diff --git a/automation-generators/generic/cp4d/preprocessor.py b/automation-generators/generic/cp4d/preprocessor.py index ef4a2c469..6b5a4f2cc 100644 --- a/automation-generators/generic/cp4d/preprocessor.py +++ b/automation-generators/generic/cp4d/preprocessor.py @@ -326,7 +326,7 @@ def preprocessor(attributes=None, fullConfig=None, moduleVariables=None): check_cp_foundation(c) if "state" in c: if c['state'] not in ['installed','removed']: - g.appendError(msg='Cartridge state must be "installed" or "removed"') + g.appendError(msg='Cartridge state {} invalid, must be "installed" or "removed"'.format(c['state'])) if "state" not in c or c['state']=='installed': # Check if there are dependencies and the depencies will be installed too if "dependencies" in c: diff --git a/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/files/check-services-installed.sh b/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/files/check-services-installed.sh index d0eeca262..1759d5e05 100755 --- a/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/files/check-services-installed.sh +++ b/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/files/check-services-installed.sh @@ -74,8 +74,8 @@ for c in $(echo $cartridges | jq -r '.[].name');do cartridge_internal=$(echo $cartridges | jq -r --arg cn "$c" '.[] | select(.name == $cn ) | .cr_internal // false') if [[ "$cartridge_internal" == "true" ]];then continue - fi - + fi + cr_cartridge_name=$(echo $cartridges | jq -r --arg cn "$c" '.[] | select(.name == $cn ) | .name') cr_cr=$(echo $cartridges | jq -r --arg cn "$c" '.[] | select(.name == $cn ) | .cr_cr') cr_name=$(echo $cartridges | jq -r --arg cn "$c" '.[] | select(.name == $cn ) | .cr_name') @@ -98,12 +98,14 @@ for c in $(echo $cartridges | jq -r '.[].name');do continue fi - # Check if object exists - oc get --namespace $project $cr_cr $cr_name - if [ $? -ne 0 ];then - log "Error: $cr_cr object $cr_name does not exist in project $project" - exit_code=3 - continue + # Check if object exists (only for current cartridge) + if [[ "$c" == "$current_cartridge_name" ]];then + oc get --namespace $project $cr_cr $cr_name + if [ $? -ne 0 ];then + log "Error: $cr_cr object $cr_name does not exist in project $project" + exit_code=3 + continue + fi fi # TODO: Remove the patching of Db2 statefulsets once tty issue has been resolved diff --git a/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/files/temp-patch-wxo.sh b/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/files/temp-patch-wxo.sh new file mode 100755 index 000000000..4ef5379ba --- /dev/null +++ b/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/files/temp-patch-wxo.sh @@ -0,0 +1,104 @@ +#!/bin/bash + +# Parameters +# $1: Status directory +# $2: OpenShift project for Cloud Pak for Data + +status_dir=$1 +project=$2 + +exit_code=0 + +get_logtime() { + echo $(date "+%Y-%m-%d %H:%M:%S") +} + +log() { + LOG_TIME=$(get_logtime) + printf "[${LOG_TIME}] ${1}\n" | tee -a ${status_dir}/log/$project-wxo-48-patch.log +} + +log "----------" +# Check if the connection to the OpenShift cluster is still valid +log "Info: Checking access to project $project" +oc get project $project +if [ $? -ne 0 ];then + log "Error: Could not access project $project. Has the OpenShift login token expired?" + exit 99 +fi + +ops_manager_patched=0 +rabbit_mq_cluster_patched=0 + +while true;do + log "----------" + log "Checking OpsManager in project ${project}" + log "----------" + + if oc get opsmanagers.mongodb.com -n ${project} mongodb-wo-mongo-ops-manager;then + log "Info: Patching OpsManager mongodb-wo-mongo-ops-manager" + patch_result=$(oc patch opsmanagers.mongodb.com \ + -n ${project} mongodb-wo-mongo-ops-manager \ + --type merge \ + --patch '{ + "spec": { + "applicationDatabase":{ + "podSpec":{ + "podTemplate":{ + "metadata":{ + "labels":{ + "wo.watsonx.ibm.com/external-access":"true" + } + } + } + } + } + } + }' 2>&1 | tee -a ${status_dir}/log/$project-wxo-48-patch.log) + if [[ "$patch_result" != *"(no change)"* ]];then + echo "OpsManager has been patched." | tee -a ${status_dir}/log/$project-wxo-48-patch.log + oc delete sts -n ${project} mongodb-wo-mongo-ops-manager-db --ignore-not-found + fi + ops_manager_patched=1 + fi + + log "----------" + log "Checking RabbitMQCluster in project ${project}" + log "----------" + + if oc get rabbitmqclusters.rabbitmq.opencontent.ibm.com -n ${project} wo-rabbitmq;then + log "Info: Patching RabbitMQCluster wo-rabbitmq" + patch_result=$(oc patch rabbitmqclusters.rabbitmq.opencontent.ibm.com \ + -n ${project} wo-rabbitmq \ + --type merge \ + --patch '{ + "metadata":{ + "annotations":{ + "wo.watsonx.ibm.com/hands-off":"true" + } + }, + "spec":{ + "global":{ + "podLabels":{ + "wo.watsonx.ibm.com/external-access":"true" + } + } + } + }' 2>&1 | tee -a ${status_dir}/log/$project-wxo-48-patch.log) + if [[ "$patch_result" != *"(no change)"* ]];then + echo "RabbitMQCluster has been patched." | tee -a ${status_dir}/log/$project-wxo-48-patch.log + oc delete job -n ${project} wo-rabbitmq-orchestrate-backup-label --ignore-not-found + fi + rabbit_mq_cluster_patched=1 + fi + + if [[ ${ops_manager_patched} -eq 1 && ${rabbit_mq_cluster_patched} -eq 1 ]];then + log "Both OpsManager and RabbitMQCluster have been patched, exiting" + exit 0 + fi + + log "----------" + log "Finished checks, sleeping for 2 minutes" + sleep 120 +done +exit 0 diff --git a/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/tasks/cp4d-install-cartridges-olm-utils.yml b/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/tasks/cp4d-install-cartridges-olm-utils.yml index 8cb6dcc16..f7090af73 100644 --- a/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/tasks/cp4d-install-cartridges-olm-utils.yml +++ b/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/tasks/cp4d-install-cartridges-olm-utils.yml @@ -3,6 +3,25 @@ debug: msg: "" +- set_fact: + _apply_cr_cartridges: >- + {{ _cartridges_to_install | + rejectattr('olm_utils_name','==','scheduler') | + selectattr('separate_install','undefined') | + union(_cartridges_to_install | selectattr('separate_install','defined') | selectattr('separate_install','!=',True)) }} + +- set_fact: + _apply_cr_cartridges_list: >- + {{ _apply_cr_cartridges | + map(attribute='olm_utils_name') | + join(',')}} + +- name: Run pre-processing scripts + include_tasks: cp4d-install-cr-pre-processing.yml + loop: "{{ _apply_cr_cartridges | default([]) }}" + loop_control: + loop_var: _current_cp4d_cartridge + # Always generate the preview script to log what will be done - name: Generate command preview script to install cartridges set_fact: @@ -65,4 +84,10 @@ - name: Run shell script to install cartridges, logs are in {{ status_dir }}/log/{{ _p_current_cp4d_cluster.project }}-apply-cr-cartridges.log shell: | {{ status_dir }}/cp4d/{{ _p_current_cp4d_cluster.project }}-apply-cr-cartridges.sh >> {{ status_dir }}/log/{{ _p_current_cp4d_cluster.project }}-apply-cr-cartridges.log 2>&1 - when: not _sequential_install \ No newline at end of file + when: not _sequential_install + +- name: Wait for cartridges to finish installation + include_tasks: cp4d-wait-cartridges-ready.yml + loop: "{{ _apply_cr_cartridges | default([]) }}" + loop_control: + loop_var: _current_cp4d_cartridge \ No newline at end of file diff --git a/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/tasks/cp4d-install-cr-pre-processing.yml b/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/tasks/cp4d-install-cr-pre-processing.yml index 504e2e506..da9a8c4f2 100644 --- a/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/tasks/cp4d-install-cr-pre-processing.yml +++ b/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/tasks/cp4d-install-cr-pre-processing.yml @@ -3,4 +3,3 @@ include_tasks: "{{ _current_cp4d_cartridge.cr_preprocessing_script }}" when: - (_current_cp4d_cartridge.cr_preprocessing_script | default('')) != '' - - (_current_cp4d_cartridge.state | default('installed')) == 'installed' diff --git a/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/tasks/cp4d-install-separate-cr.yml b/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/tasks/cp4d-install-separate-cr.yml index cb285614f..d59f61261 100644 --- a/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/tasks/cp4d-install-separate-cr.yml +++ b/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/tasks/cp4d-install-separate-cr.yml @@ -1,5 +1,9 @@ --- - block: + + - name: Run pre-processing script + include_tasks: cp4d-install-cr-pre-processing.yml + - ansible.builtin.stat: path: "{{ role_path }}/tasks/cp4d-install-cr-{{ _current_cp4d_cartridge.olm_utils_name }}.yml" register: _install_cr_script @@ -13,5 +17,4 @@ when: _install_cr_script.stat.exists when: - - (_current_cp4d_cartridge.state | default('installed')) == 'installed' - (_current_cp4d_cartridge.separate_install | default(False) | bool) \ No newline at end of file diff --git a/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/tasks/cp4d-prep-watsonx-orchestrate.yml b/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/tasks/cp4d-prep-watsonx-orchestrate.yml new file mode 100644 index 000000000..69b26828c --- /dev/null +++ b/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/tasks/cp4d-prep-watsonx-orchestrate.yml @@ -0,0 +1,126 @@ +--- +- name: Check if Watson Assistant has been installed {{ _p_current_cp4d_cluster.project }} + shell: | + oc get WatsonAssistant wa -n {{ _p_current_cp4d_cluster.project }} + failed_when: False + register: _wa_installed + +- name: Fail if Watson Assistant has not been installed in project {{ _p_current_cp4d_cluster.project }} + fail: + msg: Watson Assistant has not been installed in project {{ _p_current_cp4d_cluster.project }} + when: _wa_installed.rc != 0 + +- name: Generate OLM utils command to create watsonx Orchestrate subscription + set_fact: + _apply_olm_wxo_command: "{{ lookup('template', 'apply-olm-cartridge-wxo.j2') }}" + +- name: Show apply-olm command to create watsonx Orchestrate subscription + debug: + var: _apply_olm_wxo_command + +- name: Run apply-olm command to install watsonx Orchestrate subscriptions, logs are in {{ status_dir }}/log/{{ _p_current_cp4d_cluster.project }}-apply-olm-wxo.log + shell: | + {{ _apply_olm_wxo_command }} > {{ status_dir }}/log/{{ _p_current_cp4d_cluster.project }}-apply-olm-wxo.log 2>&1 + retries: 2 + delay: 10 + until: _apply_olm_wxo_result.rc==0 + register: _apply_olm_wxo_result + +- set_fact: + _app_connect: "{{ _current_cp4d_cartridge.app_connect }}" + +- name: Download IBM App Connect case file version {{ _app_connect.app_connect_case_version }} + get_url: + url: "https://github.com/IBM/cloud-pak/raw/master/repo/case/ibm-appconnect/{{ _app_connect.app_connect_case_version }}/ibm-appconnect-{{ _app_connect.app_connect_case_version }}.tgz" + dest: "{{ status_dir }}/cp4d/ibm-app-connect-{{ _app_connect.app_connect_case_version }}.tar.gz" + owner: root + mode: 0644 + register: _case_download_result + until: _case_download_result is succeeded + retries: 5 + delay: 30 + +- name: Unpack IBM App Connect case file {{ status_dir }}/cp4d/ibm-app-connect-{{ _app_connect.app_connect_case_version }}.tar.gz to /tmp + unarchive: + src: "{{ status_dir }}/cp4d/ibm-app-connect-{{ _app_connect.app_connect_case_version }}.tar.gz" + dest: /tmp + remote_src: True + +- name: Create OpenShift Project {{ _app_connect.app_connect_project }} + shell: + oc new-project {{ _app_connect.app_connect_project }} || true + +- name: Create IBM App Connect catalog source + shell: | + oc patch --filename=/tmp/ibm-appconnect/inventory/ibmAppconnect/files/op-olm/catalog_source.yaml \ + --type=merge \ + -o yaml \ + --patch='{"metadata": {"namespace": "{{ _app_connect.app_connect_project }}"}}' \ + --dry-run=client | oc apply -n {{ _app_connect.app_connect_project }} -f - + +- name: Generate yaml for IBM App Connect operator + template: + src: ibm-app-connect.j2 + dest: "{{ status_dir }}/cp4d/{{ _p_current_cp4d_cluster.project }}-ibm-app-connect.yaml" + +- name: Create IBM App Connect operator + shell: | + oc apply -f {{ status_dir }}/cp4d/{{ _p_current_cp4d_cluster.project }}-ibm-app-connect.yaml + +- name: Wait for IBM App Connect operator to be installed + shell: | + oc wait csv --namespace={{ _app_connect.app_connect_project }} \ + -l=operators.coreos.com/ibm-appconnect.{{ _app_connect.app_connect_project }}='' \ + --for='jsonpath={.status.phase}'=Succeeded --timeout=30s + register: _ibm_app_connect_csv + retries: 20 + delay: 10 + until: _ibm_app_connect_csv.rc == 0 + +- name: Create IBM App Connect instance for watsonx watsonx.orchestrate + shell: | + setup-appconnect \ + --appconnect_ns={{ _app_connect.app_connect_project }} \ + --cpd_instance_ns={{ _p_current_cp4d_cluster.project }} \ + --release={{ _p_current_cp4d_cluster.cp4d_version }} \ + --components=watsonx_orchestrate \ + --file_storage_class={{ ocp_storage_class_file }} + +- set_fact: + _cp4d_admin_password_vault_key_name: "cp4d_admin_{{ _p_current_cp4d_cluster.project| replace('-','_') }}_{{ _p_current_cp4d_cluster.openshift_cluster_name| replace('-','_') }}" + +- name: Retrieve CP4D admin password from vault secret {{ _cp4d_admin_password_vault_key_name }} + include_role: + name: vault-get-secret + vars: + secret_name: "{{ _cp4d_admin_password_vault_key_name }}" + secret_group: "{{ environment_name }}" + _p_secret_variable: _cp4d_admin_password_vault + +- name: Setup watsonx Assistant instances for watsonx watsonx.orchestrate + shell: | + setup-wxo-assistant \ + --cpd_instance_ns={{ _p_current_cp4d_cluster.project }} \ + --create_assistants=true \ + --user={{ _cp4d_user }} \ + --password={{ _cp4d_admin_password_vault }} \ + --auth_type=password + register: _setup_wxo_assistant + retries: 5 + delay: 10 + until: _setup_wxo_assistant.rc == 0 + +- block: + - name: Starting background task to patch OpsManager and RabbitMQCluster. Logs are in {{ status_dir }}/log/{{ _p_current_cp4d_cluster.project }}-wxo-48-patch.log + shell: | + {{ role_path }}/files/temp-patch-wxo.sh \ + {{ status_dir }} \ + {{ _p_current_cp4d_cluster.project }} + async: 86400 + poll: 0 + register: _patch_wxo_48 + + - name: Show details of background task to patch watsonx Orchestrate + debug: + var: _patch_wxo_48 + when: _p_current_cp4d_cluster.cp4d_version == "4.8.4" \ No newline at end of file diff --git a/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/tasks/cp4d-wait-cartridges-ready.yml b/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/tasks/cp4d-wait-cartridges-ready.yml index 33aaa2738..eabd81266 100644 --- a/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/tasks/cp4d-wait-cartridges-ready.yml +++ b/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/tasks/cp4d-wait-cartridges-ready.yml @@ -1,5 +1,9 @@ --- - block: + - name: Write status of cartridges to {{ status_dir }}/log/{{ _p_current_cp4d_cluster.project }}-cartridges-status.csv + shell: | + get-cr-status --cpd_instance_ns={{ _p_current_cp4d_cluster.project }} > {{ status_dir }}/log/{{ _p_current_cp4d_cluster.project }}-cartridges-status.csv + - name: Write cartridge information to file {{ status_dir }}/log/{{ _p_current_cp4d_cluster.project }}-cartridges.json copy: content: "{{ _cartridges_to_install | default([]) | to_json }}" @@ -35,6 +39,5 @@ - not (cpd_test_cartridges | default(False) | bool) when: - - (_current_cp4d_cartridge.state | default('installed')) == 'installed' - not _current_cp4d_cartridge.name in ['cpfs','cp-foundation','cpd_platform','lite','scheduler'] - not (_current_cp4d_cartridge.cr_internal | default(False) | bool) \ No newline at end of file diff --git a/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/tasks/main.yml b/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/tasks/main.yml index 6de927920..b55168f55 100644 --- a/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/tasks/main.yml +++ b/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/tasks/main.yml @@ -19,12 +19,6 @@ cloudpakfordata: true iamIntegration: {{ _p_current_cp4d_cluster.use_fs_iam | default(False) | bool }} -- name: Run pre-processing scripts - include_tasks: cp4d-install-cr-pre-processing.yml - loop: "{{ _cartridges_to_install | default([]) }}" - loop_control: - loop_var: _current_cp4d_cartridge - - name: Starting background task to patch Db2U clusters. Logs are in {{ status_dir }}/log/{{ _p_current_cp4d_cluster.project }}-db2u-temp-patch.log shell: | {{ role_path }}/files/temp-patch-db2u.sh \ diff --git a/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/templates/apply-cr-cartridges.j2 b/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/templates/apply-cr-cartridges.j2 index d74973933..c83c6d4d1 100644 --- a/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/templates/apply-cr-cartridges.j2 +++ b/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/templates/apply-cr-cartridges.j2 @@ -6,12 +6,7 @@ -v \ --cpd_instance_ns={{ _p_current_cp4d_cluster.project }} \ --param-file={{ status_dir }}/cp4d/{{ _p_current_cp4d_cluster.project }}-install-options.yml \ - --components={% for c in _cartridges_to_install -%} -{%- if (c.state | default('installed')) == 'installed' and (not c.separate_install | default(False | bool) and (c.olm_utils_name != 'scheduler')) -%} -{%- if not loop.first -%},{% endif -%} -{{ c.olm_utils_name }} -{%- endif -%} -{%- endfor %} \ + --components={{ _apply_cr_cartridges_list }} \ {%- if _storage_type == "pwx" -%} --storage_vendor=portworx {%- else -%} diff --git a/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/templates/apply-olm-cartridge-wxo.j2 b/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/templates/apply-olm-cartridge-wxo.j2 new file mode 100644 index 000000000..87079fe06 --- /dev/null +++ b/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/templates/apply-olm-cartridge-wxo.j2 @@ -0,0 +1,7 @@ +/opt/ansible/bin/apply-olm \ + --release={{ _p_current_cp4d_cluster.cp4d_version }} \ + --case_download=false \ + --catsrc=false --sub=true \ + --cpd_operator_ns={{ _p_current_cp4d_cluster.operators_project | default('cpd-operators') }} \ + --upgrade={%- if _upgrade_cp4d -%}true{%- else -%}false{%- endif %} \ + --components=watsonx_orchestrate \ No newline at end of file diff --git a/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/templates/ibm-app-connect.j2 b/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/templates/ibm-app-connect.j2 new file mode 100644 index 000000000..b4f367f2d --- /dev/null +++ b/automation-roles/50-install-cloud-pak/cp4d/cp4d-cartridge-install/templates/ibm-app-connect.j2 @@ -0,0 +1,26 @@ +--- +apiVersion: operators.coreos.com/v1 +kind: OperatorGroup +metadata: + name: appconnect-og + namespace: {{ _app_connect.app_connect_project }} +spec: + targetNamespaces: + - {{ _app_connect.app_connect_project }} + upgradeStrategy: Default +--- +apiVersion: operators.coreos.com/v1alpha1 +kind: Subscription +metadata: + name: ibm-appconnect-operator + namespace: {{ _app_connect.app_connect_project }} +spec: + channel: {{ _app_connect.app_connect_channel_version }} + config: + env: + - name: ACECC_ENABLE_PUBLIC_API + value: "true" + installPlanApproval: Automatic + name: ibm-appconnect + source: appconnect-operator-catalogsource + sourceNamespace: {{ _app_connect.app_connect_project }} \ No newline at end of file diff --git a/automation-roles/50-install-cloud-pak/cp4d/cp4d-case-save/templates/mirror-images-case-save.j2 b/automation-roles/50-install-cloud-pak/cp4d/cp4d-case-save/templates/mirror-images-case-save.j2 index 7a21282b6..87914b3da 100644 --- a/automation-roles/50-install-cloud-pak/cp4d/cp4d-case-save/templates/mirror-images-case-save.j2 +++ b/automation-roles/50-install-cloud-pak/cp4d/cp4d-case-save/templates/mirror-images-case-save.j2 @@ -2,9 +2,4 @@ mirror-images \ --release={{ _p_current_cp4d_cluster.cp4d_version }} \ --target_registry=127.0.0.1:12443 \ --preview=True \ - --components={% for c in _cartridges_to_install -%} -{%- if ((c.state | default('installed')) == 'installed') or (cpd_test_cartridges | default(False) | bool) -%} -{%- if not loop.first -%},{% endif -%} -{{ c.olm_utils_name }} -{%- endif -%} -{%- endfor -%} \ No newline at end of file + --components={{ _cartridges_to_install_list }} \ No newline at end of file diff --git a/automation-roles/50-install-cloud-pak/cp4d/cp4d-catalog-source/templates/apply-olm-create-catsrc.j2 b/automation-roles/50-install-cloud-pak/cp4d/cp4d-catalog-source/templates/apply-olm-create-catsrc.j2 index d38520378..eb882a6af 100644 --- a/automation-roles/50-install-cloud-pak/cp4d/cp4d-catalog-source/templates/apply-olm-create-catsrc.j2 +++ b/automation-roles/50-install-cloud-pak/cp4d/cp4d-catalog-source/templates/apply-olm-create-catsrc.j2 @@ -7,9 +7,4 @@ {% endif -%} --preview={%- if _p_preview_script -%}true{%- else -%}false{%- endif %} \ --upgrade={%- if _upgrade_cp4d -%}true{%- else -%}false{%- endif %} \ - --components={% for c in _cartridges_to_install -%} -{%- if ((c.state | default('installed')) == 'installed') or (cpd_test_cartridges | default(False) | bool) -%} -{%- if not loop.first -%},{% endif -%} -{{ c.olm_utils_name }} -{%- endif -%} -{%- endfor -%} \ No newline at end of file + --components={{ _cartridges_to_install_list }} \ No newline at end of file diff --git a/automation-roles/50-install-cloud-pak/cp4d/cp4d-mirror-images/templates/mirror-images.j2 b/automation-roles/50-install-cloud-pak/cp4d/cp4d-mirror-images/templates/mirror-images.j2 index 84879df5a..69fdea955 100644 --- a/automation-roles/50-install-cloud-pak/cp4d/cp4d-mirror-images/templates/mirror-images.j2 +++ b/automation-roles/50-install-cloud-pak/cp4d/cp4d-mirror-images/templates/mirror-images.j2 @@ -3,7 +3,7 @@ set -o pipefail mirror-images \ --release={{ _p_current_cp4d_cluster.cp4d_version }} \ - --components={%- if _p_current_cp4d_cluster.cp4d_version >= '4.7.0' %}ibm-cert-manager,ibm-licensing,{%- endif %}{{ _cp4d_components }} \ + --components={%- if _p_current_cp4d_cluster.cp4d_version >= '4.7.0' %}ibm-cert-manager,ibm-licensing,{%- endif %}{{ _cartridges_to_install_list }} \ {% if (_p_source_registry_hostname | default('')) == _v_portable_registry -%} --source_registry={{ _v_portable_registry }}:{{ _v_portable_registry_port }} \ {% endif -%} diff --git a/automation-roles/50-install-cloud-pak/cp4d/cp4d-subscriptions/tasks/cp4d-create-subscriptions-olm-utils.yml b/automation-roles/50-install-cloud-pak/cp4d/cp4d-subscriptions/tasks/cp4d-create-subscriptions-olm-utils.yml index ec53f6918..81434e73c 100644 --- a/automation-roles/50-install-cloud-pak/cp4d/cp4d-subscriptions/tasks/cp4d-create-subscriptions-olm-utils.yml +++ b/automation-roles/50-install-cloud-pak/cp4d/cp4d-subscriptions/tasks/cp4d-create-subscriptions-olm-utils.yml @@ -1,4 +1,13 @@ --- +- set_fact: + _apply_olm_cartridges: "{{ _cartridges_to_install | rejectattr('olm_utils_name','==','watsonx_orchestrate') }}" + +- set_fact: + _apply_olm_cartridges_list: >- + {{ _apply_olm_cartridges | + map(attribute='olm_utils_name') | + join(',')}} + - name: Generate preview script to create cartridge subscriptions set_fact: _apply_olm_command_script: "{{ lookup('template', 'apply-olm-cartridge-sub.j2') }}" diff --git a/automation-roles/50-install-cloud-pak/cp4d/cp4d-subscriptions/templates/apply-olm-cartridge-sub.j2 b/automation-roles/50-install-cloud-pak/cp4d/cp4d-subscriptions/templates/apply-olm-cartridge-sub.j2 index 1fb373b8e..807c85283 100644 --- a/automation-roles/50-install-cloud-pak/cp4d/cp4d-subscriptions/templates/apply-olm-cartridge-sub.j2 +++ b/automation-roles/50-install-cloud-pak/cp4d/cp4d-subscriptions/templates/apply-olm-cartridge-sub.j2 @@ -7,9 +7,4 @@ {% endif -%} --upgrade={%- if _upgrade_cp4d -%}true{%- else -%}false{%- endif %} \ --preview={%- if _p_preview_script -%}true{%- else -%}false{%- endif %} \ - --components={% for c in _cartridges_to_install -%} -{%- if ((c.state | default('installed')) == 'installed') or (cpd_test_cartridges | default(False) | bool) -%} -{%- if not loop.first -%},{% endif -%} -{{ c.olm_utils_name }} -{%- endif -%} -{%- endfor -%} \ No newline at end of file + --components={{ _apply_olm_cartridges_list }} \ No newline at end of file diff --git a/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/tasks/check-db2u-dependency.yml b/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/tasks/check-db2u-dependency.yml index c2f422144..4df3ba8c8 100644 --- a/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/tasks/check-db2u-dependency.yml +++ b/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/tasks/check-db2u-dependency.yml @@ -6,7 +6,6 @@ - name: Determine if any of the cartridges has a db2u dependency set_fact: _db2u_dependency: "{{ _db2u_dependency or (item.db2u_dependency | default(False)) }}" - when: (item.state | default('installed')) == 'installed' loop: "{{ _cartridges_to_install }}" no_log: True diff --git a/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/tasks/check-db2u-kubelet.yml b/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/tasks/check-db2u-kubelet.yml index 7ea2c0b26..8884cc843 100644 --- a/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/tasks/check-db2u-kubelet.yml +++ b/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/tasks/check-db2u-kubelet.yml @@ -6,7 +6,6 @@ - name: Determine if any of the cartridges require kubelet configuration set_fact: _db2u_kubelet: "{{ _db2u_kubelet or (item.db2u_kubelet | default(False)) }}" - when: (item.state | default('installed')) == 'installed' loop: "{{ _cartridges_to_install }}" no_log: True diff --git a/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/tasks/check-db2u-node-tuning.yml b/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/tasks/check-db2u-node-tuning.yml index 39bca2c77..16494d105 100644 --- a/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/tasks/check-db2u-node-tuning.yml +++ b/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/tasks/check-db2u-node-tuning.yml @@ -6,7 +6,6 @@ - name: Determine if any of the cartridges require node tuning set_fact: _db2u_node_tuning: "{{ _db2u_node_tuning or (item.db2u_node_tuning | default(False)) }}" - when: (item.state | default('installed')) == 'installed' loop: "{{ _cartridges_to_install }}" no_log: True diff --git a/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/tasks/check-knative-eventing.yml b/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/tasks/check-knative-eventing.yml index 141bf118c..fff295e3e 100644 --- a/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/tasks/check-knative-eventing.yml +++ b/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/tasks/check-knative-eventing.yml @@ -6,7 +6,6 @@ - name: Determine if any of the cartridges has a Knative eventing dependency set_fact: _knative_eventing_dependency: "{{ _knative_eventing_dependency or (item.knative_eventing_dependency | default(False)) }}" - when: (item.state | default('installed')) == 'installed' loop: "{{ _cartridges_to_install }}" - name: Show if there is a Knative eventing dependency diff --git a/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/tasks/main.yml b/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/tasks/main.yml index 396b120ba..8ea257942 100644 --- a/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/tasks/main.yml +++ b/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/tasks/main.yml @@ -23,11 +23,9 @@ # Set the license server project to the correct value, dependent if the license service is already installed in cs-control - include_tasks: set-license-service-project.yml -- debug: - var: implemented_cloud_platform_types - - set_fact: _cartridges_with_olm_utils_name: [] + _all_cartridges: [] _cartridges_to_install: [] _cartridge_dependencies: [] @@ -60,7 +58,7 @@ no_log: True - set_fact: - _undefined_cartridges: "{{ _cartridges_with_olm_utils_name | rejectattr('olm_utils_name','defined') }}" + _undefined_cartridges: "{{ _cartridges_with_olm_utils_name | rejectattr('olm_utils_name','defined') | map(attribute='name') }}" - name: Fail if there were undefined cartridges found fail: @@ -69,8 +67,8 @@ - name: Add versions details from olm-utils set_fact: - _cartridges_to_install: >- - {{ _cartridges_to_install | default([]) + _all_cartridges: >- + {{ _all_cartridges | default([]) + [ item | combine(_list_components_json_item) ] }} vars: @@ -85,27 +83,39 @@ # Remove any cartridges without a defined Component_name - set_fact: - _tmp_cartridges: "{{ _cartridges_to_install | rejectattr('Component_name','undefined') }}" + _tmp_cartridges: "{{ _all_cartridges | rejectattr('Component_name','undefined') }}" - set_fact: - _cartridges_to_install: "{{ _tmp_cartridges }}" + _all_cartridges: "{{ _tmp_cartridges }}" +# Make sure that the dp cartridge is placed at the end - set_fact: _dp_cartridge: >- - {{ _cartridges_to_install | selectattr('Component_name','match','dp') | default({}) }} + {{ _all_cartridges | selectattr('Component_name','match','dp') | default({}) }} -- debug: - var: _dp_cartridge +- set_fact: + _tmp_cartridges: "{{ _all_cartridges | rejectattr('Component_name','match','dp') }}" + +- set_fact: + _all_cartridges: >- + {{ _tmp_cartridges + _dp_cartridge }} - set_fact: - _tmp_cartridges: "{{ _cartridges_to_install | rejectattr('Component_name','match','dp') }}" + _cartridges_to_install: "{{ _all_cartridges }}" + when: (cpd_test_cartridges | default(False) | bool) - set_fact: _cartridges_to_install: >- - {{ _tmp_cartridges + _dp_cartridge }} + {{ _all_cartridges | + selectattr('state','undefined') | + union(_all_cartridges | selectattr('state','defined') | selectattr('state','==','installed')) }} + when: not(cpd_test_cartridges | default(False) | bool) - set_fact: - _all_cartridges: "{{ _cartridges_to_install }}" + _cartridges_to_install_list: >- + {{ _cartridges_to_install | + map(attribute='olm_utils_name') | + join(',')}} - set_fact: _upgrade_cp4d: False @@ -115,7 +125,6 @@ loop_control: loop_var: _current_cartridge_details when: - - (_current_cartridge_details.state | default('installed')) == 'installed' - (_current_cartridge_details.CR_Kind | default('')) != '' - (_current_cartridge_details.CR_Kind | default('')) != '--' loop: "{{ _cartridges_to_install }}" @@ -152,7 +161,6 @@ - name: Determine if CP4D services must be installed sequentially set_fact: _sequential_install: "{{ _sequential_install or item.force_sequential_install }}" - when: (item.state | default('installed')) == 'installed' loop: "{{ _cartridges_to_install }}" no_log: True @@ -176,7 +184,6 @@ set_fact: _cartridge_dependencies: >- {{ _cartridge_dependencies + ( item.Dependencies.split('+') | map("trim") | list | reject('match','^$') | list ) | unique }} - when: (item.state | default('installed')) == 'installed' loop: "{{ _cartridges_to_install }}" no_log: True @@ -189,26 +196,16 @@ debug: var: _cartridge_dependencies -- name: Show full cartridge information +- name: Show full information of cartridges to be installed debug: var: _cartridges_to_install -- name: Generate CP4D components based on cartridges to install - set_fact: - _cp4d_components: "{{ lookup('template','generate-cp4d-components.j2') }}" - -- debug: - var: _cp4d_components - - name: Obtain surviving cartridges set_fact: _surviving_cartridges_names: "{{ _cartridges_to_install | json_query(jmes_query) }} + {{ _cartridge_dependencies }}" vars: jmes_query: "[?state=='installed'].olm_utils_name" -- debug: - var: _surviving_cartridges_names - - name: Determine the surviving cartridges set_fact: _surviving_cartridges: >- @@ -217,7 +214,7 @@ }} vars: _cartridges_to_install_item: >- - {{ _cartridges_to_install + {{ _all_cartridges | selectattr('olm_utils_name','equalto',item) | list | first @@ -231,7 +228,7 @@ - debug: var: _surviving_cartridges -- name: Write cartridge information to file {{ status_dir }}/log/{{ _p_current_cp4d_cluster.project }}-cartridges.json +- name: Write cartridge to install information to file {{ status_dir }}/log/{{ _p_current_cp4d_cluster.project }}-cartridges.json copy: content: "{{ _cartridges_to_install | default([]) | to_json }}" dest: "{{ status_dir }}/log/{{ _p_current_cp4d_cluster.project }}-cartridges.json" diff --git a/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/templates/generate-cp4d-components.j2 b/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/templates/generate-cp4d-components.j2 deleted file mode 100644 index a69ae2988..000000000 --- a/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/templates/generate-cp4d-components.j2 +++ /dev/null @@ -1,6 +0,0 @@ -{% for c in _cartridges_to_install -%} -{%- if ((c.state | default('installed')) == 'installed') or (cpd_test_cartridges | default(False) | bool) -%} -{%- if not loop.first -%},{% endif -%} -{{ c.olm_utils_name }} -{%- endif -%} -{%- endfor -%} \ No newline at end of file diff --git a/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/vars/vars-cp4d-installation.yml b/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/vars/vars-cp4d-installation.yml index d563ebf4f..ca9af2d74 100644 --- a/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/vars/vars-cp4d-installation.yml +++ b/automation-roles/50-install-cloud-pak/cp4d/cp4d-variables/vars/vars-cp4d-installation.yml @@ -375,6 +375,17 @@ cartridge_cr: force_sequential_install: False db2u_dependency: True db2u_kubelet: True + - name: watsonx-orchestrate + olm_utils_name: watsonx_orchestrate + cr_preprocessing_script: cp4d-prep-watsonx-orchestrate.yml + cr_cr: WatsonxOrchestrate + cr_name: wo + cr_status_attribute: watsonxOrchestrateStatus + cr_status_completed: Completed + force_sequential_install: False + separate_install: True + db2u_dependency: False + db2u_kubelet: False - name: wkc olm_utils_name: wkc cr_preprocessing_script: cp4d-prep-wkc.yml diff --git a/automation-roles/60-configure-cloud-pak/cp4d/cp4d-instance-db2oltp/tasks/provision_db2_instance.yml b/automation-roles/60-configure-cloud-pak/cp4d/cp4d-instance-db2oltp/tasks/provision_db2_instance.yml index bff436b33..c7ebb2a84 100644 --- a/automation-roles/60-configure-cloud-pak/cp4d/cp4d-instance-db2oltp/tasks/provision_db2_instance.yml +++ b/automation-roles/60-configure-cloud-pak/cp4d/cp4d-instance-db2oltp/tasks/provision_db2_instance.yml @@ -29,7 +29,6 @@ add-cluster-role-to-user system:controller:persistent-volume-binder \ system:serviceaccount:{{ current_cp4d_cluster.project }}:zen-databases-sa - # TODO: Check if the https://.../icp4data/api/v1/databases/ URL also works for CP4D 4.6 - name: Get CP4D Database specifications uri: url: 'https://{{ cp4d_url.stdout }}/icp4data/api/v1/databases' @@ -41,6 +40,9 @@ validate_certs: no status_code: 200 register: _databases_details_result_v1 + until: _databases_details_result_v1.status == 200 + retries: 12 + delay: 5 when: current_cp4d_cluster.cp4d_version < '4.7.0' - name: Get CP4D Database specifications @@ -54,6 +56,9 @@ validate_certs: no status_code: 200 register: _databases_details_result_v2 + until: _databases_details_result_v2.status == 200 + retries: 12 + delay: 5 when: current_cp4d_cluster.cp4d_version >= '4.7.0' - set_fact: diff --git a/automation-roles/60-configure-cloud-pak/cp4d/cp4d-instance-watson_assistant/tasks/delete_wa_instance.yml b/automation-roles/60-configure-cloud-pak/cp4d/cp4d-instance-watson_assistant/tasks/delete_wa_instance.yml index e8149574a..b7ee0a3ee 100644 --- a/automation-roles/60-configure-cloud-pak/cp4d/cp4d-instance-watson_assistant/tasks/delete_wa_instance.yml +++ b/automation-roles/60-configure-cloud-pak/cp4d/cp4d-instance-watson_assistant/tasks/delete_wa_instance.yml @@ -14,7 +14,10 @@ when: _wa_cartridge.instances is defined - set_fact: _delete_wa_instance: True - when: _wa_cartridge_listed == {} + when: + - _wa_cartridge_listed == {} + - _wa_instance.display_name != 'wxo-assistant-ab' + - _wa_instance.display_name != 'wxo-assistant-de' when: (_p_delete_all_instances | default(False)) == False - set_fact: diff --git a/sample-configurations/sample-dynamic/config-samples/cp4d-480.yaml b/sample-configurations/sample-dynamic/config-samples/cp4d-480.yaml deleted file mode 100644 index 2a1a435ee..000000000 --- a/sample-configurations/sample-dynamic/config-samples/cp4d-480.yaml +++ /dev/null @@ -1,319 +0,0 @@ ---- -cp4d: -- project: cpd - openshift_cluster_name: "{{ env_id }}" - cp4d_version: 4.8.0 - cp4d_entitlement: cpd-enterprise - cp4d_production_license: True - accept_licenses: False - sequential_install: False - db2u_limited_privileges: False - use_fs_iam: True - operators_project: cpd-operators - cartridges: - - name: cp-foundation - license_service: - threads_per_core: 2 - - - name: lite - - - name: scheduler - state: removed - -# -# All tested cartridges. To install, change the "state" property to "installed". To uninstall, change the state -# to "removed" or comment out the entire cartridge. Make sure that the "-" and properties are aligned with the lite -# cartridge; the "-" is at position 3 and the property starts at position 5. -# -# If a cartridge has dependencies and you want to install it, you must ensure that the dependent cartridge is also -# installed. -# - - - name: analyticsengine - description: Analytics Engine Powered by Apache Spark - size: small - state: removed - - - name: bigsql - description: Db2 Big SQL - state: removed - - - name: ca - description: Cognos Analytics - size: small - instances: - - name: ca-instance - metastore_ref: ca-metastore - state: removed - - - name: dashboard - description: Cognos Dashboards - state: removed - - - name: datagate - description: Db2 Data Gate - state: removed - - - name: datastage-ent - description: DataStage Enterprise - state: removed - - - name: datastage-ent-plus - description: DataStage Enterprise Plus - state: removed - # instances: - # - name: ds-instance - # # Optional settings - # description: "datastage ds-instance" - # size: medium - # storage_class: efs-nfs-client - # storage_size_gb: 60 - # # Custom Scale options - # scale_px_runtime: - # replicas: 2 - # cpu_request: 500m - # cpu_limit: 2 - # memory_request: 2Gi - # memory_limit: 4Gi - # scale_px_compute: - # replicas: 2 - # cpu_request: 1 - # cpu_limit: 3 - # memory_request: 4Gi - # memory_limit: 12Gi - - - name: db2 - description: Db2 OLTP - size: small - instances: - - name: ca-metastore - metadata_size_gb: 20 - data_size_gb: 20 - backup_size_gb: 20 - transactionlog_size_gb: 20 - state: removed - - - name: db2wh - description: Db2 Warehouse - state: removed - - - name: dmc - description: Db2 Data Management Console - state: removed - instances: - - name: data-management-console - description: Data Management Console - size: medium - storage_size_gb: 50 - - - - name: dods - description: Decision Optimization - size: small - state: removed - - - name: dp - description: Data Privacy - size: small - state: removed - - - name: dpra - description: Data Privacy Risk Assessment - state: removed - - - name: dv - description: Data Virtualization - size: small - instances: - - name: data-virtualization - state: removed - - # Please note that for EDB Postgress, a secret edb-postgres-license-key must be created in the vault - # before deploying - - name: edb_cp4d - description: EDB Postgres - state: removed - instances: - - name: instance1 - version: "15.4" - #type: Standard - #members: 1 - #size_gb: 50 - #resource_request_cpu: 1 - #resource_request_memory: 4Gi - #resource_limit_cpu: 1 - #resource_limit_memory: 4Gi - - - name: factsheet - description: AI Factsheets - size: small - state: removed - - - name: hadoop - description: Execution Engine for Apache Hadoop - size: small - state: removed - - - name: mantaflow - description: MANTA Automated Lineage - size: small - state: removed - - - name: match360 - description: IBM Match 360 - size: small - wkc_enabled: true - state: removed - - - name: openpages - description: OpenPages - state: removed - - # For Planning Analytics, the case version is needed due to defect in olm utils - - name: planning-analytics - description: Planning Analytics - state: removed - - - name: replication - description: Data Replication - license: IDRC - size: small - state: removed - - - name: rstudio - description: RStudio Server with R 3.6 - size: small - state: removed - - - name: spss - description: SPSS Modeler - state: removed - - - name: syntheticdata - description: Synthetic Data Generator - state: removed - - - name: voice-gateway - description: Voice Gateway - replicas: 1 - state: removed - - - name: watson-assistant - description: Watson Assistant - size: small - # noobaa_account_secret: noobaa-admin - # noobaa_cert_secret: noobaa-s3-serving-cert - state: removed - instances: - - name: wa-instance - description: "Watson Assistant instance" - - - name: watson-discovery - description: Watson Discovery - # noobaa_account_secret: noobaa-admin - # noobaa_cert_secret: noobaa-s3-serving-cert - state: removed - instances: - - name: wd-instance - description: "Watson Discovery instance" - - - - name: watson-ks - description: Watson Knowledge Studio - size: small - # noobaa_account_secret: noobaa-admin - # noobaa_cert_secret: noobaa-s3-serving-cert - state: removed - - - name: watson-openscale - description: Watson OpenScale - size: small - state: removed - - - name: watson-speech - description: Watson Speech (STT and TTS) - stt_size: xsmall - tts_size: xsmall - # noobaa_account_secret: noobaa-admin - # noobaa_cert_secret: noobaa-s3-serving-cert - state: removed - - # Please note that for watsonx.ai foundation models, you neeed to install the - # Node Feature Discovery and NVIDIA GPU operators. You can do so by setting the openshift.gpu.install property to True - - name: watsonx_ai - description: watsonx.ai - state: removed - models: - - model_id: google-flan-t5-xxl - state: removed - - model_id: google-flan-ul2 - state: removed - - model_id: eleutherai-gpt-neox-20b - state: removed - - model_id: ibm-granite-13b-chat-v1 - state: removed - - model_id: ibm-granite-13b-instruct-v1 - state: removed - - model_id: meta-llama-llama-2-70b-chat - state: removed - - model_id: ibm-mpt-7b-instruct2 - state: removed - - model_id: bigscience-mt0-xxl - state: removed - - model_id: bigcode-starcoder - state: removed - - - name: watsonx_data - description: watsonx.data - state: removed - - - name: wkc - description: Watson Knowledge Catalog - size: small - state: removed - installation_options: - install_wkc_core_only: False - enableKnowledgeGraph: False - enableDataQuality: False - enableFactSheet: False - - - name: wml - description: Watson Machine Learning - size: small - state: installed - - - name: wml-accelerator - description: Watson Machine Learning Accelerator - replicas: 1 - size: small - state: removed - - - name: ws - description: Watson Studio - state: installed - - - name: ws-pipelines - description: Watson Studio Pipelines - state: removed - - - name: ws-runtimes - description: Watson Studio Runtimes - runtimes: - - ibm-cpd-ws-runtime-py39 - - ibm-cpd-ws-runtime-222-py - - ibm-cpd-ws-runtime-py39gpu - - ibm-cpd-ws-runtime-222-pygpu - - ibm-cpd-ws-runtime-231-pygpu - - ibm-cpd-ws-runtime-r36 - - ibm-cpd-ws-runtime-222-r - - ibm-cpd-ws-runtime-231-r - state: removed - -# -# Cartridges where extra work is needed (will not install automatically) -# - # Product Master requires set up of the Db2 instance secret before install - - name: productmaster - description: Product Master - size: small - state: removed \ No newline at end of file diff --git a/sample-configurations/sample-dynamic/config-samples/cp4d-482.yaml b/sample-configurations/sample-dynamic/config-samples/cp4d-484.yaml similarity index 94% rename from sample-configurations/sample-dynamic/config-samples/cp4d-482.yaml rename to sample-configurations/sample-dynamic/config-samples/cp4d-484.yaml index 6006f3692..a03ffe0d5 100644 --- a/sample-configurations/sample-dynamic/config-samples/cp4d-482.yaml +++ b/sample-configurations/sample-dynamic/config-samples/cp4d-484.yaml @@ -2,8 +2,8 @@ cp4d: - project: cpd openshift_cluster_name: "{{ env_id }}" - cp4d_version: 4.8.2 - cp4d_entitlement: cpd-enterprise + cp4d_version: 4.8.4 + cp4d_entitlement: cpd-enterprise # or: cpd-standard, watsonx-ai, watsonx-data, watsonx-gov-model-management, watsonx-gov-risk-compliance cp4d_production_license: True accept_licenses: False sequential_install: False @@ -270,6 +270,19 @@ cp4d: description: watsonx.data state: removed + - name: watsonx_governance + description: watsonx.governance + state: removed + installation_options: + installType: all + enableFactsheet: true + enableOpenpages: true + enableOpenscale: true + + - name: watsonx_orchestrate + description: watsonx.orchestrate + state: removed + - name: wkc description: Watson Knowledge Catalog size: small diff --git a/scripts/cp4d/cp4d-delete-instance.sh b/scripts/cp4d/cp4d-delete-instance.sh index ec2d655ee..0412a1eb6 100755 --- a/scripts/cp4d/cp4d-delete-instance.sh +++ b/scripts/cp4d/cp4d-delete-instance.sh @@ -81,7 +81,7 @@ oc get project ${CP4D_PROJECT} > /dev/null 2>&1 if [ $? -eq 0 ];then log "Getting Custom Resources in OpenShift project ${CP4D_PROJECT}..." - oc get --no-headers -n $CP4D_PROJECT $(oc api-resources --namespaced=true --verbs=list -o name | grep ibm | awk '{printf "%s%s",sep,$0;sep=","}') --ignore-not-found -o=custom-columns=KIND:.kind,NAME:.metadata.name --sort-by='kind' > ${temp_dir}/cp4d-resources.out + oc get --no-headers -n $CP4D_PROJECT $(oc api-resources --namespaced=true --verbs=list -o name | grep -E 'ibm|caikitruntimestacks' | awk '{printf "%s%s",sep,$0;sep=","}') --ignore-not-found -o=custom-columns=KIND:.kind,NAME:.metadata.name --sort-by='kind' > ${temp_dir}/cp4d-resources.out # # First the script deletes all CP4D custom resources in the specified project @@ -187,6 +187,18 @@ else echo "Project ${KNATIVE_SERVING} does not exist, skipping" fi +APP_CONNECT=ibm-app-connect +oc get project ${APP_CONNECT} > /dev/null 2>&1 +if [ $? -eq 0 ];then + log "Deleting everything in the ${APP_CONNECT} project" + + log "Deleting ${APP_CONNECT} project" + oc delete ns ${APP_CONNECT} --ignore-not-found --wait=false + wait_ns_deleted ${APP_CONNECT} +else + echo "Project ${APP_CONNECT} does not exist, skipping" +fi + IBM_SCHEDULING=ibm-scheduling oc get project ${IBM_SCHEDULING} > /dev/null 2>&1 if [ $? -eq 0 ];then