Skip to content

Commit

Permalink
build new containerd with rhel8 packages, old with centos8 packages (#…
Browse files Browse the repository at this point in the history
…5568)

* build new containerd with rhel8 packages, old with centos8 packages

* properly identify pre-1.6.28 versions
  • Loading branch information
laverya authored Feb 14, 2025
1 parent e67f2e4 commit e1f22a7
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 12 deletions.
2 changes: 1 addition & 1 deletion addons/containerd/1.6.28/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ yum container-selinux
asset runc https://github.com/opencontainers/runc/releases/download/v1.2.4/runc.amd64
dockerout rhel-7 addons/containerd/template/Dockerfile.centos7 1.6.28
dockerout rhel-7-force addons/containerd/template/Dockerfile.centos7-force 1.6.28
dockerout rhel-8 addons/containerd/template/Dockerfile.centos8 1.6.28
dockerout rhel-8 addons/containerd/template/Dockerfile.centos8.rhel 1.6.28
dockerout rhel-9 addons/containerd/template/Dockerfile.rhel9 1.6.28
dockerout ubuntu-18.04 addons/containerd/template/Dockerfile.ubuntu18 1.6.21
dockerout ubuntu-20.04 addons/containerd/template/Dockerfile.ubuntu20 1.6.28
Expand Down
2 changes: 1 addition & 1 deletion addons/containerd/1.6.31/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ yum container-selinux
asset runc https://github.com/opencontainers/runc/releases/download/v1.2.4/runc.amd64
dockerout rhel-7 addons/containerd/template/Dockerfile.centos7 1.6.31
dockerout rhel-7-force addons/containerd/template/Dockerfile.centos7-force 1.6.31
dockerout rhel-8 addons/containerd/template/Dockerfile.centos8 1.6.31
dockerout rhel-8 addons/containerd/template/Dockerfile.centos8.rhel 1.6.31
dockerout rhel-9 addons/containerd/template/Dockerfile.rhel9 1.6.31
dockerout ubuntu-18.04 addons/containerd/template/Dockerfile.ubuntu18 1.6.21
dockerout ubuntu-20.04 addons/containerd/template/Dockerfile.ubuntu20 1.6.31
Expand Down
2 changes: 1 addition & 1 deletion addons/containerd/1.6.32/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ yum container-selinux
asset runc https://github.com/opencontainers/runc/releases/download/v1.2.4/runc.amd64
dockerout rhel-7 addons/containerd/template/Dockerfile.centos7 1.6.32
dockerout rhel-7-force addons/containerd/template/Dockerfile.centos7-force 1.6.32
dockerout rhel-8 addons/containerd/template/Dockerfile.centos8 1.6.32
dockerout rhel-8 addons/containerd/template/Dockerfile.centos8.rhel 1.6.32
dockerout rhel-9 addons/containerd/template/Dockerfile.rhel9 1.6.32
dockerout ubuntu-18.04 addons/containerd/template/Dockerfile.ubuntu18 1.6.21
dockerout ubuntu-20.04 addons/containerd/template/Dockerfile.ubuntu20 1.6.32
Expand Down
2 changes: 1 addition & 1 deletion addons/containerd/1.6.33/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ yum container-selinux
asset runc https://github.com/opencontainers/runc/releases/download/v1.2.4/runc.amd64
dockerout rhel-7 addons/containerd/template/Dockerfile.centos7 1.6.33
dockerout rhel-7-force addons/containerd/template/Dockerfile.centos7-force 1.6.33
dockerout rhel-8 addons/containerd/template/Dockerfile.centos8 1.6.33
dockerout rhel-8 addons/containerd/template/Dockerfile.centos8.rhel 1.6.33
dockerout rhel-9 addons/containerd/template/Dockerfile.rhel9 1.6.33
dockerout ubuntu-18.04 addons/containerd/template/Dockerfile.ubuntu18 1.6.21
dockerout ubuntu-20.04 addons/containerd/template/Dockerfile.ubuntu20 1.6.33
Expand Down
2 changes: 1 addition & 1 deletion addons/containerd/1.7.25/Manifest
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ yum container-selinux
asset runc https://github.com/opencontainers/runc/releases/download/v1.2.4/runc.amd64
dockerout rhel-7 addons/containerd/template/Dockerfile.centos7 1.6.33
dockerout rhel-7-force addons/containerd/template/Dockerfile.centos7-force 1.6.33
dockerout rhel-8 addons/containerd/template/Dockerfile.centos8 1.7.25
dockerout rhel-8 addons/containerd/template/Dockerfile.centos8.rhel 1.7.25
dockerout rhel-9 addons/containerd/template/Dockerfile.rhel9 1.7.25
dockerout ubuntu-18.04 addons/containerd/template/Dockerfile.ubuntu18 1.6.21
dockerout ubuntu-20.04 addons/containerd/template/Dockerfile.ubuntu20 1.7.25
Expand Down
2 changes: 1 addition & 1 deletion addons/containerd/template/Dockerfile.centos8
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ RUN echo -e "fastestmirror=1\nmax_parallel_downloads=8" >> /etc/dnf/dnf.conf

RUN yum install -y yum-utils epel-release createrepo
RUN yum install -y modulemd-tools
RUN yum-config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
RUN yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
RUN mkdir -p /packages/archives

ARG VERSION
Expand Down
18 changes: 18 additions & 0 deletions addons/containerd/template/Dockerfile.centos8.rhel
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM rockylinux:8.5

RUN echo -e "fastestmirror=1\nmax_parallel_downloads=8" >> /etc/dnf/dnf.conf

RUN yum install -y yum-utils epel-release createrepo
RUN yum install -y modulemd-tools
RUN yum-config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
RUN mkdir -p /packages/archives

ARG VERSION
ENV VERSION=${VERSION}

CMD yumdownloader --installroot=/tmp/empty-directory --releasever=/ --resolve --destdir=/packages/archives -y \
containerd.io-$(yum list --showduplicates 'containerd.io' | grep ${VERSION} | tail -1 | awk '{ print $2 }' | sed 's/.\://') \
&& createrepo_c /packages/archives \
&& repo2module --module-name=kurl.local --module-stream=stable /packages/archives /tmp/modules.yaml \
&& modifyrepo_c --mdtype=modules /tmp/modules.yaml /packages/archives/repodata \
&& cp -r /packages/archives/* /out/
12 changes: 8 additions & 4 deletions addons/containerd/template/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ UNSUPPORTED_CONTAINERD_MINORS="01234"
VERSIONS=()
function find_common_versions() {
docker build --no-cache --pull -t centos7 -f Dockerfile.centos7 .
docker build --no-cache --pull -t centos8 -f Dockerfile.centos8 .
docker build --no-cache --pull -t centos8 -f Dockerfile.centos8.rhel .
docker build --no-cache --pull -t rhel9 -f Dockerfile.rhel9 .
docker build --no-cache --pull -t ubuntu16 -f Dockerfile.ubuntu16 .
docker build --no-cache --pull -t ubuntu18 -f Dockerfile.ubuntu18 .
Expand Down Expand Up @@ -204,7 +204,11 @@ function find_common_versions() {
# remove versions prior to 1.7.25
SEVEN_VERSIONS=($(printf "%s\n" "${ALL_VERSIONS[@]}" | sort -rV | awk '$1 >= "1.7.25"'))
echo "7.x versions: ${SEVEN_VERSIONS[*]}"
local OTHER_VERSIONS=($(echo "${ALL_VERSIONS[@]}" | tr ' ' '\n' | grep -vE '1\.7\.' | tr '\n' ' ')) # filter to remove 7.x versions

# filter to remove 7.x versions
local OTHER_VERSIONS=($(echo "${ALL_VERSIONS[@]}" | tr ' ' '\n' | grep -vE '1\.7\.' | tr '\n' ' '))
# and then remove versions prior to 1.6.28, as they are old enough that we no longer rebuild them
OTHER_VERSIONS=($(printf "%s\n" "${OTHER_VERSIONS[@]}" | sort -rV | grep -E '1\.6\.[0-9][0-9]+' | awk '$1 >= "1.6.28"'))
echo "Other versions: ${OTHER_VERSIONS[*]}"
ALL_VERSIONS=("${SEVEN_VERSIONS[@]}" "${OTHER_VERSIONS[@]}")

Expand Down Expand Up @@ -232,12 +236,12 @@ function find_common_versions() {
add_override_os_to_preflight_file "$version" "${CENTOS8_VERSIONS[0]}" "centos" "8"
add_override_os_to_preflight_file "$version" "${CENTOS8_VERSIONS[0]}" "rhel" "8"
add_override_os_to_preflight_file "$version" "${CENTOS8_VERSIONS[0]}" "ol" "8"
add_override_os_to_manifest_file "$version" "${CENTOS8_VERSIONS[0]}" "rhel-8" "Dockerfile.centos8"
add_override_os_to_manifest_file "$version" "${CENTOS8_VERSIONS[0]}" "rhel-8" "Dockerfile.centos8.rhel"
else
add_supported_os_to_preflight_file "$version" "centos" "=" "8"
add_supported_os_to_preflight_file "$version" "rhel" "=" "8"
add_supported_os_to_preflight_file "$version" "ol" "=" "8"
add_supported_os_to_manifest_file "$version" "rhel-8" "Dockerfile.centos8"
add_supported_os_to_manifest_file "$version" "rhel-8" "Dockerfile.centos8.rhel"
fi

if ! contains "$version" ${RHEL9_VERSIONS[*]}; then
Expand Down
4 changes: 2 additions & 2 deletions web/src/installers/versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ module.exports.InstallerVersions = {
"1.20.0",
],
containerd: [
"1.7.25", "1.6.33", "1.6.32", "1.6.31", "1.6.28", "1.6.27", "1.6.26", "1.6.25", "1.6.24", "1.6.22", "1.6.21", "1.6.20", "1.6.19", "1.6.18", "1.6.16", "1.6.15", "1.6.14", "1.6.13", "1.6.12", "1.6.11", "1.6.10", "1.6.9", "1.6.8", "1.6.7", "1.6.6", "1.6.4", "1.5.11", "1.5.10", // cron-containerd-update
"1.4.13", "1.4.12", "1.4.11", "1.4.10", "1.4.9", "1.4.8", "1.4.6", "1.4.4", "1.4.3", "1.3.9", "1.3.7", "1.2.13",
"1.7.25", "1.6.33", "1.6.32", "1.6.31", "1.6.28", // cron-containerd-update
"1.6.27", "1.6.26", "1.6.25", "1.6.24", "1.6.22", "1.6.21", "1.6.20", "1.6.19", "1.6.18", "1.6.16", "1.6.15", "1.6.14", "1.6.13", "1.6.12", "1.6.11", "1.6.10", "1.6.9", "1.6.8", "1.6.7", "1.6.6", "1.6.4", "1.5.11", "1.5.10", "1.4.13", "1.4.12", "1.4.11", "1.4.10", "1.4.9", "1.4.8", "1.4.6", "1.4.4", "1.4.3", "1.3.9", "1.3.7", "1.2.13",
],
weave: [
"2.6.5-20230417",
Expand Down

0 comments on commit e1f22a7

Please sign in to comment.