Skip to content

Commit

Permalink
Merge pull request openshift#326 from elfosardo/centos-stream-9
Browse files Browse the repository at this point in the history
Use centos stream 9 as base image
  • Loading branch information
metal3-io-bot committed Mar 17, 2022
2 parents 09ad5a2 + 0ae729d commit 3e54b12
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
8 changes: 6 additions & 2 deletions Dockerfile
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=quay.io/centos/centos:stream8
ARG BASE_IMAGE=quay.io/centos/centos:stream9

## Build iPXE w/ IPv6 Support
## Note: we are pinning to a specific commit for reproducible builds.
Expand All @@ -15,11 +15,14 @@ FROM $BASE_IMAGE AS ironic-builder
# ``Cannot initialize '::'``
# This is due to the conversion table missing codepage 850, included in glibc-gconv-extra
RUN dnf install -y gcc git make xz-devel glibc-gconv-extra

WORKDIR /tmp

RUN git clone --depth 1 --branch v1.21.1 https://github.com/ipxe/ipxe.git && \
cd ipxe/src && \
ARCH=$(uname -m | sed 's/aarch/arm/') && \
make bin/undionly.kpxe bin-$ARCH-efi/ipxe.efi bin-$ARCH-efi/snponly.efi
# NOTE(elfosardo): warning should not be treated as errors by default
NO_WERROR=1 make bin/undionly.kpxe bin-$ARCH-efi/ipxe.efi bin-$ARCH-efi/snponly.efi

COPY prepare-efi.sh /bin/
RUN prepare-efi.sh centos
Expand Down Expand Up @@ -61,3 +64,4 @@ RUN mkdir -p /var/lib/ironic /var/lib/ironic-inspector && \

COPY ironic-inspector-config/ironic-inspector.conf.j2 /etc/ironic-inspector/
COPY ironic-inspector-config/inspector-apache.conf.j2 /etc/httpd/conf.d/

2 changes: 1 addition & 1 deletion main-packages-list.txt
@@ -1,5 +1,4 @@
dnsmasq
genisoimage
httpd
httpd-tools
ipcalc
Expand All @@ -12,3 +11,4 @@ python3-mod_wsgi
qemu-img
sqlite
syslinux-nonlinux
xorriso
11 changes: 9 additions & 2 deletions prepare-image.sh
Expand Up @@ -8,12 +8,13 @@ echo "install_weak_deps=False" >> /etc/dnf/dnf.conf
# Tell RPM to skip installing documentation
echo "tsflags=nodocs" >> /etc/dnf/dnf.conf

dnf install -y python3 python3-requests epel-release 'dnf-command(config-manager)'
dnf config-manager --set-disabled epel
dnf install -y python3 python3-requests 'dnf-command(config-manager)'

# RPM install #
if [[ $INSTALL_TYPE == "rpm" ]]; then
curl https://raw.githubusercontent.com/openstack/tripleo-repos/master/plugins/module_utils/tripleo_repos/main.py | python3 - -b master current-tripleo
# NOTE(elfosardo): enable CRB repo for more python3 dependencies
dnf config-manager --set-enabled crb
dnf upgrade -y
xargs -rtd'\n' dnf install -y < $IRONIC_PKG_LIST
fi
Expand Down Expand Up @@ -46,8 +47,14 @@ if [[ ! -z ${EXTRA_PKGS_LIST:-} ]]; then
fi
fi

dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
dnf config-manager --set-disabled epel
dnf install -y --enablerepo=epel inotify-tools

# NOTE(elfosardo): we need to reinstall tzdata as the base CS9 container removes
# its content, for more info see https://bugzilla.redhat.com/show_bug.cgi?id=2052861
dnf reinstall -y tzdata

chown ironic:ironic /var/log/ironic
# This file is generated after installing mod_ssl and it affects our configuration
rm -f /etc/httpd/conf.d/ssl.conf /etc/httpd/conf.d/autoindex.conf /etc/httpd/conf.d/welcome.conf /etc/httpd/conf.modules.d/*.conf
Expand Down

0 comments on commit 3e54b12

Please sign in to comment.