Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions ansible/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,22 @@ virtual_machines:
- rhel-9-4-sap-ha
container_engine: podman

# RHCOS lifecycle dates: https://access.redhat.com/support/policy/updates/openshift#dates
rhcos:
project: rhcos-cloud
images:
- "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.19') }}"
# OCP 4.22 (RHEL 10.2 + 9.8), EUS until June 2029
- "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.22 x86_64.images.gcp.name rhel-10') }}"
- "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.22 x86_64.images.gcp.name rhel-9') }}"
# OCP 4.20 (RHEL 9.6), EUS until October 2028
- "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.20') }}"
# OCP 4.18 (RHEL 9.4), EUS until February 2028
- "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.18') }}"
# OCP 4.16 (RHEL 9.4), EUS until June 2027
- "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.16') }}"
Comment thread
robbycochran marked this conversation as resolved.
# OCP 4.14 (RHEL 9.2), EUS until October 2026
- "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.14') }}"
# OCP 4.12 (RHEL 8.6), EUS until January 2027
- "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.12') }}"
username: core
ignition:
Expand All @@ -93,8 +102,14 @@ virtual_machines:
arch: arm64
machine_type: t2a-standard-2
images:
- "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.19 aarch64.images.gcp.name') }}"
# OCP 4.22 (RHEL 10.2 + 9.8), EUS until June 2029
- "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.22 aarch64.images.gcp.name rhel-10') }}"
- "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.22 aarch64.images.gcp.name rhel-9') }}"
# OCP 4.20 (RHEL 9.6), EUS until October 2028
- "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.20 aarch64.images.gcp.name') }}"
# OCP 4.18 (RHEL 9.4), EUS until February 2028
- "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.18 aarch64.images.gcp.name') }}"
# OCP 4.16 (RHEL 9.4), EUS until June 2027
- "{{ lookup('ansible.builtin.pipe', 'scripts/fetch_ocp_rhcos_bootimage.sh 4.16 aarch64.images.gcp.name') }}"
username: core
ignition:
Expand Down
12 changes: 10 additions & 2 deletions ansible/scripts/fetch_ocp_rhcos_bootimage.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

if [ -z "$1" ]; then
echo "Usage: $0 <ocp-version> [<architectures.path>]"
echo "Usage: $0 <ocp-version> [<architectures.path>] [<rhel-variant>]"
exit 1
fi

Expand All @@ -10,7 +10,15 @@ OCP_VERSION=$1
# Json path with architecture and image name, e.g., x86_64.images.gcp.name or s390x.artifacts.ibmcloud.release
JSONPATH=${2:-"x86_64.images.gcp.name"}

URL="https://raw.githubusercontent.com/openshift/installer/release-${OCP_VERSION}/data/data/coreos/rhcos.json"
# Optional RHEL variant (e.g., rhel-9, rhel-10) for OCP 4.22+ which splits
# RHCOS images into separate coreos-rhel-9.json and coreos-rhel-10.json files.
RHEL_VARIANT=${3:-""}

if [ -n "$RHEL_VARIANT" ]; then
URL="https://raw.githubusercontent.com/openshift/installer/release-${OCP_VERSION}/data/data/coreos/coreos-${RHEL_VARIANT}.json"
else
URL="https://raw.githubusercontent.com/openshift/installer/release-${OCP_VERSION}/data/data/coreos/rhcos.json"
fi
Comment thread
robbycochran marked this conversation as resolved.

json_data=$(curl --retry 5 --retry-delay 2 -sS "$URL")
if [ -z "$json_data" ]; then
Expand Down
Loading