mas-cli 11.5.0__py3-none-any.whl → 11.7.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 +43 -5
- mas/cli/gencfg.py +32 -8
- mas/cli/install/app.py +228 -357
- mas/cli/install/argBuilder.py +14 -2
- mas/cli/install/argParser.py +210 -1
- 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 +11 -11
- mas/cli/install/settings/db2Settings.py +75 -45
- mas/cli/install/settings/kafkaSettings.py +14 -10
- mas/cli/install/settings/manageSettings.py +71 -41
- mas/cli/install/settings/mongodbSettings.py +42 -0
- mas/cli/install/settings/turbonomicSettings.py +14 -13
- mas/cli/install/summarizer.py +39 -12
- mas/cli/templates/ibm-mas-tekton.yaml +1316 -124
- mas/cli/templates/suite_mongocfg.yml.j2 +55 -0
- mas/cli/update/app.py +20 -15
- {mas_cli-11.5.0.dist-info → mas_cli-11.7.0.dist-info}/METADATA +2 -2
- {mas_cli-11.5.0.dist-info → mas_cli-11.7.0.dist-info}/RECORD +24 -20
- {mas_cli-11.5.0.dist-info → mas_cli-11.7.0.dist-info}/WHEEL +1 -1
- {mas_cli-11.5.0.data → mas_cli-11.7.0.data}/scripts/mas-cli +0 -0
- {mas_cli-11.5.0.dist-info → mas_cli-11.7.0.dist-info}/top_level.txt +0 -0
|
@@ -63,7 +63,7 @@ class AdditionalConfigsMixin():
|
|
|
63
63
|
self.additionalConfigsSecret = additionalConfigsSecret
|
|
64
64
|
|
|
65
65
|
def podTemplates(self) -> None:
|
|
66
|
-
if self.interactiveMode:
|
|
66
|
+
if self.interactiveMode and self.showAdvancedOptions:
|
|
67
67
|
self.printH1("Configure Pod Templates")
|
|
68
68
|
self.printDescription([
|
|
69
69
|
"The CLI supports two pod template profiles out of the box that allow you to reconfigure MAS for either a guaranteed or best effort QoS level",
|
|
@@ -137,40 +137,40 @@ class AdditionalConfigsMixin():
|
|
|
137
137
|
|
|
138
138
|
apps = {
|
|
139
139
|
"mas_app_channel_assist": {
|
|
140
|
-
"dir": self.
|
|
140
|
+
"dir": self.manualCertsDir + "/assist/",
|
|
141
141
|
"keyPrefix": "assist."
|
|
142
142
|
},
|
|
143
143
|
"mas_app_channel_manage": {
|
|
144
|
-
"dir": self.
|
|
144
|
+
"dir": self.manualCertsDir + "/manage/",
|
|
145
145
|
"keyPrefix": "manage."
|
|
146
146
|
},
|
|
147
147
|
"mas_app_channel_iot": {
|
|
148
|
-
"dir": self.
|
|
148
|
+
"dir": self.manualCertsDir + "/iot/",
|
|
149
149
|
"keyPrefix": "iot."
|
|
150
150
|
},
|
|
151
151
|
"mas_app_channel_monitor": {
|
|
152
|
-
"dir": self.
|
|
152
|
+
"dir": self.manualCertsDir + "/monitor/",
|
|
153
153
|
"keyPrefix": "monitor."
|
|
154
154
|
},
|
|
155
155
|
"mas_app_channel_predict": {
|
|
156
|
-
"dir": self.
|
|
156
|
+
"dir": self.manualCertsDir + "/predict/",
|
|
157
157
|
"keyPrefix": "predict."
|
|
158
158
|
},
|
|
159
159
|
"mas_app_channel_visualinspection": {
|
|
160
|
-
"dir": self.
|
|
160
|
+
"dir": self.manualCertsDir + "/visualinspection/",
|
|
161
161
|
"keyPrefix": "visualinspection."
|
|
162
162
|
},
|
|
163
163
|
"mas_app_channel_optimizer": {
|
|
164
|
-
"dir": self.
|
|
164
|
+
"dir": self.manualCertsDir + "/optimizer/",
|
|
165
165
|
"keyPrefix": "optimizer."
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
for file in ["ca.crt", "tls.crt", "tls.key"]:
|
|
170
|
-
if file not in map(path.basename, glob(f'{self.
|
|
171
|
-
self.fatalError(f'{file} is not present in {self.
|
|
170
|
+
if file not in map(path.basename, glob(f'{self.manualCertsDir}/core/*')):
|
|
171
|
+
self.fatalError(f'{file} is not present in {self.manualCertsDir}/core/')
|
|
172
172
|
for ext in extensions:
|
|
173
|
-
certsSecret = self.addFilesToSecret(certsSecret, self.
|
|
173
|
+
certsSecret = self.addFilesToSecret(certsSecret, self.manualCertsDir + '/core/', ext, "core.")
|
|
174
174
|
|
|
175
175
|
for app in apps:
|
|
176
176
|
if self.getParam(app) != "":
|
|
@@ -18,12 +18,39 @@ class Db2SettingsMixin():
|
|
|
18
18
|
# The channel used for Db2 used has not changed since the January 2024 catalog update
|
|
19
19
|
self.params["db2_channel"] = "v110509.0"
|
|
20
20
|
|
|
21
|
+
# If neither Iot or Manage is being installed, we have nothing to do
|
|
21
22
|
if not self.installIoT and not self.installManage:
|
|
22
23
|
print_formatted_text("No applications have been selected that require a Db2 installation")
|
|
23
24
|
self.setParam("db2_action_system", "none")
|
|
24
25
|
self.setParam("db2_action_manage", "none")
|
|
25
26
|
return
|
|
26
27
|
|
|
28
|
+
# For now we are limiting users to bring your own database for Manage on s390x
|
|
29
|
+
# Eventually we will be able to remove this clause and allow the standard logic to work for both s390x and amd64
|
|
30
|
+
if self.architecture == "s390x" and self.installManage:
|
|
31
|
+
self.printDescription([
|
|
32
|
+
"Installation of a Db2 instance using the IBM Db2 Universal Operator is not currently supported on s390x, please provide configuration details for the database you wish to use.",
|
|
33
|
+
])
|
|
34
|
+
instanceId = self.getParam('mas_instance_id')
|
|
35
|
+
workspaceId = self.getParam("mas_workspace_id")
|
|
36
|
+
|
|
37
|
+
self.setParam("mas_appws_bindings_jdbc_manage", "workspace-application")
|
|
38
|
+
self.setParam("db2_action_manage", "byo")
|
|
39
|
+
self.selectLocalConfigDir()
|
|
40
|
+
|
|
41
|
+
# Check if a configuration already exists before creating a new one
|
|
42
|
+
jdbcCfgFile = path.join(self.localConfigDir, f"jdbc-{instanceId}-manage.yaml")
|
|
43
|
+
print_formatted_text(f"Searching for Manage database configuration file in {jdbcCfgFile} ...")
|
|
44
|
+
if path.exists(jdbcCfgFile):
|
|
45
|
+
if self.yesOrNo(f"Manage database configuration file 'jdbc-{instanceId}-manage.yaml' already exists. Do you want to generate a new one"):
|
|
46
|
+
self.generateJDBCCfg(instanceId=instanceId, scope="workspace-application", workspaceId=workspaceId, appId="manage", destination=jdbcCfgFile)
|
|
47
|
+
else:
|
|
48
|
+
print_formatted_text(f"Expected file ({jdbcCfgFile}) was not found, generating a valid Manage database configuration file now ...")
|
|
49
|
+
self.generateJDBCCfg(instanceId=instanceId, scope="workspace-application", workspaceId=workspaceId, appId="manage", destination=jdbcCfgFile)
|
|
50
|
+
return
|
|
51
|
+
|
|
52
|
+
# Proceed as normal
|
|
53
|
+
# We know we are installing either IoT or Manage, and on amd64 target architecture
|
|
27
54
|
self.printDescription([
|
|
28
55
|
"The installer can setup one or more IBM Db2 instances in your OpenShift cluster for the use of applications that require a JDBC datasource (IoT, Manage, Monitor, & Predict) or you may choose to configure MAS to use an existing database"
|
|
29
56
|
])
|
|
@@ -126,48 +153,51 @@ class Db2SettingsMixin():
|
|
|
126
153
|
|
|
127
154
|
# Do we need to configure Db2u?
|
|
128
155
|
if self.getParam("db2_action_system") == "install" or self.getParam("db2_action_manage") == "install":
|
|
129
|
-
self.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
self.
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
self.
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
self.
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
self.
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
156
|
+
if self.showAdvancedOptions:
|
|
157
|
+
self.printH2("Installation Namespace")
|
|
158
|
+
self.promptForString("Install namespace", "db2_namespace", default="db2u")
|
|
159
|
+
|
|
160
|
+
# Node Affinity & Tolerations
|
|
161
|
+
# -------------------------------------------------------------------------
|
|
162
|
+
self.printH2("Node Affinity and Tolerations")
|
|
163
|
+
self.printDescription([
|
|
164
|
+
"Note that the same settings are applied to both the IoT and Manage Db2 instances",
|
|
165
|
+
"Use existing node labels and taints to control scheduling of the Db2 workload in your cluster",
|
|
166
|
+
"For more information refer to the Red Hat documentation:",
|
|
167
|
+
" - <u>https://docs.openshift.com/container-platform/4.12/nodes/scheduling/nodes-scheduler-node-affinity.html</u>",
|
|
168
|
+
" - <u>https://docs.openshift.com/container-platform/4.12/nodes/scheduling/nodes-scheduler-taints-tolerations.html</u>"
|
|
169
|
+
])
|
|
170
|
+
|
|
171
|
+
if self.yesOrNo("Configure node affinity"):
|
|
172
|
+
self.promptForString(" + Key", "db2_affinity_key")
|
|
173
|
+
self.promptForString(" + Value", "db2_affinity_value")
|
|
174
|
+
|
|
175
|
+
if self.yesOrNo("Configure node tolerations"):
|
|
176
|
+
self.promptForString(" + Key", "db2_tolerate_key")
|
|
177
|
+
self.promptForString(" + Value", "db2_tolerate_value")
|
|
178
|
+
self.promptForString(" + Effect", "db2_tolerate_effect")
|
|
179
|
+
|
|
180
|
+
self.printH2("Database CPU & Memory")
|
|
181
|
+
self.printDescription([
|
|
182
|
+
"Note that the same settings are applied to both the IoT and Manage Db2 instances"
|
|
183
|
+
])
|
|
184
|
+
|
|
185
|
+
if self.yesOrNo("Customize CPU and memory request/limit"):
|
|
186
|
+
self.promptForString(" + CPU Request", "db2_cpu_requests", default=self.getParam("db2_cpu_requests"))
|
|
187
|
+
self.promptForString(" + CPU Limit", "db2_cpu_limits", default=self.getParam("db2_cpu_limits"))
|
|
188
|
+
self.promptForString(" + Memory Request", "db2_memory_requests", default=self.getParam("db2_memory_requests"))
|
|
189
|
+
self.promptForString(" + Memory Limit", "db2_memory_limits", default=self.getParam("db2_memory_limits"))
|
|
190
|
+
|
|
191
|
+
self.printH2("Database Storage Capacity")
|
|
192
|
+
self.printDescription([
|
|
193
|
+
"Note that the same settings are applied to both the IoT and Manage Db2 instances"
|
|
194
|
+
])
|
|
195
|
+
|
|
196
|
+
if self.yesOrNo("Customize storage capacity"):
|
|
197
|
+
self.promptForString(" + Data Volume", "db2_data_storage_size", default=self.getParam("db2_data_storage_size"))
|
|
198
|
+
self.promptForString(" + Temporary Volume", "db2_temp_storage_size", default=self.getParam("db2_temp_storage_size"))
|
|
199
|
+
self.promptForString(" + Metadata Volume", "db2_meta_storage_size", default=self.getParam("db2_meta_storage_size"))
|
|
200
|
+
self.promptForString(" + Transaction Logs Volume", "db2_logs_storage_size", default=self.getParam("db2_logs_storage_size"))
|
|
201
|
+
self.promptForString(" + Backup Volume", "db2_backup_storage_size", default=self.getParam("db2_backup_storage_size"))
|
|
202
|
+
else:
|
|
203
|
+
self.setParam("db2_namespace", "db2u")
|
|
@@ -24,15 +24,18 @@ class KafkaSettingsMixin():
|
|
|
24
24
|
if self.yesOrNo("Create system Kafka instance using one of the supported providers"):
|
|
25
25
|
self.setParam("kafka_action_system", "install")
|
|
26
26
|
|
|
27
|
-
self.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
if self.showAdvancedOptions:
|
|
28
|
+
self.printDescription([
|
|
29
|
+
"",
|
|
30
|
+
"Kafka Provider:",
|
|
31
|
+
" 1. Strimzi (opensource)",
|
|
32
|
+
" 2. Red Hat AMQ Streams (requires a separate license)",
|
|
33
|
+
" 3. IBM Cloud Event Streams (paid IBM Cloud service)",
|
|
34
|
+
" 4. AWS MSK (paid AWS service)"
|
|
35
|
+
])
|
|
36
|
+
self.promptForListSelect("Select Kafka provider", ["strimzi", "redhat", "ibm", "aws"], "kafka_provider")
|
|
37
|
+
else:
|
|
38
|
+
self.setParam("kafka_provider", "strimzi")
|
|
36
39
|
|
|
37
40
|
if self.getParam("kafka_provider") == "strimzi":
|
|
38
41
|
self.printDescription([
|
|
@@ -42,7 +45,8 @@ class KafkaSettingsMixin():
|
|
|
42
45
|
" - If you are using the latest available operator catalog then the default version below can be accepted",
|
|
43
46
|
" - If you are using older operator catalogs (e.g. in a disconnected install) you should confirm the supported versions in your OperatorHub"
|
|
44
47
|
])
|
|
45
|
-
self.
|
|
48
|
+
if self.showAdvancedOptions:
|
|
49
|
+
self.promptForString("Strimzi namespace", "kafka_namespace", default="strimzi")
|
|
46
50
|
self.promptForString("Kafka version", "kafka_version", default="3.7.0")
|
|
47
51
|
|
|
48
52
|
elif self.getParam("kafka_provider") == "redhat":
|
|
@@ -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.showAdvancedOptionsshowAdvancedOptions:
|
|
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>"
|
|
@@ -246,3 +250,29 @@ class ManageSettingsMixin():
|
|
|
246
250
|
self.manageSettingsTimezone()
|
|
247
251
|
self.manageSettingsLanguages()
|
|
248
252
|
self.manageSettingsCP4D()
|
|
253
|
+
|
|
254
|
+
def aibrokerSettings(self) -> None:
|
|
255
|
+
if self.installAiBroker:
|
|
256
|
+
self.printH2("Maximo AI Broker Settings - Storage, WatsonX, MariaDB details")
|
|
257
|
+
self.printDescription(["Customise AI Broker details"])
|
|
258
|
+
self.promptForString("Storage provider", "mas_aibroker_storage_provider")
|
|
259
|
+
self.promptForString("Storage access key", "mas_aibroker_storage_accesskey")
|
|
260
|
+
self.promptForString("Storage secret key", "mas_aibroker_storage_secretkey")
|
|
261
|
+
self.promptForString("Storage host", "mas_aibroker_storage_host")
|
|
262
|
+
self.promptForString("Storage port", "mas_aibroker_storage_port")
|
|
263
|
+
self.promptForString("Storage ssl", "mas_aibroker_storage_ssl")
|
|
264
|
+
self.promptForString("Storage region", "mas_aibroker_storage_region")
|
|
265
|
+
self.promptForString("Storage pipelines bucket", "mas_aibroker_storage_pipelines_bucket")
|
|
266
|
+
self.promptForString("Storage tenants bucket", "mas_aibroker_storage_tenants_bucket")
|
|
267
|
+
self.promptForString("Storage templates bucket", "mas_aibroker_storage_templates_bucket")
|
|
268
|
+
|
|
269
|
+
self.promptForString("Watsonxai api key", "mas_aibroker_watsonxai_apikey")
|
|
270
|
+
self.promptForString("Watsonxai machine learning url", "mas_aibroker_watsonxai_url")
|
|
271
|
+
self.promptForString("Watsonxai project id", "mas_aibroker_watsonxai_project_id")
|
|
272
|
+
|
|
273
|
+
self.promptForString("Database host", "mas_aibroker_db_host")
|
|
274
|
+
self.promptForString("Database port", "mas_aibroker_db_port")
|
|
275
|
+
self.promptForString("Database user", "mas_aibroker_db_user")
|
|
276
|
+
self.promptForString("Database name", "mas_aibroker_db_database")
|
|
277
|
+
self.promptForString("Database Secretname", "mas_aibroker_db_secret_name")
|
|
278
|
+
self.promptForString("Database password", "mas_aibroker_db_secret_value")
|
|
@@ -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
|
|
|
@@ -77,7 +71,7 @@ class InstallSummarizerMixin():
|
|
|
77
71
|
|
|
78
72
|
if self.getParam("mas_manual_cert_mgmt") != "":
|
|
79
73
|
print()
|
|
80
|
-
self.
|
|
74
|
+
self.printSummary("Manual Certificates", self.manualCertsDir)
|
|
81
75
|
else:
|
|
82
76
|
print()
|
|
83
77
|
self.printSummary("Manual Certificates", "Not Configured")
|
|
@@ -155,6 +149,32 @@ class InstallSummarizerMixin():
|
|
|
155
149
|
else:
|
|
156
150
|
self.printSummary("Visual Inspection", "Do Not Install")
|
|
157
151
|
|
|
152
|
+
def aibrokerSummary(self) -> None:
|
|
153
|
+
if self.installAiBroker:
|
|
154
|
+
self.printSummary("AI Broker", self.params["mas_app_channel_aibroker"])
|
|
155
|
+
print_formatted_text(HTML(" <SkyBlue>+ Maximo AI Broker Settings</SkyBlue>"))
|
|
156
|
+
self.printParamSummary(" + Storage provider", "mas_aibroker_storage_provider")
|
|
157
|
+
self.printParamSummary(" + Storage access key", "mas_aibroker_storage_accesskey")
|
|
158
|
+
self.printParamSummary(" + Storage secret key", "mas_aibroker_storage_secretkey")
|
|
159
|
+
self.printParamSummary(" + Storage host", "mas_aibroker_storage_host")
|
|
160
|
+
self.printParamSummary(" + Storage port", "mas_aibroker_storage_port")
|
|
161
|
+
self.printParamSummary(" + Storage ssl", "mas_aibroker_storage_ssl")
|
|
162
|
+
self.printParamSummary(" + Storage region", "mas_aibroker_storage_region")
|
|
163
|
+
self.printParamSummary(" + Storage pipelines bucket", "mas_aibroker_storage_pipelines_bucket")
|
|
164
|
+
self.printParamSummary(" + Storage tenants bucket", "mas_aibroker_storage_tenants_bucket")
|
|
165
|
+
self.printParamSummary(" + Storage templates bucket", "mas_aibroker_storage_templates_bucket")
|
|
166
|
+
self.printParamSummary(" + Watsonxai api key", "mas_aibroker_watsonxai_apikey")
|
|
167
|
+
self.printParamSummary(" + Watsonxai machine learning url", "mas_aibroker_watsonxai_url")
|
|
168
|
+
self.printParamSummary(" + Watsonxai project id", "mas_aibroker_watsonxai_project_id")
|
|
169
|
+
self.printParamSummary(" + Database host", "mas_aibroker_db_host")
|
|
170
|
+
self.printParamSummary(" + Database port", "mas_aibroker_db_port")
|
|
171
|
+
self.printParamSummary(" + Database user", "mas_aibroker_db_user")
|
|
172
|
+
self.printParamSummary(" + Database name", "mas_aibroker_db_database")
|
|
173
|
+
self.printParamSummary(" + Database Secretname", "mas_aibroker_db_secret_name")
|
|
174
|
+
self.printParamSummary(" + Database password", "mas_aibroker_db_secret_value")
|
|
175
|
+
else:
|
|
176
|
+
self.printSummary("AI Broker", "Do Not Install")
|
|
177
|
+
|
|
158
178
|
def manageSummary(self) -> None:
|
|
159
179
|
if self.installManage:
|
|
160
180
|
self.printSummary("Manage", self.params["mas_app_channel_manage"])
|
|
@@ -248,13 +268,14 @@ class InstallSummarizerMixin():
|
|
|
248
268
|
self.printH2("IBM Suite License Service")
|
|
249
269
|
self.printSummary("License File", self.slsLicenseFileLocal)
|
|
250
270
|
self.printParamSummary("IBM Open Registry", "sls_icr_cpopen")
|
|
271
|
+
self.printParamSummary("Namespace", "sls_namespace")
|
|
251
272
|
|
|
252
273
|
def cosSummary(self) -> None:
|
|
253
274
|
self.printH2("Cloud Object Storage")
|
|
254
275
|
if self.getParam("cos_type") != "":
|
|
255
276
|
self.printParamSummary("Type", "cos_type")
|
|
256
|
-
if self.getParam("
|
|
257
|
-
self.printParamSummary("Resource Group", "
|
|
277
|
+
if self.getParam("ibmcos_resourcegroup") != "":
|
|
278
|
+
self.printParamSummary("Resource Group", "ibmcos_resourcegroup")
|
|
258
279
|
else:
|
|
259
280
|
self.printSummary("Type", "None")
|
|
260
281
|
|
|
@@ -282,7 +303,13 @@ class InstallSummarizerMixin():
|
|
|
282
303
|
|
|
283
304
|
def mongoSummary(self) -> None:
|
|
284
305
|
self.printH2("MongoDb")
|
|
285
|
-
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')}")
|
|
286
313
|
|
|
287
314
|
def kafkaSummary(self) -> None:
|
|
288
315
|
if self.getParam("kafka_action_system") != "":
|
|
@@ -327,7 +354,6 @@ class InstallSummarizerMixin():
|
|
|
327
354
|
|
|
328
355
|
# Cluster Config & Dependencies
|
|
329
356
|
self.ocpSummary()
|
|
330
|
-
self.icrSummary()
|
|
331
357
|
self.droSummary()
|
|
332
358
|
self.slsSummary()
|
|
333
359
|
self.masSummary()
|
|
@@ -341,6 +367,7 @@ class InstallSummarizerMixin():
|
|
|
341
367
|
self.optimizerSummary()
|
|
342
368
|
self.assistSummary()
|
|
343
369
|
self.inspectionSummary()
|
|
370
|
+
self.aibrokerSummary()
|
|
344
371
|
|
|
345
372
|
# Application Dependencies
|
|
346
373
|
self.mongoSummary()
|