-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (49 loc) · 1.76 KB
/
new-microk8s-ppc64le.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
name: MicroK8s with QEMU (ppc64le)
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
microk8s-setup:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up QEMU for ppc64le emulation
uses: docker/setup-qemu-action@v3
with:
platforms: linux/ppc64le
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y qemu-system-ppc64
- name: Create a minimal Ubuntu 20.04 LTS rootfs for PPC64LE
run: |
wget http://cdimage.ubuntu.com/ubuntu-base/releases/20.04/release/ubuntu-base-20.04.4-base-ppc64el.tar.gz
tar -xvf ubuntu-base-20.04.4-base-ppc64el.tar.gz
sudo mv ubuntu-base-20.04.4-base-ppc64el /mnt
- name: Create QEMU virtual machine
run: |
qemu-system-ppc64 -m 2048 -vnc :0 -kernel /mnt/boot/vmlinuz-5.4.0-42-generic -initrd /mnt/boot/initrd.img-5.4.0-42-generic -append "root=/dev/sda1" -hda /mnt/rootfs.img &
sleep 30
- name: Install MicroK8s
run: |
sudo snap install microk8s --classic
sudo microk8s.kubectl config set-cluster microk8s --server=https://localhost:16443
sudo microk8s.kubectl config set-context microk8s --cluster=microk8s
sudo microk8s.kubectl config use-context microk8s
- name: Start MicroK8s cluster
run: |
sudo microk8s.start
sleep 30
- name: Test cluster architecture
run: |
ARCH=$(sudo microk8s.kubectl get nodes -o jsonpath='{.items[0].status.nodeInfo.architecture}')
if [ "$ARCH" == "ppc64le" ]; then
echo "true"
else
echo "false"
fi