feat: add almalinux-container element
Change-Id: I0b9f50e9a8844e157af70ee0f343fe9d40fa2537 Signed-off-by: Birger J. Nordølum <contact@mindtooth.no>
This commit is contained in:
parent
5d0162905f
commit
ce44d51677
@ -58,6 +58,7 @@
|
||||
parent: dib-functests-base
|
||||
vars:
|
||||
dib_functests:
|
||||
- almalinux-container/almalinux-9-aarch64-build-succeeds
|
||||
- centos-minimal/8-stream-aarch64-build-succeeds
|
||||
- centos-minimal/9-stream-aarch64-build-succeeds
|
||||
- openeuler-minimal/22.03-LTS-build-succeeds
|
||||
@ -82,6 +83,32 @@
|
||||
- ^doc/.*$
|
||||
- ^releasenotes/.*$
|
||||
|
||||
- job:
|
||||
name: dib-nodepool-functional-openstack-almalinux-8-containerfile-src
|
||||
description: |
|
||||
Test building and booting a AlmaLinux image from a
|
||||
containerfile with Nodepool and OpenStack (using released
|
||||
libraries)
|
||||
parent: dib-nodepool-functional-src-base
|
||||
vars:
|
||||
nodepool_debug: true
|
||||
nodepool_diskimage:
|
||||
base_element: almalinux-container
|
||||
release: '8'
|
||||
|
||||
- job:
|
||||
name: dib-nodepool-functional-openstack-almalinux-9-containerfile-src
|
||||
description: |
|
||||
Test building and booting a AlmaLinux image from a
|
||||
containerfile with Nodepool and OpenStack (using released
|
||||
libraries)
|
||||
parent: dib-nodepool-functional-src-base
|
||||
vars:
|
||||
nodepool_debug: true
|
||||
nodepool_diskimage:
|
||||
base_element: almalinux-container
|
||||
release: '9'
|
||||
|
||||
- job:
|
||||
name: dib-nodepool-functional-openstack-centos-7-src
|
||||
description: |
|
||||
|
@ -32,6 +32,10 @@
|
||||
- dib-functests
|
||||
- opendev-buildset-registry
|
||||
- nodepool-build-image-siblings
|
||||
- dib-nodepool-functional-openstack-almalinux-8-containerfile-src:
|
||||
voting: false
|
||||
- dib-nodepool-functional-openstack-almalinux-9-containerfile-src:
|
||||
voting: false
|
||||
- dib-nodepool-functional-openstack-centos-7-src
|
||||
- dib-nodepool-functional-openstack-centos-8-stream-src
|
||||
- dib-nodepool-functional-openstack-centos-9-stream-src
|
||||
|
@ -0,0 +1,9 @@
|
||||
===================
|
||||
almalinux-container
|
||||
===================
|
||||
|
||||
Create a minimal image based on AlmaLinux container image
|
||||
|
||||
This element sets the ``DISTRO_NAME`` var to 'almalinux'. The release
|
||||
of AlmaLinux to be installed can be controlled through the ``DIB_RELEASE``
|
||||
variable, which defaults the latest supported release.
|
@ -0,0 +1,13 @@
|
||||
FROM quay.io/almalinuxorg/almalinux:8
|
||||
|
||||
RUN dnf group install -y 'Minimal Install' --allowerasing && \
|
||||
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
|
||||
|
||||
# /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
|
@ -0,0 +1,13 @@
|
||||
FROM quay.io/almalinuxorg/almalinux:9
|
||||
|
||||
RUN dnf group install -y 'Minimal Install' --allowerasing && \
|
||||
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
|
||||
|
||||
# /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
|
@ -0,0 +1,8 @@
|
||||
cache-url
|
||||
containerfile
|
||||
package-installs
|
||||
redhat-common
|
||||
rpm-distro
|
||||
source-repositories
|
||||
vm
|
||||
yum
|
@ -0,0 +1,4 @@
|
||||
export DISTRO_NAME=almalinux
|
||||
export DIB_RELEASE=${DIB_RELEASE:-9} # always the most recent major
|
||||
export EFI_BOOT_DIR="EFI/almalinux"
|
||||
export DIB_YUM_MINIMAL_CREATE_INTERFACES=0
|
@ -0,0 +1 @@
|
||||
export YUM=dnf
|
@ -0,0 +1,10 @@
|
||||
audit:
|
||||
dnf-plugins-core:
|
||||
dracut:
|
||||
dracut-config-generic:
|
||||
grubby:
|
||||
kernel:
|
||||
initscripts:
|
||||
man-pages:
|
||||
passwd:
|
||||
redhat-rpm-config:
|
@ -0,0 +1 @@
|
||||
Verify a AlmaLinux 9 aarch64 image
|
@ -0,0 +1,3 @@
|
||||
block-device-efi
|
||||
openstack-ci-mirrors
|
||||
vm
|
@ -0,0 +1 @@
|
||||
export DIB_RELEASE='9'
|
@ -0,0 +1 @@
|
||||
Verify we can build a almalinux-container image.
|
@ -0,0 +1 @@
|
||||
vm
|
@ -8,7 +8,7 @@ set -eu
|
||||
set -o pipefail
|
||||
|
||||
case "$DISTRO_NAME" in
|
||||
centos* | rhel* | rocky*)
|
||||
almalinux* | centos* | rhel* | rocky*)
|
||||
dnf install -y elrepo-release.noarch
|
||||
if [ ${DIB_ELREPO_KERNEL:-0} -eq 1 ]; then
|
||||
rpm -q dnf-plugins-core || dnf install -y dnf-plugins-core
|
||||
|
@ -1,5 +1,9 @@
|
||||
{
|
||||
"distro": {
|
||||
"almalinux": {
|
||||
"wget": "wget",
|
||||
"yum-utils": "yum-utils"
|
||||
},
|
||||
"centos7": {
|
||||
"wget": "wget",
|
||||
"yum-utils": "yum-utils"
|
||||
|
@ -6,7 +6,7 @@ fi
|
||||
set -eu
|
||||
set -o pipefail
|
||||
|
||||
if [[ (${DISTRO_NAME} =~ "centos" || ${DISTRO_NAME} =~ "rocky") ]]; then
|
||||
if [[ (${DISTRO_NAME} =~ "almalinux" || ${DISTRO_NAME} =~ "centos" || ${DISTRO_NAME} =~ "rocky") ]]; then
|
||||
# Centos has "epel-release" in extras, which is default enabled.
|
||||
${YUM} install -y epel-release
|
||||
else
|
||||
|
@ -26,7 +26,8 @@ log = logging.getLogger()
|
||||
|
||||
def os_family(distro):
|
||||
family = None
|
||||
if distro in ['fedora', 'rhel', 'rhel7', 'centos', 'centos7', 'openeuler',
|
||||
if distro in ['almalinux', 'fedora', 'rhel', 'rhel7', 'centos', 'centos7',
|
||||
'openeuler',
|
||||
'rocky']:
|
||||
family = 'redhat'
|
||||
elif distro in ['debian', 'ubuntu']:
|
||||
|
@ -1,12 +1,12 @@
|
||||
if [[ ${DISTRO_NAME} =~ (centos|fedora|rocky) ]]; then
|
||||
if [[ ${DISTRO_NAME} =~ (almalinux|centos|fedora|rocky) ]]; then
|
||||
export DIB_SIMPLE_INIT_NETWORKMANAGER=${DIB_SIMPLE_INIT_NETWORKMANAGER:-1}
|
||||
else
|
||||
export DIB_SIMPLE_INIT_NETWORKMANAGER=${DIB_SIMPLE_INIT_NETWORKMANAGER:-0}
|
||||
fi
|
||||
|
||||
if [[ (${DISTRO_NAME} == "centos" || ${DISTRO_NAME} == "rocky") && $DIB_RELEASE > 7 ]] || [[ ${DISTRO_NAME} == "fedora" ]]; then
|
||||
if [[ (${DISTRO_NAME} == "almalinux" || ${DISTRO_NAME} == "centos" || ${DISTRO_NAME} == "rocky") && $DIB_RELEASE > 7 ]] || [[ ${DISTRO_NAME} == "fedora" ]]; then
|
||||
if [[ $DIB_SIMPLE_INIT_NETWORKMANAGER == 0 ]]; then
|
||||
echo "simple-init only supports NetworkManager mode on Fedora and CentOS/Rocky 8"
|
||||
echo "simple-init only supports NetworkManager mode on Fedora and AlmaLinux/CentOS/Rocky 8 & 9"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user