Skip to content

Commit 25188ea

Browse files
committed
adding ci for microk8s
1 parent 5eb873b commit 25188ea

2 files changed

Lines changed: 92 additions & 5 deletions

File tree

.github/workflows/deploy-to-aks.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@ jobs:
2828
K8S_VERSION="1.32"
2929
# ${{ inputs.k8s_version }}
3030
echo "K8S_VERSION=${K8S_VERSION}" >> $GITHUB_ENV
31-
CHARMED_SPARK_VERSION="3.4"
32-
# ${{ inputs.charmed_spark_version }}
33-
echo "CHARMED_SPARK_VERSION=${CHARMED_SPARK_VERSION}" >> $GITHUB_ENV
31+
3432
JUJU_VERSION="3.6"
3533
echo "JUJU_VERSION=${JUJU_VERSION}" >> $GITHUB_ENV
3634
@@ -56,9 +54,8 @@ jobs:
5654
- name: Create resource group and cluster
5755
run: |
5856
_K8S_VERSION=${{ env.K8S_VERSION }}
59-
_SPARK_VERSION=${{ env.CHARMED_SPARK_VERSION }}
6057
# Renaming of the version to use _ instead of .
61-
RUN_VERSION="spark-${_K8S_VERSION//./_}-${_SPARK_VERSION//./_}"
58+
RUN_VERSION="spark-${_K8S_VERSION//./_}"
6259
RESOURCE_GROUP=${RUN_VERSION}_rg
6360
NAME=${RUN_VERSION}_aks
6461
LOCATION=westeurope
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
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

Comments
 (0)