Skip to content

Commit

Permalink
e2e testing support volcano gang-scheduler (#1831)
Browse files Browse the repository at this point in the history
put patching gang-scheduler-name before installing gang-scheduler-plugin

Signed-off-by: lowang-bh <[email protected]>
  • Loading branch information
lowang-bh authored Jun 17, 2023
1 parent 0318771 commit 15ea54b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ jobs:
- kubernetes-version: v1.25.2
gang-scheduler-name: "scheduler-plugins"
python-version: "3.10"
- kubernetes-version: v1.26.4
gang-scheduler-name: "volcano"
python-version: "3.9"
- kubernetes-version: v1.24.6
gang-scheduler-name: "volcano"
python-version: "3.10"
- kubernetes-version: v1.25.2
gang-scheduler-name: "volcano"
python-version: "3.10"

steps:
- name: Checkout
Expand Down
18 changes: 18 additions & 0 deletions scripts/gha/setup-training-operator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,16 @@ if [ "${GANG_SCHEDULER_NAME}" = "scheduler-plugins" ]; then
echo "Configure gang-scheduling using scheduler-plugins to training-operator"
kubectl patch -n kubeflow deployments training-operator --type='json' \
-p='[{"op": "add", "path": "/spec/template/spec/containers/0/command/1", "value": "--gang-scheduler-name=scheduler-plugins"}]'
elif [ "${GANG_SCHEDULER_NAME}" = "volcano" ]; then
VOLCANO_SCHEDULER_VERSION=$(go list -m -f "{{.Version}}" volcano.sh/apis)

# patch scheduler first so that it is ready when scheduler-deployment installing finished
echo "Configure gang-scheduling using volcano to training-operator"
kubectl patch -n kubeflow deployments training-operator --type='json' \
-p='[{"op": "add", "path": "/spec/template/spec/containers/0/command/1", "value": "--gang-scheduler-name=volcano"}]'

echo "Installing volcano scheduler ${VOLCANO_SCHEDULER_VERSION}..."
kubectl apply -f https://raw.githubusercontent.com/volcano-sh/volcano/${VOLCANO_SCHEDULER_VERSION}/installer/volcano-development.yaml
fi

TIMEOUT=30
Expand All @@ -54,6 +64,14 @@ if [ "${GANG_SCHEDULER_NAME}" = "scheduler-plugins" ]; then
(kubectl get pods -n scheduler-plugins && kubectl describe pods -n scheduler-plugins; exit 1)
fi

# wait for volcano up
if [ "${GANG_SCHEDULER_NAME}" = "volcano" ]; then
kubectl rollout status deployment -n volcano-system volcano-admission --timeout "${TIMEOUT}s" && \
kubectl rollout status deployment -n volcano-system volcano-scheduler --timeout "${TIMEOUT}s" && \
kubectl rollout status deployment -n volcano-system volcano-controllers --timeout "${TIMEOUT}s" || \
(kubectl get pods -n volcano-system && kubectl describe pods -n volcano-system; exit 1)
fi

kubectl version
kubectl cluster-info
kubectl get nodes
Expand Down

0 comments on commit 15ea54b

Please sign in to comment.