From db238b9c9950d956bec920034638ab14b6a5e4dc Mon Sep 17 00:00:00 2001 From: Dmitry Tantsur Date: Tue, 15 Dec 2020 15:10:50 +0100 Subject: [PATCH] Make the debian job voting and start publishing debian images With only 270MiB in size, the Debian images are likely candidates for our future default images. Given that CentOS Stream 8 images are nearly 500MiB in size, Debian may be our only path forward. Enable installing firmware on Debian images to make them suitable for bare metal installations. Do not try to install biosdevname on non-RH systems. Change-Id: I2c2a71c4afd0cd534961317b7fe9d3fb5d007d24 --- dib/extra-hardware/package-installs.yaml | 4 +++- .../environment.d/01-debian-ipa.bash | 8 ++++++++ .../package-installs.yaml | 17 +++++++++++++++++ .../notes/debian-firmware-1927601ebb779bc4.yaml | 13 +++++++++++++ roles/ipa-build-dib-image/tasks/main.yaml | 7 +++++++ zuul.d/ironic-python-agent-builder-jobs.yaml | 17 ++++++++++++++++- zuul.d/project.yaml | 7 +++++-- 7 files changed, 69 insertions(+), 4 deletions(-) create mode 100644 dib/ironic-python-agent-ramdisk/environment.d/01-debian-ipa.bash create mode 100644 releasenotes/notes/debian-firmware-1927601ebb779bc4.yaml diff --git a/dib/extra-hardware/package-installs.yaml b/dib/extra-hardware/package-installs.yaml index 12029e9..82687ee 100644 --- a/dib/extra-hardware/package-installs.yaml +++ b/dib/extra-hardware/package-installs.yaml @@ -1,4 +1,3 @@ -biosdevname: ethtool: fio: hdparm: @@ -8,3 +7,6 @@ pciutils: sdparm: smartmontools: sysbench: + +biosdevname: + when: IPA_DISTRO_FAMILY = rh diff --git a/dib/ironic-python-agent-ramdisk/environment.d/01-debian-ipa.bash b/dib/ironic-python-agent-ramdisk/environment.d/01-debian-ipa.bash new file mode 100644 index 0000000..bb697e8 --- /dev/null +++ b/dib/ironic-python-agent-ramdisk/environment.d/01-debian-ipa.bash @@ -0,0 +1,8 @@ +# IPA is built with non-free firmware by default. +export DIB_DEBIAN_COMPONENTS=${DIB_DEBIAN_COMPONENTS:-main,contrib,non-free} + +if [[ $DIB_DEBIAN_COMPONENTS =~ non-free ]]; then + export IPA_DEBIAN_NONFREE=true +else + export IPA_DEBIAN_NONFREE=false +fi diff --git a/dib/ironic-python-agent-ramdisk/package-installs.yaml b/dib/ironic-python-agent-ramdisk/package-installs.yaml index 3b4206c..99e5c6a 100644 --- a/dib/ironic-python-agent-ramdisk/package-installs.yaml +++ b/dib/ironic-python-agent-ramdisk/package-installs.yaml @@ -36,6 +36,23 @@ linux-firmware: phase: post-install.d when: IPA_DISTRO_FAMILY = rh +firmware-linux-free: + when: DISTRO_NAME = debian +firmware-misc-nonfree: + when: + - DISTRO_NAME = debian + - IPA_DEBIAN_NONFREE = true +intel-microcode: + arch: x86_64 + when: + - DISTRO_NAME = debian + - IPA_DEBIAN_NONFREE = true +amd64-microcode: + arch: x86_64 + when: + - DISTRO_NAME = debian + - IPA_DEBIAN_NONFREE = true + # Packages that should not normally be present on IPA images cloud-init: phase: post-install.d diff --git a/releasenotes/notes/debian-firmware-1927601ebb779bc4.yaml b/releasenotes/notes/debian-firmware-1927601ebb779bc4.yaml new file mode 100644 index 0000000..45e8efd --- /dev/null +++ b/releasenotes/notes/debian-firmware-1927601ebb779bc4.yaml @@ -0,0 +1,13 @@ +--- +fixes: + - | + Free firmware is now installed by default on Debian DIB builds. + - | + No longer tries to install ``biosdevname`` on non Red Hat systems + (dropped from Ubuntu after Bionic, never present in Debian). +upgrade: + - | + Non-free firmware is now installed by default on Debian DIB builds. + Change the available repositories to disable: + + export DIB_DEBIAN_COMPONENTS=main diff --git a/roles/ipa-build-dib-image/tasks/main.yaml b/roles/ipa-build-dib-image/tasks/main.yaml index bbec891..b8826b4 100644 --- a/roles/ipa-build-dib-image/tasks/main.yaml +++ b/roles/ipa-build-dib-image/tasks/main.yaml @@ -12,6 +12,13 @@ - image_distro in ["centos-minimal", "centos"] - not image_target_name +- name: Generate a nice target name for Debian + set_fact: + image_target_name: debian + when: + - image_distro in ["debian-minimal", "debian"] + - not image_target_name + - name: Generate image name set_fact: image_name: ipa-{{ image_target_name | default(image_distro, true) }}-{{ ipa_branch_path }} diff --git a/zuul.d/ironic-python-agent-builder-jobs.yaml b/zuul.d/ironic-python-agent-builder-jobs.yaml index 817f9fd..cd7331e 100644 --- a/zuul.d/ironic-python-agent-builder-jobs.yaml +++ b/zuul.d/ironic-python-agent-builder-jobs.yaml @@ -39,6 +39,15 @@ image_distro: 'centos' image_release: 8 +- job: + name: ironic-python-agent-build-image-dib-debian + parent: ironic-python-agent-build-image-base + required-projects: + - openstack/diskimage-builder + vars: + image_type: 'dib' + image_distro: 'debian-minimal' + - job: name: ironic-python-agent-check-image-base parent: base @@ -119,7 +128,13 @@ - openstack/diskimage-builder vars: image_type: 'dib' - image_distro: 'debian' + image_distro: 'debian-minimal' + +- job: + name: ironic-python-agent-check-image-dib-debian-extra + parent: ironic-python-agent-check-image-dib-debian + vars: + extra_elements: ["extra-hardware"] - job: name: ironic-python-agent-check-image-dib-ubuntu diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index cd50a26..871097c 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -13,13 +13,13 @@ - ironic-python-agent-check-image-dib-centos8 - ironic-python-agent-check-image-dib-centos8-extra - ironic-python-agent-check-image-dib-centos7 + - ironic-python-agent-check-image-dib-debian + - ironic-python-agent-check-image-dib-debian-extra # Non-voting jobs - ironic-python-agent-check-image-dib-centos7-python3: voting: false - ironic-python-agent-check-image-dib-fedora: voting: false - - ironic-python-agent-check-image-dib-debian: - voting: false - ironic-python-agent-check-image-dib-ubuntu: voting: false - ipa-tempest-wholedisk-bios-ipmi-direct-dib-src: @@ -40,8 +40,11 @@ - ironic-python-agent-check-image-dib-centos8 - ironic-python-agent-check-image-dib-centos8-extra - ironic-python-agent-check-image-dib-centos7 + - ironic-python-agent-check-image-dib-debian + - ironic-python-agent-check-image-dib-debian-extra post: jobs: - publish-openstack-python-branch-tarball - ironic-python-agent-build-image-tinyipa - ironic-python-agent-build-image-dib-centos8 + - ironic-python-agent-build-image-dib-debian