diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d99d76e2914..270539da0e6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -110,6 +110,24 @@ git checkout -b name-your-branch git checkout name-your-branch ``` +Testing with a modified python-devops code. +------------------------------------------------------------------------------- +Make sure that the python-devops repository is cloned locally in the same directory +as the CLI repository. +From the top level CLI directory, run +``` +make python-devops +``` +This will build and copy the locally modified python-devops package into the CLI image +structure so that the modified python-devops will be included when the CLI is built. + +Build the CLI, either locally or in GitHub. + +NOTE: if building on MacOS you will need to first install pandoc or the `make python-devops` command may fail: +``` +brew install pandoc +``` + Pull Requests ------------------------------------------------------------------------------- diff --git a/Makefile b/Makefile index a452859dcea..92a46020957 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ python-cli: cp python/dist/mas_cli-100.0.0.tar.gz image/cli/install/mas_cli.tar.gz python-devops: - cd ../python-devops && make build + cd ../python-devops && make install build cp ../python-devops/dist/mas_devops-100.0.0.tar.gz image/cli/install/mas_devops.tar.gz python: python-devops python-cli diff --git a/python/src/mas/cli/install/argBuilder.py b/python/src/mas/cli/install/argBuilder.py index ad077d03ae1..c09b7b3c379 100644 --- a/python/src/mas/cli/install/argBuilder.py +++ b/python/src/mas/cli/install/argBuilder.py @@ -235,6 +235,12 @@ def buildCommand(self) -> str: command += " --cp4d-install-openscal" if self.getParam('cpd_install_cognos') == "install": command += " --cp4d-install-cognos" + if self.getParam('cpd_install_ws') == "install": + command += " --cp4d-install-ws" + if self.getParam('cpd_install_wml') == "install": + command += " --cp4d-install-wml" + if self.getParam('cpd_install_ae') == "install": + command += " --cp4d-install-ae" command += newline # IBM Db2 Universal Operator diff --git a/python/src/mas/cli/install/argParser.py b/python/src/mas/cli/install/argParser.py index 1098d1950cf..2964fd2b518 100644 --- a/python/src/mas/cli/install/argParser.py +++ b/python/src/mas/cli/install/argParser.py @@ -716,6 +716,30 @@ def isValidFile(parser, arg) -> str: action="store_const", const="install" ) +cpdAppsArgGroup.add_argument( + "--cp4d-install-ws", + dest="cpd_install_ws", + required=False, + help="Add Watson Studio as part of Cloud Pak for Data", + action="store_const", + const="install" +) +cpdAppsArgGroup.add_argument( + "--cp4d-install-wml", + dest="cpd_install_wml", + required=False, + help="Add Watson Machine Learning as part of Cloud Pak for Data", + action="store_const", + const="install" +) +cpdAppsArgGroup.add_argument( + "--cp4d-install-ae", + dest="cpd_install_ae", + required=False, + help="Add Spark Analytics Engine as part of Cloud Pak for Data", + action="store_const", + const="install" +) # IBM Db2 Universal Operator # ----------------------------------------------------------------------------- diff --git a/python/src/mas/cli/install/params.py b/python/src/mas/cli/install/params.py index 0a63bd0446c..acd7622d16c 100644 --- a/python/src/mas/cli/install/params.py +++ b/python/src/mas/cli/install/params.py @@ -99,6 +99,9 @@ "cpd_install_cognos", "cpd_install_openscale", "cpd_install_spss", + "cpd_install_ws", + "cpd_install_wml", + "cpd_install_ae", # Kafka "kafka_namespace", "kafka_version", diff --git a/python/src/mas/cli/install/summarizer.py b/python/src/mas/cli/install/summarizer.py index f2c3dd30f40..f8637e5fbc4 100644 --- a/python/src/mas/cli/install/summarizer.py +++ b/python/src/mas/cli/install/summarizer.py @@ -252,6 +252,11 @@ def cp4dSummary(self) -> None: self.printSummary("Watson Studio Local", "Install (Required by Maximo Predict)") self.printSummary("Watson Machine Learning", "Install (Required by Maximo Predict)") self.printSummary("Analytics Engine", "Install (Required by Maximo Predict)") + else: + self.printSummary("Watson Studio Local", "Install" if self.getParam("cpd_install_ws") == "true" else "Do Not Install") + self.printSummary("Watson Machine Learning", "Install" if self.getParam("cpd_install_wml") == "true" else "Do Not Install") + self.printSummary("Analytics Engine", "Install" if self.getParam("cpd_install_ae") == "true" else "Do Not Install") + self.printSummary("Watson Openscale", "Install" if self.getParam("cpd_install_openscale") == "true" else "Do Not Install") self.printSummary("SPSS Modeler", "Install" if self.getParam("cpd_install_spss") == "true" else "Do Not Install") self.printSummary("Cognos Analytics", "Install" if self.getParam("cpd_install_cognos") == "true" else "Do Not Install") diff --git a/tekton/src/params/install.yml.j2 b/tekton/src/params/install.yml.j2 index b01b6836d59..93c4013df0d 100644 --- a/tekton/src/params/install.yml.j2 +++ b/tekton/src/params/install.yml.j2 @@ -235,7 +235,13 @@ - name: cpd_install_cognos type: string default: "" -- name: cpd_install_all +- name: cpd_install_ws + type: string + default: "" +- name: cpd_install_wml + type: string + default: "" +- name: cpd_install_ae type: string default: "" diff --git a/tekton/src/pipelines/taskdefs/cp4d/cp4d-aiopenscale.yml.j2 b/tekton/src/pipelines/taskdefs/cp4d/cp4d-aiopenscale.yml.j2 index cea24b01601..bc6ebecbb73 100644 --- a/tekton/src/pipelines/taskdefs/cp4d/cp4d-aiopenscale.yml.j2 +++ b/tekton/src/pipelines/taskdefs/cp4d/cp4d-aiopenscale.yml.j2 @@ -25,12 +25,12 @@ name: mas-devops-cp4d-service # Only needed if Predict is being installed when: - - input: "$(params.mas_app_channel_predict)$(params.cpd_install_all)" + - input: "$(params.mas_app_channel_predict)$(params.cpd_install_openscale)" operator: notin values: [""] - input: "$(params.cpd_install_openscale)" operator: in - values: ["True","true"] + values: ["True","true","install"] workspaces: - name: configs workspace: shared-configs \ No newline at end of file diff --git a/tekton/src/pipelines/taskdefs/cp4d/cp4d-cognos.yml.j2 b/tekton/src/pipelines/taskdefs/cp4d/cp4d-cognos.yml.j2 index b5394b9f5a8..c3fadfa7fe4 100644 --- a/tekton/src/pipelines/taskdefs/cp4d/cp4d-cognos.yml.j2 +++ b/tekton/src/pipelines/taskdefs/cp4d/cp4d-cognos.yml.j2 @@ -23,12 +23,12 @@ name: mas-devops-cp4d-service # Only needed if Manage is being installed and Cognos is chosen to be installed when: - - input: "$(params.mas_app_channel_manage)$(params.cpd_install_all)" + - input: "$(params.mas_app_channel_manage)$(params.cpd_install_cognos)" operator: notin values: [""] - input: "$(params.cpd_install_cognos)" operator: in - values: ["True","true"] + values: ["True","true","install"] workspaces: - name: configs workspace: shared-configs \ No newline at end of file diff --git a/tekton/src/pipelines/taskdefs/cp4d/cp4d-platform.yml.j2 b/tekton/src/pipelines/taskdefs/cp4d/cp4d-platform.yml.j2 index 5382be26497..1d447ca7050 100644 --- a/tekton/src/pipelines/taskdefs/cp4d/cp4d-platform.yml.j2 +++ b/tekton/src/pipelines/taskdefs/cp4d/cp4d-platform.yml.j2 @@ -18,6 +18,6 @@ name: mas-devops-cp4d # Only needed if either Predict, Assist, Health w/ WSL, or Cognos are being installed when: - - input: "$(params.mas_app_channel_predict)$(params.mas_appws_bindings_health_wsl_flag)$(params.cpd_install_cognos)$(params.cpd_install_all)" + - input: "$(params.mas_app_channel_predict)$(params.mas_appws_bindings_health_wsl_flag)$(params.cpd_install_cognos)$(params.cpd_install_spss)$(params.cpd_install_openscale)$(params.cpd_install_ws)$(params.cpd_install_wml)$(params.cpd_install_ae)" operator: notin values: [""] \ No newline at end of file diff --git a/tekton/src/pipelines/taskdefs/cp4d/cp4d-spark.yml.j2 b/tekton/src/pipelines/taskdefs/cp4d/cp4d-spark.yml.j2 index 3342ec0fc16..a93cecf5dec 100644 --- a/tekton/src/pipelines/taskdefs/cp4d/cp4d-spark.yml.j2 +++ b/tekton/src/pipelines/taskdefs/cp4d/cp4d-spark.yml.j2 @@ -23,7 +23,7 @@ name: mas-devops-cp4d-service # Only needed if Predict is being installed when: - - input: "$(params.mas_app_channel_predict)$(params.cpd_install_all)" + - input: "$(params.mas_app_channel_predict)$(params.cpd_install_ae)" operator: notin values: [""] workspaces: diff --git a/tekton/src/pipelines/taskdefs/cp4d/cp4d-spss.yml.j2 b/tekton/src/pipelines/taskdefs/cp4d/cp4d-spss.yml.j2 index c107fda35c2..90ba04456e3 100644 --- a/tekton/src/pipelines/taskdefs/cp4d/cp4d-spss.yml.j2 +++ b/tekton/src/pipelines/taskdefs/cp4d/cp4d-spss.yml.j2 @@ -25,12 +25,12 @@ name: mas-devops-cp4d-service # Only needed if Predict is being installed when: - - input: "$(params.mas_app_channel_predict)$(params.cpd_install_all)" + - input: "$(params.mas_app_channel_predict)$(params.cpd_install_spss)" operator: notin values: [""] - input: "$(params.cpd_install_spss)" operator: in - values: ["True","true"] + values: ["True","true","install"] workspaces: - name: configs workspace: shared-configs \ No newline at end of file diff --git a/tekton/src/pipelines/taskdefs/cp4d/cp4d-wml.yml.j2 b/tekton/src/pipelines/taskdefs/cp4d/cp4d-wml.yml.j2 index d3464cab033..5ed75763445 100644 --- a/tekton/src/pipelines/taskdefs/cp4d/cp4d-wml.yml.j2 +++ b/tekton/src/pipelines/taskdefs/cp4d/cp4d-wml.yml.j2 @@ -23,7 +23,7 @@ name: mas-devops-cp4d-service # Only needed if Predict is being installed when: - - input: "$(params.mas_app_channel_predict)$(params.cpd_install_all)" + - input: "$(params.mas_app_channel_predict)$(params.cpd_install_wml)" operator: notin values: [""] workspaces: diff --git a/tekton/src/pipelines/taskdefs/cp4d/cp4d-wsl.yml.j2 b/tekton/src/pipelines/taskdefs/cp4d/cp4d-wsl.yml.j2 index 6272a88708c..59823631fd5 100644 --- a/tekton/src/pipelines/taskdefs/cp4d/cp4d-wsl.yml.j2 +++ b/tekton/src/pipelines/taskdefs/cp4d/cp4d-wsl.yml.j2 @@ -23,7 +23,7 @@ name: mas-devops-cp4d-service # Only needed if either Predict or Health w/ WSL are being installed when: - - input: "$(params.mas_app_channel_predict)$(params.mas_appws_bindings_health_wsl_flag)$(params.cpd_install_all)" + - input: "$(params.mas_app_channel_predict)$(params.mas_appws_bindings_health_wsl_flag)$(params.cpd_install_ws)" operator: notin values: [""] workspaces: