diff --git a/README.md b/README.md index 2141319bd1..4f6b191137 100644 --- a/README.md +++ b/README.md @@ -16,4 +16,4 @@ ansible-galaxy collection install ibm.mas_devops ## Want to contribute to MAS Ansible Devops collection? -We welcome all Maximo Application Suite users, developers and enthusiasts to contribute to this Ansible collection. You can contribute to this collection by raising [a new issue](https://github.com/ibm-mas/ansible-devops/issues) with suggestions on how to make the MAS automation engine even better, or if you want to become a new code contributor please review the [Contributing document](CONTRIBUTING.md) to learn more about how to get started. \ No newline at end of file +We welcome all Maximo Application Suite users, developers and enthusiasts to contribute to this Ansible collection. You can contribute to this collection by raising [a new issue](https://github.com/ibm-mas/ansible-devops/issues) with suggestions on how to make the MAS automation engine even better, or if you want to become a new code contributor please review the [Contributing document](CONTRIBUTING.md) to learn more about how to get started. diff --git a/build/bin/build-collection.sh b/build/bin/build-collection.sh index 3f764d7fd4..037635fb8a 100644 --- a/build/bin/build-collection.sh +++ b/build/bin/build-collection.sh @@ -13,8 +13,8 @@ cat $GITHUB_WORKSPACE/ibm/mas_devops/galaxy.yml # Update this when we have new catalog -MAS_PREVIOUS_CATALOG='v9-251030-amd64' -MAS_LATEST_CATALOG='v9-251127-amd64' +MAS_PREVIOUS_CATALOG='v9-251127-amd64' +MAS_LATEST_CATALOG='v9-251224-amd64' # Update all the placeholders in the playbooks diff --git a/ibm/mas_devops/common_vars/compatibility_matrix.yml b/ibm/mas_devops/common_vars/compatibility_matrix.yml index f95df9b6a1..3f75c3243f 100644 --- a/ibm/mas_devops/common_vars/compatibility_matrix.yml +++ b/ibm/mas_devops/common_vars/compatibility_matrix.yml @@ -118,4 +118,4 @@ upgrade_path: # The key is the current installed channel of AI Service # and the value is the allowed upgrade versions. aiservice_upgrade_path: - 9.1.x: 9.2.x-feature + 9.1.x: [9.2.x-feature] diff --git a/ibm/mas_devops/playbooks/mirror_dependencies.yml b/ibm/mas_devops/playbooks/mirror_dependencies.yml index b496e22325..ca8db715d8 100644 --- a/ibm/mas_devops/playbooks/mirror_dependencies.yml +++ b/ibm/mas_devops/playbooks/mirror_dependencies.yml @@ -373,6 +373,7 @@ case_version: "{{ mas_catalog_metadata.wsl_version }}" exclude_images: [] ibmpak_skip_dependencies: false + casectl_resolve_charts: false - role: ibm.mas_devops.mirror_images when: mirror_wsl or mirror_wml @@ -554,6 +555,7 @@ case_version: "{{ mas_catalog_metadata.cognos_version }}" exclude_images: [] ibmpak_skip_dependencies: false + casectl_resolve_charts: false - role: ibm.mas_devops.mirror_images when: mirror_cognos diff --git a/ibm/mas_devops/roles/cp4d/tasks/prereqs/install-cpfs.yml b/ibm/mas_devops/roles/cp4d/tasks/prereqs/install-cpfs.yml index e7c6435896..a1e170d295 100644 --- a/ibm/mas_devops/roles/cp4d/tasks/prereqs/install-cpfs.yml +++ b/ibm/mas_devops/roles/cp4d/tasks/prereqs/install-cpfs.yml @@ -85,7 +85,32 @@ apply: yes template: "templates/cpfs/subscription.yml.j2" -# 2. Patch ZenService lite-cr to set the zen version and increase resource limits +# During upgrades, patch existing zen-operator subscription to use new channel from updated catalog +# This forces OLM to upgrade the operator to the new version automatically +# The zen channel is derived from zen_cr_version variable (e.g., 6.2.0 -> v6.2) +# ---------------------------------------------------------------------------------------------- +- name: "Patch zen-operator subscription to new channel during upgrade" + when: is_cpd_upgrade | default(false) + kubernetes.core.k8s: + api_version: operators.coreos.com/v1alpha1 + kind: Subscription + name: ibm-zen-operator + namespace: "{{ cpd_operators_namespace }}" + definition: + spec: + channel: "v{{ zen_cr_version.split('.')[0] }}.{{ zen_cr_version.split('.')[1] }}" + source: ibm-zen-operator-catalog + sourceNamespace: "{{ cpd_operators_namespace }}" + apply: yes + ignore_errors: yes + +# Wait for OLM to process the channel update and upgrade the operator +- name: "Wait for OLM to upgrade zen-operator to new version" + when: is_cpd_upgrade | default(false) + pause: + seconds: 60 + +# 2. Wait for operators to be ready # ---------------------------------------------------------------------------------------------- - name: "Wait for ibm-common-service-operator to be ready (60s delay)" kubernetes.core.k8s_info: diff --git a/ibm/mas_devops/roles/cp4d_service/tasks/wait/wait-wml-etcd.yml b/ibm/mas_devops/roles/cp4d_service/tasks/wait/wait-wml-etcd.yml index 958b726411..8f0fa96b51 100644 --- a/ibm/mas_devops/roles/cp4d_service/tasks/wait/wait-wml-etcd.yml +++ b/ibm/mas_devops/roles/cp4d_service/tasks/wait/wait-wml-etcd.yml @@ -47,13 +47,13 @@ force_conflicts: true # Delete wml-cpd-etcd statefulset so next time it recreates with proper upgrade specs - - name: "wait/wml : Delete wml-cpd-etcd statefulset so next time it recreates with proper upgrade specs" - kubernetes.core.k8s: - state: absent - api_version: apps/v1 - kind: StatefulSet - name: wml-cpd-etcd - namespace: "{{ cpd_instance_namespace }}" + # - name: "wait/wml : Delete wml-cpd-etcd statefulset so next time it recreates with proper upgrade specs" + # kubernetes.core.k8s: + # state: absent + # api_version: apps/v1 + # kind: StatefulSet + # name: wml-cpd-etcd + # namespace: "{{ cpd_instance_namespace }}" # Scale up ibm-cpd-wml-operator again to force reconcile - name: "wait/wml : Scale up ibm-cpd-wml-operator to force reconcile" diff --git a/ibm/mas_devops/roles/mirror_case_prepare/defaults/main.yml b/ibm/mas_devops/roles/mirror_case_prepare/defaults/main.yml index 4aafdd1a09..5b144b6683 100644 --- a/ibm/mas_devops/roles/mirror_case_prepare/defaults/main.yml +++ b/ibm/mas_devops/roles/mirror_case_prepare/defaults/main.yml @@ -27,8 +27,9 @@ mirror_working_dir: "{{ lookup('env', 'MIRROR_WORKING_DIR') }}" # --skip-dependencies # --skip-verify # --insecure +# CASECTL_RESOLVE_CHARTS=false ibmpak_skip_dependencies: "{{ lookup('env', 'IBMPAK_SKIP_DEPENDENCIES') | default('False', True) | bool }}" ibmpak_skip_verify: "{{ lookup('env', 'IBMPAK_SKIP_VERIFY') | default('False', True) | bool }}" ibmpak_insecure: "{{ lookup('env', 'IBMPAK_INSECURE') | default('False', True) | bool }}" - image_group_filter: "{{ lookup('env', 'IMAGE_GROUP_FILTER') }}" +casectl_resolve_charts: "{{ lookup('env', 'CASECTL_RESOLVE_CHARTS') | default('True', True) | bool }}" diff --git a/ibm/mas_devops/roles/mirror_case_prepare/tasks/main.yml b/ibm/mas_devops/roles/mirror_case_prepare/tasks/main.yml index f090e063a5..5a4e8f05bf 100644 --- a/ibm/mas_devops/roles/mirror_case_prepare/tasks/main.yml +++ b/ibm/mas_devops/roles/mirror_case_prepare/tasks/main.yml @@ -31,6 +31,10 @@ ibmpak_flag_skip_verify: "{{ ibmpak_skip_verify | ternary('--skip-verify', '') }}" ibmpak_flag_skip_dependencies: "{{ ibmpak_skip_dependencies | ternary('--skip-dependencies', '') }}" +- name: "{{ case_name }} : Determine if CASECTL_RESOLVE_CHARTS should be disabled" + set_fact: + casectl_resolve_charts_disabled: "{{ casectl_resolve_charts | ternary('', 'CASECTL_RESOLVE_CHARTS=false') }}" + - name: "{{ case_name }} : Airgap setup configuration" debug: msg: @@ -43,11 +47,12 @@ - "Skip Verify ............................ {{ ibmpak_skip_verify }}" - "Skip Dependencies ...................... {{ ibmpak_skip_dependencies }}" - "IBM Pak Flags .......................... {{ ibmpak_flag_insecure }} {{ ibmpak_flag_skip_verify }} {{ ibmpak_flag_skip_dependencies }}" + - "CASECTL_RESOLVE_CHARTS ................. {{ casectl_resolve_charts_disabled }}" # 4. Get the CASE bundle # ----------------------------------------------------------------------------- - name: "{{ case_name }} : Get the CASE bundle" - shell: oc ibm-pak get {{ case_name }} --version {{ case_version }} {{ ibmpak_flag_insecure }} {{ ibmpak_flag_skip_verify }} {{ ibmpak_flag_skip_dependencies }} + shell: "{{ casectl_resolve_charts_disabled }} oc ibm-pak get {{ case_name }} --version {{ case_version }} {{ ibmpak_flag_insecure }} {{ ibmpak_flag_skip_verify }} {{ ibmpak_flag_skip_dependencies }}" register: ibmpak_get_result - name: "{{ case_name }} : Get Build from output" diff --git a/ibm/mas_devops/roles/mirror_ocp/templates/imagesetconfiguration.yml.j2 b/ibm/mas_devops/roles/mirror_ocp/templates/imagesetconfiguration.yml.j2 index 00b8a69902..e2583865c7 100644 --- a/ibm/mas_devops/roles/mirror_ocp/templates/imagesetconfiguration.yml.j2 +++ b/ibm/mas_devops/roles/mirror_ocp/templates/imagesetconfiguration.yml.j2 @@ -49,7 +49,6 @@ mirror: - name: v5 - name: strimzi-kafka-operator # Required by ibm.mas_devops.kafka role channels: - - name: stable - name: strimzi-0.45.x - name: opendatahub-operator channels: