mas-cli 11.6.0__py3-none-any.whl → 11.8.0__py3-none-any.whl
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/__init__.py +1 -1
- mas/cli/cli.py +41 -4
- mas/cli/gencfg.py +32 -8
- mas/cli/install/app.py +204 -383
- mas/cli/install/argBuilder.py +2 -0
- mas/cli/install/argParser.py +19 -0
- mas/cli/install/catalogs.py +141 -0
- mas/cli/install/params.py +168 -0
- mas/cli/install/settings/__init__.py +2 -1
- mas/cli/install/settings/additionalConfigs.py +1 -1
- mas/cli/install/settings/db2Settings.py +75 -45
- mas/cli/install/settings/kafkaSettings.py +14 -10
- mas/cli/install/settings/manageSettings.py +47 -41
- mas/cli/install/settings/mongodbSettings.py +42 -0
- mas/cli/install/settings/turbonomicSettings.py +14 -13
- mas/cli/install/summarizer.py +9 -9
- mas/cli/templates/ibm-mas-tekton.yaml +308 -105
- mas/cli/templates/suite_mongocfg.yml.j2 +55 -0
- mas/cli/update/app.py +20 -15
- {mas_cli-11.6.0.dist-info → mas_cli-11.8.0.dist-info}/METADATA +2 -2
- {mas_cli-11.6.0.dist-info → mas_cli-11.8.0.dist-info}/RECORD +24 -20
- {mas_cli-11.6.0.dist-info → mas_cli-11.8.0.dist-info}/WHEEL +1 -1
- {mas_cli-11.6.0.data → mas_cli-11.8.0.data}/scripts/mas-cli +0 -0
- {mas_cli-11.6.0.dist-info → mas_cli-11.8.0.dist-info}/top_level.txt +0 -0
|
@@ -125,53 +125,57 @@ class ManageSettingsMixin():
|
|
|
125
125
|
exit(1)
|
|
126
126
|
|
|
127
127
|
def manageSettingsDatabase(self) -> None:
|
|
128
|
-
self.
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
self.
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
self.
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
128
|
+
if self.showAdvancedOptions:
|
|
129
|
+
self.printH2("Maximo Manage Settings - Database")
|
|
130
|
+
self.printDescription(["Customise the schema, tablespace, indexspace, and encryption settings used by Manage"])
|
|
131
|
+
|
|
132
|
+
if self.yesOrNo("Customize database settings"):
|
|
133
|
+
self.promptForString("Schema", "mas_app_settings_db2_schema", default="maximo")
|
|
134
|
+
self.promptForString("Tablespace", "mas_app_settings_tablespace", default="MAXDATA")
|
|
135
|
+
self.promptForString("Indexspace", "mas_app_settings_indexspace", default="MAXINDEX")
|
|
136
|
+
|
|
137
|
+
if self.yesOrNo("Customize database encryption settings"):
|
|
138
|
+
self.promptForString("MXE_SECURITY_CRYPTO_KEY", "mas_app_settings_crypto_key")
|
|
139
|
+
self.promptForString("MXE_SECURITY_CRYPTOX_KEY", "mas_app_settings_cryptox_key")
|
|
140
|
+
self.promptForString("MXE_SECURITY_OLD_CRYPTO_KEY", "mas_app_settings_old_crypto_key")
|
|
141
|
+
self.promptForString("MXE_SECURITY_OLD_CRYPTOX_KEY", "mas_app_settings_old_cryptox_key")
|
|
142
|
+
self.yesOrNo("Override database encryption secrets with provided keys", "mas_app_settings_override_encryption_secrets_flag")
|
|
142
143
|
|
|
143
144
|
def manageSettingsServerBundleConfig(self) -> None:
|
|
144
|
-
self.
|
|
145
|
-
|
|
146
|
-
"Define how you want to configure Manage servers:",
|
|
147
|
-
" - You can have one or multiple Manage servers distributing workload",
|
|
148
|
-
" - Additionally, you can choose to include JMS server for messaging queues",
|
|
149
|
-
"",
|
|
150
|
-
"Configurations:",
|
|
151
|
-
" 1. Deploy the 'all' server pod only (workload is concentrated in just one server pod but consumes less resource)",
|
|
152
|
-
" 2. Deploy the 'all' and 'jms' bundle pods (workload is concentrated in just one server pod and includes jms server)"
|
|
153
|
-
])
|
|
154
|
-
|
|
155
|
-
if not self.isSNO():
|
|
145
|
+
if self.showAdvancedOptions:
|
|
146
|
+
self.printH2("Maximo Manage Settings - Server Bundles")
|
|
156
147
|
self.printDescription([
|
|
157
|
-
"
|
|
158
|
-
"
|
|
148
|
+
"Define how you want to configure Manage servers:",
|
|
149
|
+
" - You can have one or multiple Manage servers distributing workload",
|
|
150
|
+
" - Additionally, you can choose to include JMS server for messaging queues",
|
|
151
|
+
"",
|
|
152
|
+
"Configurations:",
|
|
153
|
+
" 1. Deploy the 'all' server pod only (workload is concentrated in just one server pod but consumes less resource)",
|
|
154
|
+
" 2. Deploy the 'all' and 'jms' bundle pods (workload is concentrated in just one server pod and includes jms server)"
|
|
159
155
|
])
|
|
160
156
|
|
|
161
|
-
|
|
157
|
+
if not self.isSNO():
|
|
158
|
+
self.printDescription([
|
|
159
|
+
" 3. Deploy the 'mea', 'report', 'ui' and 'cron' bundle pods (workload is distributed across multiple server pods)",
|
|
160
|
+
" 4. Deploy the 'mea', 'report', 'ui', 'cron' and 'jms' bundle pods (workload is distributed across multiple server pods and includes jms server)"
|
|
161
|
+
])
|
|
162
162
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
163
|
+
manageServerBundleSelection = self.promptForString("Select a server bundle configuration")
|
|
164
|
+
|
|
165
|
+
if manageServerBundleSelection == "1":
|
|
166
|
+
self.setParam("mas_app_settings_server_bundles_size", "dev")
|
|
167
|
+
elif manageServerBundleSelection == "2":
|
|
168
|
+
self.setParam("mas_app_settings_server_bundles_size", "snojms")
|
|
169
|
+
self.setParam("mas_app_settings_persistent_volumes_flag", "true")
|
|
170
|
+
elif manageServerBundleSelection == "3":
|
|
171
|
+
self.setParam("mas_app_settings_server_bundles_size", "small")
|
|
172
|
+
elif manageServerBundleSelection == "4":
|
|
173
|
+
self.setParam("mas_app_settings_server_bundles_size", "jms")
|
|
174
|
+
self.setParam("mas_app_settings_persistent_volumes_flag", "true")
|
|
175
|
+
else:
|
|
176
|
+
self.fatalError("Invalid selection")
|
|
173
177
|
else:
|
|
174
|
-
self.
|
|
178
|
+
self.setParam("mas_app_settings_server_bundles_size", "dev")
|
|
175
179
|
|
|
176
180
|
def manageSettingsJMS(self) -> None:
|
|
177
181
|
if self.getParam("mas_app_settings_server_bundles_size") in ["jms", "snojms"]:
|
|
@@ -219,7 +223,7 @@ class ManageSettingsMixin():
|
|
|
219
223
|
self.promptForString("Secondary languages", "mas_app_settings_secondary_langs")
|
|
220
224
|
|
|
221
225
|
def manageSettingsCP4D(self) -> None:
|
|
222
|
-
if self.getParam("mas_app_channel_manage") in ["8.7.x", "9.0.x"]:
|
|
226
|
+
if self.getParam("mas_app_channel_manage") in ["8.7.x", "9.0.x"] and self.showAdvancedOptions:
|
|
223
227
|
self.printDescription([
|
|
224
228
|
"Integration with Cognos Analytics provides additional support for reporting features in Maximo Manage, for more information refer to the documentation online: ",
|
|
225
229
|
" <u>https://ibm.biz/BdMuxs</u>"
|
|
@@ -261,9 +265,11 @@ class ManageSettingsMixin():
|
|
|
261
265
|
self.promptForString("Storage pipelines bucket", "mas_aibroker_storage_pipelines_bucket")
|
|
262
266
|
self.promptForString("Storage tenants bucket", "mas_aibroker_storage_tenants_bucket")
|
|
263
267
|
self.promptForString("Storage templates bucket", "mas_aibroker_storage_templates_bucket")
|
|
268
|
+
|
|
264
269
|
self.promptForString("Watsonxai api key", "mas_aibroker_watsonxai_apikey")
|
|
265
270
|
self.promptForString("Watsonxai machine learning url", "mas_aibroker_watsonxai_url")
|
|
266
271
|
self.promptForString("Watsonxai project id", "mas_aibroker_watsonxai_project_id")
|
|
272
|
+
|
|
267
273
|
self.promptForString("Database host", "mas_aibroker_db_host")
|
|
268
274
|
self.promptForString("Database port", "mas_aibroker_db_port")
|
|
269
275
|
self.promptForString("Database user", "mas_aibroker_db_user")
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# *****************************************************************************
|
|
2
|
+
# Copyright (c) 2024 IBM Corporation and other Contributors.
|
|
3
|
+
#
|
|
4
|
+
# All rights reserved. This program and the accompanying materials
|
|
5
|
+
# are made available under the terms of the Eclipse Public License v1.0
|
|
6
|
+
# which accompanies this distribution, and is available at
|
|
7
|
+
# http://www.eclipse.org/legal/epl-v10.html
|
|
8
|
+
#
|
|
9
|
+
# *****************************************************************************
|
|
10
|
+
|
|
11
|
+
from os import path
|
|
12
|
+
from prompt_toolkit import print_formatted_text
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class MongoDbSettingsMixin():
|
|
16
|
+
def configMongoDb(self) -> None:
|
|
17
|
+
self.printH1("Configure MongoDb")
|
|
18
|
+
self.printDescription([
|
|
19
|
+
"The installer can setup mongoce in your OpenShift cluster (available only for amd64) or you may choose to configure MAS to use an existing mongodb"
|
|
20
|
+
])
|
|
21
|
+
|
|
22
|
+
if self.architecture != "s390x" and self.yesOrNo("Create MongoDb cluster using MongoDb Community Edition Operator"):
|
|
23
|
+
if self.showAdvancedOptions:
|
|
24
|
+
self.promptForString("MongoDb namespace", "mongodb_namespace", default="mongoce")
|
|
25
|
+
self.setParam("mongodb_action", "install")
|
|
26
|
+
self.setParam("sls_mongodb_cfg_file", f"/workspace/configs/mongo-{self.getParam('mongodb_namespace')}.yml")
|
|
27
|
+
else:
|
|
28
|
+
self.setParam("mongodb_action", "byo")
|
|
29
|
+
self.setParam("sls_mongodb_cfg_file", "/workspace/additional-configs/mongodb-system.yaml")
|
|
30
|
+
self.selectLocalConfigDir()
|
|
31
|
+
|
|
32
|
+
instanceId = self.getParam('mas_instance_id')
|
|
33
|
+
# Check if a configuration already exists before creating a new one
|
|
34
|
+
mongoCfgFile = path.join(self.localConfigDir, "mongodb-system.yaml")
|
|
35
|
+
|
|
36
|
+
print_formatted_text(f"Searching for system mongodb configuration file in {mongoCfgFile} ...")
|
|
37
|
+
if path.exists(mongoCfgFile):
|
|
38
|
+
if self.yesOrNo("System mongodb configuration file 'mongodb-system.yaml' already exists. Do you want to generate a new one"):
|
|
39
|
+
self.generateMongoCfg(instanceId=instanceId, destination=mongoCfgFile)
|
|
40
|
+
else:
|
|
41
|
+
print_formatted_text(f"Expected file ({mongoCfgFile}) was not found, generating a valid system mongodb configuration file now ...")
|
|
42
|
+
self.generateMongoCfg(instanceId=instanceId, destination=mongoCfgFile)
|
|
@@ -14,17 +14,18 @@ from mas.devops.mas import isAirgapInstall
|
|
|
14
14
|
class TurbonomicSettingsMixin():
|
|
15
15
|
|
|
16
16
|
def configTurbonomic(self) -> None:
|
|
17
|
-
self.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
if self.showAdvancedOptions:
|
|
18
|
+
self.printH1("Configure Turbonomic")
|
|
19
|
+
self.printDescription([
|
|
20
|
+
"The IBM Turbonomic hybrid cloud cost optimization platform allows you to eliminate this guesswork with solutions that save time and optimize costs",
|
|
21
|
+
" - Learn more: <u>https://www.ibm.com/products/turbonomic</u>"
|
|
22
|
+
])
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
if isAirgapInstall(self.dynamicClient):
|
|
25
|
+
self.printHighlight("The Turbonomic Kubernetes Operator does not support disconnected installation at this time")
|
|
26
|
+
elif self.yesOrNo("Configure IBM Turbonomic integration"):
|
|
27
|
+
self.promptForString("Turbonomic Target Name", "turbonomic_target_name")
|
|
28
|
+
self.promptForString("Turbonomic Server URL", "turbonomic_server_url")
|
|
29
|
+
self.promptForString("Turbonomic Server Version", "turbonomic_server_version")
|
|
30
|
+
self.promptForString("Turbonomic Username", "turbonomic_username")
|
|
31
|
+
self.promptForString("Turbonomic Password", "turbonomic_password", isPassword=True)
|
mas/cli/install/summarizer.py
CHANGED
|
@@ -20,6 +20,7 @@ logger = logging.getLogger(__name__)
|
|
|
20
20
|
class InstallSummarizerMixin():
|
|
21
21
|
def ocpSummary(self) -> None:
|
|
22
22
|
self.printH2("OpenShift Container Platform")
|
|
23
|
+
self.printSummary("Worker Node Architecture", self.architecture)
|
|
23
24
|
self.printSummary("Storage Class Provider", self.storageClassProvider)
|
|
24
25
|
self.printParamSummary("ReadWriteOnce Storage Class", "storage_class_rwo")
|
|
25
26
|
self.printParamSummary("ReadWriteMany Storage Class", "storage_class_rwx")
|
|
@@ -35,13 +36,6 @@ class InstallSummarizerMixin():
|
|
|
35
36
|
self.printSummary("Skip Pre-Install Healthcheck", "Yes" if self.getParam('skip_pre_check') == "true" else "No")
|
|
36
37
|
self.printSummary("Skip Grafana-Install", "Yes" if self.getParam('grafana_action') == "none" else "No")
|
|
37
38
|
|
|
38
|
-
def icrSummary(self) -> None:
|
|
39
|
-
self.printH2("IBM Container Registry Credentials")
|
|
40
|
-
self.printSummary("IBM Entitlement Key", f"{self.params['ibm_entitlement_key'][0:8]}<snip>")
|
|
41
|
-
if self.devMode:
|
|
42
|
-
self.printSummary("Artifactory Username", self.params['artifactory_username'])
|
|
43
|
-
self.printSummary("Artifactory Token", f"{self.params['artifactory_token'][0:8]}<snip>")
|
|
44
|
-
|
|
45
39
|
def masSummary(self) -> None:
|
|
46
40
|
operationalModeNames = ["", "Production", "Non-Production"]
|
|
47
41
|
|
|
@@ -274,6 +268,7 @@ class InstallSummarizerMixin():
|
|
|
274
268
|
self.printH2("IBM Suite License Service")
|
|
275
269
|
self.printSummary("License File", self.slsLicenseFileLocal)
|
|
276
270
|
self.printParamSummary("IBM Open Registry", "sls_icr_cpopen")
|
|
271
|
+
self.printParamSummary("Namespace", "sls_namespace")
|
|
277
272
|
|
|
278
273
|
def cosSummary(self) -> None:
|
|
279
274
|
self.printH2("Cloud Object Storage")
|
|
@@ -308,7 +303,13 @@ class InstallSummarizerMixin():
|
|
|
308
303
|
|
|
309
304
|
def mongoSummary(self) -> None:
|
|
310
305
|
self.printH2("MongoDb")
|
|
311
|
-
self.
|
|
306
|
+
if self.getParam("mongodb_action") == "install":
|
|
307
|
+
self.printSummary("Type", "MongoCE Operator")
|
|
308
|
+
self.printParamSummary("Install Namespace", "mongodb_namespace")
|
|
309
|
+
elif self.getParam("mongodb_action") == "byo":
|
|
310
|
+
self.printSummary("Type", "BYO (mongodb-system.yaml)")
|
|
311
|
+
else:
|
|
312
|
+
self.fatalError(f"Unexpected value for mongodb_action parameter: {self.getParam('mongodb_action')}")
|
|
312
313
|
|
|
313
314
|
def kafkaSummary(self) -> None:
|
|
314
315
|
if self.getParam("kafka_action_system") != "":
|
|
@@ -353,7 +354,6 @@ class InstallSummarizerMixin():
|
|
|
353
354
|
|
|
354
355
|
# Cluster Config & Dependencies
|
|
355
356
|
self.ocpSummary()
|
|
356
|
-
self.icrSummary()
|
|
357
357
|
self.droSummary()
|
|
358
358
|
self.slsSummary()
|
|
359
359
|
self.masSummary()
|