From f5d015c8830dc8abf8407feb07381026d868a704 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Fri, 27 Aug 2021 15:56:25 +1000 Subject: [PATCH] Update Docker and bindep for Bullseye base images Similar to Zuul (I71182e9d3e6e930977a9f983b37743ee3300ec91), the base images have updated to Bullseye. This updates various things to get a building Bullseye image. We have upgrade to 3.9-based images here because OpenDev builds ARM64 wheels for a bullseye+arm64 combo, which we use to speed up the ARM64 cross-build (we do not have any repository of <3.7|3.8>+bullseye ARM64 wheels, so it makes it difficult to use these combos as the cross-build can take a very long time) Depends-On: https://review.opendev.org/c/openstack/diskimage-builder/+/806318 Change-Id: I21cfbd3935e48be4b92591ea36c7eed301230753 --- .zuul.yaml | 12 ++++++------ Dockerfile | 31 ++++++++++++++++--------------- bindep.txt | 4 ++-- tools/pip.conf.arm64 | 2 +- 4 files changed, 25 insertions(+), 24 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index db192395f..aa3e73857 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -67,8 +67,8 @@ dependencies: - opendev-buildset-registry requires: - - python-builder-3.8-container-image - - python-base-3.8-container-image + - python-builder-3.9-bullseye-container-image + - python-base-3.9-bullseye-container-image provides: nodepool-container-image vars: &nodepool_image_vars docker_images: @@ -103,8 +103,8 @@ description: Build Docker images and upload to Docker Hub. timeout: *image_build_timeout requires: - - python-builder-3.8-container-image - - python-base-3.8-container-image + - python-builder-3.9-bullseye-container-image + - python-base-3.9-bullseye-container-image provides: nodepool-container-image vars: *nodepool_image_vars secrets: @@ -134,8 +134,8 @@ - openstack/diskimage-builder - openstack/openstacksdk requires: - - python-builder-3.8-container-image - - python-base-3.8-container-image + - python-builder-3.9-bullseye-container-image + - python-base-3.9-bullseye-container-image provides: nodepool-siblings-container-image vars: zuul_work_dir: "{{ zuul.projects['opendev.org/zuul/nodepool'].src_dir }}" diff --git a/Dockerfile b/Dockerfile index 4a5dd94ed..d74feffb3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -FROM docker.io/opendevorg/python-builder:3.7 as builder +FROM docker.io/opendevorg/python-builder:3.9-bullseye as builder # ============================================================================ ARG ZUUL_SIBLINGS="" @@ -25,7 +25,7 @@ RUN if [ `uname -m` = "aarch64" ] ; then \ fi RUN assemble -FROM docker.io/opendevorg/python-base:3.7 as nodepool-base +FROM docker.io/opendevorg/python-base:3.9-bullseye as nodepool-base # ============================================================================ COPY --from=builder /output/ /output @@ -77,19 +77,17 @@ RUN \ && apt-get update \ && apt-get install -y \ curl \ + dnf \ debian-keyring \ dosfstools \ gdisk \ git \ kpartx \ qemu-utils \ - ubuntu-keyring \ vhd-util \ debootstrap \ procps \ xz-utils \ - yum \ - yum-utils \ zypper # Podman install mainly for the "containerfile" elements of dib that @@ -102,20 +100,23 @@ RUN \ # hand-wavy motion) but it's not in the container; override to use # cgroupfs manager. Also disable trying to send logs to the journal. # -# Kernel may not support overlayfsmetacopy options (bionic?), need to -# turn that off for compatability. See various error messages related -# to: -# Error: error creating libpod runtime: failed to mount overlay for -# metacopy check: invalid argument RUN \ - echo "deb https://deb.debian.org/debian buster-backports main" >> /etc/apt/sources.list \ - && echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/ /" > "/etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" \ + echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_11/ /" > "/etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list" \ && apt-get update \ && apt-get install -y --install-recommends \ - libseccomp2/buster-backports \ podman \ - && printf '[engine]\ncgroup_manager="cgroupfs"\nevents_logger="file"\n' > /etc/containers/containers.conf \ - && sed -i 's/,metacopy=on//g' /etc/containers/storage.conf + && printf '[engine]\ncgroup_manager="cgroupfs"\nevents_logger="file"\n' > /etc/containers/containers.conf + +# There is a Debian package in the NEW queue currently for dnf-plugins-core +# https://ftp-master.debian.org/new/dnf-plugins-core_4.0.21-1~exp1.html +# Until this is generally available; manually install "dnf download" +# for the yum-minimal element +RUN \ + git clone https://github.com/rpm-software-management/dnf-plugins-core \ + && mkdir /usr/lib/python3/dist-packages/dnf-plugins \ + && cp -r dnf-plugins-core/plugins/dnfpluginscore /usr/lib/python3/dist-packages \ + && cp dnf-plugins-core/plugins/download.py /usr/lib/python3/dist-packages/dnf-plugins \ + && rm -rf dnf-plugins-core # Cleanup RUN \ diff --git a/bindep.txt b/bindep.txt index 84a90769d..12142228f 100644 --- a/bindep.txt +++ b/bindep.txt @@ -5,8 +5,8 @@ gcc [compile test] libc6-dev [compile test platform:dpkg] libffi-dev [compile test platform:dpkg platform:apk] libffi [platform:apk] -libffi7 [platform:ubuntu-focal] -libffi6 [platform:dpkg !platform:ubuntu-focal] +libffi7 [platform:ubuntu-focal platform:debian-bullseye] +libffi6 [platform:dpkg !platform:ubuntu-focal !platform:debian-bullseye] libffi-devel [compile test platform:rpm] libressl-dev [compile test platform:apk] libssl-dev [compile test platform:dpkg] diff --git a/tools/pip.conf.arm64 b/tools/pip.conf.arm64 index 04bae5b66..c2f8825c5 100644 --- a/tools/pip.conf.arm64 +++ b/tools/pip.conf.arm64 @@ -1,5 +1,5 @@ [global] -extra-index-url = https://mirror.dfw.rax.opendev.org/wheel/debian-10-aarch64/ +extra-index-url = https://mirror.dfw.rax.opendev.org/wheel/debian-11-aarch64/ [install] prefer-binary = true