Skip to content

Commit

Permalink
ocp 4.15 updates (#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
Noreen21 authored Mar 12, 2024
1 parent e4f603b commit 5f859e7
Show file tree
Hide file tree
Showing 28 changed files with 117 additions and 74 deletions.
24 changes: 22 additions & 2 deletions ansible/roles/bastion-install/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@
with_items:
- url: "{{ coredns_url }}"
dest: "{{ bastion_cluster_config_dir }}/coredns_linux_amd64.tgz"
- url: "{{ openshift_client_url }}/latest/opm-linux.tar.gz"
dest: "{{ bastion_cluster_config_dir }}/opm-linux.tar.gz"
- url: "{{ openshift_client_url }}/latest/oc-mirror.tar.gz"
dest: "{{ bastion_cluster_config_dir }}/oc-mirror.tar.gz"
- url: "{{ openshift_client_url }}/latest/openshift-client-linux.tar.gz"
Expand All @@ -175,6 +173,28 @@
- url: "{{ yq_url }}"
dest: "{{ bastion_cluster_config_dir }}/yq_linux_amd64.tar.gz"

- name: Get rhel8 opm
get_url:
validate_certs: false
force: true
url: "{{ item.url }}"
dest: "{{ item.dest }}"
with_items:
- url: "{{ openshift_client_url }}/latest-4.14/opm-linux.tar.gz"
dest: "{{ bastion_cluster_config_dir }}/opm-linux.tar.gz"
when: rhel_version == "rhel8"

- name: Get rhel9 opm
get_url:
validate_certs: false
force: true
url: "{{ item.url }}"
dest: "{{ item.dest }}"
with_items:
- url: "{{ openshift_client_url }}/latest/opm-linux.tar.gz"
dest: "{{ bastion_cluster_config_dir }}/opm-linux.tar.gz"
when: rhel_version == "rhel9"

# We rename oc/kubectl clients as oc.latest and kubectl.latest since they are
# likely not the actual version of the intended cluster, those specific clients
# are obtained during the bastion-ocp-version role in which we use oc.latest to
Expand Down
10 changes: 0 additions & 10 deletions ansible/roles/bastion-ocp-version/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@
content: "{{ pull_secret }}"
dest: "/root/.docker/config.json"

- name: RHEL version rhel9 check
set_fact:
rhel_version: "rhel9"
when: ansible_facts['distribution_version'] is version('9.0', '>=')

- name: RHEL version rhel8 check
set_fact:
rhel_version: "rhel8"
when: ansible_facts['distribution_version'] is version('8.9', '<=')

- name: Create directory for bastion ocp-version data
file:
path: "{{ ocp_version_path }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
{% elif siteconfig_du_sno_install_config_overrides in ["4.13", "4.14"] %}
installConfigOverrides: "{\"capabilities\":{\"baselineCapabilitySet\": \"None\", \"additionalEnabledCapabilities\": [ \"marketplace\", \"NodeTuning\" ] }}"
{% elif siteconfig_du_sno_install_config_overrides == "4.15" %}
installConfigOverrides: "{\"capabilities\":{\"baselineCapabilitySet\": \"None\", \"additionalEnabledCapabilities\": [ \"OperatorLifecycleManager\", \"marketplace\", \"NodeTuning\" ] }}"
installConfigOverrides: "{\"capabilities\":{\"baselineCapabilitySet\": \"None\", \"additionalEnabledCapabilities\": [ \"OperatorLifecycleManager\", \"NodeTuning\" ] }}"
{% else %}
{% if siteconfig_fips %}
installConfigOverrides: '{ "fips": true }'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ignition": {
{% if openshift_version in ["4.8","4.9","4.10","4.11","4.12","4.13","4.14","4.15"] %}
{% if openshift_version is version('4.8', ">=") %}
"version": "3.2.0"
{% else %}
"version": "3.1.0"
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/install-cluster/templates/worker.ign.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ignition": {
{% if openshift_version in ["4.8","4.9","4.10","4.11","4.12","4.13","4.14","4.15"] %}
{% if openshift_version is version('4.8', ">=") %}
"version": "3.2.0"
{% else %}
"version": "3.1.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
- include_role:
name: create-ai-cluster
tasks_from: 01_manifest_update.yml
when: openshift_version in ["4.9", "4.10", "4.11", "4.12", "4.13"]
when: openshift_version is version('4.13', "<=")
with_items:
- file_name: 99-master-workload-partitioning.yml
template_name: 99-master-workload-partitioning.yml
Expand All @@ -34,7 +34,7 @@
- include_role:
name: create-ai-cluster
tasks_from: 01_manifest_update.yml
when: openshift_version in ["4.9", "4.10", "4.11", "4.12"]
when: openshift_version is version('4.12', "<=")
with_items:
- file_name: 04-accelerated-container-startup-master.yaml
template_name: 04-accelerated-container-startup-master.yaml
Expand All @@ -43,7 +43,7 @@
- include_role:
name: create-ai-cluster
tasks_from: 01_manifest_update.yml
when: openshift_version == "4.14"
when: openshift_version is version('4.14', ">=")
with_items:
- file_name: 08-set-rcu-normal-master.yaml
template_name: 08-set-rcu-normal-master.yaml
Expand All @@ -52,7 +52,7 @@
- include_role:
name: create-ai-cluster
tasks_from: 01_manifest_update.yml
when: openshift_version in ["4.13", "4.14"]
when: openshift_version is version('4.13', ">=")
with_items:
- file_name: 05-kdump-config-master.yaml
template_name: 05-kdump-config-master.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
network_yaml: "{{ lookup('template', 'ibmcloud_nmstate.yml.j2') }}"
mac_interface_map: "{{ lookup('template', 'ibmcloud_mac_interface_map.json.j2') }}"
when:
- lab in rh_labs
- lab in cloud_labs
- use_bastion_registry

- name: Add {{ item }} ip config
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
{% if openshift_version == "4.14" and du_profile %}
{% if openshift_version is version('4.14', ">=") and du_profile %}
cpuPartitioningMode: AllNodes
{% endif %}
{% if openshift_version in ["4.13","4.14"] and du_profile %}
{% if openshift_version is version('4.13', ">=") and du_profile %}
capabilities:
baselineCapabilitySet: None
additionalEnabledCapabilities:
{% if openshift_version in ["4.13","4.14"] and du_profile %}
- marketplace
{% endif %}
- NodeTuning
{% if openshift_version is version('4.15', ">=") and du_profile %}
- OperatorLifecycleManager
{% endif %}
{% endif %}
{% if enable_fips | default(false) %}
fips: true
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/sno-install-cluster/templates/sno.ign.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"ignition": {
{% if openshift_version in ["4.8","4.9","4.10","4.11","4.12","4.13","4.14","4.15"] %}
{% if openshift_version is version('4.8', ">=") %}
"version": "3.2.0"
{% else %}
"version": "3.1.0"
Expand Down
2 changes: 2 additions & 0 deletions ansible/roles/sno-post-cluster-install/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ node: 0
isolated_cpus: 2-47,50-95

du_profile: false
operator_index_name: redhat-operator-index
operator_index_tag: v4.15

28 changes: 22 additions & 6 deletions ansible/roles/sno-post-cluster-install/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,23 @@
delay: 2
until: not operator_hub_disable.failed
loop: "{{ ai_cluster_ids | dict2items }}"
when: use_bastion_registry | default(false)
when:
- use_bastion_registry | default(false)
- openshift_version is version('4.14', "<=")
- du_profile

- name: Create openshift-marketplace namespace for ocp 4.15 and higher releases
shell: |
KUBECONFIG={{ bastion_cluster_config_dir }}/{{ item.key }}/kubeconfig oc create ns openshift-marketplace
register: marketplace_ns
retries: 120
delay: 2
until: not marketplace_ns.failed
loop: "{{ ai_cluster_ids | dict2items }}"
when:
- use_bastion_registry | default(false)
- openshift_version is version('4.15', ">=")
- du_profile

- name: Apply olm-mirror imageContentSourcePolicy on bastion registry clusters
shell: |
Expand Down Expand Up @@ -209,13 +225,13 @@
KUBECONFIG={{ bastion_cluster_config_dir }}/{{ item.key }}/kubeconfig oc get mcp master -o json | jq -r '.status.configuration.name'
register: config_name
loop: "{{ ai_cluster_ids | dict2items }}"
when: du_profile and openshift_version == "4.13"
when: du_profile and openshift_version is version('4.13', ">=")

- name: Print the CONFIG name, null if empty
debug:
msg: "{{ item.stdout }}"
loop: "{{ config_name.results }}"
when: du_profile and openshift_version == "4.13"
when: du_profile and openshift_version is version('4.13', ">=")

- name: Wait until MachineConfigPools are updating
shell: |
Expand Down Expand Up @@ -246,13 +262,13 @@
retries: 360
until: ("rendered" in config_name.stdout)
loop: "{{ ai_cluster_ids | dict2items }}"
when: du_profile and openshift_version == "4.13"
when: du_profile and openshift_version is version('4.13', ">=")

- name: Print the latest CONFIG name
debug:
msg: "{{ item.stdout }}"
loop: "{{ config_name.results }}"
when: du_profile and openshift_version == "4.13"
when: du_profile and openshift_version is version('4.13', ">=")

- name: Apply the TunedPerformancePatch
shell: |
Expand All @@ -272,7 +288,7 @@
retries: 120
until: result.stdout == "True"
loop: "{{ ai_cluster_ids | dict2items }}"
when: du_profile and openshift_version != "4.13"
when: du_profile and openshift_version is version('4.12', "<=")

- name: Wait until MachineConfigPools are updated
shell: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ data:
enabled: false
alertmanagerMain:
enabled: false
{% if openshift_version == "4.14" %}
{% if openshift_version is version('4.14', ">=") %}
telemeterClient:
enabled: false
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ spec:
- idle=poll
{% endif %}
- rcupdate.rcu_normal_after_boot=0
{% if not openshift_version in ["4.9","4.10"] %}
{% if openshift_version is version('4.11', ">=") %}
- efi=runtime
{% endif %}
{% if not openshift_version in ["4.9","4.10","4.11"] %}
{% if openshift_version is version('4.12', ">=") %}
- module_blacklist=irdma
{% endif %}
{% if openshift_version in ["4.13","4.14"] %}
{% if openshift_version is version('4.13', ">=") %}
- "vfio_pci.enable_sriov=1"
- "vfio_pci.disable_idle_d3=1"
{% endif %}
Expand Down Expand Up @@ -56,7 +56,7 @@ spec:
# To use the standard (non-realtime) kernel, set enabled to false
realTimeKernel:
enabled: true
{% if openshift_version == "4.14" %}
{% if openshift_version in ["4.14","4.15"] %}
workloadHints:
# WorkloadHints defines the set of upper level flags for different type of workloads.
# See https://github.com/openshift/cluster-node-tuning-operator/blob/master/docs/performanceprofile/performance_profile.md#workloadhints
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ spec:
[main]
summary=Configuration changes profile inherited from performance created tuned
include=openshift-node-performance-perf-profile
{% if openshift_version in ["4.9","4.10","4.11","4.12"] %}
{% if openshift_version is version('4.12', "<=") %}
[bootloader]
cmdline_crash=nohz_full={{ isolated_cpus }}
{% endif %}
[sysctl]
kernel.timer_migration=1
[scheduler]
group.ice-ptp=0:f:10:*:ice-ptp.*
{% if openshift_version in ["4.13","4.14"] %}
{% if openshift_version is version('4.13', ">=") %}
group.ice-gnss=0:f:10:*:ice-gnss.*
{% endif %}
[service]
Expand Down
8 changes: 4 additions & 4 deletions ansible/roles/sync-operator-index/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ registry_path: /opt/registry
operator_index_name: redhat-operator-index

# operator_index_tag represents the destination operator tag on the installed cluster (actual image tags can be found in the operator_index_container_image value under operators_to_sync)
operator_index_tag: v4.14
operator_index_tag: v4.15

# These defaults match ACM/ZTP testing (4.14 SNO with 4.14 Operators). For SNO DU profile defaults, refer ansible/vars/sync-operator-index.sample.yml
# These defaults match ACM/ZTP testing (4.15 SNO with 4.15 Operators). For SNO DU profile defaults, refer ansible/vars/sync-operator-index.sample.yml
operators_to_sync:
- name: redhat-operators
operator_index_container_image: registry.redhat.io/redhat/redhat-operator-index:v4.14
operator_index_container_image: registry.redhat.io/redhat/redhat-operator-index:v4.15
operators:
- cluster-logging
- local-storage-operator
Expand All @@ -33,6 +33,6 @@ operators_to_sync:
- topology-aware-lifecycle-manager
- volsync-product
#- name: certified-operators
# operator_index_container_image: registry.redhat.io/redhat/certified-operator-index:v4.14
# operator_index_container_image: registry.redhat.io/redhat/certified-operator-index:v4.15
# operators:
# - sriov-fec
10 changes: 10 additions & 0 deletions ansible/roles/validate-vars/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@
- ansible_distribution is defined
- (ansible_distribution|lower == "redhat" and ansible_distribution_version|float < 8.6)

- name: RHEL version rhel9 check
set_fact:
rhel_version: "rhel9"
when: ansible_facts['distribution_version'] is version('9.0', '>=')

- name: RHEL version rhel8 check
set_fact:
rhel_version: "rhel8"
when: ansible_facts['distribution_version'] is version('9.0', '<')

- name: Set worker_node_count if undefined or empty (bm/rwn)
set_fact:
worker_node_count: "{{ allocation_node_count - 4 }}"
Expand Down
6 changes: 3 additions & 3 deletions ansible/vars/all.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ public_vlan: false
# you must stop and rm all assisted-installer containers on the bastion and rerun
# the setup-bastion step in order to setup your bastion's assisted-installer to
# the version you specified
ocp_release_image: quay.io/openshift-release-dev/ocp-release:4.14.7-x86_64
ocp_release_image: quay.io/openshift-release-dev/ocp-release:4.15.2-x86_64

# This should just match the above release image version (Ex: 4.14)
openshift_version: "4.14"
# This should just match the above release image version (Ex: 4.15)
openshift_version: "4.15"

# Either "OVNKubernetes" or "OpenShiftSDN" (Only for BM/RWN cluster types)
networktype: OVNKubernetes
Expand Down
2 changes: 1 addition & 1 deletion ansible/vars/hv.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ standard_cluster_count: 0
standard_cluster_node_count: 5

# The cluster imageset used in the manifests
cluster_image_set: openshift-4.14.7
cluster_image_set: openshift-4.15.2

# Include ACM CRs in the manifests
hv_vm_manifest_acm_cr: false
Expand Down
6 changes: 3 additions & 3 deletions ansible/vars/ibmcloud.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ sno_node_count:
# you must stop and rm all assisted-installer containers on the bastion and rerun
# the setup-bastion step in order to setup your bastion's assisted-installer to
# the version you specified
ocp_release_image: quay.io/openshift-release-dev/ocp-release:4.14.7-x86_64
ocp_release_image: quay.io/openshift-release-dev/ocp-release:4.15.2-x86_64

# This should just match the above release image version (Ex: 4.14)
openshift_version: "4.14"
# This should just match the above release image version (Ex: 4.15)
openshift_version: "4.15"

# Either "OVNKubernetes" or "OpenShiftSDN" (Only for BM/RWN cluster types)
networktype: OVNKubernetes
Expand Down
2 changes: 1 addition & 1 deletion ansible/vars/sync-ocp-release.sample.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# Sample sync-ocp-release vars file

ocp_release_image: quay.io/openshift-release-dev/ocp-release:4.14.7-x86_64
ocp_release_image: quay.io/openshift-release-dev/ocp-release:4.15.2-x86_64

pull_secret: "{{ lookup('file', '../pull_secret.txt') }}"
6 changes: 3 additions & 3 deletions ansible/vars/sync-operator-index.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ bastion_cluster_config_dir: /root/{{ cluster_type }}
operator_index_name: redhat-operator-index

# operator_index_tag represents the destination operator tag on the installed cluster (actual image tags can be found in the operator_index_container_image value under operators_to_sync)
operator_index_tag: v4.14
operator_index_tag: v4.15

# All of the following operators apply as part of DU profile, sync-operator-index makes all the required DU operators available through a single catalog source
operators_to_sync:
- name: redhat-operators
operator_index_container_image: registry.redhat.io/redhat/redhat-operator-index:v4.14
operator_index_container_image: registry.redhat.io/redhat/redhat-operator-index:v4.15
operators:
- cluster-logging
- local-storage-operator
Expand All @@ -29,7 +29,7 @@ operators_to_sync:
# - topology-aware-lifecycle-manager
# - volsync-product
- name: certified-operators
operator_index_container_image: registry.redhat.io/redhat/certified-operator-index:v4.14
operator_index_container_image: registry.redhat.io/redhat/certified-operator-index:v4.15
operators:
- sriov-fec

Expand Down
Loading

0 comments on commit 5f859e7

Please sign in to comment.