Create AKS cluster, deploy CKF and run bundle test #5
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
name: Create AKS cluster, deploy CKF and run bundle test | |
on: | |
workflow_dispatch: | |
inputs: | |
bundle_version: | |
description: 'Comma-separated list of Bundle versions e.g. "1.7","1.8"' | |
default: '"1.7"' | |
required: true | |
schedule: | |
- cron: "34 * * * *" | |
# - cron: "23 0 * * 2" | |
jobs: | |
deploy-ckf-to-aks: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
bundle_version: ${{ fromJSON(format('[{0}]', inputs.bundle_version || '"1.7","1.8"')) }} | |
env: | |
JUJU_VERSION: 3.1 | |
steps: | |
- name: print input | |
run: | | |
echo ${{ matrix.bundle_version }} | |
VERSION=${{ matrix.bundle_version }} | |
VERSION_WITHOUT_DOT="${VERSION//.}" | |
echo VERSION WITHOUT DOT = $VERSION_WITHOUT_DOT | |
echo ${${{ matrix.bundle_version }}//.} | |
# - name: Checkout repository | |
# uses: actions/checkout@v2 | |
# - name: Install CLI tools tox charmcraft juju | |
# run: | | |
# python -m pip install --upgrade pip | |
# pip install tox | |
# sudo snap install juju --classic --channel=${{ env.JUJU_VERSION }}/stable | |
# sudo snap install charmcraft --classic | |
# juju version | |
# - name: Azure login | |
# uses: azure/login@v1 | |
# with: | |
# client-id: ${{ secrets.AZURE_CLIENT_ID }} | |
# tenant-id: ${{ secrets.AZURE_TENANT_ID }} | |
# subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} | |
# - name: Create cluster | |
# run: | | |
# VERSION=${{ matrix.bundle_version }} | |
# VERSION_WITHOUT_DOT="${VERSION//.}" | |
# echo $VERSION_WITHOUT_DOT | |
# az group create --name kf${VERSION_WITHOUT_DOT}ResourceGroup --location westeurope | |
# - name: Setup juju | |
# run: | | |
# juju add-k8s aks --client | |
# juju bootstrap aks aks-controller | |
# juju add-model kubeflow | |
# - name: Test bundle deployment | |
# run: | | |
# tox -vve test_bundle_deployment- -- --model kubeflow --keep-models -vv -s | |
# # On failure, capture debugging resources | |
# - name: Get juju status | |
# run: juju status | |
# if: failure() | |
# - name: Get juju debug logs | |
# run: juju debug-log --replay --no-tail | |
# if: failure() | |
# - name: Get all kubernetes resources | |
# run: kubectl get all -A | |
# if: failure() | |
# - name: Get logs from pods with status = Pending | |
# run: kubectl -n kubeflow get pods | tail -n +2 | grep Pending | awk '{print $1}' | xargs -n1 kubectl -n kubeflow logs --all-containers=true --tail 100 | |
# if: failure() | |
# - name: Get logs from pods with status = Failed | |
# run: kubectl -n kubeflow get pods | tail -n +2 | grep Failed | awk '{print $1}' | xargs -n1 kubectl -n kubeflow logs --all-containers=true --tail 100 | |
# if: failure() | |
# - name: Get logs from pods with status = CrashLoopBackOff | |
# run: kubectl -n kubeflow get pods | tail -n +2 | grep CrashLoopBackOff | awk '{print $1}' | xargs -n1 kubectl -n kubeflow logs --all-containers=true --tail 100 | |
# if: failure() | |
# - name: Delete AKS cluster | |
# if: always() | |
# run: | | |
# # eksctl delete cluster --region eu-central-1 --name=kubeflow-test |