From 769f56ed257d645539b6246feda48d12046b2d9c Mon Sep 17 00:00:00 2001 From: Hari Palleti Date: Mon, 5 Aug 2024 11:39:47 -0500 Subject: [PATCH 1/2] [patch] update the skip grafana option --- docs/commands/install.md | 1 + python/src/mas/cli/install/app.py | 9 +++++++-- python/src/mas/cli/install/argParser.py | 6 ++++++ python/src/mas/cli/install/summarizer.py | 1 + 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/commands/install.md b/docs/commands/install.md index b1a06881eb..3b79dbd49a 100644 --- a/docs/commands/install.md +++ b/docs/commands/install.md @@ -247,6 +247,7 @@ More: --dev-mode Configure installation for development mode --no-wait-for-pvc Disable the wait for pipeline PVC to bind before starting the pipeline --skip-pre-check Disable the 'pre-install-check' at the start of the install pipeline + --skip-grafana-install Skips Grafana install action --no-confirm Launch the upgrade without prompting for confirmation -h, --help Show this help message and exit ``` diff --git a/python/src/mas/cli/install/app.py b/python/src/mas/cli/install/app.py index c059056cb8..18af1b9563 100644 --- a/python/src/mas/cli/install/app.py +++ b/python/src/mas/cli/install/app.py @@ -165,7 +165,10 @@ def configGrafana(self) -> None: try: packagemanifestAPI = self.dynamicClient.resources.get(api_version="packages.operators.coreos.com/v1", kind="PackageManifest") packagemanifestAPI.get(name="grafana-operator", namespace="openshift-marketplace") - self.setParam("grafana_action", "install") + if self.skipGrafanaInstall: + self.setParam("grafana_action", "none") + else: + self.setParam("grafana_action", "install") except NotFoundError: self.setParam("grafana_action", "none") @@ -842,7 +845,7 @@ def nonInteractiveMode(self) -> None: self.fatalError(f"Unsupported format for {key} ({value}). Expected string:int:int:boolean") # Arguments that we don't need to do anything with - elif key in ["accept_license", "dev_mode", "skip_pre_check", "no_confirm", "no_wait_for_pvc", "help"]: + elif key in ["accept_license", "dev_mode", "skip_pre_check", "skip_grafana_install", "no_confirm", "no_wait_for_pvc", "help"]: pass elif key == "manual_certificates": @@ -886,6 +889,8 @@ def install(self, argv): # These flags work for setting params in both interactive and non-interactive modes if args.skip_pre_check: self.setParam("skip_pre_check", "true") + if args.skip_grafana_install: + self.skipGrafanaInstall = True self.installOptions = [ { diff --git a/python/src/mas/cli/install/argParser.py b/python/src/mas/cli/install/argParser.py index a60d0db4a5..2ae80c10f4 100644 --- a/python/src/mas/cli/install/argParser.py +++ b/python/src/mas/cli/install/argParser.py @@ -843,6 +843,12 @@ def isValidFile(parser, arg) -> str: action="store_true", help="Disable the 'pre-install-check' at the start of the install pipeline" ) +otherArgGroup.add_argument( + "--skip-grafana-install", + required=False, + action="store_true", + help="Skips Grafana install action" +) otherArgGroup.add_argument( "--no-confirm", required=False, diff --git a/python/src/mas/cli/install/summarizer.py b/python/src/mas/cli/install/summarizer.py index 001f511db2..1f175fe4c3 100644 --- a/python/src/mas/cli/install/summarizer.py +++ b/python/src/mas/cli/install/summarizer.py @@ -32,6 +32,7 @@ def ocpSummary(self) -> None: self.printSummary("Single Node OpenShift", "No") self.printSummary("Skip Pre-Install Healthcheck", "Yes" if self.getParam('skip_pre_check') == "true" else "No") + self.printSummary("Skip Grafana-Install", "Yes" if self.getParam('grafana_action') == "none" else "No") def icrSummary(self) -> None: self.printH2("IBM Container Registry Credentials") From cecfe3cf5db19a5879434c322cfb101f52c0dcbc Mon Sep 17 00:00:00 2001 From: Hari Palleti Date: Mon, 5 Aug 2024 16:29:18 -0500 Subject: [PATCH 2/2] [patch] updated documentation --- docs/commands/install.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/commands/install.md b/docs/commands/install.md index 3b79dbd49a..6fd68bfa00 100644 --- a/docs/commands/install.md +++ b/docs/commands/install.md @@ -45,7 +45,7 @@ usage: mas install [-c MAS_CATALOG_VERSION] [--ibm-entitlement-key IBM_ENTITLEME [--artifactory-username ARTIFACTORY_USERNAME] [--artifactory-token ARTIFACTORY_TOKEN] [--approval-core APPROVAL_CORE] [--approval-assist APPROVAL_ASSIST] [--approval-iot APPROVAL_IOT] [--approval-manage APPROVAL_MANAGE] [--approval-monitor APPROVAL_MONITOR] [--approval-optimizer APPROVAL_OPTIMIZER] [--approval-predict APPROVAL_PREDICT] [--approval-visualinspection APPROVAL_VISUALINSPECTION] - [--accept-license] [--dev-mode] [--no-wait-for-pvc] [--skip-pre-check] [--no-confirm] [-h] + [--accept-license] [--dev-mode] [--no-wait-for-pvc] [--skip-pre-check] [--skip-grafana-install] [--no-confirm] [-h] IBM Maximo Application Suite Admin CLI v100.0.0 Install MAS by configuring and launching the MAS Uninstall Tekton Pipeline.