1+ name : Create AKS cluster, deploy Kyuubi and run bundle test
2+ on :
3+ pull_request :
4+ # workflow_dispatch:
5+ # inputs:
6+ # k8s_version:
7+ # description: 'Kubernetes version to be used for the AKS cluster'
8+ # required: false
9+ # default: "1.32"
10+ # charmed_spark_version:
11+ # description: 'Charmed Spark version to be tested'
12+ # required: false
13+ # default: "3.4"
14+ # juju_version:
15+ # description: 'Charmed Spark version to be tested'
16+ # required: false
17+ # default: "3.6"
18+
19+ jobs :
20+ aks-deployment :
21+ runs-on : ubuntu-24.04
22+ steps :
23+ - name : Checkout repository
24+ uses : actions/checkout@v4
25+
26+ - name : Update ENV variables from inputs if available
27+ run : |
28+ K8S_VERSION="1.32"
29+ # ${{ inputs.k8s_version }}
30+ echo "K8S_VERSION=${K8S_VERSION}" >> $GITHUB_ENV
31+
32+ JUJU_VERSION="3.6"
33+ echo "JUJU_VERSION=${JUJU_VERSION}" >> $GITHUB_ENV
34+
35+ - name : Install CLI tools
36+ run : |
37+ # Install python tooling
38+ pipx install tox
39+ pipx install poetry
40+
41+ # Install general tools via snaps
42+ sudo snap install charmcraft --classic
43+ sudo snap install terraform --channel latest/stable --classic
44+
45+ # Check versions
46+ terraform --version
47+
48+ - name : Setup operator environment
49+ uses : charmed-kubernetes/actions-operator@main
50+ with :
51+ juju-channel : ${{ env.JUJU_VERSION }}/stable
52+ provider : microk8s
53+ channel : ${{ env.K8S_VERSION }}-strict/stable
54+ microk8s-group : snap_microk8s
55+ microk8s-addons : " rbac dns minio metallb:10.64.140.43-10.64.140.49"
56+
57+ - name : Bootstrap controller
58+ run : |
59+ juju bootstrap microk8s micro
60+
61+ - name : Deploy Kyuubi Reference Architecture
62+ working-directory : ./python/tests/reference_architecture/azure
63+ run : |
64+ terraform init
65+ source get-vars.sh
66+ terraform apply -auto-approve
67+
68+ juju wait-for model cos --query='forEach(units, unit => unit.agent-status=="idle" && unit.workload-status=="active")' --timeout 30m0s
69+ juju wait-for model spark --query='forEach(units, unit => unit.agent-status=="idle" && unit.workload-status=="active")' --timeout 30m0s
70+
71+ - name : Get juju status
72+ run : |
73+ juju status --model cos
74+ juju status --model spark
75+
76+ - name : Run Kyuubi UATs
77+ working-directory : ./python
78+ run : |
79+ tox -e integration-kyuubi -- --no-deploy --keep-models --model spark --cos-model cos
80+
81+ - name : Get juju debug logs
82+ run : juju debug-log --replay --no-tail
83+ if : failure() || cancelled()
84+
85+ - name : Tear down deployment
86+ if : always()
87+ working-directory : ./python/tests/reference_architecture/azure
88+ run : |
89+ source get-vars.sh
90+ terraform destroy -auto-approve
0 commit comments