From b08357591d4b846fd456e4bbb62658aac5923fd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Marcelino?= <31037381+andrercm@users.noreply.github.com> Date: Thu, 1 Jun 2023 10:33:00 -0300 Subject: [PATCH] [patch] Make Watson OpenScale install optional (#321) --- image/cli/mascli/functions/pipeline_config_applications | 7 +++++-- image/cli/mascli/templates/pipelinerun.yaml | 2 ++ tekton/src/params/install.yml.j2 | 3 +++ tekton/src/pipelines/taskdefs/cp4d/cp4d-aiopenscale.yml.j2 | 5 +++++ tekton/src/tasks/dependencies/cp4d_service.yml.j2 | 6 ++++++ 5 files changed, 21 insertions(+), 2 deletions(-) diff --git a/image/cli/mascli/functions/pipeline_config_applications b/image/cli/mascli/functions/pipeline_config_applications index a36201843a..edd2bde72e 100644 --- a/image/cli/mascli/functions/pipeline_config_applications +++ b/image/cli/mascli/functions/pipeline_config_applications @@ -185,8 +185,11 @@ function config_pipeline_applications() { # Predict if prompt_for_confirm "Install Predict"; then channel_select_predict || exit 1 - if prompt_for_confirm "+ Install SPSS (Optional Cloud Pak for Data service)"; then - CPD_INSTALL_SPSS=true + if prompt_for_confirm "+ Install IBM SPSS Statistics"; then + CPD_INSTALL_SPSS=true + fi + if prompt_for_confirm "+ Install Watson OpenScale"; then + CPD_INSTALL_OPENSCALE=true fi fi fi diff --git a/image/cli/mascli/templates/pipelinerun.yaml b/image/cli/mascli/templates/pipelinerun.yaml index a7dd200e8c..bcaafb38c0 100644 --- a/image/cli/mascli/templates/pipelinerun.yaml +++ b/image/cli/mascli/templates/pipelinerun.yaml @@ -137,6 +137,8 @@ spec: value: '$CP4D_VERSION' - name: cpd_install_spss value: '$CPD_INSTALL_SPSS' + - name: cpd_install_openscale + value: '$CPD_INSTALL_OPENSCALE' # Dependencies - SLS # ------------------------------------------------------------------------- diff --git a/tekton/src/params/install.yml.j2 b/tekton/src/params/install.yml.j2 index 2b305a4416..511a652b62 100644 --- a/tekton/src/params/install.yml.j2 +++ b/tekton/src/params/install.yml.j2 @@ -177,6 +177,9 @@ - name: cpd_install_spss type: string default: "False" +- name: cpd_install_openscale + type: string + default: "False" # Dependencies - UDS # ----------------------------------------------------------------------------- diff --git a/tekton/src/pipelines/taskdefs/cp4d/cp4d-aiopenscale.yml.j2 b/tekton/src/pipelines/taskdefs/cp4d/cp4d-aiopenscale.yml.j2 index d4b9b5c81b..53b7f384e9 100644 --- a/tekton/src/pipelines/taskdefs/cp4d/cp4d-aiopenscale.yml.j2 +++ b/tekton/src/pipelines/taskdefs/cp4d/cp4d-aiopenscale.yml.j2 @@ -12,6 +12,8 @@ value: "$(params.cpd_aiopenscale_storage_class)" - name: mas_workspace_id value: $(params.mas_workspace_id) + - name: cpd_install_openscale + value: $(params.cpd_install_openscale) taskRef: kind: Task name: mas-devops-cp4d-service @@ -20,6 +22,9 @@ - input: "$(params.mas_app_channel_predict)" operator: notin values: [""] + - input: "$(params.cpd_install_openscale)" + operator: in + values: ["True","true"] workspaces: - name: configs workspace: shared-configs \ No newline at end of file diff --git a/tekton/src/tasks/dependencies/cp4d_service.yml.j2 b/tekton/src/tasks/dependencies/cp4d_service.yml.j2 index 5bf39777b4..334761a578 100644 --- a/tekton/src/tasks/dependencies/cp4d_service.yml.j2 +++ b/tekton/src/tasks/dependencies/cp4d_service.yml.j2 @@ -40,6 +40,10 @@ spec: - name: cpd_install_spss type: string default: "False" + # Whether to install Watson OpenScale or not (Optional for Predict app) + - name: cpd_install_openscale + type: string + default: "False" - name: mas_instance_id type: string @@ -85,6 +89,8 @@ spec: value: $(params.cpd_wsl_project_name) - name: CPD_INSTALL_SPSS value: $(params.cpd_install_spss) + - name: CPD_INSTALL_OPENSCALE + value: $(params.cpd_install_openscale) steps: - name: cp4d-service command: