Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate Poseidon k8s cluster nodes to Debian 12
A local containerd deb package will be built using a Docker image because the respective version of the containerd deb package distributed by Debian's snapshot repositories does not work with my Poseidon Kubernetes cluster. The go tool now used as part of my Makefile will not need to be tied to a specific version of Golang. The only requirement is that the Golang version installed supports go modules. The sed commands are required to allow for building containerd with Golang versions '1.18'+. This fix follows how upstream patched this, see containerd/containerd#6716. pyyaml will now be added to the k8s_controllers client Python virtual environment because the debian/bookworm64 Vagrant box does not ship with a 'yaml' library installed in its system Python environment, causing the 'Add the Calico Helm repository' task to fail. Hence also why ansible_python_interpreter is now set for the 'Setup Kubernetes control planes (first control-planes) (poseidon)' play. The entire /etc/containerd directory is being removed as part of the 'Remove the default Debian packaged containerd configuration file' task because the containerd deb package installs a single configuration file within that directory. I could have just removed the file but I did not want to leave an empty directory on the filesystem. The 'Register the current grub configuration file inode' task now requires elevated permissions because the grub configuration file is not readable by the ansible_user. The 'Remove preset Vagrant box configurations' play was removed because the play was only applicable when using the generic/ubuntu2204 Vagrant box for the k8s_workers and k8s_controllers. gawk was changed to awk because gawk is not installed on the debian/bookworm64 Vagrant box, and I am fine with using mawk implementation. gnupg was added as a package to install as part of the Kubernetes apt repository dependencies because the gpg tool is not installed by default on the debian/bookworm64 Vagrant box. This should have been added as part of 966ad96 because that's when the roles started using said tool.
- Loading branch information
Showing
10 changed files
with
140 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FROM debian:bookworm@sha256:b91baba9c2cae5edbe3b0ff50ae8f05157e3ae6f018372dcfc3aba224acb392b | ||
|
||
ARG HOST_UID=1000 | ||
ARG HOST_GID=1000 | ||
ARG CONTAINERD_UPSTREAM_PREFIX | ||
|
||
ENV USERNAME="builder" | ||
WORKDIR "/build" | ||
|
||
# required to install build deps for a pkg | ||
RUN <<_EOF_ | ||
sed \ | ||
--in-place \ | ||
's/Types: deb/Types: deb deb-src/g' \ | ||
"/etc/apt/sources.list.d/debian.sources" | ||
_EOF_ | ||
|
||
RUN <<_EOF_ | ||
apt-get update | ||
apt-get install --assume-yes "build-essential" "protobuf-compiler" | ||
apt-get build-dep --assume-yes "containerd" | ||
_EOF_ | ||
|
||
RUN <<_EOF_ | ||
groupadd --gid "${HOST_GID}" "${USERNAME}" | ||
useradd \ | ||
--uid "${HOST_UID}" \ | ||
--gid "${HOST_GID}" \ | ||
"${USERNAME}" | ||
_EOF_ | ||
|
||
WORKDIR "/build/${CONTAINERD_UPSTREAM_PREFIX}" | ||
USER "${USERNAME}" | ||
|
||
# DEB_BUILD_OPTIONS=nocheck to ignore running tests after building the pkg, see | ||
# https://manpages.debian.org/testing/debhelper/dh_auto_test.1.en.html | ||
ENTRYPOINT [ \ | ||
"/bin/bash", \ | ||
"-c", \ | ||
"DEB_BUILD_OPTIONS=\"nocheck\" dpkg-buildpackage --build=\"binary\"" \ | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.