mas-cli 10.4.0__tar.gz → 10.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of mas-cli might be problematic. Click here for more details.
- {mas_cli-10.4.0 → mas_cli-10.4.2}/PKG-INFO +1 -1
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/__init__.py +1 -1
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/cli.py +36 -1
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/install/app.py +85 -12
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/install/argParser.py +63 -2
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/ibm-mas-tekton.yaml +98 -627
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas-cli +1 -1
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas_cli.egg-info/PKG-INFO +1 -1
- {mas_cli-10.4.0 → mas_cli-10.4.2}/MANIFEST.in +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/README.rst +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/pyproject.toml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/setup.cfg +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/setup.py +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/displayMixins.py +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/gencfg.py +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/install/__init__.py +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/install/settings/__init__.py +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/install/settings/additionalConfigs.py +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/install/settings/db2Settings.py +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/install/settings/kafkaSettings.py +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/install/settings/manageSettings.py +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/install/settings/turbonomicSettings.py +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/install/summarizer.py +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/jdbccfg.yml.j2 +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-data-dictionary-assetdatadictionary.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-bascfg.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-coreidp.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-actions.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-auth.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-datapower.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-devops.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-dm.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-dsc.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-edgeconfig.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-fpl.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-guardian.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-iot.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-mbgx.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-mfgx.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-monitor.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-orgmgmt.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-provision.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-registry.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-state.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-webui.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-healthextaccelerator.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-healthextworkspace.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-imagestitching.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-manageaccelerators.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-manageapp.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-manageworkspace.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-slackproxy.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-pushnotificationcfg.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-scimcfg.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-slscfg.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-smtpcfg.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-suite.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-visualinspection.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/best-effort/ibm-sls-licenseservice.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-data-dictionary-assetdatadictionary.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-bascfg.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-coreidp.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-actions.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-auth.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-datapower.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-devops.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-dm.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-dsc.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-edgeconfig.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-fpl.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-guardian.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-iot.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-mbgx.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-mfgx.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-monitor.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-orgmgmt.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-provision.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-registry.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-state.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-webui.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-healthextaccelerator.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-healthextworkspace.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-imagestitching.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-manageaccelerators.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-manageapp.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-manageworkspace.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-slackproxy.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-pushnotificationcfg.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-scimcfg.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-slscfg.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-smtpcfg.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-suite.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-visualinspection.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/templates/pod-templates/guaranteed/ibm-sls-licenseservice.yml +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/uninstall/__init__.py +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/uninstall/app.py +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/uninstall/argParser.py +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/update/__init__.py +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/update/app.py +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/update/argParser.py +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/upgrade/__init__.py +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/upgrade/app.py +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/upgrade/argParser.py +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas/cli/validators.py +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas_cli.egg-info/SOURCES.txt +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas_cli.egg-info/dependency_links.txt +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas_cli.egg-info/requires.txt +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/src/mas_cli.egg-info/top_level.txt +0 -0
- {mas_cli-10.4.0 → mas_cli-10.4.2}/test/test_help.py +0 -0
|
@@ -20,6 +20,7 @@ from sys import exit
|
|
|
20
20
|
from openshift import dynamic
|
|
21
21
|
from kubernetes import config
|
|
22
22
|
from kubernetes.client import api_client
|
|
23
|
+
from openshift.dynamic.exceptions import NotFoundError
|
|
23
24
|
|
|
24
25
|
from prompt_toolkit import prompt, print_formatted_text, HTML
|
|
25
26
|
|
|
@@ -198,8 +199,10 @@ class BaseApp(PrintMixin, PromptMixin):
|
|
|
198
199
|
# We are already connected to a cluster, but prompt the user if they want to use this connection
|
|
199
200
|
continueWithExistingCluster = prompt(HTML('<Yellow>Proceed with this cluster?</Yellow> '), validator=YesNoValidator(), validate_while_typing=False)
|
|
200
201
|
promptForNewServer = continueWithExistingCluster in ["n", "no"]
|
|
201
|
-
except Exception:
|
|
202
|
+
except Exception as e:
|
|
202
203
|
# We are already connected to a cluster, but the connection is not valid so prompt for connection details
|
|
204
|
+
logger.debug("Failed looking up OpenShift Console route to verify connection")
|
|
205
|
+
logger.exception(e, stack_info=True)
|
|
203
206
|
promptForNewServer = True
|
|
204
207
|
else:
|
|
205
208
|
# We are not already connected to any cluster, so prompt for connection details
|
|
@@ -214,3 +217,35 @@ class BaseApp(PrintMixin, PromptMixin):
|
|
|
214
217
|
if self._dynClient is None:
|
|
215
218
|
print_formatted_text(HTML("<Red>Unable to connect to cluster. See log file for details</Red>"))
|
|
216
219
|
exit(1)
|
|
220
|
+
|
|
221
|
+
def initializeApprovalConfigMap(self, namespace: str, id: str, key: str=None, maxRetries: int=100, delay: int=300, ignoreFailure: bool=True) -> None:
|
|
222
|
+
"""
|
|
223
|
+
Set key = None if you don't want approval workflow enabled
|
|
224
|
+
"""
|
|
225
|
+
cmAPI = self.dynamicClient.resources.get(api_version="v1", kind="ConfigMap")
|
|
226
|
+
configMap = {
|
|
227
|
+
"apiVersion": "v1",
|
|
228
|
+
"kind": "ConfigMap",
|
|
229
|
+
"metadata": {
|
|
230
|
+
"name": f"approval-{id}",
|
|
231
|
+
"namespace": namespace
|
|
232
|
+
},
|
|
233
|
+
"data": {
|
|
234
|
+
"MAX_RETRIES": str(maxRetries),
|
|
235
|
+
"DELAY": str(delay),
|
|
236
|
+
"IGNORE_FAILURE": str(ignoreFailure),
|
|
237
|
+
"CONFIGMAP_KEY": key,
|
|
238
|
+
key: ""
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
# Delete any existing configmap and create a new one
|
|
243
|
+
try:
|
|
244
|
+
logger.debug(f"Deleting any existing approval workflow configmap for {id}")
|
|
245
|
+
cmAPI.delete(name=f"approval-{id}", namespace=namespace)
|
|
246
|
+
except NotFoundError:
|
|
247
|
+
pass
|
|
248
|
+
|
|
249
|
+
if key is not None:
|
|
250
|
+
logger.debug(f"Enabling approval workflow for {id} using {key} with {maxRetries} max retries on a {delay}s delay ({'ignoring failures' if ignoreFailure else 'abort on failure'})")
|
|
251
|
+
cmAPI.create(body=configMap, namespace=namespace)
|
|
@@ -39,7 +39,14 @@ from mas.cli.validators import (
|
|
|
39
39
|
)
|
|
40
40
|
|
|
41
41
|
from mas.devops.ocp import createNamespace, getStorageClass, getStorageClasses
|
|
42
|
-
from mas.devops.tekton import
|
|
42
|
+
from mas.devops.tekton import (
|
|
43
|
+
installOpenShiftPipelines,
|
|
44
|
+
updateTektonDefinitions,
|
|
45
|
+
preparePipelinesNamespace,
|
|
46
|
+
prepareInstallSecrets,
|
|
47
|
+
testCLI,
|
|
48
|
+
launchInstallPipeline
|
|
49
|
+
)
|
|
43
50
|
|
|
44
51
|
logger = logging.getLogger(__name__)
|
|
45
52
|
|
|
@@ -190,14 +197,16 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
|
|
|
190
197
|
self.deployCP4D = True
|
|
191
198
|
|
|
192
199
|
def configSSOProperties(self):
|
|
193
|
-
self.
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
200
|
+
self.printH1("Single Sign-On (SSO)")
|
|
201
|
+
self.printDescription([
|
|
202
|
+
"Many aspects of Maximo Application Suite's Single Sign-On (SSO) can be customized:",
|
|
203
|
+
" - Idle session automatic logout timer",
|
|
204
|
+
" - Session, access token, and refresh token timeouts",
|
|
205
|
+
" - Default identity provider (IDP), and seamless login"
|
|
206
|
+
])
|
|
207
|
+
sso_response = self.yesOrNo("Configure SSO properties")
|
|
208
|
+
if sso_response:
|
|
209
|
+
self.promptForInt("Enter the idle timeout (in seconds)", "idle_timeout", default=1800)
|
|
201
210
|
self.promptForString("Enter the IDP session timeout (e.g., '12h' for 12 hours)", "idp_session_timeout", validator=TimeoutFormatValidator(), default="12h")
|
|
202
211
|
self.promptForString("Enter the access token timeout (e.g., '30m' for 30 minutes)", "access_token_timeout", validator=TimeoutFormatValidator(), default="30m")
|
|
203
212
|
self.promptForString("Enter the refresh token timeout (e.g., '12h' for 12 hours)", "refresh_token_timeout", validator=TimeoutFormatValidator(), default="12h")
|
|
@@ -232,6 +241,7 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
|
|
|
232
241
|
self.configOperationMode()
|
|
233
242
|
self.configCATrust()
|
|
234
243
|
self.configDNSAndCerts()
|
|
244
|
+
self.configSSOProperties()
|
|
235
245
|
|
|
236
246
|
def configCATrust(self) -> None:
|
|
237
247
|
self.printH1("Certificate Authority Trust")
|
|
@@ -530,8 +540,6 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
|
|
|
530
540
|
# Interactive mode
|
|
531
541
|
self.interactiveMode = True
|
|
532
542
|
|
|
533
|
-
# SSO Config
|
|
534
|
-
self.configSSOProperties()
|
|
535
543
|
# Catalog
|
|
536
544
|
self.configCatalog()
|
|
537
545
|
if not self.devMode:
|
|
@@ -587,22 +595,38 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
|
|
|
587
595
|
self.db2SetAffinity = False
|
|
588
596
|
self.db2SetTolerations = False
|
|
589
597
|
|
|
598
|
+
self.approvals = {
|
|
599
|
+
"approval_core": {"id": "suite-verify"}, # After Core Platform verification has completed
|
|
600
|
+
"approval_assist": {"id": "app-cfg-assist"}, # After Assist workspace has been configured
|
|
601
|
+
"approval_iot": {"id": "app-cfg-iot"}, # After IoT workspace has been configured
|
|
602
|
+
"approval_manage": {"id": "app-cfg-manage"}, # After Manage workspace has been configured
|
|
603
|
+
"approval_monitor": {"id": "app-cfg-monitor"}, # After Monitor workspace has been configured
|
|
604
|
+
"approval_optimizer": {"id": "app-cfg-optimizer"}, # After Optimizer workspace has been configured
|
|
605
|
+
"approval_predict": {"id": "app-cfg-predict"}, # After Predict workspace has been configured
|
|
606
|
+
"approval_visualinspection": {"id": "app-cfg-visualinspection"} # After Visual Inspection workspace has been configured
|
|
607
|
+
}
|
|
608
|
+
|
|
590
609
|
self.configGrafana()
|
|
591
610
|
|
|
592
611
|
requiredParams = [
|
|
612
|
+
# MAS
|
|
593
613
|
"mas_catalog_version",
|
|
594
614
|
"mas_channel",
|
|
595
615
|
"mas_instance_id",
|
|
596
616
|
"mas_workspace_id",
|
|
597
617
|
"mas_workspace_name",
|
|
618
|
+
# Storage classes
|
|
598
619
|
"storage_class_rwo",
|
|
599
620
|
"storage_class_rwx",
|
|
621
|
+
# Entitlement
|
|
600
622
|
"ibm_entitlement_key",
|
|
623
|
+
# DRO
|
|
601
624
|
"uds_contact_email",
|
|
602
625
|
"uds_contact_firstname",
|
|
603
626
|
"uds_contact_lastname"
|
|
604
627
|
]
|
|
605
628
|
optionalParams = [
|
|
629
|
+
# MAS
|
|
606
630
|
"mas_superuser_username",
|
|
607
631
|
"mas_superuser_password",
|
|
608
632
|
"mas_trust_default_cas",
|
|
@@ -628,9 +652,11 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
|
|
|
628
652
|
"mas_app_settings_secondary_langs",
|
|
629
653
|
"mas_app_settings_server_timezone",
|
|
630
654
|
"ocp_ingress_tls_secret_name",
|
|
655
|
+
# DRO
|
|
631
656
|
"dro_namespace",
|
|
657
|
+
# MongoDb
|
|
632
658
|
"mongodb_namespace",
|
|
633
|
-
|
|
659
|
+
# Db2
|
|
634
660
|
"db2_action_system",
|
|
635
661
|
"db2_action_manage",
|
|
636
662
|
"db2_type",
|
|
@@ -651,9 +677,12 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
|
|
|
651
677
|
"db2_logs_storage_size",
|
|
652
678
|
"db2_meta_storage_size",
|
|
653
679
|
"db2_temp_storage_size",
|
|
680
|
+
# CP4D
|
|
681
|
+
"cpd_product_version",
|
|
654
682
|
"cpd_install_cognos",
|
|
655
683
|
"cpd_install_openscale",
|
|
656
684
|
"cpd_install_spss",
|
|
685
|
+
# Kafka
|
|
657
686
|
"kafka_namespace",
|
|
658
687
|
"kafka_version",
|
|
659
688
|
"aws_msk_instance_type",
|
|
@@ -667,21 +696,27 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
|
|
|
667
696
|
"eventstreams_resource_group",
|
|
668
697
|
"eventstreams_instance_name",
|
|
669
698
|
"eventstreams_instance_location",
|
|
699
|
+
# ECK
|
|
670
700
|
"eck_action",
|
|
671
701
|
"eck_enable_logstash",
|
|
672
702
|
"eck_remote_es_hosts",
|
|
673
703
|
"eck_remote_es_username",
|
|
674
704
|
"eck_remote_es_password",
|
|
705
|
+
# Turbonomic
|
|
675
706
|
"turbonomic_target_name",
|
|
676
707
|
"turbonomic_server_url",
|
|
677
708
|
"turbonomic_server_version",
|
|
678
709
|
"turbonomic_username",
|
|
679
710
|
"turbonomic_password",
|
|
711
|
+
# Cloud Providers
|
|
680
712
|
"ibmcloud_apikey",
|
|
681
713
|
"aws_region",
|
|
682
714
|
"aws_access_key_id",
|
|
683
715
|
"secret_access_key",
|
|
684
716
|
"aws_vpc_id",
|
|
717
|
+
# Dev Mode
|
|
718
|
+
"artifactory_username",
|
|
719
|
+
"artifactory_token",
|
|
685
720
|
# TODO: The way arcgis has been implemented needs to be fixed
|
|
686
721
|
"install_arcgis",
|
|
687
722
|
"mas_arcgis_channel"
|
|
@@ -784,6 +819,23 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
|
|
|
784
819
|
self.fatalError(f"{key} must be set")
|
|
785
820
|
self.slsLicenseFileLocal = value
|
|
786
821
|
|
|
822
|
+
elif key.startswith("approval_"):
|
|
823
|
+
if key not in self.approvals:
|
|
824
|
+
raise KeyError(f"{key} is not a supported approval workflow ID: {self.approvals.keys()}")
|
|
825
|
+
|
|
826
|
+
if value != "":
|
|
827
|
+
valueParts = value.split(":")
|
|
828
|
+
if len(valueParts) != 4:
|
|
829
|
+
self.fatalError(f"Unsupported format for {key} ({value}). Expected APPROVAL_KEY:MAX_RETRIES:RETRY_DELAY:IGNORE_FAILURE")
|
|
830
|
+
else:
|
|
831
|
+
try:
|
|
832
|
+
self.approvals[key]["approvalKey"] = valueParts[0]
|
|
833
|
+
self.approvals[key]["maxRetries"] = int(valueParts[1])
|
|
834
|
+
self.approvals[key]["retryDelay"] = int(valueParts[2])
|
|
835
|
+
self.approvals[key]["ignoreFailure"] = bool(valueParts[3])
|
|
836
|
+
except:
|
|
837
|
+
self.fatalError(f"Unsupported format for {key} ({value}). Expected string:int:int:boolean")
|
|
838
|
+
|
|
787
839
|
# Arguments that we don't need to do anything with
|
|
788
840
|
elif key in ["accept_license", "dev_mode", "skip_pre_check", "no_confirm", "no_wait_for_pvc", "help"]:
|
|
789
841
|
pass
|
|
@@ -821,6 +873,8 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
|
|
|
821
873
|
self.licenseAccepted = args.accept_license
|
|
822
874
|
self.devMode = args.dev_mode
|
|
823
875
|
|
|
876
|
+
self.approvals = {}
|
|
877
|
+
|
|
824
878
|
# Store all args
|
|
825
879
|
self.args = args
|
|
826
880
|
|
|
@@ -977,6 +1031,9 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
|
|
|
977
1031
|
podTemplates=self.podTemplatesSecret,
|
|
978
1032
|
certs=self.certsSecret
|
|
979
1033
|
)
|
|
1034
|
+
|
|
1035
|
+
self.setupApprovals(pipelinesNamespace)
|
|
1036
|
+
|
|
980
1037
|
h.stop_and_persist(symbol=self.successIcon, text=f"Namespace is ready ({pipelinesNamespace})")
|
|
981
1038
|
|
|
982
1039
|
with Halo(text=f'Testing availability of MAS CLI image in cluster', spinner=self.spinner) as h:
|
|
@@ -995,3 +1052,19 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
|
|
|
995
1052
|
else:
|
|
996
1053
|
h.stop_and_persist(symbol=self.failureIcon, text=f"Failed to submit PipelineRun for {self.getParam('mas_instance_id')} install, see log file for details")
|
|
997
1054
|
print()
|
|
1055
|
+
|
|
1056
|
+
def setupApprovals(self, namespace: str) -> None:
|
|
1057
|
+
"""
|
|
1058
|
+
Ensure the supported approval configmaps are in the expected state for the start of the run:
|
|
1059
|
+
- not present (if approval is not required)
|
|
1060
|
+
- present with the chosen state field initialized to ""
|
|
1061
|
+
"""
|
|
1062
|
+
for approval in self.approvals.values():
|
|
1063
|
+
if "approvalKey" in approval:
|
|
1064
|
+
# Enable this approval workload
|
|
1065
|
+
logger.debug(f"Approval workflow for {approval['id']} will be enabled during install ({approval['maxRetries']} / {approval['retryDelay']}s / {approval['approvalKey']} / {approval['ignoreFailure']})")
|
|
1066
|
+
self.initializeApprovalConfigMap(namespace, approval['id'], approval['approvalKey'], approval['maxRetries'], approval['retryDelay'], approval['ignoreFailure'])
|
|
1067
|
+
else:
|
|
1068
|
+
# Disable this approval workload
|
|
1069
|
+
logger.debug(f"Approval workflow for {approval['id']} will be disabled during install")
|
|
1070
|
+
self.initializeApprovalConfigMap(namespace, approval['id'])
|
|
@@ -146,7 +146,7 @@ masAdvancedArgGroup.add_argument(
|
|
|
146
146
|
masAdvancedArgGroup.add_argument(
|
|
147
147
|
"--manual-certificates",
|
|
148
148
|
required=False,
|
|
149
|
-
help="
|
|
149
|
+
help="Path to directory containing the certificates to be applied"
|
|
150
150
|
)
|
|
151
151
|
|
|
152
152
|
# Storage
|
|
@@ -756,12 +756,73 @@ cloudArgGroup.add_argument(
|
|
|
756
756
|
help="Set target Virtual Private Cloud ID for the MSK instance"
|
|
757
757
|
)
|
|
758
758
|
|
|
759
|
+
# Development Mode
|
|
760
|
+
# -----------------------------------------------------------------------------
|
|
761
|
+
devArgGroup = installArgParser.add_argument_group("Development Mode")
|
|
762
|
+
devArgGroup.add_argument(
|
|
763
|
+
"--artifactory-username",
|
|
764
|
+
required=False,
|
|
765
|
+
help="Username for access to development builds on Artifactory"
|
|
766
|
+
)
|
|
767
|
+
devArgGroup.add_argument(
|
|
768
|
+
"--artifactory-token",
|
|
769
|
+
required=False,
|
|
770
|
+
help="API Token for access to development builds on Artifactory"
|
|
771
|
+
)
|
|
772
|
+
|
|
773
|
+
# Approvals
|
|
774
|
+
# -----------------------------------------------------------------------------
|
|
775
|
+
approvalsGroup = installArgParser.add_argument_group("Integrated Approval Workflow (APPROVAL_KEY:MAX_RETRIES:RETRY_DELAY:IGNORE_FAILURE)")
|
|
776
|
+
approvalsGroup.add_argument(
|
|
777
|
+
"--approval-core",
|
|
778
|
+
default="",
|
|
779
|
+
help="Require approval after the Core Platform has been configured"
|
|
780
|
+
)
|
|
781
|
+
approvalsGroup.add_argument(
|
|
782
|
+
"--approval-assist",
|
|
783
|
+
default="",
|
|
784
|
+
help="Require approval after the Maximo Assist workspace has been configured"
|
|
785
|
+
)
|
|
786
|
+
approvalsGroup.add_argument(
|
|
787
|
+
"--approval-iot",
|
|
788
|
+
default="",
|
|
789
|
+
help="Require approval after the Maximo IoT workspace has been configured"
|
|
790
|
+
)
|
|
791
|
+
approvalsGroup.add_argument(
|
|
792
|
+
"--approval-manage",
|
|
793
|
+
default="",
|
|
794
|
+
help="Require approval after the Maximo Manage workspace has been configured"
|
|
795
|
+
)
|
|
796
|
+
approvalsGroup.add_argument(
|
|
797
|
+
"--approval-monitor",
|
|
798
|
+
default="",
|
|
799
|
+
help="Require approval after the Maximo Monitor workspace has been configured"
|
|
800
|
+
)
|
|
801
|
+
approvalsGroup.add_argument(
|
|
802
|
+
"--approval-optimizer",
|
|
803
|
+
default="",
|
|
804
|
+
help="Require approval after the Maximo Optimizer workspace has been configured"
|
|
805
|
+
)
|
|
806
|
+
approvalsGroup.add_argument(
|
|
807
|
+
"--approval-predict",
|
|
808
|
+
default="",
|
|
809
|
+
help="Require approval after the Maximo Predict workspace has been configured"
|
|
810
|
+
)
|
|
811
|
+
approvalsGroup.add_argument(
|
|
812
|
+
"--approval-visualinspection",
|
|
813
|
+
default="",
|
|
814
|
+
help="Require approval after the Maximo Visual Inspection workspace has been configured"
|
|
815
|
+
)
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
# More Options
|
|
819
|
+
# -----------------------------------------------------------------------------
|
|
759
820
|
otherArgGroup = installArgParser.add_argument_group("More")
|
|
760
821
|
otherArgGroup.add_argument(
|
|
761
822
|
"--accept-license",
|
|
762
823
|
action="store_true",
|
|
763
824
|
default=False,
|
|
764
|
-
help=""
|
|
825
|
+
help="Accept all license terms without prompting"
|
|
765
826
|
)
|
|
766
827
|
otherArgGroup.add_argument(
|
|
767
828
|
"--dev-mode",
|