From 81abb49bbf7a9dec55d25f007cd435174e21a282 Mon Sep 17 00:00:00 2001 From: Michael Schubert Date: Sun, 19 May 2019 13:31:39 +0200 Subject: [PATCH 1/3] builds: add dist-fedora.yml --- .builds/dist-fedora.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .builds/dist-fedora.yml diff --git a/.builds/dist-fedora.yml b/.builds/dist-fedora.yml new file mode 100644 index 0000000..34a6314 --- /dev/null +++ b/.builds/dist-fedora.yml @@ -0,0 +1,27 @@ +image: fedora/30 +sources: + - https://github.com/schu/kubedee +tasks: + - requirements: | + # Avoid selinux policy error; for details see + # https://gist.github.com/schu/59b253481b2a26d0e9463ea01449768b + sudo mount -t tmpfs tmpfs /sys/fs/selinux + sudo dnf install -y curl jq snapd tar + # Wait for snapd to be "seeded", otherwise we encounter + # "error: too early for operation, device not yet seeded or device model not acknowledged" + sudo systemctl enable snapd.seeded + sudo systemctl start snapd.seeded + sudo snap install lxd + sudo usermod -a -G lxd $(whoami) + cd kubedee + sudo ln -s $PWD/kubedee /usr/local/bin/kubedee + curl -fsSL https://files.schu.io/pub/cfssl/cfssl-linux-amd64-1.3.2 -o /tmp/cfssl && sudo install -m 0755 /tmp/cfssl /usr/local/bin/ + curl -fsSL https://files.schu.io/pub/cfssl/cfssljson-linux-amd64-1.3.2 -o /tmp/cfssljson && sudo install -m 0755 /tmp/cfssljson /usr/local/bin/ + curl -fsSL https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl -o /tmp/kubectl && sudo install -m 0755 /tmp/kubectl /usr/local/bin/ + - setup: | + export PATH=/var/lib/snapd/snap/bin:$PATH + lxd init --auto --storage-backend btrfs + - test: | + export PATH=/var/lib/snapd/snap/bin:$PATH + cd kubedee + ./scripts/smoke-test From d9db7d079d8db9fbcc4de7e36a1a628948a7da0d Mon Sep 17 00:00:00 2001 From: Michael Schubert Date: Fri, 8 Jan 2021 22:28:09 +0100 Subject: [PATCH 2/3] builds/dist-fedora: update 30 -> 32 --- .builds/dist-fedora.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.builds/dist-fedora.yml b/.builds/dist-fedora.yml index 34a6314..e47c46f 100644 --- a/.builds/dist-fedora.yml +++ b/.builds/dist-fedora.yml @@ -1,4 +1,4 @@ -image: fedora/30 +image: fedora/32 sources: - https://github.com/schu/kubedee tasks: From 808ce6b3e8ba3b3962f3109a615848aaf6a61ff3 Mon Sep 17 00:00:00 2001 From: Michael Schubert Date: Sat, 9 Jan 2021 19:07:30 +0100 Subject: [PATCH 3/3] builds/dist-fedora: work around cgroup v2 issue ``` ... 2021/01/09 10:42:05.335155 cmd_run.go:418: restoring default SELinux context of /home/build/snap WARNING: cgroup v2 is not fully supported yet, proceeding with partial confinement Error: Failed to start device "loop0": Failed to add cgroup rule for device ... ``` --- .builds/dist-fedora.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.builds/dist-fedora.yml b/.builds/dist-fedora.yml index e47c46f..76becfd 100644 --- a/.builds/dist-fedora.yml +++ b/.builds/dist-fedora.yml @@ -6,6 +6,12 @@ tasks: # Avoid selinux policy error; for details see # https://gist.github.com/schu/59b253481b2a26d0e9463ea01449768b sudo mount -t tmpfs tmpfs /sys/fs/selinux + # Make sure cgroup v2 devices group is enabled + # https://github.com/lxc/lxc/issues/2268#issuecomment-380019126 + sudo mount -o remount,rw /sys/fs/cgroup + sudo mkdir /sys/fs/cgroup/devices + sudo mount -t cgroup devices -o devices /sys/fs/cgroup/devices + sudo mount -o remount,ro /sys/fs/cgroup sudo dnf install -y curl jq snapd tar # Wait for snapd to be "seeded", otherwise we encounter # "error: too early for operation, device not yet seeded or device model not acknowledged"