-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (83 loc) · 4.72 KB
/
microk8s.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Deploy on Microk8s (Edge)
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * *" # This will run the workflow every day at midnight UTC
jobs:
deploy-microk8s:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
name: MicroK8s
steps:
- uses: balchua/[email protected]
with:
channel: "1.30/stable"
addons: '["dns", "dashboard", "hostpath-storage", "nvidia"]'
- name: Set permissions
run: |
sudo chown -f -R $USER $HOME/.kube $HOME/.config
- name: Test MicroK8s
id: list-pods
run: |
kubectl get no
kubectl get pods -A -o wide
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Minio
id: install-minio
run: |
git clone --depth 1 --branch v6.0.1 https://github.com/minio/operator.git && kubectl apply -k operator/
sed -i 's/openebs-hostpath/microk8s-hostpath/g' ./minio-tenant-base.yaml
kubectl apply -f minio-tenant-base.yaml
echo "Sleeping for 60 seconds, give time for the operator/tenant to create the CRDs" && sleep 60
kubectl get po -A -o wide
kubectl get po -A -o wide | grep myminio-pool-0-0 | awk '{print $3}' | grep -q '2/2' && echo "myminio-pool-0-0 pod is running with status 2/2" || (echo "myminio-pool-0-0 pod is not running with status 2/2" && exit 1)
- name: Install MongoDB
id: install-mongodb
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
kubectl create namespace mongodb
sed -i 's/openebs-hostpath/microk8s-hostpath/g' ./mongodb-values.yaml
helm install mongodb -n mongodb bitnami/mongodb --values ./mongodb-values.yaml
echo "Sleeping for 90 seconds, give time for the helm chart to create the pods" && sleep 90
kubectl get pods -A -o wide
kubectl get pods -A -o wide | grep mongodb | awk '{print $3}' | grep -q '1/1' && echo "mongodb pod is running with status 1/1" || (echo "mongodb pod is not running with status 1/1" && exit 1)
- name: Install RabbitMQ
id: install-rabbitmq
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
kubectl create namespace rabbitmq
sed -i 's/openebs-hostpath/microk8s-hostpath/g' ./rabbitmq-values.yaml
helm install rabbitmq -n rabbitmq bitnami/rabbitmq --values ./rabbitmq-values.yaml
echo "Sleeping for 60 seconds, give time for the helm chart to create the pods" && sleep 60
kubectl get pods -A -o wide
kubectl get pods -A -o wide | grep rabbitmq | awk '{print $3}' | grep -q '1/1' && echo "rabbitmq pod is running with status 1/1" || (echo "rabbitmq pod is not running with status 1/1" && exit 1)
- name: Install Kerberos Vault
id: install-kerberos-vault
run: |
kubectl create namespace kerberos-vault
kubectl apply -f ./kerberos-vault-configmap.yaml -n kerberos-vault
kubectl apply -f ./kerberos-vault-deployment.yaml -n kerberos-vault
kubectl apply -f ./kerberos-vault-service.yaml -n kerberos-vault
echo "Sleeping for 30 seconds, give time for the helm chart to create the pods" && sleep 30
kubectl get pods -A -o wide
kubectl get pods -A -o wide | grep kerberos-vault | awk '{print $3}' | grep -q '1/1' && echo "kerberos-vault pod is running with status 1/1" || (echo "kerberos-vault pod is not running with status 1/1" && exit 1)
- name: Install Kerberos Agent
id: install-kerberos-agent
run: |
kubectl apply -f ./kerberos-agent-deployment.yaml
echo "Sleeping for 30 seconds, give time for the helm chart to create the pods" && sleep 30
kubectl get pods -A -o wide
kubectl get pods -A -o wide | grep agent | awk '{print $3}' | grep -q '1/1' && echo "kerberos-agent pod is running with status 1/1" || (echo "kerberos-agent pod is not running with status 1/1" && exit 1)
- name: Install Data filtering
id: install-data-filtering
run: |
sed -e '/resources/ s/^#*/#/' -i ./data-filtering-deployment.yaml
sed -e '/limits/ s/^#*/#/' -i ./data-filtering-deployment.yaml
sed -e '/nvidia/ s/^#*/#/' -i ./data-filtering-deployment.yaml
kubectl apply -f data-filtering-deployment.yaml
echo "Sleeping for 120 seconds, give time for the helm chart to create the pods" && sleep 120
kubectl get pods -A -o wide
kubectl get pods -A -o wide | grep data-filtering | awk '{print $3}' | grep -q '1/1' && echo "data-filtering pod is running with status 1/1" || (echo "data-filtering pod is not running with status 1/1" && exit 1)