-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into add-vm-metrics-train
- Loading branch information
Showing
29 changed files
with
1,087 additions
and
2,198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,7 +83,7 @@ jobs: | |
uses: actions/checkout@v4 | ||
|
||
- name: use Kepler action to deploy cluster | ||
uses: sustainable-computing-io/[email protected].7 | ||
uses: sustainable-computing-io/[email protected].9 | ||
with: | ||
ebpfprovider: libbpf | ||
cluster_provider: kind | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,15 +35,13 @@ env: | |
|
||
jobs: | ||
run-integration: | ||
if: ${{ (inputs.base_change != 'true') || ( (inputs.base_change == 'true') && (inputs.docker_secret == 'true') ) }} | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: use Kepler action to deploy cluster | ||
uses: sustainable-computing-io/[email protected].7 | ||
uses: sustainable-computing-io/[email protected].9 | ||
with: | ||
runningBranch: kind | ||
cluster_provider: kind | ||
local_dev_cluster_version: v0.0.5 | ||
- name: load kepler image | ||
run: | | ||
docker pull ${{ env.KEPLER_IMAGE }} | ||
|
@@ -74,24 +72,31 @@ jobs: | |
- name: test deploying with only estimator | ||
run: | | ||
make deploy | ||
make e2e-test | ||
./tests/e2e_test.sh --estimator ${{ inputs.additional_opts }} | ||
make cleanup | ||
env: | ||
OPTS: ESTIMATOR${{ inputs.additional_opts }} | ||
OPTS: ESTIMATOR | ||
KEPLER_IMAGE_VERSION: ${{ inputs.kepler_tag }} | ||
- name: test deploying with only server | ||
run: | | ||
make deploy | ||
make e2e-test | ||
./tests/e2e_test.sh --server ${{ inputs.additional_opts }} | ||
make cleanup | ||
env: | ||
OPTS: SERVER${{ inputs.additional_opts }} | ||
OPTS: SERVER | ||
KEPLER_IMAGE_VERSION: ${{ inputs.kepler_tag }} | ||
- name: test deploying with estimator and model server | ||
run: | | ||
make deploy | ||
make e2e-test | ||
./tests/e2e_test.sh --estimator --server ${{ inputs.additional_opts }} | ||
make cleanup | ||
env: | ||
OPTS: ESTIMATOR SERVER${{ inputs.additional_opts }} | ||
OPTS: ESTIMATOR SERVER | ||
KEPLER_IMAGE_VERSION: ${{ inputs.kepler_tag }} | ||
|
||
- name: upload artifacts on failure | ||
if: ${{ failure() }} | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: integration-test-artifacts | ||
path: tmp/e2e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,11 +38,9 @@ env: | |
BASE_IMAGE: ${{ inputs.image_repo }}/kepler_model_server_base:${{ inputs.image_tag }} | ||
IMAGE: ${{ inputs.image_repo }}/kepler_model_server:${{ inputs.image_tag }} | ||
KIND_CLUSTER_NAME: kind | ||
KUBECONFIG: /tmp/kubeconfig | ||
|
||
jobs: | ||
tekton-test: | ||
if: ${{ (inputs.base_change != 'true') || ( (inputs.base_change == 'true') && (inputs.docker_secret == 'true') ) }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
|
@@ -59,7 +57,7 @@ jobs: | |
run: | | ||
docker build -t $IMAGE -f dockerfiles/Dockerfile . | ||
- name: use Kepler action to deploy cluster | ||
uses: sustainable-computing-io/[email protected].7 | ||
uses: sustainable-computing-io/[email protected].9 | ||
with: | ||
ebpfprovider: libbpf | ||
cluster_provider: kind | ||
|
@@ -73,6 +71,7 @@ jobs: | |
- name: Install Kepler | ||
working-directory: model_training | ||
run: | | ||
export KUBECONFIG_ROOT_DIR=/tmp/kubeconfig | ||
./script.sh deploy_kepler | ||
./script.sh deploy_prom_dependency | ||
podname=$(kubectl get pods -oname -nkepler) | ||
|
@@ -84,17 +83,20 @@ jobs: | |
- name: Prepare PVC | ||
working-directory: model_training/tekton | ||
run: | | ||
export KUBECONFIG_ROOT_DIR=/tmp/kubeconfig | ||
kubectl apply -f pvc/hostpath.yaml | ||
- name: Deploy Tasks and Pipelines | ||
working-directory: model_training/tekton | ||
run: | | ||
export KUBECONFIG_ROOT_DIR=/tmp/kubeconfig | ||
kubectl apply -f tasks | ||
kubectl apply -f tasks/s3 | ||
kubectl apply -f pipelines | ||
- name: Run Tekton Collect | ||
run: | | ||
export KUBECONFIG_ROOT_DIR=/tmp/kubeconfig | ||
cat <<EOF | kubectl apply -f - | ||
apiVersion: tekton.dev/v1 | ||
kind: PipelineRun | ||
|
@@ -131,6 +133,7 @@ jobs: | |
- name: Run Tekton Retrain | ||
run: | | ||
export KUBECONFIG_ROOT_DIR=/tmp/kubeconfig | ||
cat <<EOF | kubectl apply -f - | ||
apiVersion: tekton.dev/v1 | ||
kind: PipelineRun | ||
|
@@ -166,6 +169,7 @@ jobs: | |
- name: Run Tekton Complete Retrain | ||
run: | | ||
export KUBECONFIG_ROOT_DIR=/tmp/kubeconfig | ||
cat <<EOF | kubectl apply -f - | ||
apiVersion: tekton.dev/v1 | ||
kind: PipelineRun | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -116,7 +116,7 @@ jobs: | |
sudo pip3 install awscli | ||
- name: use Kepler action to deploy cluster | ||
uses: sustainable-computing-io/[email protected].7 | ||
uses: sustainable-computing-io/[email protected].9 | ||
with: | ||
ebpfprovider: libbpf | ||
cluster_provider: kind | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# | ||
# Copyright 2024. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
is_fn() { | ||
[[ $(type -t "$1") == "function" ]] | ||
return $? | ||
} | ||
|
||
header() { | ||
local title=" πππ $* πππ " | ||
|
||
local len=40 | ||
if [[ ${#title} -gt $len ]]; then | ||
len=${#title} | ||
fi | ||
|
||
echo -e "\n\n \033[1m${title}\033[0m" | ||
echo -n "βββββ" | ||
printf 'β%.0s' $(seq "$len") | ||
echo "βββββββ" | ||
|
||
} | ||
|
||
info() { | ||
echo -e " π $*" >&2 | ||
} | ||
|
||
err() { | ||
echo -e " π± $*" >&2 | ||
} | ||
|
||
warn() { | ||
echo -e " ο± $*" >&2 | ||
} | ||
|
||
ok() { | ||
echo -e " β $*" >&2 | ||
} | ||
|
||
skip() { | ||
echo -e " π SKIP: $*" >&2 | ||
} | ||
|
||
fail() { | ||
echo -e " β FAIL: $*" >&2 | ||
} | ||
|
||
info_run() { | ||
echo -e " ξ $*\n" >&2 | ||
} | ||
|
||
run() { | ||
echo -e " β― $*\n" >&2 | ||
"$@" | ||
} | ||
|
||
die() { | ||
echo -e "\n β $* " | ||
echo -e "ββββββββββββββββββββ βοΈβοΈβοΈ ββββββββββββββββββββββββ\n" | ||
exit 1 | ||
} | ||
|
||
line() { | ||
local len="$1" | ||
local style="${2:-thin}" | ||
shift | ||
|
||
local ch='β' | ||
[[ "$style" == 'heavy' ]] && ch="β" | ||
|
||
printf "$ch%.0s" $(seq "$len") >&2 | ||
echo | ||
} |
Oops, something went wrong.