Skip to content

Usernetes Gen2: depends on Rootless Docker on hosts #374

Usernetes Gen2: depends on Rootless Docker on hosts

Usernetes Gen2: depends on Rootless Docker on hosts #374

Workflow file for this run

---
name: Main
on: [push, pull_request]
env:
DOCKER_BUILDKIT: 1
KUBECONFIG: ./kubeconfig
jobs:
single-node:
name: "Single node"
runs-on: ubuntu-22.04
timeout-minutes: 40
steps:
- uses: actions/checkout@v3
- name: Set up cgroup v2 delegation
run: |
sudo mkdir -p /etc/systemd/system/[email protected]
cat <<EOF | sudo tee /etc/systemd/system/[email protected]/delegate.conf
[Service]
Delegate=cpu cpuset io memory pids
EOF
sudo systemctl daemon-reload
- name: Set up Rootless Docker
run: |
set -eux -o pipefail
sudo apt-get remove moby-engine-*
curl https://get.docker.com | sudo sh
sudo systemctl disable --now docker.socket docker.service
sudo rm -rf /var/run/docker*
dockerd-rootless-setuptool.sh install
docker info
- run: make up
- run: sleep 5
- run: make kubeadm-init
- run: make install-flannel
- run: make kubeconfig
- run: kubectl taint nodes --all node-role.kubernetes.io/control-plane-
- run: ./hack/test-smoke.sh
multi-node:
name: "Multi node (emulated using LXD)"
runs-on: ubuntu-22.04
timeout-minutes: 40
steps:
- uses: actions/checkout@v3
- run: sudo lxd init --auto --storage-backend=dir
- run: |
sudo ./hack/create-hosts-lxc.sh ~/.u7s-ci-lxc lxc0 lxc1
for host in lxc0 lxc1; do
scp -F ~/.u7s-ci-lxc/ssh_config -q -r $(pwd) ${host}:~/usernetes
ssh -F ~/.u7s-ci-lxc/ssh_config ${USER}-sudo@${host} sudo ~${USER}/usernetes/hack/init-host.root.sh
ssh -F ~/.u7s-ci-lxc/ssh_config ${USER}-sudo@${host} sudo loginctl enable-linger ${USER}
ssh -F ~/.u7s-ci-lxc/ssh_config ${host} ~/usernetes/hack/init-host.rootless.sh
done
- run: |
for host in lxc0 lxc1; do
ssh -F ~/.u7s-ci-lxc/ssh_config ${host} make -C ~/usernetes up
done
- run: |
ssh -F ~/.u7s-ci-lxc/ssh_config lxc0 make -C ~/usernetes kubeadm-init install-flannel kubeconfig
# TODO: let lxc1 join lxc0