diff --git a/.github/workflows/test-cluster-config.yaml b/.github/workflows/test-cluster-config.yaml new file mode 100644 index 0000000000..de8adce1bc --- /dev/null +++ b/.github/workflows/test-cluster-config.yaml @@ -0,0 +1,78 @@ +name: Test Cluster Config +on: + workflow_dispatch: + inputs: + cluster_config: + description: 'Which cluster config type? (options are: "gpu")' + required: true + from_branch: + description: 'Which branch to source release branch from? (default: master)' + required: false + default: 'master' +jobs: + create-release-branch: + runs-on: ubuntu-latest + steps: + - name: validate version + run: echo "${{github.event.inputs.cluster_config}}" | grep -E '^gpu$' + - uses: actions/checkout@v2 + with: + ref: ${{github.event.inputs.from_branch}} + - name: Setup SSH Keys and known_hosts + env: + SSH_AUTH_SOCK: /tmp/ssh_agent.sock + run: | + ssh-agent -a $SSH_AUTH_SOCK > /dev/null + - name: install go + uses: actions/setup-go@v2 + with: + go-version: '^1.16' + - name: Install helm + run: | + curl https://baltocdn.com/helm/signing.asc | sudo apt-key add - + sudo apt-get install apt-transport-https --yes + echo "deb https://baltocdn.com/helm/stable/debian/ all main" | sudo tee /etc/apt/sources.list.d/helm-stable-debian.list + sudo apt-get update + sudo apt-get install helm + - name: Install k + run: | + sudo curl -o /usr/local/bin/k https://raw.githubusercontent.com/jakepearson/k/master/k + sudo chmod +x /usr/local/bin/k + - name: Build aks-engine binary + run: make build-binary + - name: Validate gpu + docker scenario + if: ${{ github.event.inputs.cluster_config == 'gpu' }} + env: + SSH_AUTH_SOCK: /tmp/ssh_agent.sock + ORCHESTRATOR_RELEASE: "1.22" + CLUSTER_DEFINITION: "examples/kubernetes-gpu/kubernetes.json" + GINKGO_FOCUS: "should be able to run a nvidia-gpu job" + SUBSCRIPTION_ID: ${{ secrets.TEST_AZURE_SUB_ID }} + CLIENT_ID: ${{ secrets.TEST_AZURE_SP_ID }} + CLIENT_SECRET: ${{ secrets.TEST_AZURE_SP_PW }} + LOCATION: "westus2" + TENANT_ID: ${{ secrets.TEST_AZURE_TENANT_ID }} + CLEANUP_ON_EXIT: true + CLEANUP_IF_FAIL: true + CONTAINER_RUNTIME: "docker" + SKIP_LOGS_COLLECTION: true + AZURE_CORE_ONLY_SHOW_ERRORS: True + run: make test-kubernetes + - name: Validate gpu + containerd scenario + if: ${{ github.event.inputs.cluster_config == 'gpu' }} + env: + SSH_AUTH_SOCK: /tmp/ssh_agent.sock + ORCHESTRATOR_RELEASE: "1.22" + CLUSTER_DEFINITION: "examples/kubernetes-gpu/kubernetes.json" + GINKGO_FOCUS: "should be able to run a nvidia-gpu job" + SUBSCRIPTION_ID: ${{ secrets.TEST_AZURE_SUB_ID }} + CLIENT_ID: ${{ secrets.TEST_AZURE_SP_ID }} + CLIENT_SECRET: ${{ secrets.TEST_AZURE_SP_PW }} + LOCATION: "westus2" + TENANT_ID: ${{ secrets.TEST_AZURE_TENANT_ID }} + CLEANUP_ON_EXIT: true + CLEANUP_IF_FAIL: true + CONTAINER_RUNTIME: "containerd" + SKIP_LOGS_COLLECTION: true + AZURE_CORE_ONLY_SHOW_ERRORS: True + run: make test-kubernetes