Convert ephemeral from docker to containerd

Change-Id: I07eaa10b39992fe379082c8f03cf27cea48f0597
This commit is contained in:
Walter Wahlstedt 2021-09-24 11:05:39 -04:00
parent 75044b33b1
commit 2713c90db8

View File

@ -28,13 +28,16 @@ stringData:
gecos: deployer
ssh_pwauth: True
runcmd:
- mkdir -p /etc/containerd
- containerd config default | sed -r -e '/\[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc\]$/a\ SystemdCgroup = true' | tee /etc/containerd/config.toml
- systemctl daemon-reload
- systemctl restart containerd
- systemctl restart docker
- /bin/bash -c 'kernel_libsubdir="$(ls /lib/modules | head -1)"; config_dir="/lib/modules/${kernel_libsubdir}/build"; mkdir -p "${config_dir}"; if [ -f /run/live/medium/config ] && [ ! -f "${config_dir}/.config" ]; then ln -s /run/live/medium/config "${config_dir}/.config"; fi;'
- kubeadm init --config /tmp/kubeadm.yaml
- mkdir -p /opt/metal3-dev-env/ironic/html/images
write_files:
- path: /etc/systemd/system/docker.service.d/http-proxy.conf
- path: /etc/systemd/system/containerd.service.d/http-proxy.conf
permissions: '0644'
owner: root:root
content: |
@ -100,6 +103,10 @@ stringData:
- NumCPU
- SystemVerification
taints: []
kubeletExtraArgs:
cgroup-driver: "systemd"
container-runtime: remote
criSocket: "unix:///run/containerd/containerd.sock"
owner: root:root
path: /tmp/kubeadm.yaml
permissions: "0640"
@ -128,9 +135,11 @@ stringData:
- mkdir -p /opt/metal3-dev-env/ironic/html/images
- mkdir -p /mnt/ephemeral/opt/metal3-dev-env/ironic/html/images
- mount --bind /mnt/ephemeral/opt/metal3-dev-env/ironic/html/images /opt/metal3-dev-env/ironic/html/images
- mkdir -p /var/lib/containerd /mnt/ephemeral/var/lib/containerd
- mount --bind /mnt/ephemeral/var/lib/containerd /var/lib/containerd
- mkdir -p /var/lib/docker /mnt/ephemeral/var/lib/docker
- mount --bind /mnt/ephemeral/var/lib/docker /var/lib/docker
- mkdir -p /var/lib/docker-engine /mnt/ephemeral/var/lib/docker-engine
- mount --bind /mnt/ephemeral/var/lib/docker-engine /var/lib/docker-engine
- mkdir -p /mnt/ephemeral/var/lib/kubelet/ /var/lib/kubelet/
- mount --bind /mnt/ephemeral/var/lib/kubelet/ /var/lib/kubelet/
- mount --bind /mnt/ephemeral/var/lib/kubelet/ /var/lib/kubelet/