Skip to content

Commit

Permalink
[patch] allow configuring install plan for apps
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanjay Prabhakar committed Sep 27, 2024
1 parent fbf81ee commit 7b43c65
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions image/cli/mascli/functions/gitops_suite_app_install
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Maximo Application Suite:
-m, --mas-instance-id ${COLOR_YELLOW}MAS_INSTANCE_ID${TEXT_RESET} IBM Suite Maximo Application Suite Instance ID
--mas-app-id ${COLOR_YELLOW}MAS_APP_ID${TEXT_RESET} IBM Suite Maximo Application Suite Application ID
--mas-app-channel ${COLOR_YELLOW}MAS_APP_CHANNEL${TEXT_RESET} IBM Suite Maximo Application Suite Application Channel
--mas-app-install-plan ${COLOR_YELLOW}MAS_APP_INSTALL_PLAN{TEXT_RESET} IBM Suite Maximo Application Suite Application Install Plan ('Automatic' or 'Manual'. Default is 'Automatic')
--mas-app-catalog-source ${COLOR_YELLOW}MAS_APP_CATALOG_SOURCE${TEXT_RESET} IBM Suite Maximo Application Suite Application Catalog Source
--mas-app-api-version ${COLOR_YELLOW}MAS_APP_API_VERSION${TEXT_RESET} IBM Suite Maximo Application Suite Application API Version
--mas-app-kind ${COLOR_YELLOW}MAS_APP_KIND${TEXT_RESET} IBM Suite Maximo Application Suite Application Kind
Expand Down Expand Up @@ -71,6 +72,8 @@ function gitops_suite_app_install_noninteractive() {
export REGION=${REGION:-${SM_AWS_REGION}}
export CLUSTER_URL=${CLUSTER_URL:-"https://kubernetes.default.svc"} # use an in-cluster argocd worker (which fvtsaas does)

export MAS_APP_INSTALL_PLAN="Automatic"

while [[ $# -gt 0 ]]
do
key="$1"
Expand Down Expand Up @@ -124,6 +127,9 @@ function gitops_suite_app_install_noninteractive() {
--mas-app-channel)
export MAS_APP_CHANNEL=$1 && shift
;;
--mas-app-install-plan)
export MAS_APP_INSTALL_PLAN=$1 && shift
;;
--mas-app-catalog-source)
export MAS_APP_CATALOG_SOURCE=$1 && shift
;;
Expand Down Expand Up @@ -272,6 +278,7 @@ function gitops_suite_app_install() {
echo_reset_dim "Instance ID ........................... ${COLOR_MAGENTA}${MAS_INSTANCE_ID}"
echo_reset_dim "Application ID ........................ ${COLOR_MAGENTA}${MAS_APP_ID}"
echo_reset_dim "Application Channel ................... ${COLOR_MAGENTA}${MAS_APP_CHANNEL}"
echo_reset_dim "Application Install Plan .............. ${COLOR_MAGENTA}${MAS_APP_INSTALL_PLAN}"
echo_reset_dim "Application Catalog Source ............ ${COLOR_MAGENTA}${MAS_APP_CATALOG_SOURCE}"
echo_reset_dim "Application API Version ............... ${COLOR_MAGENTA}${MAS_APP_API_VERSION}"
echo_reset_dim "Application Kind ...................... ${COLOR_MAGENTA}${MAS_APP_KIND}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ ibm_suite_app_{{ MAS_APP_ID }}_install:
ibm_entitlement_key: <path:{{ SECRETS_PATH }}:{{ SECRET_KEY_IBM_ENTITLEMENT }}>
mas_instance_id: {{ MAS_INSTANCE_ID }}
mas_app_id: {{ MAS_APP_ID }}
mas_app_install_plan: {{ MAS_APP_INSTALL_PLAN }}
mas_edition: {{ MAS_EDITION }}
mas_app_namespace: {{ MAS_APP_NAMESPACE }}
mas_app_channel: {{ MAS_APP_CHANNEL }}
Expand Down

0 comments on commit 7b43c65

Please sign in to comment.