From 2474419fe899ff792db414090b20d0ce31632cd7 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Thu, 25 Apr 2024 23:24:31 -0400 Subject: [PATCH] Add new `okd-c9s` and `ocp-rhel-9.4` variants To make introducing the base RHCOS/SCOS images safer, let's create two new variants: `okd-c9s` and `ocp-rhel-9.4`. These variants are cloned from the existing `c9s` and `rhel-9.4` variants to start. The new variants will track the status quo: building SCOS/RHCOS with the OpenShift components baked in (hence the `okd`/`ocp` prefixes). This is what the pipeline will keep building. Meanwhile, what is currently the `c9s` and rhel-9.4` variants will become the new base SCOS/RHCOS streams containing *purely* CentOS Stream/RHEL content. The default variant is still `ocp-rhel-9.4` for now. --- README.md | 8 ++- ci/prow-entrypoint.sh | 12 ++-- extensions-ocp-rhel-9.4.yaml | 1 + extensions-okd-c9s.yaml | 1 + extensions.yaml | 2 +- image-ocp-rhel-9.4.yaml | 1 + image-okd-c9s.yaml | 1 + image.yaml | 2 +- manifest-ocp-rhel-9.4.yaml | 110 +++++++++++++++++++++++++++++++ manifest-okd-c9s.yaml | 123 +++++++++++++++++++++++++++++++++++ manifest.yaml | 2 +- 11 files changed, 251 insertions(+), 12 deletions(-) create mode 120000 extensions-ocp-rhel-9.4.yaml create mode 120000 extensions-okd-c9s.yaml create mode 120000 image-ocp-rhel-9.4.yaml create mode 120000 image-okd-c9s.yaml create mode 100644 manifest-ocp-rhel-9.4.yaml create mode 100644 manifest-okd-c9s.yaml diff --git a/README.md b/README.md index 4663763c..acac80b4 100644 --- a/README.md +++ b/README.md @@ -13,12 +13,14 @@ To support building both a RHEL-based and a CentOS Stream-based CoreOS, the coreos-assembler concept of [variants] is used. The following variants are supported: -- `rhel-9.4`: RHEL 9.4-based CoreOS; including OpenShift components. -- `c9s`: CentOS Stream-based CoreOS, including OpenShift components. This +- `rhel-9.4`: Clone of `ocp-rhel-9.4` for now. +- `ocp-rhel-9.4`: RHEL 9.4-based CoreOS; including OpenShift components. +- `c9s`: Clone of `okd-c9s` for now. +- `okd-c9s`: CentOS Stream-based CoreOS, including OpenShift components. This currently includes some packages from RHEL because not all packages required by OpenShift are provided in CentOS Stream. -The default variant is `rhel-9.4`. +The default variant is `ocp-rhel-9.4`. ## Reporting issues diff --git a/ci/prow-entrypoint.sh b/ci/prow-entrypoint.sh index eaffd070..78c6d306 100755 --- a/ci/prow-entrypoint.sh +++ b/ci/prow-entrypoint.sh @@ -305,36 +305,36 @@ main() { prepare_repos ;; "build" | "init-and-build-default") # TODO: change prow job to use init-and-build-default - cosa_init "rhel-9.4" + cosa_init "ocp-rhel-9.4" cosa_build ;; "rhcos-cosa-prow-pr-ci") setup_user - cosa_init "rhel-9.4" + cosa_init "ocp-rhel-9.4" cosa_build kola_test_qemu ;; "rhcos-9-build-test-qemu") setup_user - cosa_init "rhel-9.4" + cosa_init "ocp-rhel-9.4" cosa_build kola_test_qemu ;; "rhcos-9-build-test-metal") setup_user - cosa_init "rhel-9.4" + cosa_init "ocp-rhel-9.4" cosa_build kola_test_metal ;; "scos-9-build-test-qemu") setup_user - cosa_init "c9s" + cosa_init "okd-c9s" cosa_build kola_test_qemu ;; "scos-9-build-test-metal") setup_user - cosa_init "c9s" + cosa_init "okd-c9s" cosa_build kola_test_metal ;; diff --git a/extensions-ocp-rhel-9.4.yaml b/extensions-ocp-rhel-9.4.yaml new file mode 120000 index 00000000..94e08ff2 --- /dev/null +++ b/extensions-ocp-rhel-9.4.yaml @@ -0,0 +1 @@ +extensions-rhel-9.4.yaml \ No newline at end of file diff --git a/extensions-okd-c9s.yaml b/extensions-okd-c9s.yaml new file mode 120000 index 00000000..dedefe81 --- /dev/null +++ b/extensions-okd-c9s.yaml @@ -0,0 +1 @@ +extensions-c9s.yaml \ No newline at end of file diff --git a/extensions.yaml b/extensions.yaml index 94e08ff2..4fb167ca 120000 --- a/extensions.yaml +++ b/extensions.yaml @@ -1 +1 @@ -extensions-rhel-9.4.yaml \ No newline at end of file +extensions-ocp-rhel-9.4.yaml \ No newline at end of file diff --git a/image-ocp-rhel-9.4.yaml b/image-ocp-rhel-9.4.yaml new file mode 120000 index 00000000..3abbf78c --- /dev/null +++ b/image-ocp-rhel-9.4.yaml @@ -0,0 +1 @@ +image-rhel-9.4.yaml \ No newline at end of file diff --git a/image-okd-c9s.yaml b/image-okd-c9s.yaml new file mode 120000 index 00000000..56168f45 --- /dev/null +++ b/image-okd-c9s.yaml @@ -0,0 +1 @@ +image-c9s.yaml \ No newline at end of file diff --git a/image.yaml b/image.yaml index 3abbf78c..d2760020 120000 --- a/image.yaml +++ b/image.yaml @@ -1 +1 @@ -image-rhel-9.4.yaml \ No newline at end of file +image-ocp-rhel-9.4.yaml \ No newline at end of file diff --git a/manifest-ocp-rhel-9.4.yaml b/manifest-ocp-rhel-9.4.yaml new file mode 100644 index 00000000..ca1387fd --- /dev/null +++ b/manifest-ocp-rhel-9.4.yaml @@ -0,0 +1,110 @@ +# Manifest for RHCOS based on RHEL 9.4 + +rojig: + license: MIT + name: rhcos + summary: OpenShift 4 + +variables: + osversion: "rhel-9.4" + +# Include manifests common to all RHEL and CentOS Stream versions and manifest +# common to RHEL 9 & C9S variants +include: + - common.yaml + - packages-openshift.yaml + +# Starting from here, everything should be specific to RHCOS based on RHEL 9.4 content + +repos: + - rhel-9.4-baseos + - rhel-9.4-appstream + - rhel-9.4-fast-datapath + # Include RHCOS 9 repo for oc, kubelet + - rhel-9.4-server-ose-4.17 + +# We include hours/minutes to avoid version number reuse +automatic-version-prefix: "417.94." +# This ensures we're semver-compatible which OpenShift wants +automatic-version-suffix: "-" +# Keep this is sync with the version in postprocess +mutate-os-release: "4.17" + +postprocess: + - | + #!/usr/bin/env bash + set -xeo pipefail + + # Tweak /usr/lib/os-release + grep -v -e "OSTREE_VERSION" -e "OPENSHIFT_VERSION" /etc/os-release > /usr/lib/os-release.rhel + ( + . /etc/os-release + cat > /usr/lib/os-release < /usr/lib/system-release-cpe < /usr/lib/system-release < /usr/lib/issue <" +# This ensures we're semver-compatible which OpenShift wants +automatic-version-suffix: "-" +# Keep this is sync with the version in postprocess +mutate-os-release: "4.17" + +postprocess: + - | + #!/usr/bin/env bash + set -xeo pipefail + + # Tweak /usr/lib/os-release + grep -v -e "OSTREE_VERSION" -e "OPENSHIFT_VERSION" /etc/os-release > /usr/lib/os-release.stream + ( + . /etc/os-release + cat > /usr/lib/os-release < /usr/lib/system-release-cpe < /usr/lib/system-release < /usr/lib/issue <