Skip to content

Commit e6b59d5

Browse files
Merge pull request openshift#8196 from r4f4/install-rhel-9
CORS-2797: images: move container images to RHEL 9
2 parents 7dd2fbc + 1522568 commit e6b59d5

File tree

10 files changed

+39
-44
lines changed

10 files changed

+39
-44
lines changed

.ci-operator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
build_root_image:
22
name: release
33
namespace: openshift
4-
tag: rhel-8-release-golang-1.21-openshift-4.16
4+
tag: rhel-9-release-golang-1.21-openshift-4.16

images/baremetal/Dockerfile.ci

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
# This Dockerfile is a used by CI to publish an installer image
22
# It builds an image containing openshift-install.
33

4-
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS builder
4+
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS builder
55
ARG TAGS="baremetal fipscapable"
66
WORKDIR /go/src/github.com/openshift/installer
77
COPY . .
88
RUN DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh
99
RUN DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build-node-joiner.sh
1010

11-
FROM registry.ci.openshift.org/ocp/4.16:base
11+
FROM registry.ci.openshift.org/ocp/4.16:base-rhel9
12+
1213
COPY --from=builder /go/src/github.com/openshift/installer/bin/openshift-install /bin/openshift-install
1314

1415
RUN dnf upgrade -y && \

images/infrastructure-providers/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
# FIPS support is offered via the baremetal-installer image
22

3-
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS macbuilder
3+
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS macbuilder
44
ENV GO_COMPLIANCE_EXCLUDE=".*"
55
WORKDIR /go/src/github.com/openshift/installer
66
COPY . .
77
RUN CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 make -C terraform
88

9-
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS macarmbuilder
9+
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS macarmbuilder
1010
ENV GO_COMPLIANCE_EXCLUDE=".*"
1111
WORKDIR /go/src/github.com/openshift/installer
1212
COPY . .
1313
RUN CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 make -C terraform
1414

15-
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS linuxbuilder
15+
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS linuxbuilder
1616
ENV GO_COMPLIANCE_EXCLUDE=".*"
1717
WORKDIR /go/src/github.com/openshift/installer
1818
COPY . .
1919
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 make -C terraform
2020

21-
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS linuxarmbuilder
21+
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS linuxarmbuilder
2222
ENV GO_COMPLIANCE_EXCLUDE=".*"
2323
WORKDIR /go/src/github.com/openshift/installer
2424
COPY . .
2525
RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm64 make -C terraform
2626

27-
FROM registry.ci.openshift.org/ocp/4.16:base
27+
FROM registry.ci.openshift.org/ocp/4.16:base-rhel9
2828
WORKDIR /go/src/github.com/openshift/installer
2929
COPY --from=macbuilder /go/src/github.com/openshift/installer/terraform/bin/ terraform/bin/
3030
COPY --from=macarmbuilder /go/src/github.com/openshift/installer/terraform/bin/ terraform/bin/

images/installer-artifacts/Dockerfile.rhel

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,45 +5,46 @@ FROM registry.ci.openshift.org/ocp/4.16:installer-terraform-providers AS provide
55

66
# FIPS support is offered via the baremetal-installer image
77

8-
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS macbuilder
8+
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS macbuilder
99
ENV GO_COMPLIANCE_EXCLUDE=".*"
1010
ARG TAGS=""
1111
WORKDIR /go/src/github.com/openshift/installer
1212
COPY . .
1313
COPY --from=providers /go/src/github.com/openshift/installer/terraform/bin/darwin_amd64 terraform/bin/darwin_amd64
1414
RUN GOOS=darwin GOARCH=amd64 DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh
1515

16-
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS macarmbuilder
16+
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS macarmbuilder
1717
ENV GO_COMPLIANCE_EXCLUDE=".*"
1818
ARG TAGS=""
1919
WORKDIR /go/src/github.com/openshift/installer
2020
COPY . .
2121
COPY --from=providers /go/src/github.com/openshift/installer/terraform/bin/darwin_arm64 terraform/bin/darwin_arm64
2222
RUN GOOS=darwin GOARCH=arm64 DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh
2323

24-
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS linuxbuilder
24+
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS linuxbuilder
2525
ENV GO_COMPLIANCE_EXCLUDE=".*"
2626
ARG TAGS=""
2727
WORKDIR /go/src/github.com/openshift/installer
2828
COPY . .
2929
COPY --from=providers /go/src/github.com/openshift/installer/terraform/bin/linux_amd64 terraform/bin/linux_amd64
3030
RUN GOOS=linux GOARCH=amd64 DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh
3131

32-
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS linuxarmbuilder
32+
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS linuxarmbuilder
3333
ENV GO_COMPLIANCE_EXCLUDE=".*"
3434
ARG TAGS=""
3535
WORKDIR /go/src/github.com/openshift/installer
3636
COPY . .
3737
COPY --from=providers /go/src/github.com/openshift/installer/terraform/bin/linux_arm64 terraform/bin/linux_arm64
3838
RUN GOOS=linux GOARCH=arm64 DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh
3939

40-
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS builder
40+
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS builder
41+
ENV GO_COMPLIANCE_EXCLUDE=".*"
4142
ARG TAGS=""
4243
WORKDIR /go/src/github.com/openshift/installer
4344
COPY . .
4445
RUN go run -mod=vendor hack/build-coreos-manifest.go
4546

46-
FROM registry.ci.openshift.org/ocp/4.16:base
47+
FROM registry.ci.openshift.org/ocp/4.16:base-rhel9
4748
COPY --from=macbuilder /go/src/github.com/openshift/installer/bin/openshift-install /usr/share/openshift/mac/openshift-install
4849
COPY --from=macarmbuilder /go/src/github.com/openshift/installer/bin/openshift-install /usr/share/openshift/mac_arm64/openshift-install
4950
COPY --from=linuxbuilder /go/src/github.com/openshift/installer/bin/openshift-install /usr/share/openshift/linux_amd64/openshift-install

images/installer/Dockerfile.ci

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
FROM registry.ci.openshift.org/ocp/4.16:installer-terraform-providers AS providers
55

6-
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS builder
6+
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS builder
77
# FIPS support is offered via the baremetal-installer image
88
ENV GO_COMPLIANCE_EXCLUDE=".*"
99
ARG TAGS=""
@@ -13,7 +13,8 @@ COPY --from=providers /go/src/github.com/openshift/installer/terraform/bin/ terr
1313
RUN DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh
1414
RUN go run -mod=vendor hack/build-coreos-manifest.go
1515

16-
FROM registry.ci.openshift.org/ocp/4.16:base
16+
FROM registry.ci.openshift.org/ocp/4.16:base-rhel9
17+
1718
COPY --from=builder /go/src/github.com/openshift/installer/bin/openshift-install /bin/openshift-install
1819
COPY --from=builder /go/src/github.com/openshift/installer/bin/manifests/ /manifests/
1920

images/installer/Dockerfile.upi.ci

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
FROM registry.ci.openshift.org/ocp/4.16:installer-terraform-providers as providers
66

7-
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS builder
7+
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS builder
88
# FIPS support is offered via the baremetal-installer image
99
ENV GO_COMPLIANCE_EXCLUDE=".*"
1010
ARG TAGS=""
@@ -18,20 +18,20 @@ FROM quay.io/ocp-splat/govc:v0.30.7 as govc
1818
FROM quay.io/multi-arch/yq:3.3.0 as yq3
1919
FROM quay.io/multi-arch/yq:4.30.5 as yq4
2020

21-
FROM registry.ci.openshift.org/ocp/4.16:base
21+
FROM registry.ci.openshift.org/ocp/4.16:base-rhel9
2222
COPY --from=cli /usr/bin/oc /bin/oc
2323
COPY --from=builder /go/src/github.com/openshift/installer/bin/openshift-install /bin/openshift-install
2424
COPY --from=builder /go/src/github.com/openshift/installer/upi /var/lib/openshift-install/upi
2525

2626
COPY --from=govc /govc /bin/govc
2727

2828
RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc && \
29-
sh -c 'echo -e "[packages-microsoft-com-prod]\nname=packages-microsoft-com-prod\nbaseurl=https://packages.microsoft.com/rhel/8/prod\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" >/etc/yum.repos.d/microsoft-prod.repo' && \
30-
sh -c 'echo -e "[google-cloud-cli]\nname=Google Cloud CLI\nbaseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el8-x86_64\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg\n https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg" > /etc/yum.repos.d/google-cloud-sdk.repo'
29+
sh -c 'echo -e "[packages-microsoft-com-prod]\nname=packages-microsoft-com-prod\nbaseurl=https://packages.microsoft.com/rhel/9/prod\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" >/etc/yum.repos.d/microsoft-prod.repo' && \
30+
sh -c 'echo -e "[google-cloud-cli]\nname=Google Cloud CLI\nbaseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el9-x86_64\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=0\ngpgkey=https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg" > /etc/yum.repos.d/google-cloud-sdk.repo'
3131

3232
RUN yum update -y && \
3333
yum install --setopt=tsflags=nodocs -y \
34-
azure-cli-2.49.0-1.el8 \
34+
azure-cli-2.49.0-1.el9 \
3535
gettext \
3636
google-cloud-cli-447.0.0-1 \
3737
gzip \
@@ -40,8 +40,7 @@ RUN yum update -y && \
4040
openssh-clients \
4141
openssl \
4242
powershell \
43-
python3-pyOpenSSL \
44-
python2-pyyaml \
43+
python3-pip \
4544
python3-pyyaml \
4645
bind-utils \
4746
util-linux \
@@ -59,7 +58,8 @@ RUN curl -sSL "${ALIYUN_URI}" --output /tmp/aliyun-cli-linux-latest-amd64.tgz &&
5958
rm -f /tmp/aliyun-cli-linux-latest-amd64.tgz
6059

6160
# Not packaged, but required by gcloud. See https://cloud.google.com/sdk/crypto
62-
RUN pip-3 install cryptography
61+
# Pin version because of https://github.com/GoogleCloudPlatform/gsutil/issues/1753
62+
RUN pip-3 install cryptography pyOpenSSL==23.2.0
6363

6464
ENV CLOUDSDK_PYTHON=/usr/bin/python
6565
ENV CLOUDSDK_PYTHON_SITEPACKAGES=1

images/libvirt/Dockerfile.ci

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# It builds an image containing openshift-install and nss-wrapper for remote deployments, as well as the google cloud-sdk for nested GCE environments and
33
# oc for getting assets from an existing cluster to spin up multi-architecture compute clusters on libvirt.
44

5-
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS builder
5+
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS builder
66
ARG TAGS="libvirt fipscapable"
77
WORKDIR /go/src/github.com/openshift/installer
88
COPY . .
@@ -12,7 +12,7 @@ FROM registry.ci.openshift.org/ocp/4.16:cli as cli
1212
FROM quay.io/multi-arch/yq:3.3.0 as yq3
1313
FROM quay.io/multi-arch/yq:4.30.5 as yq4
1414

15-
FROM quay.io/centos/centos:stream
15+
FROM quay.io/centos/centos:stream9
1616
COPY --from=builder /go/src/github.com/openshift/installer/bin/openshift-install /bin/openshift-install
1717
COPY --from=builder /go/src/github.com/openshift/installer/images/libvirt/mock-nss.sh /bin/mock-nss.sh
1818
COPY --from=builder /go/src/github.com/openshift/installer/images/libvirt/google-cloud-sdk.repo /etc/yum.repos.d/google-cloud-sdk.repo
@@ -22,7 +22,7 @@ RUN yum update -y && \
2222
yum install --setopt=tsflags=nodocs -y \
2323
genisoimage \
2424
gettext \
25-
google-cloud-sdk-365.0.1 \
25+
google-cloud-sdk \
2626
libvirt-client \
2727
libvirt-libs \
2828
nss_wrapper \
Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
[google-cloud-sdk]
22
name=Google Cloud SDK
3-
baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el8-x86_64
3+
baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el9-x86_64
44
enabled=1
55
gpgcheck=1
6-
repo_gpgcheck=1
7-
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
8-
https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
6+
repo_gpgcheck=0
7+
gpgkey=https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg

images/openstack/Dockerfile.ci

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# It builds an image containing the openshift-install command as well as the openstack cli.
33
FROM registry.ci.openshift.org/ocp/4.16:installer-terraform-providers as providers
44

5-
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS builder
5+
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS builder
66
# FIPS support is offered via the baremetal-installer image
77
ENV GO_COMPLIANCE_EXCLUDE=".*"
88
ARG TAGS=""
@@ -13,7 +13,7 @@ RUN DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh
1313

1414
FROM registry.ci.openshift.org/ocp/4.16:cli AS cli
1515

16-
FROM registry.ci.openshift.org/ocp/4.16:base
16+
FROM registry.ci.openshift.org/ocp/4.16:base-rhel9
1717
COPY --from=cli /usr/bin/oc /bin/oc
1818
COPY --from=builder /go/src/github.com/openshift/installer/bin/openshift-install /bin/openshift-install
1919
COPY --from=builder /go/src/github.com/openshift/installer/upi/openstack /var/lib/openshift-install/upi
@@ -22,21 +22,14 @@ COPY --from=builder /go/src/github.com/openshift/installer/hack/openstack/test-m
2222

2323
# Install Dependendencies for tests
2424
# https://github.com/openshift/origin/blob/6114cbc507bf18890f009f16ee424a62007bc390/images/tests/Dockerfile.rhel
25-
RUN yum install --setopt=tsflags=nodocs -y gettext make git gzip util-linux glibc-locale-source && \
25+
RUN yum update -y && \
26+
yum install --setopt=tsflags=nodocs -y gettext make git gzip util-linux glibc-locale-source python3-pip unzip jq nmap && \
2627
yum clean all && rm -rf /var/cache/yum/* && \
2728
localedef -c -f UTF-8 -i en_US en_US.UTF-8 && \
2829
git config --system user.name test && \
2930
git config --system user.email [email protected] && \
3031
chmod g+w /etc/passwd
3132

32-
RUN yum update -y && \
33-
yum install --setopt=tsflags=nodocs -y \
34-
python38 unzip jq nmap && \
35-
yum erase -y python36 && \
36-
yum clean all && rm -rf /var/cache/yum/*
37-
38-
RUN python3 -m pip install --upgrade pip
39-
4033
# ansible 2.9 is EOL in September 2023, so we need to install ansible-core and get the collections from source
4134
# until we have a package available.
4235
RUN python3 -m pip install ansible-core

pkg/hostcrypt/static.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ package hostcrypt
55

66
import "fmt"
77

8-
const binaryInstructions = "To obtain a suitable binary, download the openshift-install-rhel8 archive from the client mirror, or extract the openshift-install-fips command from the release payload."
8+
const binaryInstructions = "To obtain a suitable binary, download the openshift-install-rhel9 archive from the client mirror, or extract the openshift-install-fips command from the release payload."
99

1010
func allowFIPSCluster() error {
1111
hostMsg := ""
1212
if fipsEnabled, err := hostFIPSEnabled(); err != nil || !fipsEnabled {
1313
hostMsg = " on a host with FIPS enabled"
1414
}
15-
return fmt.Errorf("use the FIPS-capable installer binary for RHEL 8%s.\n%s",
15+
return fmt.Errorf("use the FIPS-capable installer binary for RHEL 9%s.\n%s",
1616
hostMsg, binaryInstructions)
1717
}

0 commit comments

Comments
 (0)