From d58b0d977bceb18c4ac1734f0ba86426d68a196e Mon Sep 17 00:00:00 2001 From: John Garbutt Date: Tue, 24 May 2022 11:29:21 +0100 Subject: [PATCH 01/31] Copy and paste in rocky-container from upstream --- elements/rocky-container-pulp/README.rst | 9 +++++++++ elements/rocky-container-pulp/containerfiles/8 | 7 +++++++ elements/rocky-container-pulp/element-deps | 8 ++++++++ .../environment.d/10-01-rocky-distro-name.bash | 4 ++++ .../environment.d/11-yum-dnf.bash | 1 + elements/rocky-container-pulp/package-installs.yaml | 13 +++++++++++++ .../test-elements/build-succeeds/README.rst | 1 + .../test-elements/build-succeeds/element-deps | 1 + 8 files changed, 44 insertions(+) create mode 100644 elements/rocky-container-pulp/README.rst create mode 100644 elements/rocky-container-pulp/containerfiles/8 create mode 100644 elements/rocky-container-pulp/element-deps create mode 100644 elements/rocky-container-pulp/environment.d/10-01-rocky-distro-name.bash create mode 100644 elements/rocky-container-pulp/environment.d/11-yum-dnf.bash create mode 100644 elements/rocky-container-pulp/package-installs.yaml create mode 100644 elements/rocky-container-pulp/test-elements/build-succeeds/README.rst create mode 100644 elements/rocky-container-pulp/test-elements/build-succeeds/element-deps diff --git a/elements/rocky-container-pulp/README.rst b/elements/rocky-container-pulp/README.rst new file mode 100644 index 0000000..0420844 --- /dev/null +++ b/elements/rocky-container-pulp/README.rst @@ -0,0 +1,9 @@ +================ +rocky-container +================ + +Create a minimal image based on Rocky Linux container image + +This element sets the ``DISTRO_NAME`` var to 'rocky'. The release of +rocky to be installed can be controlled through the ``DIB_RELEASE`` +variable, which defaults the latest supported release. diff --git a/elements/rocky-container-pulp/containerfiles/8 b/elements/rocky-container-pulp/containerfiles/8 new file mode 100644 index 0000000..e619137 --- /dev/null +++ b/elements/rocky-container-pulp/containerfiles/8 @@ -0,0 +1,7 @@ +FROM docker.io/library/rockylinux:8 + +RUN dnf install -y findutils util-linux sudo python3 NetworkManager + +RUN systemctl unmask console-getty.service dev-hugepages.mount \ + getty.target sys-fs-fuse-connections.mount systemd-logind.service \ + systemd-remount-fs.service diff --git a/elements/rocky-container-pulp/element-deps b/elements/rocky-container-pulp/element-deps new file mode 100644 index 0000000..d9ef0bf --- /dev/null +++ b/elements/rocky-container-pulp/element-deps @@ -0,0 +1,8 @@ +cache-url +containerfile +package-installs +redhat-common +rpm-distro +source-repositories +vm +yum diff --git a/elements/rocky-container-pulp/environment.d/10-01-rocky-distro-name.bash b/elements/rocky-container-pulp/environment.d/10-01-rocky-distro-name.bash new file mode 100644 index 0000000..6112015 --- /dev/null +++ b/elements/rocky-container-pulp/environment.d/10-01-rocky-distro-name.bash @@ -0,0 +1,4 @@ +export DISTRO_NAME=rocky +export DIB_RELEASE=${DIB_RELEASE:-8} # always the most recent major +export EFI_BOOT_DIR="EFI/rocky" +export DIB_YUM_MINIMAL_CREATE_INTERFACES=0 diff --git a/elements/rocky-container-pulp/environment.d/11-yum-dnf.bash b/elements/rocky-container-pulp/environment.d/11-yum-dnf.bash new file mode 100644 index 0000000..91514f1 --- /dev/null +++ b/elements/rocky-container-pulp/environment.d/11-yum-dnf.bash @@ -0,0 +1 @@ +export YUM=dnf diff --git a/elements/rocky-container-pulp/package-installs.yaml b/elements/rocky-container-pulp/package-installs.yaml new file mode 100644 index 0000000..15659ce --- /dev/null +++ b/elements/rocky-container-pulp/package-installs.yaml @@ -0,0 +1,13 @@ +audit: +dnf-plugins-core: +dracut: +dracut-config-generic: +grubby: +kernel: +initscripts: +man-pages: +redhat-rpm-config: +linux-firmware: + uninstall: true +linux-firmware-whence: + uninstall: true diff --git a/elements/rocky-container-pulp/test-elements/build-succeeds/README.rst b/elements/rocky-container-pulp/test-elements/build-succeeds/README.rst new file mode 100644 index 0000000..200dea0 --- /dev/null +++ b/elements/rocky-container-pulp/test-elements/build-succeeds/README.rst @@ -0,0 +1 @@ +Verify we can build a rocky-container image. diff --git a/elements/rocky-container-pulp/test-elements/build-succeeds/element-deps b/elements/rocky-container-pulp/test-elements/build-succeeds/element-deps new file mode 100644 index 0000000..73b3d4e --- /dev/null +++ b/elements/rocky-container-pulp/test-elements/build-succeeds/element-deps @@ -0,0 +1 @@ +vm From 2c7357a9c6f4c7057ace08a86892c6ba0b03739c Mon Sep 17 00:00:00 2001 From: John Garbutt Date: Tue, 24 May 2022 12:02:38 +0100 Subject: [PATCH 02/31] Move 8.5 base container and add pulp repos --- elements/rocky-container-pulp/containerfiles/8 | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/elements/rocky-container-pulp/containerfiles/8 b/elements/rocky-container-pulp/containerfiles/8 index e619137..466af8d 100644 --- a/elements/rocky-container-pulp/containerfiles/8 +++ b/elements/rocky-container-pulp/containerfiles/8 @@ -1,5 +1,17 @@ -FROM docker.io/library/rockylinux:8 +FROM docker.io/rockylinux/rockylinux:8.5 +RUN curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/8.5/BaseOS/x86_64/os/20220517T042605/config.repo > /etc/yum.repos.d/Rocky-BaseOS.repo && \ + echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-BaseOS.repo && \ + curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/8.5/extras/x86_64/os/20220421T052541/config.repo > /etc/yum.repos.d/Rocky-Extras.repo && \ + echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-Extras.repo && \ + curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/8.5/AppStream/x86_64/os/20220507T065526/config.repo > /etc/yum.repos.d/Rocky-AppStream.repo && \ + echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-AppStream.repo && \ + curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/8.5/PowerTools/x86_64/os/20220513T051657/config.repo > /etc/yum.repos.d/Rocky-PowerTools.repo && \ + echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-PowerTools.repo && \ + curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/8.5/nfv/x86_64/os/20220506T031824/config.repo > /etc/yum.repos.d/Rocky-NFV.repo && \ + echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-NFV.repo + +RUN dnf update -y RUN dnf install -y findutils util-linux sudo python3 NetworkManager RUN systemctl unmask console-getty.service dev-hugepages.mount \ From d5317fe0077d70afb5202446736a7d744bee4fb3 Mon Sep 17 00:00:00 2001 From: John Garbutt Date: Tue, 24 May 2022 12:12:22 +0100 Subject: [PATCH 03/31] Use base image closer to pulp snapshot --- elements/rocky-container-pulp/containerfiles/8 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/elements/rocky-container-pulp/containerfiles/8 b/elements/rocky-container-pulp/containerfiles/8 index 466af8d..791609a 100644 --- a/elements/rocky-container-pulp/containerfiles/8 +++ b/elements/rocky-container-pulp/containerfiles/8 @@ -1,6 +1,7 @@ -FROM docker.io/rockylinux/rockylinux:8.5 +FROM quay.io/rockylinux/rockylinux:Rocky-8.5.20220328-x86_64 -RUN curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/8.5/BaseOS/x86_64/os/20220517T042605/config.repo > /etc/yum.repos.d/Rocky-BaseOS.repo && \ +RUN rm -rf /etc/yum.repos.d/*.repo && \ + curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/8.5/BaseOS/x86_64/os/20220517T042605/config.repo > /etc/yum.repos.d/Rocky-BaseOS.repo && \ echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-BaseOS.repo && \ curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/8.5/extras/x86_64/os/20220421T052541/config.repo > /etc/yum.repos.d/Rocky-Extras.repo && \ echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-Extras.repo && \ @@ -10,8 +11,8 @@ RUN curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/8.5/BaseOS/x86 echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-PowerTools.repo && \ curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/8.5/nfv/x86_64/os/20220506T031824/config.repo > /etc/yum.repos.d/Rocky-NFV.repo && \ echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-NFV.repo - RUN dnf update -y + RUN dnf install -y findutils util-linux sudo python3 NetworkManager RUN systemctl unmask console-getty.service dev-hugepages.mount \ From c480b186da196c647170c39797937ff2667e26be Mon Sep 17 00:00:00 2001 From: John Garbutt Date: Mon, 30 May 2022 14:25:52 +0000 Subject: [PATCH 04/31] Move back to docker's rocky linux image --- elements/rocky-container-pulp/containerfiles/8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elements/rocky-container-pulp/containerfiles/8 b/elements/rocky-container-pulp/containerfiles/8 index 791609a..4fda21a 100644 --- a/elements/rocky-container-pulp/containerfiles/8 +++ b/elements/rocky-container-pulp/containerfiles/8 @@ -1,4 +1,4 @@ -FROM quay.io/rockylinux/rockylinux:Rocky-8.5.20220328-x86_64 +FROM docker.io/library/rockylinux:8.5 RUN rm -rf /etc/yum.repos.d/*.repo && \ curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/8.5/BaseOS/x86_64/os/20220517T042605/config.repo > /etc/yum.repos.d/Rocky-BaseOS.repo && \ From a9f4b488b6f37170411dba397be85ebaae2310e1 Mon Sep 17 00:00:00 2001 From: John Garbutt Date: Mon, 30 May 2022 14:59:48 +0000 Subject: [PATCH 05/31] Add cloud-init into the image --- elements/rocky-container-pulp/containerfiles/8 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elements/rocky-container-pulp/containerfiles/8 b/elements/rocky-container-pulp/containerfiles/8 index 4fda21a..da913b2 100644 --- a/elements/rocky-container-pulp/containerfiles/8 +++ b/elements/rocky-container-pulp/containerfiles/8 @@ -13,7 +13,7 @@ RUN rm -rf /etc/yum.repos.d/*.repo && \ echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-NFV.repo RUN dnf update -y -RUN dnf install -y findutils util-linux sudo python3 NetworkManager +RUN dnf install -y findutils util-linux sudo python3 NetworkManager cloud-init RUN systemctl unmask console-getty.service dev-hugepages.mount \ getty.target sys-fs-fuse-connections.mount systemd-logind.service \ From 4fa1b214b245d2e1dc97c80704df4abb797294e0 Mon Sep 17 00:00:00 2001 From: John Garbutt Date: Mon, 30 May 2022 15:39:42 +0000 Subject: [PATCH 06/31] Use centos advanced virt to get libvirt --- elements/rocky-container-pulp/containerfiles/8 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/elements/rocky-container-pulp/containerfiles/8 b/elements/rocky-container-pulp/containerfiles/8 index da913b2..ceb7af1 100644 --- a/elements/rocky-container-pulp/containerfiles/8 +++ b/elements/rocky-container-pulp/containerfiles/8 @@ -13,7 +13,10 @@ RUN rm -rf /etc/yum.repos.d/*.repo && \ echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-NFV.repo RUN dnf update -y -RUN dnf install -y findutils util-linux sudo python3 NetworkManager cloud-init +RUN dnf install centos-release-advanced-virtualization -y +RUN dnf install cloud-init libvirt -y + +RUN dnf install -y findutils util-linux sudo python3 NetworkManager RUN systemctl unmask console-getty.service dev-hugepages.mount \ getty.target sys-fs-fuse-connections.mount systemd-logind.service \ From 48f06454bae2041deca85bf1374a4f40ebc60087 Mon Sep 17 00:00:00 2001 From: John Garbutt Date: Mon, 30 May 2022 15:49:37 +0000 Subject: [PATCH 07/31] Include qemu-kvm --- elements/rocky-container-pulp/containerfiles/8 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elements/rocky-container-pulp/containerfiles/8 b/elements/rocky-container-pulp/containerfiles/8 index ceb7af1..bd1bb77 100644 --- a/elements/rocky-container-pulp/containerfiles/8 +++ b/elements/rocky-container-pulp/containerfiles/8 @@ -13,8 +13,8 @@ RUN rm -rf /etc/yum.repos.d/*.repo && \ echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-NFV.repo RUN dnf update -y -RUN dnf install centos-release-advanced-virtualization -y -RUN dnf install cloud-init libvirt -y +RUN dnf install -y centos-release-advanced-virtualization +RUN dnf install -y cloud-init libvirt qemu-kvm RUN dnf install -y findutils util-linux sudo python3 NetworkManager From f115198678478118aabc6e80d4e7e87bf505f975 Mon Sep 17 00:00:00 2001 From: John Garbutt Date: Wed, 8 Jun 2022 15:31:21 +0100 Subject: [PATCH 08/31] Move to dry-er custom rocky container --- .../{containerfiles/8 => 8.5-pulp} | 2 +- elements/rocky-container-pulp/README.rst | 22 +++++++++++++------ elements/rocky-container-pulp/element-deps | 8 ------- .../10-01-rocky-distro-name.bash | 4 ---- .../environment.d/11-yum-dnf.bash | 1 - .../package-installs.yaml | 13 ----------- .../test-elements/build-succeeds/README.rst | 1 - .../test-elements/build-succeeds/element-deps | 1 - 8 files changed, 16 insertions(+), 36 deletions(-) rename elements/rocky-container-pulp/{containerfiles/8 => 8.5-pulp} (96%) delete mode 100644 elements/rocky-container-pulp/element-deps delete mode 100644 elements/rocky-container-pulp/environment.d/10-01-rocky-distro-name.bash delete mode 100644 elements/rocky-container-pulp/environment.d/11-yum-dnf.bash delete mode 100644 elements/rocky-container-pulp/package-installs.yaml delete mode 100644 elements/rocky-container-pulp/test-elements/build-succeeds/README.rst delete mode 100644 elements/rocky-container-pulp/test-elements/build-succeeds/element-deps diff --git a/elements/rocky-container-pulp/containerfiles/8 b/elements/rocky-container-pulp/8.5-pulp similarity index 96% rename from elements/rocky-container-pulp/containerfiles/8 rename to elements/rocky-container-pulp/8.5-pulp index 791609a..4fda21a 100644 --- a/elements/rocky-container-pulp/containerfiles/8 +++ b/elements/rocky-container-pulp/8.5-pulp @@ -1,4 +1,4 @@ -FROM quay.io/rockylinux/rockylinux:Rocky-8.5.20220328-x86_64 +FROM docker.io/library/rockylinux:8.5 RUN rm -rf /etc/yum.repos.d/*.repo && \ curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/8.5/BaseOS/x86_64/os/20220517T042605/config.repo > /etc/yum.repos.d/Rocky-BaseOS.repo && \ diff --git a/elements/rocky-container-pulp/README.rst b/elements/rocky-container-pulp/README.rst index 0420844..f34a82d 100644 --- a/elements/rocky-container-pulp/README.rst +++ b/elements/rocky-container-pulp/README.rst @@ -1,9 +1,17 @@ -================ -rocky-container -================ +======================= +rocky custom containers +======================= -Create a minimal image based on Rocky Linux container image +This makes use of the upstream dib element rocky-container. -This element sets the ``DISTRO_NAME`` var to 'rocky'. The release of -rocky to be installed can be controlled through the ``DIB_RELEASE`` -variable, which defaults the latest supported release. +To use these container files simple set something like this::: + + overcloud_dib_os_element: rocky-container + + overcloud_dib_env_vars_extra: + DIB_CONTAINERFILE_DOCKERFILE: "{{ source_checkout_path }}/stackhpc-image-elements/elements/rocky-container-pulp/8.5-pulp + + overcloud_dib_git_elements_extra: + - repo: https://github.com/stackhpc/stackhpc-image-elements + local: "{{ source_checkout_path }}/stackhpc-image-elements" + elements_path: elements diff --git a/elements/rocky-container-pulp/element-deps b/elements/rocky-container-pulp/element-deps deleted file mode 100644 index d9ef0bf..0000000 --- a/elements/rocky-container-pulp/element-deps +++ /dev/null @@ -1,8 +0,0 @@ -cache-url -containerfile -package-installs -redhat-common -rpm-distro -source-repositories -vm -yum diff --git a/elements/rocky-container-pulp/environment.d/10-01-rocky-distro-name.bash b/elements/rocky-container-pulp/environment.d/10-01-rocky-distro-name.bash deleted file mode 100644 index 6112015..0000000 --- a/elements/rocky-container-pulp/environment.d/10-01-rocky-distro-name.bash +++ /dev/null @@ -1,4 +0,0 @@ -export DISTRO_NAME=rocky -export DIB_RELEASE=${DIB_RELEASE:-8} # always the most recent major -export EFI_BOOT_DIR="EFI/rocky" -export DIB_YUM_MINIMAL_CREATE_INTERFACES=0 diff --git a/elements/rocky-container-pulp/environment.d/11-yum-dnf.bash b/elements/rocky-container-pulp/environment.d/11-yum-dnf.bash deleted file mode 100644 index 91514f1..0000000 --- a/elements/rocky-container-pulp/environment.d/11-yum-dnf.bash +++ /dev/null @@ -1 +0,0 @@ -export YUM=dnf diff --git a/elements/rocky-container-pulp/package-installs.yaml b/elements/rocky-container-pulp/package-installs.yaml deleted file mode 100644 index 15659ce..0000000 --- a/elements/rocky-container-pulp/package-installs.yaml +++ /dev/null @@ -1,13 +0,0 @@ -audit: -dnf-plugins-core: -dracut: -dracut-config-generic: -grubby: -kernel: -initscripts: -man-pages: -redhat-rpm-config: -linux-firmware: - uninstall: true -linux-firmware-whence: - uninstall: true diff --git a/elements/rocky-container-pulp/test-elements/build-succeeds/README.rst b/elements/rocky-container-pulp/test-elements/build-succeeds/README.rst deleted file mode 100644 index 200dea0..0000000 --- a/elements/rocky-container-pulp/test-elements/build-succeeds/README.rst +++ /dev/null @@ -1 +0,0 @@ -Verify we can build a rocky-container image. diff --git a/elements/rocky-container-pulp/test-elements/build-succeeds/element-deps b/elements/rocky-container-pulp/test-elements/build-succeeds/element-deps deleted file mode 100644 index 73b3d4e..0000000 --- a/elements/rocky-container-pulp/test-elements/build-succeeds/element-deps +++ /dev/null @@ -1 +0,0 @@ -vm From 4829a37c37149235cce216448fe2125210bf8fb2 Mon Sep 17 00:00:00 2001 From: John Garbutt Date: Wed, 8 Jun 2022 14:41:50 +0000 Subject: [PATCH 09/31] Add mofed --- elements/rocky-container-pulp/containerfiles/8 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/elements/rocky-container-pulp/containerfiles/8 b/elements/rocky-container-pulp/containerfiles/8 index bd1bb77..d42b64c 100644 --- a/elements/rocky-container-pulp/containerfiles/8 +++ b/elements/rocky-container-pulp/containerfiles/8 @@ -11,7 +11,9 @@ RUN rm -rf /etc/yum.repos.d/*.repo && \ echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-PowerTools.repo && \ curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/8.5/nfv/x86_64/os/20220506T031824/config.repo > /etc/yum.repos.d/Rocky-NFV.repo && \ echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-NFV.repo +RUN curl https://linux.mellanox.com/public/repo/mlnx_ofed/5.6-1.0.3.3/rhel8.5/mellanox_mlnx_ofed.repo > /etc/yum.repos.d/mofed.repo RUN dnf update -y +RUN dnf -y install mlnx-ofed-hypervisor RUN dnf install -y centos-release-advanced-virtualization RUN dnf install -y cloud-init libvirt qemu-kvm @@ -21,3 +23,5 @@ RUN dnf install -y findutils util-linux sudo python3 NetworkManager RUN systemctl unmask console-getty.service dev-hugepages.mount \ getty.target sys-fs-fuse-connections.mount systemd-logind.service \ systemd-remount-fs.service + + From 8bca2c04ad2bb589972e080be79f97be2fa81f73 Mon Sep 17 00:00:00 2001 From: John Garbutt Date: Wed, 8 Jun 2022 15:44:45 +0100 Subject: [PATCH 10/31] Move to mofed name --- elements/rocky-container-pulp/{8.5-pulp => 8.5-pulp-mofed} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename elements/rocky-container-pulp/{8.5-pulp => 8.5-pulp-mofed} (100%) diff --git a/elements/rocky-container-pulp/8.5-pulp b/elements/rocky-container-pulp/8.5-pulp-mofed similarity index 100% rename from elements/rocky-container-pulp/8.5-pulp rename to elements/rocky-container-pulp/8.5-pulp-mofed From dc16325914653dfc049f340d8c38088594509231 Mon Sep 17 00:00:00 2001 From: John Garbutt Date: Wed, 8 Jun 2022 14:52:34 +0000 Subject: [PATCH 11/31] First go at 8.6 container --- elements/rocky-container-pulp/8.6-pulp-mofed | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 elements/rocky-container-pulp/8.6-pulp-mofed diff --git a/elements/rocky-container-pulp/8.6-pulp-mofed b/elements/rocky-container-pulp/8.6-pulp-mofed new file mode 100644 index 0000000..35b2742 --- /dev/null +++ b/elements/rocky-container-pulp/8.6-pulp-mofed @@ -0,0 +1,16 @@ +FROM docker.io/library/rockylinux:8 + +RUN curl https://linux.mellanox.com/public/repo/mlnx_ofed/5.6-1.0.3.3/rhel8.6/mellanox_mlnx_ofed.repo > /etc/yum.repos.d/mofed.repo +RUN dnf install -y centos-release-ceph-nautilus +RUN dnf update -y + +RUN dnf -y install mlnx-ofed-hypervisor +RUN dnf install -y cloud-init libvirt qemu-kvm ceph-common + +RUN dnf install -y findutils util-linux sudo python3 NetworkManager + +RUN systemctl unmask console-getty.service dev-hugepages.mount \ + getty.target sys-fs-fuse-connections.mount systemd-logind.service \ + systemd-remount-fs.service + + From 80c9b24ae507838decf7ac2aa21624927b9102b6 Mon Sep 17 00:00:00 2001 From: John Garbutt Date: Wed, 8 Jun 2022 15:54:13 +0000 Subject: [PATCH 12/31] Fix up bits of the 8.6 image --- elements/rocky-container-pulp/8.6-pulp-mofed | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/elements/rocky-container-pulp/8.6-pulp-mofed b/elements/rocky-container-pulp/8.6-pulp-mofed index 35b2742..40db27d 100644 --- a/elements/rocky-container-pulp/8.6-pulp-mofed +++ b/elements/rocky-container-pulp/8.6-pulp-mofed @@ -1,11 +1,10 @@ FROM docker.io/library/rockylinux:8 RUN curl https://linux.mellanox.com/public/repo/mlnx_ofed/5.6-1.0.3.3/rhel8.6/mellanox_mlnx_ofed.repo > /etc/yum.repos.d/mofed.repo -RUN dnf install -y centos-release-ceph-nautilus RUN dnf update -y RUN dnf -y install mlnx-ofed-hypervisor -RUN dnf install -y cloud-init libvirt qemu-kvm ceph-common +RUN dnf install -y cloud-init libvirt qemu-kvm RUN dnf install -y findutils util-linux sudo python3 NetworkManager @@ -13,4 +12,5 @@ RUN systemctl unmask console-getty.service dev-hugepages.mount \ getty.target sys-fs-fuse-connections.mount systemd-logind.service \ systemd-remount-fs.service - +RUN dnf list --installed +RUN dnf install -y ceph-common From 0c8318165cb535a662c1544a7158419d93ae04c8 Mon Sep 17 00:00:00 2001 From: John Garbutt Date: Wed, 8 Jun 2022 16:25:24 +0000 Subject: [PATCH 13/31] Try to add new pulp repos --- elements/rocky-container-pulp/8.6-pulp-mofed | 21 ++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/elements/rocky-container-pulp/8.6-pulp-mofed b/elements/rocky-container-pulp/8.6-pulp-mofed index 40db27d..61a4297 100644 --- a/elements/rocky-container-pulp/8.6-pulp-mofed +++ b/elements/rocky-container-pulp/8.6-pulp-mofed @@ -1,11 +1,29 @@ FROM docker.io/library/rockylinux:8 +ARG pulp_version=20220606T111205 +ARG rocky_version=8.6 + + +RUN rm -rf /etc/yum.repos.d/*.repo && \ + curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/${rocky_version}/BaseOS/x86_64/os/${pulp_version}/config.repo > /etc/yum.repos.d/Rocky-BaseOS.repo && \ + echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-BaseOS.repo && \ + curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/${rocky_version}/extras/x86_64/os/${pulp_version}/config.repo > /etc/yum.repos.d/Rocky-Extras.repo && \ + echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-Extras.repo && \ + curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/${rocky_version}/AppStream/x86_64/os/${pulp_version}/config.repo > /etc/yum.repos.d/Rocky-AppStream.repo && \ + echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-AppStream.repo && \ + curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/${rocky_version}/PowerTools/x86_64/os/${pulp_version}/config.repo > /etc/yum.repos.d/Rocky-PowerTools.repo && \ + echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-PowerTools.repo && \ + curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/${rocky_version}/nfv/x86_64/os/${pulp_version}/config.repo > /etc/yum.repos.d/Rocky-NFV.repo && \ + echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-NFV.repo && \ + curl https://pulp.128-232-222-245.sslip.io/pulp/content/centos/8/storage/x86_64/ceph-nautilus/20211122T102435/config.repo > /etc/yum.repos.d/ceph.repo && \ + echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Storage" >> /etc/yum.repos.d/ceph.repo RUN curl https://linux.mellanox.com/public/repo/mlnx_ofed/5.6-1.0.3.3/rhel8.6/mellanox_mlnx_ofed.repo > /etc/yum.repos.d/mofed.repo RUN dnf update -y RUN dnf -y install mlnx-ofed-hypervisor -RUN dnf install -y cloud-init libvirt qemu-kvm +RUN dnf install -y cloud-init libvirt qemu-kvm ceph-common edk2-ovmf qemu-kvm-block-rbd cyrus-sasl +# From the base dib element RUN dnf install -y findutils util-linux sudo python3 NetworkManager RUN systemctl unmask console-getty.service dev-hugepages.mount \ @@ -13,4 +31,3 @@ RUN systemctl unmask console-getty.service dev-hugepages.mount \ systemd-remount-fs.service RUN dnf list --installed -RUN dnf install -y ceph-common From 3162cce6ca436dcb9905e3cda97fc65237486ab0 Mon Sep 17 00:00:00 2001 From: John Garbutt Date: Wed, 8 Jun 2022 16:27:10 +0000 Subject: [PATCH 14/31] Fix ceph gpg key --- elements/rocky-container-pulp/8.6-pulp-mofed | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elements/rocky-container-pulp/8.6-pulp-mofed b/elements/rocky-container-pulp/8.6-pulp-mofed index 61a4297..7b91295 100644 --- a/elements/rocky-container-pulp/8.6-pulp-mofed +++ b/elements/rocky-container-pulp/8.6-pulp-mofed @@ -16,7 +16,7 @@ RUN rm -rf /etc/yum.repos.d/*.repo && \ curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/${rocky_version}/nfv/x86_64/os/${pulp_version}/config.repo > /etc/yum.repos.d/Rocky-NFV.repo && \ echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-NFV.repo && \ curl https://pulp.128-232-222-245.sslip.io/pulp/content/centos/8/storage/x86_64/ceph-nautilus/20211122T102435/config.repo > /etc/yum.repos.d/ceph.repo && \ - echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Storage" >> /etc/yum.repos.d/ceph.repo + echo "gpgkey=https://www.centos.org/keys/RPM-GPG-KEY-CentOS-SIG-Storage" >> /etc/yum.repos.d/ceph.repo RUN curl https://linux.mellanox.com/public/repo/mlnx_ofed/5.6-1.0.3.3/rhel8.6/mellanox_mlnx_ofed.repo > /etc/yum.repos.d/mofed.repo RUN dnf update -y From 2e51b08505b3ed01bc54591c9d0b3865fecd612e Mon Sep 17 00:00:00 2001 From: John Garbutt Date: Wed, 8 Jun 2022 17:29:01 +0000 Subject: [PATCH 15/31] Fix up perftest version issue --- elements/rocky-container-pulp/8.6-pulp-mofed | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/elements/rocky-container-pulp/8.6-pulp-mofed b/elements/rocky-container-pulp/8.6-pulp-mofed index 7b91295..c2b3cf3 100644 --- a/elements/rocky-container-pulp/8.6-pulp-mofed +++ b/elements/rocky-container-pulp/8.6-pulp-mofed @@ -30,4 +30,8 @@ RUN systemctl unmask console-getty.service dev-hugepages.mount \ getty.target sys-fs-fuse-connections.mount systemd-logind.service \ systemd-remount-fs.service +# Add hack because perftest in mofed conflicts and is older than rocky 8.6 version +RUN dnf install python3-dnf-plugin-versionlock -y +RUN dnf versionlock add "perftest-4.5-0.14.gd962d8c.56103" +RUN dnf update -y RUN dnf list --installed From f0a174dcf1d41dff63a2cbd208797ab0d2296f4c Mon Sep 17 00:00:00 2001 From: John Garbutt Date: Thu, 9 Jun 2022 14:52:54 +0000 Subject: [PATCH 16/31] Add docker-ce repo --- elements/rocky-container-pulp/8.6-pulp-mofed | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/elements/rocky-container-pulp/8.6-pulp-mofed b/elements/rocky-container-pulp/8.6-pulp-mofed index c2b3cf3..2fefba1 100644 --- a/elements/rocky-container-pulp/8.6-pulp-mofed +++ b/elements/rocky-container-pulp/8.6-pulp-mofed @@ -16,12 +16,14 @@ RUN rm -rf /etc/yum.repos.d/*.repo && \ curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/${rocky_version}/nfv/x86_64/os/${pulp_version}/config.repo > /etc/yum.repos.d/Rocky-NFV.repo && \ echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-NFV.repo && \ curl https://pulp.128-232-222-245.sslip.io/pulp/content/centos/8/storage/x86_64/ceph-nautilus/20211122T102435/config.repo > /etc/yum.repos.d/ceph.repo && \ - echo "gpgkey=https://www.centos.org/keys/RPM-GPG-KEY-CentOS-SIG-Storage" >> /etc/yum.repos.d/ceph.repo + echo "gpgkey=https://www.centos.org/keys/RPM-GPG-KEY-CentOS-SIG-Storage" >> /etc/yum.repos.d/ceph.repo && \ + curl https://pulp.128-232-222-245.sslip.io/pulp/content/docker-ce/centos/8/x86_64/stable/20211122T102435/config.repo > /etc/yum.repos.d/docker.repo && \ + echo "gpgkey=https://download.docker.com/linux/centos/gpg" >> /etc/yum.repos.d/docker.repo RUN curl https://linux.mellanox.com/public/repo/mlnx_ofed/5.6-1.0.3.3/rhel8.6/mellanox_mlnx_ofed.repo > /etc/yum.repos.d/mofed.repo RUN dnf update -y RUN dnf -y install mlnx-ofed-hypervisor -RUN dnf install -y cloud-init libvirt qemu-kvm ceph-common edk2-ovmf qemu-kvm-block-rbd cyrus-sasl +RUN dnf install -y cloud-init libvirt qemu-kvm ceph-common edk2-ovmf qemu-kvm-block-rbd cyrus-sasl docker-ce # From the base dib element RUN dnf install -y findutils util-linux sudo python3 NetworkManager @@ -33,5 +35,5 @@ RUN systemctl unmask console-getty.service dev-hugepages.mount \ # Add hack because perftest in mofed conflicts and is older than rocky 8.6 version RUN dnf install python3-dnf-plugin-versionlock -y RUN dnf versionlock add "perftest-4.5-0.14.gd962d8c.56103" +# DIB will do this, but run it here to test we are good RUN dnf update -y -RUN dnf list --installed From f06d9f088a7eab228fee6dda82ef8f0453b54db8 Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Tue, 9 Aug 2022 13:40:29 +0100 Subject: [PATCH 17/31] rockylinux : create machine-id early See: https://github.com/openstack/diskimage-builder/commit/99f10f9380ccebfdf9bd1758464f24d449323cc3 --- elements/rocky-container-pulp/8.6-pulp-mofed | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/elements/rocky-container-pulp/8.6-pulp-mofed b/elements/rocky-container-pulp/8.6-pulp-mofed index 2fefba1..58fcafc 100644 --- a/elements/rocky-container-pulp/8.6-pulp-mofed +++ b/elements/rocky-container-pulp/8.6-pulp-mofed @@ -3,6 +3,10 @@ FROM docker.io/library/rockylinux:8 ARG pulp_version=20220606T111205 ARG rocky_version=8.6 +# /etc/machine-id needs to be populated for /bin/kernel-install to +# correctly copy kernels into /boot. We will clear this out in the +# final image. +RUN systemd-machine-id-setup RUN rm -rf /etc/yum.repos.d/*.repo && \ curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/${rocky_version}/BaseOS/x86_64/os/${pulp_version}/config.repo > /etc/yum.repos.d/Rocky-BaseOS.repo && \ From b717ca7064e45743bdf3ff12361af85a36c14abe Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Tue, 9 Aug 2022 13:41:22 +0100 Subject: [PATCH 18/31] Add a delay to cloud-init-local.service This is to workaround the issue: ``` Unable to find a system nic for ``` See: https://askubuntu.com/questions/1400527/unable-to-find-a-system-nic-while-running-cloud-init --- elements/rocky-container-pulp/8.6-pulp-mofed | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/elements/rocky-container-pulp/8.6-pulp-mofed b/elements/rocky-container-pulp/8.6-pulp-mofed index 58fcafc..d02fd9c 100644 --- a/elements/rocky-container-pulp/8.6-pulp-mofed +++ b/elements/rocky-container-pulp/8.6-pulp-mofed @@ -29,6 +29,17 @@ RUN dnf update -y RUN dnf -y install mlnx-ofed-hypervisor RUN dnf install -y cloud-init libvirt qemu-kvm ceph-common edk2-ovmf qemu-kvm-block-rbd cyrus-sasl docker-ce +# Workaround for: Unable to find a system nic for from cloud-init +# https://askubuntu.com/questions/1400527/unable-to-find-a-system-nic-while-running-cloud-init +# The strange formatting is so we don't need to use DOCKER_BUILDKIT=1 for +# heredoc support. Echoing this inline prevents the need to set DIB_CONTAINER_CONTEXT +# in order to copy the file in (paths are relative to this directory). +RUN mkdir /etc/systemd/system/cloud-init-local.service.d \ + && echo $'\ +[Service] \n\ +ExecStartPre=sleep 30 \n' \ +>> /etc/systemd/system/cloud-init-local.service.d/delay.conf + # From the base dib element RUN dnf install -y findutils util-linux sudo python3 NetworkManager From 1b49e6c095ed4a8713c8512eec4b402bfdb1a453 Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Tue, 9 Aug 2022 13:42:45 +0100 Subject: [PATCH 19/31] Install kmod-mpt3sas This is to support some older raid controllers that were previously supported out of the box in CentOS7. --- elements/rocky-container-pulp/8.6-pulp-mofed | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/elements/rocky-container-pulp/8.6-pulp-mofed b/elements/rocky-container-pulp/8.6-pulp-mofed index d02fd9c..da31fc4 100644 --- a/elements/rocky-container-pulp/8.6-pulp-mofed +++ b/elements/rocky-container-pulp/8.6-pulp-mofed @@ -50,5 +50,15 @@ RUN systemctl unmask console-getty.service dev-hugepages.mount \ # Add hack because perftest in mofed conflicts and is older than rocky 8.6 version RUN dnf install python3-dnf-plugin-versionlock -y RUN dnf versionlock add "perftest-4.5-0.14.gd962d8c.56103" + +# Add support for MPTSAS raid controllers. This kernel module was included in +# CentOS 7. We now need an alternative source. Don't leave elrepo installed +# to avoid installing other packages of unknown providence. +RUN rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org \ + && dnf install -y https://www.elrepo.org/elrepo-release-8.el8.elrepo.noarch.rpm \ + && dnf versionlock add "kmod-mpt3sas-39.100.00.00-1.el8_6.elrepo.x86_64" \ + && dnf install -y kmod-mpt3sas \ + && dnf remove -y elrepo-release.noarch + # DIB will do this, but run it here to test we are good RUN dnf update -y From 7badf2c9d9d01c2fa07a2891a8f58d551353813d Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Thu, 11 Aug 2022 11:05:08 +0100 Subject: [PATCH 20/31] Install packages from generic cloud image --- elements/rocky-container-pulp/8.6-pulp-mofed | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/elements/rocky-container-pulp/8.6-pulp-mofed b/elements/rocky-container-pulp/8.6-pulp-mofed index da31fc4..e5a1d52 100644 --- a/elements/rocky-container-pulp/8.6-pulp-mofed +++ b/elements/rocky-container-pulp/8.6-pulp-mofed @@ -26,6 +26,21 @@ RUN rm -rf /etc/yum.repos.d/*.repo && \ RUN curl https://linux.mellanox.com/public/repo/mlnx_ofed/5.6-1.0.3.3/rhel8.6/mellanox_mlnx_ofed.repo > /etc/yum.repos.d/mofed.repo RUN dnf update -y +# Install/remove packages from https://git.rockylinux.org/rocky/kickstarts/-/blob/r8/Rocky-8-GenericCloud.ks +RUN dnf install -y @core --allowerasing +RUN dnf install -y chrony dnf yum cloud-init cloud-utils-growpart NetworkManager \ + dracut-config-generic dracut-norescue firewalld gdisk grub2 \ + kernel nfs-utils rsync tar dnf-utils yum-utils \ + python3-jsonschema qemu-guest-agent dhcp-client cockpit-ws \ + cockpit-system rocky-release rng-tools +RUN dnf erase -y aic94xx-firmware alsa-firmware alsa-lib alsa-tools-firmware \ + ivtv-firmware iwl100-firmware iwl1000-firmware iwl105-firmware \ + iwl135-firmware iwl2000-firmware iwl2030-firmware iwl3160-firmware \ + iwl3945-firmware iwl4965-firmware iwl5000-firmware iwl5150-firmware \ + iwl6000-firmware iwl6000g2a-firmware iwl6000g2b-firmware iwl6050-firmware \ + iwl7260-firmware libertas-sd8686-firmware libertas-sd8787-firmware \ + libertas-usb8388-firmware biosdevname iprutils plymouth + RUN dnf -y install mlnx-ofed-hypervisor RUN dnf install -y cloud-init libvirt qemu-kvm ceph-common edk2-ovmf qemu-kvm-block-rbd cyrus-sasl docker-ce From dc0acff28f28b334925358b62df636f317a25044 Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Thu, 11 Aug 2022 16:11:28 +0100 Subject: [PATCH 21/31] Remove cockpit --- elements/rocky-container-pulp/8.6-pulp-mofed | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/elements/rocky-container-pulp/8.6-pulp-mofed b/elements/rocky-container-pulp/8.6-pulp-mofed index e5a1d52..405fa93 100644 --- a/elements/rocky-container-pulp/8.6-pulp-mofed +++ b/elements/rocky-container-pulp/8.6-pulp-mofed @@ -31,8 +31,8 @@ RUN dnf install -y @core --allowerasing RUN dnf install -y chrony dnf yum cloud-init cloud-utils-growpart NetworkManager \ dracut-config-generic dracut-norescue firewalld gdisk grub2 \ kernel nfs-utils rsync tar dnf-utils yum-utils \ - python3-jsonschema qemu-guest-agent dhcp-client cockpit-ws \ - cockpit-system rocky-release rng-tools + python3-jsonschema qemu-guest-agent dhcp-client \ + rocky-release rng-tools RUN dnf erase -y aic94xx-firmware alsa-firmware alsa-lib alsa-tools-firmware \ ivtv-firmware iwl100-firmware iwl1000-firmware iwl105-firmware \ iwl135-firmware iwl2000-firmware iwl2030-firmware iwl3160-firmware \ From 75017e4965f3e278074be3d7f44bb0e6f946fbb5 Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Tue, 20 Sep 2022 17:38:32 +0100 Subject: [PATCH 22/31] Bump Rocky 8.6 snapshot versions --- elements/rocky-container-pulp/8.6-pulp-mofed | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/elements/rocky-container-pulp/8.6-pulp-mofed b/elements/rocky-container-pulp/8.6-pulp-mofed index 405fa93..2eff7fe 100644 --- a/elements/rocky-container-pulp/8.6-pulp-mofed +++ b/elements/rocky-container-pulp/8.6-pulp-mofed @@ -1,6 +1,5 @@ FROM docker.io/library/rockylinux:8 -ARG pulp_version=20220606T111205 ARG rocky_version=8.6 # /etc/machine-id needs to be populated for /bin/kernel-install to @@ -9,21 +8,22 @@ ARG rocky_version=8.6 RUN systemd-machine-id-setup RUN rm -rf /etc/yum.repos.d/*.repo && \ - curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/${rocky_version}/BaseOS/x86_64/os/${pulp_version}/config.repo > /etc/yum.repos.d/Rocky-BaseOS.repo && \ + curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/${rocky_version}/BaseOS/x86_64/os/20220914T080246/config.repo > /etc/yum.repos.d/Rocky-BaseOS.repo && \ echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-BaseOS.repo && \ - curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/${rocky_version}/extras/x86_64/os/${pulp_version}/config.repo > /etc/yum.repos.d/Rocky-Extras.repo && \ + curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/${rocky_version}/extras/x86_64/os/20220904T041706/config.repo > /etc/yum.repos.d/Rocky-Extras.repo && \ echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-Extras.repo && \ - curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/${rocky_version}/AppStream/x86_64/os/${pulp_version}/config.repo > /etc/yum.repos.d/Rocky-AppStream.repo && \ + curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/${rocky_version}/AppStream/x86_64/os/20220918T035853/config.repo > /etc/yum.repos.d/Rocky-AppStream.repo && \ echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-AppStream.repo && \ - curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/${rocky_version}/PowerTools/x86_64/os/${pulp_version}/config.repo > /etc/yum.repos.d/Rocky-PowerTools.repo && \ + curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/${rocky_version}/PowerTools/x86_64/os/20220918T035853/config.repo > /etc/yum.repos.d/Rocky-PowerTools.repo && \ echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-PowerTools.repo && \ - curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/${rocky_version}/nfv/x86_64/os/${pulp_version}/config.repo > /etc/yum.repos.d/Rocky-NFV.repo && \ + curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/${rocky_version}/nfv/x86_64/os/20220918T035853/config.repo > /etc/yum.repos.d/Rocky-NFV.repo && \ echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-NFV.repo && \ curl https://pulp.128-232-222-245.sslip.io/pulp/content/centos/8/storage/x86_64/ceph-nautilus/20211122T102435/config.repo > /etc/yum.repos.d/ceph.repo && \ echo "gpgkey=https://www.centos.org/keys/RPM-GPG-KEY-CentOS-SIG-Storage" >> /etc/yum.repos.d/ceph.repo && \ curl https://pulp.128-232-222-245.sslip.io/pulp/content/docker-ce/centos/8/x86_64/stable/20211122T102435/config.repo > /etc/yum.repos.d/docker.repo && \ - echo "gpgkey=https://download.docker.com/linux/centos/gpg" >> /etc/yum.repos.d/docker.repo -RUN curl https://linux.mellanox.com/public/repo/mlnx_ofed/5.6-1.0.3.3/rhel8.6/mellanox_mlnx_ofed.repo > /etc/yum.repos.d/mofed.repo + echo "gpgkey=https://download.docker.com/linux/centos/gpg" >> /etc/yum.repos.d/docker.repo && \ + curl https://pulp.128-232-222-245.sslip.io/pulp/content/mlnx_ofed/5.7-1.0.2.0/rhel8.6/x86_64/20220920T151419/config.repo > /etc/yum.repos.d/mofed.repo && \ + echo "gpgkey=https://www.mellanox.com/downloads/ofed/RPM-GPG-KEY-Mellanox" >> /etc/yum.repos.d/mofed.repo RUN dnf update -y # Install/remove packages from https://git.rockylinux.org/rocky/kickstarts/-/blob/r8/Rocky-8-GenericCloud.ks From 6521962287bbfed1d25ed002265d7bfdc1e376e2 Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Tue, 20 Sep 2022 18:03:01 +0100 Subject: [PATCH 23/31] Fix version lock --- elements/rocky-container-pulp/8.6-pulp-mofed | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elements/rocky-container-pulp/8.6-pulp-mofed b/elements/rocky-container-pulp/8.6-pulp-mofed index 2eff7fe..d5d7484 100644 --- a/elements/rocky-container-pulp/8.6-pulp-mofed +++ b/elements/rocky-container-pulp/8.6-pulp-mofed @@ -64,7 +64,7 @@ RUN systemctl unmask console-getty.service dev-hugepages.mount \ # Add hack because perftest in mofed conflicts and is older than rocky 8.6 version RUN dnf install python3-dnf-plugin-versionlock -y -RUN dnf versionlock add "perftest-4.5-0.14.gd962d8c.56103" +RUN dnf versionlock add "perftest-0:4.5-0.17.g6f25f23.57102.*" # Add support for MPTSAS raid controllers. This kernel module was included in # CentOS 7. We now need an alternative source. Don't leave elrepo installed From 91da79c5428b1d384a7324b6dc689d612156a67e Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Wed, 21 Sep 2022 18:44:39 +0100 Subject: [PATCH 24/31] Hardcode repository ids for ease of update --- elements/rocky-container-pulp/8.6-pulp-mofed | 101 ++++++++++++++----- 1 file changed, 75 insertions(+), 26 deletions(-) diff --git a/elements/rocky-container-pulp/8.6-pulp-mofed b/elements/rocky-container-pulp/8.6-pulp-mofed index d5d7484..2796e3d 100644 --- a/elements/rocky-container-pulp/8.6-pulp-mofed +++ b/elements/rocky-container-pulp/8.6-pulp-mofed @@ -1,3 +1,7 @@ +# syntax=docker/dockerfile:1.4.3 + +# To build this image you need enable docker build kit. This is for the heredoc support. + FROM docker.io/library/rockylinux:8 ARG rocky_version=8.6 @@ -7,23 +11,72 @@ ARG rocky_version=8.6 # final image. RUN systemd-machine-id-setup -RUN rm -rf /etc/yum.repos.d/*.repo && \ - curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/${rocky_version}/BaseOS/x86_64/os/20220914T080246/config.repo > /etc/yum.repos.d/Rocky-BaseOS.repo && \ - echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-BaseOS.repo && \ - curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/${rocky_version}/extras/x86_64/os/20220904T041706/config.repo > /etc/yum.repos.d/Rocky-Extras.repo && \ - echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-Extras.repo && \ - curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/${rocky_version}/AppStream/x86_64/os/20220918T035853/config.repo > /etc/yum.repos.d/Rocky-AppStream.repo && \ - echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-AppStream.repo && \ - curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/${rocky_version}/PowerTools/x86_64/os/20220918T035853/config.repo > /etc/yum.repos.d/Rocky-PowerTools.repo && \ - echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-PowerTools.repo && \ - curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/${rocky_version}/nfv/x86_64/os/20220918T035853/config.repo > /etc/yum.repos.d/Rocky-NFV.repo && \ - echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-NFV.repo && \ - curl https://pulp.128-232-222-245.sslip.io/pulp/content/centos/8/storage/x86_64/ceph-nautilus/20211122T102435/config.repo > /etc/yum.repos.d/ceph.repo && \ - echo "gpgkey=https://www.centos.org/keys/RPM-GPG-KEY-CentOS-SIG-Storage" >> /etc/yum.repos.d/ceph.repo && \ - curl https://pulp.128-232-222-245.sslip.io/pulp/content/docker-ce/centos/8/x86_64/stable/20211122T102435/config.repo > /etc/yum.repos.d/docker.repo && \ - echo "gpgkey=https://download.docker.com/linux/centos/gpg" >> /etc/yum.repos.d/docker.repo && \ - curl https://pulp.128-232-222-245.sslip.io/pulp/content/mlnx_ofed/5.7-1.0.2.0/rhel8.6/x86_64/20220920T151419/config.repo > /etc/yum.repos.d/mofed.repo && \ - echo "gpgkey=https://www.mellanox.com/downloads/ofed/RPM-GPG-KEY-Mellanox" >> /etc/yum.repos.d/mofed.repo +COPY < from cloud-init # https://askubuntu.com/questions/1400527/unable-to-find-a-system-nic-while-running-cloud-init -# The strange formatting is so we don't need to use DOCKER_BUILDKIT=1 for -# heredoc support. Echoing this inline prevents the need to set DIB_CONTAINER_CONTEXT -# in order to copy the file in (paths are relative to this directory). -RUN mkdir /etc/systemd/system/cloud-init-local.service.d \ - && echo $'\ -[Service] \n\ -ExecStartPre=sleep 30 \n' \ ->> /etc/systemd/system/cloud-init-local.service.d/delay.conf +COPY < Date: Thu, 22 Sep 2022 09:35:54 +0100 Subject: [PATCH 25/31] Make ceph repo ID easily overidable --- elements/rocky-container-pulp/8.6-pulp-mofed | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/elements/rocky-container-pulp/8.6-pulp-mofed b/elements/rocky-container-pulp/8.6-pulp-mofed index 2796e3d..6aba1f2 100644 --- a/elements/rocky-container-pulp/8.6-pulp-mofed +++ b/elements/rocky-container-pulp/8.6-pulp-mofed @@ -52,8 +52,8 @@ gpgcheck=0 repo_gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial Rocky-NFV.repo -[centos-8-ceph-nautilus] -name=centos-8-ceph-nautilus +[ceph] +name=CentOS-$releasever - Ceph Nautilus enabled=1 baseurl=https://pulp.128-232-222-245.sslip.io/pulp/content/centos/8/storage/x86_64/ceph-nautilus/20211122T102435/ gpgcheck=0 @@ -125,4 +125,4 @@ RUN rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org \ && dnf remove -y elrepo-release.noarch # DIB will do this, but run it here to test we are good -RUN dnf update -y \ No newline at end of file +RUN dnf update -y From 8a859e7f15c5e6cff01f4b0ffa2d05a914992644 Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Thu, 22 Sep 2022 10:41:30 +0100 Subject: [PATCH 26/31] Enable gpgcheck for all repos --- elements/rocky-container-pulp/8.6-pulp-mofed | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/elements/rocky-container-pulp/8.6-pulp-mofed b/elements/rocky-container-pulp/8.6-pulp-mofed index 6aba1f2..a634f1a 100644 --- a/elements/rocky-container-pulp/8.6-pulp-mofed +++ b/elements/rocky-container-pulp/8.6-pulp-mofed @@ -16,7 +16,7 @@ COPY < Date: Thu, 22 Sep 2022 10:41:45 +0100 Subject: [PATCH 27/31] Use localfile for GPG key This means that you don't need an internet connection to download the GPG keys. This is useful if you run a local pulp. --- elements/rocky-container-pulp/8.6-pulp-mofed | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/elements/rocky-container-pulp/8.6-pulp-mofed b/elements/rocky-container-pulp/8.6-pulp-mofed index a634f1a..ba4bf37 100644 --- a/elements/rocky-container-pulp/8.6-pulp-mofed +++ b/elements/rocky-container-pulp/8.6-pulp-mofed @@ -11,6 +11,10 @@ ARG rocky_version=8.6 # final image. RUN systemd-machine-id-setup +RUN curl -L https://www.centos.org/keys/RPM-GPG-KEY-CentOS-SIG-Storage -o /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Storage\ + && curl -L https://www.mellanox.com/downloads/ofed/RPM-GPG-KEY-Mellanox -o /etc/pki/rpm-gpg/RPM-GPG-KEY-Mellanox\ + && curl -L https://download.docker.com/linux/centos/gpg -o /etc/pki/rpm-gpg/RPM-GPG-KEY-docker + COPY < Date: Mon, 26 Sep 2022 10:30:56 +0100 Subject: [PATCH 28/31] Revert to using upstream mellanox repo --- elements/rocky-container-pulp/8.6-pulp-mofed | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elements/rocky-container-pulp/8.6-pulp-mofed b/elements/rocky-container-pulp/8.6-pulp-mofed index ba4bf37..6d6e9a5 100644 --- a/elements/rocky-container-pulp/8.6-pulp-mofed +++ b/elements/rocky-container-pulp/8.6-pulp-mofed @@ -75,7 +75,7 @@ docker.repo [mlnx_ofed] name=Mellanox Technologies rhel8.6-$basearch mlnx_ofed 5.7-1.0.2.0 GA enabled=1 -baseurl=https://pulp.128-232-222-245.sslip.io/pulp/content/mlnx_ofed/5.7-1.0.2.0/rhel8.6/x86_64/20220920T151419/ +baseurl=http://linux.mellanox.com/public/repo/mlnx_ofed/5.7-1.0.2.0/rhel8.6/$basearch gpgcheck=1 repo_gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Mellanox From 75091826993362078c270a5cd80e5712851f9c73 Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Mon, 26 Sep 2022 10:55:36 +0100 Subject: [PATCH 29/31] basearch undefined? --- elements/rocky-container-pulp/8.6-pulp-mofed | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elements/rocky-container-pulp/8.6-pulp-mofed b/elements/rocky-container-pulp/8.6-pulp-mofed index 6d6e9a5..96385c9 100644 --- a/elements/rocky-container-pulp/8.6-pulp-mofed +++ b/elements/rocky-container-pulp/8.6-pulp-mofed @@ -75,7 +75,7 @@ docker.repo [mlnx_ofed] name=Mellanox Technologies rhel8.6-$basearch mlnx_ofed 5.7-1.0.2.0 GA enabled=1 -baseurl=http://linux.mellanox.com/public/repo/mlnx_ofed/5.7-1.0.2.0/rhel8.6/$basearch +baseurl=https://linux.mellanox.com/public/repo/mlnx_ofed/5.7-1.0.2.0/rhel8.6/x86_64/ gpgcheck=1 repo_gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Mellanox From 64277c5fe5f683f77d061b5073d18bd0b6a9adb3 Mon Sep 17 00:00:00 2001 From: John Garbutt Date: Mon, 26 Sep 2022 17:41:08 +0100 Subject: [PATCH 30/31] Build OFED from source, to match latest kernel (#52) * Build OFED from source, to match latest kernel * Tidy up OFED build Co-authored-by: root --- elements/rocky-container-pulp/8.6-pulp-mofed | 34 +++++++++----------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/elements/rocky-container-pulp/8.6-pulp-mofed b/elements/rocky-container-pulp/8.6-pulp-mofed index 96385c9..a41cec0 100644 --- a/elements/rocky-container-pulp/8.6-pulp-mofed +++ b/elements/rocky-container-pulp/8.6-pulp-mofed @@ -15,7 +15,7 @@ RUN curl -L https://www.centos.org/keys/RPM-GPG-KEY-CentOS-SIG-Storage -o /etc/p && curl -L https://www.mellanox.com/downloads/ofed/RPM-GPG-KEY-Mellanox -o /etc/pki/rpm-gpg/RPM-GPG-KEY-Mellanox\ && curl -L https://download.docker.com/linux/centos/gpg -o /etc/pki/rpm-gpg/RPM-GPG-KEY-docker -COPY < from cloud-init -# https://askubuntu.com/questions/1400527/unable-to-find-a-system-nic-while-running-cloud-init -COPY < from cloud-init +# https://askubuntu.com/questions/1400527/unable-to-find-a-system-nic-while-running-cloud-init +COPY < Date: Wed, 7 Dec 2022 10:04:12 +0000 Subject: [PATCH 31/31] Remove untested 8.5 image --- elements/rocky-container-pulp/8.5-pulp-mofed | 27 -------------------- 1 file changed, 27 deletions(-) delete mode 100644 elements/rocky-container-pulp/8.5-pulp-mofed diff --git a/elements/rocky-container-pulp/8.5-pulp-mofed b/elements/rocky-container-pulp/8.5-pulp-mofed deleted file mode 100644 index d42b64c..0000000 --- a/elements/rocky-container-pulp/8.5-pulp-mofed +++ /dev/null @@ -1,27 +0,0 @@ -FROM docker.io/library/rockylinux:8.5 - -RUN rm -rf /etc/yum.repos.d/*.repo && \ - curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/8.5/BaseOS/x86_64/os/20220517T042605/config.repo > /etc/yum.repos.d/Rocky-BaseOS.repo && \ - echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-BaseOS.repo && \ - curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/8.5/extras/x86_64/os/20220421T052541/config.repo > /etc/yum.repos.d/Rocky-Extras.repo && \ - echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-Extras.repo && \ - curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/8.5/AppStream/x86_64/os/20220507T065526/config.repo > /etc/yum.repos.d/Rocky-AppStream.repo && \ - echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-AppStream.repo && \ - curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/8.5/PowerTools/x86_64/os/20220513T051657/config.repo > /etc/yum.repos.d/Rocky-PowerTools.repo && \ - echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-PowerTools.repo && \ - curl https://pulp.128-232-222-245.sslip.io/pulp/content/rocky/8.5/nfv/x86_64/os/20220506T031824/config.repo > /etc/yum.repos.d/Rocky-NFV.repo && \ - echo "gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial" >> /etc/yum.repos.d/Rocky-NFV.repo -RUN curl https://linux.mellanox.com/public/repo/mlnx_ofed/5.6-1.0.3.3/rhel8.5/mellanox_mlnx_ofed.repo > /etc/yum.repos.d/mofed.repo -RUN dnf update -y -RUN dnf -y install mlnx-ofed-hypervisor - -RUN dnf install -y centos-release-advanced-virtualization -RUN dnf install -y cloud-init libvirt qemu-kvm - -RUN dnf install -y findutils util-linux sudo python3 NetworkManager - -RUN systemctl unmask console-getty.service dev-hugepages.mount \ - getty.target sys-fs-fuse-connections.mount systemd-logind.service \ - systemd-remount-fs.service - -