Skip to content

Commit

Permalink
Change integration test sysytem from KinD Cluster to Minikube Cluster (
Browse files Browse the repository at this point in the history
  • Loading branch information
tenzen-y authored Jun 16, 2022
1 parent 2c8758b commit f7261de
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 46 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/darts-cifar10-e2e-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: E2E Test with darts-cnn-cifar10
on:
- pull_request

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
e2e:
runs-on: ubuntu-20.04
Expand All @@ -25,9 +28,8 @@ jobs:
strategy:
fail-fast: false
matrix:
# Detail: https://hub.docker.com/r/kindest/node
# TODO (tenzen-y): We need to consider running tests on more kubernetes versions.
# kubernetes-version: ["v1.20.15", "v1.21.12", "v1.22.9", "v1.23.6", "v1.24.1"]
kubernetes-version: ["v1.21.12", "v1.22.9", "v1.23.6"]
# kubernetes-version: ["v1.20.15", "v1.21.13", "v1.22.10", "v1.23.7", "v1.24.1"]
kubernetes-version: ["v1.21.13", "v1.22.10", "v1.23.7"]
# Comma Delimited
experiments: ["darts-cpu"]
8 changes: 5 additions & 3 deletions .github/workflows/enas-cifar10-e2e-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: E2E Test with enas-cnn-cifar10
on:
- pull_request

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
e2e:
runs-on: ubuntu-20.04
Expand All @@ -25,9 +28,8 @@ jobs:
strategy:
fail-fast: false
matrix:
# Detail: https://hub.docker.com/r/kindest/node
# TODO (tenzen-y): We need to consider running tests on more kubernetes versions.
# kubernetes-version: ["v1.20.15", "v1.21.12", "v1.22.9", "v1.23.6", "v1.24.1"]
kubernetes-version: ["v1.21.12", "v1.22.9", "v1.23.6"]
# kubernetes-version: ["v1.20.15", "v1.21.13", "v1.22.10", "v1.23.7", "v1.24.1"]
kubernetes-version: ["v1.21.13", "v1.22.10", "v1.23.7"]
# Comma Delimited
experiments: ["enas-cpu"]
12 changes: 7 additions & 5 deletions .github/workflows/katib-ui-e2e-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: E2E Test for katib-ui
on:
- pull_request

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
e2e:
runs-on: ubuntu-20.04
Expand All @@ -15,16 +18,15 @@ jobs:
with:
kubernetes-version: ${{ matrix.kubernetes-version }}

- name: Set Up KinD Cluster
run: ./test/e2e/v1beta1/scripts/gh-actions/setup-kind.sh true
- name: Set Up Minikube Cluster
run: ./test/e2e/v1beta1/scripts/gh-actions/setup-minikube.sh true

- name: Start Katib
run: ./test/e2e/v1beta1/scripts/gh-actions/setup-katib.sh true false

strategy:
fail-fast: false
matrix:
# Detail: https://hub.docker.com/r/kindest/node
# TODO (tenzen-y): We need to consider running tests on more kubernetes versions.
# kubernetes-version: ["v1.20.15", "v1.21.12", "v1.22.9", "v1.23.6", "v1.24.1"]
kubernetes-version: ["v1.21.12", "v1.22.9", "v1.23.6"]
# kubernetes-version: ["v1.20.15", "v1.21.13", "v1.22.10", "v1.23.7", "v1.24.1"]
kubernetes-version: ["v1.21.13", "v1.22.10", "v1.23.7"]
8 changes: 5 additions & 3 deletions .github/workflows/mxnet-mnist-e2e-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: E2E Test with mxnet-mnist
on:
- pull_request

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
e2e:
runs-on: ubuntu-20.04
Expand All @@ -25,10 +28,9 @@ jobs:
strategy:
fail-fast: false
matrix:
# Detail: https://hub.docker.com/r/kindest/node
# TODO (tenzen-y): We need to consider running tests on more kubernetes versions.
# kubernetes-version: ["v1.20.15", "v1.21.12", "v1.22.9", "v1.23.6", "v1.24.1"]
kubernetes-version: ["v1.21.12", "v1.22.9", "v1.23.6"]
# kubernetes-version: ["v1.20.15", "v1.21.13", "v1.22.10", "v1.23.7", "v1.24.1"]
kubernetes-version: ["v1.21.13", "v1.22.10", "v1.23.7"]
# Comma Delimited
experiments:
# suggestion-hyperopt
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/pytorch-mnist-e2e-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: E2E Test with pytorch-mnist
on:
- pull_request

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
e2e:
runs-on: ubuntu-20.04
Expand All @@ -26,10 +29,9 @@ jobs:
strategy:
fail-fast: false
matrix:
# Detail: https://hub.docker.com/r/kindest/node
# TODO (tenzen-y): We need to consider running tests on more kubernetes versions.
# kubernetes-version: ["v1.20.15", "v1.21.12", "v1.22.9", "v1.23.6", "v1.24.1"]
kubernetes-version: ["v1.21.12", "v1.22.9", "v1.23.6"]
# kubernetes-version: ["v1.20.15", "v1.21.13", "v1.22.10", "v1.23.7", "v1.24.1"]
kubernetes-version: ["v1.21.13", "v1.22.10", "v1.23.7"]
# Comma Delimited
experiments:
- "file-metrics-collector,pytorchjob-mnist"
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/template-e2e-test/action.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Template for e2e tests.

inputs:
cluster_name:
required: false
type: string
default: katib-e2e-cluster
experiments:
required: true
type: string
Expand All @@ -22,9 +18,9 @@ inputs:
runs:
using: composite
steps:
- name: Set Up KinD Cluster
- name: Set Up Minikube Cluster
shell: bash
run: ./test/e2e/v1beta1/scripts/gh-actions/setup-kind.sh ${{ inputs.katib-ui }} ${{ inputs.trial-images }} ${{ inputs.cluster_name }} ${{ inputs.experiments }}
run: ./test/e2e/v1beta1/scripts/gh-actions/setup-minikube.sh ${{ inputs.katib-ui }} ${{ inputs.trial-images }} ${{ inputs.experiments }}

- name: Set Up Katib
shell: bash
Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/template-setup-e2e-test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,17 @@ inputs:
kubernetes-version:
required: true
type: string
cluster_name:
required: false
type: string
default: katib-e2e-cluster

runs:
using: composite
steps:
- name: Set Up KinD Cluster
uses: helm/kind-action@v1.2.0
- name: Set Up Minikube Cluster
uses: manusa/actions-setup-minikube@v2.6.0
with:
version: v0.13.0
node_image: kindest/node:${{ inputs.kubernetes-version }}
cluster_name: ${{ inputs.cluster_name }}
wait: 120s
minikube version: "v1.25.2"
kubernetes version: ${{ inputs.kubernetes-version }}
start args: --driver none --wait-timeout=60s
github token: ${{ env.GITHUB_TOKEN }}

- name: Set Up Docker Buildx
uses: docker/setup-buildx-action@v1
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/tf-mnist-with-summaries-e2e-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: E2E Test with tf-mnist-with-summaries
on:
- pull_request

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
e2e:
runs-on: ubuntu-20.04
Expand All @@ -26,9 +29,8 @@ jobs:
strategy:
fail-fast: false
matrix:
# Detail: https://hub.docker.com/r/kindest/node
# TODO (tenzen-y): We need to consider running tests on more kubernetes versions.
# kubernetes-version: ["v1.20.15", "v1.21.12", "v1.22.9", "v1.23.6", "v1.24.1"]
kubernetes-version: ["v1.21.12", "v1.22.9", "v1.23.6"]
# kubernetes-version: ["v1.20.15", "v1.21.13", "v1.22.10", "v1.23.7", "v1.24.1"]
kubernetes-version: ["v1.21.13", "v1.22.10", "v1.23.7"]
# Comma Delimited
experiments: ["tfjob-mnist-with-summaries"]
9 changes: 4 additions & 5 deletions test/e2e/v1beta1/scripts/gh-actions/build-load.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ set -o nounset
cd "$(dirname "$0")"

TRIAL_IMAGES=${1:-""}
CLUSTER_NAME=${2:-""}
EXPERIMENTS=${3:-""}
DEPLOY_KATIB_UI=${4:-false}
EXPERIMENTS=${2:-""}
DEPLOY_KATIB_UI=${3:-false}

REGISTRY="docker.io/kubeflowkatib"
TAG="e2e-test"
Expand Down Expand Up @@ -55,8 +54,8 @@ _build_containers() {
_load_kind_cluster() {
CONTAINER_NAME=${1:-"katib-controller"}

echo -e "\nLoading $CONTAINER_NAME image to $CLUSTER_NAME...\n"
kind load docker-image "$REGISTRY/$CONTAINER_NAME:$TAG" --name "$CLUSTER_NAME"
echo -e "\n\nLoading $CONTAINER_NAME image...\n\n"
minikube image load "$REGISTRY/$CONTAINER_NAME:$TAG"
}

_install_tools() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,12 @@ cd "$(dirname "$0")"

DEPLOY_KATIB_UI=${1:-false}
TRIAL_IMAGES=${2:-""}
CLUSTER_NAME=${3:-"katib-e2e-cluster"}
EXPERIMENTS=${4:-""}
EXPERIMENTS=${3:-""}

echo "Start to setup KinD Kubernetes Cluster"
kubectl wait --for condition=ready --timeout=5m node "$CLUSTER_NAME-control-plane"
echo "Start to setup Minikube Kubernetes Cluster"
kubectl version
kubectl cluster-info
kubectl get nodes

echo "Build and Load container images"
./build-load.sh "$TRIAL_IMAGES" "$CLUSTER_NAME" "$EXPERIMENTS" "$DEPLOY_KATIB_UI"
./build-load.sh "$TRIAL_IMAGES" "$EXPERIMENTS" "$DEPLOY_KATIB_UI"

0 comments on commit f7261de

Please sign in to comment.