forked from kubeflow/manifests
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Training operator CICD improvements (kubeflow#2779)
* Add the networkpolicies Signed-off-by: juliusvonkohout <[email protected]> * rework the training operator tests Signed-off-by: juliusvonkohout <[email protected]> * fix the comments Signed-off-by: juliusvonkohout <[email protected]> * fix filename Signed-off-by: juliusvonkohout <[email protected]> * try to fix the permissions Signed-off-by: juliusvonkohout <[email protected]> * try to fix the permissions Signed-off-by: juliusvonkohout <[email protected]> * change to the user namespace Signed-off-by: juliusvonkohout <[email protected]> * update the image to rc.1 Signed-off-by: juliusvonkohout <[email protected]> * fixes Signed-off-by: juliusvonkohout <[email protected]> * fixes Signed-off-by: juliusvonkohout <[email protected]> * fixes Signed-off-by: juliusvonkohout <[email protected]> * fixes Signed-off-by: juliusvonkohout <[email protected]> * fixes Signed-off-by: juliusvonkohout <[email protected]> --------- Signed-off-by: juliusvonkohout <[email protected]>
- Loading branch information
1 parent
591349d
commit 5ac0da5
Showing
10 changed files
with
116 additions
and
71 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
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 was deleted.
Oops, something went wrong.
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,57 @@ | ||
name: Build & Apply Training Operator manifests in KinD | ||
on: | ||
pull_request: | ||
paths: | ||
- .github/workflows/training_operator_test.yaml | ||
- apps/training-operator/upstream/** | ||
- tests/gh-actions/kind-cluster.yaml | ||
- tests/gh-actions/install_kind.sh | ||
- tests/gh-actions/install_kustomize.sh | ||
- tests/gh-actions/install_istio.sh | ||
- common/istio*/** | ||
- tests/gh-actions/kf-objects/tfjob.yaml | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install KinD | ||
run: ./tests/gh-actions/install_kind.sh | ||
|
||
- name: Create KinD Cluster | ||
run: kind create cluster --config tests/gh-actions/kind-cluster.yaml | ||
|
||
- name: Install kustomize | ||
run: ./tests/gh-actions/install_kustomize.sh | ||
|
||
- name: Install kubectl | ||
run: ./tests/gh-actions/install_kubectl.sh | ||
|
||
- name: Install Istio with external authentication | ||
run: ./tests/gh-actions/install_istio_with_ext_auth.sh | ||
|
||
- name: Install cert-manager | ||
run: ./tests/gh-actions/install_cert_manager.sh | ||
|
||
- name: Create kubeflow namespace | ||
run: kustomize build common/kubeflow-namespace/base | kubectl apply -f - | ||
|
||
- name: Install KF Multi Tenancy | ||
run: ./tests/gh-actions/install_multi_tenancy.sh | ||
|
||
- name: Install kubeflow-istio-resources | ||
run: kustomize build common/istio-1-22/kubeflow-istio-resources/base | kubectl apply -f - | ||
|
||
- name: Create KF Profile | ||
run: kustomize build common/user-namespace/base | kubectl apply -f - | ||
|
||
- name: Install training operator | ||
run: ./tests/gh-actions/install_training_operator.sh | ||
|
||
- name: Create a PyTorchJob | ||
run: | | ||
kubectl create -f tests/gh-actions/kf-objects/training_operator_job.yaml -n kubeflow-user-example-com | ||
kubectl wait --for=condition=Succeeded PyTorchJob pytorch-simple -n kubeflow-user-example-com --timeout 600s |
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
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,9 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
echo "Installing training operator ..." | ||
|
||
cd apps/training-operator/upstream | ||
kustomize build overlays/kubeflow | kubectl apply -f - | ||
kubectl wait --for=condition=Ready pods --all --all-namespaces --timeout=600s \ | ||
--field-selector=status.phase!=Succeeded | ||
cd - |
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 was deleted.
Oops, something went wrong.
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,40 @@ | ||
# from https://github.com/kubeflow/training-operator/blob/master/examples/pytorch/simple.yaml | ||
# and disabled istio as stated in the documentation https://www.kubeflow.org/docs/components/training/user-guides/pytorch/ | ||
apiVersion: "kubeflow.org/v1" | ||
kind: PyTorchJob | ||
metadata: | ||
name: pytorch-simple | ||
spec: | ||
pytorchReplicaSpecs: | ||
Master: | ||
replicas: 1 | ||
restartPolicy: OnFailure | ||
template: | ||
metadata: | ||
annotations: | ||
sidecar.istio.io/inject: "false" | ||
spec: | ||
containers: | ||
- name: pytorch | ||
image: docker.io/kubeflowkatib/pytorch-mnist:v1beta1-45c5727 | ||
imagePullPolicy: Always | ||
command: | ||
- "python3" | ||
- "/opt/pytorch-mnist/mnist.py" | ||
- "--epochs=1" | ||
Worker: | ||
replicas: 1 | ||
restartPolicy: OnFailure | ||
template: | ||
metadata: | ||
annotations: | ||
sidecar.istio.io/inject: "false" | ||
spec: | ||
containers: | ||
- name: pytorch | ||
image: docker.io/kubeflowkatib/pytorch-mnist:v1beta1-45c5727 | ||
imagePullPolicy: Always | ||
command: | ||
- "python3" | ||
- "/opt/pytorch-mnist/mnist.py" | ||
- "--epochs=1" |