mas-cli 13.25.1__py3-none-any.whl → 13.27.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.

@@ -0,0 +1,120 @@
1
+ # *****************************************************************************
2
+ # Copyright (c) 2024, 2025 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
+ requiredParams = [
12
+ # MAS
13
+ "mas_catalog_version",
14
+ # Storage classes
15
+ "storage_class_rwo",
16
+ "storage_class_rwx",
17
+ # Entitlement
18
+ "ibm_entitlement_key",
19
+ # DRO
20
+ "uds_contact_email",
21
+ "uds_contact_firstname",
22
+ "uds_contact_lastname"
23
+ ]
24
+
25
+ optionalParams = [
26
+ # Pipeline
27
+ "image_pull_policy",
28
+ "service_account_name",
29
+ # Catalogue
30
+ "mas_catalog_digest",
31
+ # SLS
32
+ "sls_namespace",
33
+ # DRO
34
+ "dro_namespace",
35
+ # Db2
36
+ "db2_action_system",
37
+ "db2_action_manage",
38
+ "db2_action_facilities",
39
+ "db2_type",
40
+ "db2_timezone",
41
+ "db2_namespace",
42
+ "db2_channel",
43
+ "db2_affinity_key",
44
+ "db2_affinity_value",
45
+ "db2_tolerate_key",
46
+ "db2_tolerate_value",
47
+ "db2_tolerate_effect",
48
+ "db2_cpu_requests",
49
+ "db2_cpu_limits",
50
+ "db2_memory_requests",
51
+ "db2_memory_limits",
52
+ "db2_backup_storage_size",
53
+ "db2_data_storage_size",
54
+ "db2_logs_storage_size",
55
+ "db2_meta_storage_size",
56
+ "db2_temp_storage_size",
57
+ # Dev Mode
58
+ "artifactory_username",
59
+ "artifactory_token",
60
+ # Aibroker
61
+ "mas_aibroker_storage_provider",
62
+ "mas_aibroker_storage_accesskey",
63
+ "mas_aibroker_storage_secretkey",
64
+ "mas_aibroker_storage_host",
65
+ "mas_aibroker_storage_port",
66
+ "mas_aibroker_storage_ssl",
67
+ "mas_aibroker_storage_region",
68
+ "mas_aibroker_storage_pipelines_bucket",
69
+ "mas_aibroker_storage_tenants_bucket",
70
+ "mas_aibroker_storage_templates_bucket",
71
+ "mas_aibroker_tenant_name",
72
+ "mas_aibroker_watsonxai_apikey",
73
+ "mas_aibroker_watsonxai_url",
74
+ "mas_aibroker_watsonxai_project_id",
75
+ "mas_aibroker_watsonx_action",
76
+ "mas_aibroker_db_host",
77
+ "mas_aibroker_db_port",
78
+ "mas_aibroker_db_user",
79
+ "mas_aibroker_db_database",
80
+ "mas_aibroker_db_secret_name",
81
+ "mas_aibroker_db_secret_key",
82
+ "mas_aibroker_db_secret_value",
83
+ "aibroker_instance_id",
84
+ "mariadb_user",
85
+ "mariadb_password",
86
+ "minio_root_user",
87
+ "minio_root_password",
88
+ "tenant_entitlement_type",
89
+ "tenant_entitlement_start_date",
90
+ "tenant_entitlement_end_date",
91
+ "mas_aibroker_s3_bucket_prefix",
92
+ "mas_aibroker_s3_region",
93
+ "mas_aibroker_s3_endpoint_url",
94
+ "mas_aibroker_tenant_s3_bucket_prefix",
95
+ "mas_aibroker_tenant_s3_region",
96
+ "mas_aibroker_tenant_s3_endpoint_url",
97
+ "mas_aibroker_tenant_s3_access_key",
98
+ "mas_aibroker_tenant_s3_secret_key",
99
+ "rsl_url",
100
+ "rsl_org_id",
101
+ "rsl_token",
102
+ "install_minio_aiservice",
103
+ "install_sls_aiservice",
104
+ "install_dro_aiservice",
105
+ "install_db2_aiservice",
106
+ "mas_aibroker_dro_secret_name",
107
+ "mas_aibroker_dro_api_key",
108
+ "mas_aibroker_dro_url",
109
+ "mas_aibroker_dro_ca_cert",
110
+ "mas_aibroker_db2_username",
111
+ "mas_aibroker_db2_password",
112
+ "mas_aibroker_db2_jdbc_url",
113
+ "mas_aibroker_db2_ssl_enabled",
114
+ "mas_aibroker_db2_ca_cert",
115
+ "mas_aibroker_sls_secret_name",
116
+ "mas_aibroker_sls_registration_key",
117
+ "mas_aibroker_sls_url",
118
+ "mas_aibroker_sls_ca_cert",
119
+ "environment_type",
120
+ ]
@@ -0,0 +1,193 @@
1
+ # *****************************************************************************
2
+ # Copyright (c) 2024, 2025 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
+ import logging
12
+ import yaml
13
+ from prompt_toolkit import print_formatted_text, HTML
14
+ from mas.devops.ocp import getConsoleURL
15
+
16
+ logger = logging.getLogger(__name__)
17
+
18
+
19
+ class aiServiceInstallSummarizerMixin():
20
+ def ocpSummary(self) -> None:
21
+ self.printH2("Pipeline Configuration")
22
+ self.printParamSummary("Service Account", "service_account_name")
23
+ self.printParamSummary("Image Pull Policy", "image_pull_policy")
24
+ self.printSummary("Skip Pre-Install Healthcheck", "Yes" if self.getParam('skip_pre_check') == "true" else "No")
25
+
26
+ self.printH2("OpenShift Container Platform")
27
+ self.printSummary("Worker Node Architecture", self.architecture)
28
+ self.printSummary("Storage Class Provider", self.storageClassProvider)
29
+ self.printParamSummary("ReadWriteOnce Storage Class", "storage_class_rwo")
30
+ self.printParamSummary("ReadWriteMany Storage Class", "storage_class_rwx")
31
+
32
+ self.printParamSummary("Certificate Manager", "cert_manager_provider")
33
+ self.printParamSummary("Cluster Ingress Certificate Secret", "ocp_ingress_tls_secret_name")
34
+
35
+ def masSummary(self) -> None:
36
+
37
+ self.printH2("IBM Maximo Application Suite")
38
+
39
+ print()
40
+ self.printParamSummary("Catalog Version", "mas_catalog_version")
41
+ # We only list the digest if it's specified (primary use case is when running development builds in airgap environments)
42
+ if self.getParam("mas_catalog_digest" != ""):
43
+ self.printParamSummary("Catalog Digest", "mas_catalog_digest")
44
+ self.printParamSummary("Subscription Channel", "mas_channel")
45
+
46
+ print()
47
+ self.printParamSummary("IBM Entitled Registry", "mas_icr_cp")
48
+ self.printParamSummary("IBM Open Registry", "mas_icr_cpopen")
49
+
50
+ print()
51
+ if self.localConfigDir is not None:
52
+ self.printSummary("Additional Config", self.localConfigDir)
53
+ else:
54
+ self.printSummary("Additional Config", "Not Configured")
55
+
56
+ def aibrokerSummary(self) -> None:
57
+ if self.installAiBroker:
58
+ self.printSummary("AI Broker", self.params["mas_app_channel_aibroker"])
59
+ print_formatted_text(HTML(" <SkyBlue>+ Maximo AI Broker Settings</SkyBlue>"))
60
+ self.printParamSummary(" + Aibroker Instance Id", "aibroker_instance_id")
61
+ self.printParamSummary(" + Storage provider", "mas_aibroker_storage_provider")
62
+ if self.getParam("mas_aibroker_storage_provider") == "minio":
63
+ self.printParamSummary(" + minio root username", "minio_root_user")
64
+ if self.getParam("mas_app_channel_aibroker") != "9.0.x":
65
+ self.printParamSummary(" + Mariadb username", "mariadb_user")
66
+ self.printParamSummary(" + Mariadb password", "mariadb_password")
67
+ self.printParamSummary(" + Storage access key", "mas_aibroker_storage_accesskey")
68
+ self.printParamSummary(" + Storage host", "mas_aibroker_storage_host")
69
+ self.printParamSummary(" + Storage port", "mas_aibroker_storage_port")
70
+ self.printParamSummary(" + Storage ssl", "mas_aibroker_storage_ssl")
71
+ self.printParamSummary(" + Storage region", "mas_aibroker_storage_region")
72
+ self.printParamSummary(" + Storage pipelines bucket", "mas_aibroker_storage_pipelines_bucket")
73
+ self.printParamSummary(" + Storage tenants bucket", "mas_aibroker_storage_tenants_bucket")
74
+ self.printParamSummary(" + Storage templates bucket", "mas_aibroker_storage_templates_bucket")
75
+ self.printParamSummary(" + Watsonxai machine learning url", "mas_aibroker_watsonxai_url")
76
+ self.printParamSummary(" + Watsonxai project id", "mas_aibroker_watsonxai_project_id")
77
+ self.printParamSummary(" + Database host", "mas_aibroker_db_host")
78
+ self.printParamSummary(" + Database port", "mas_aibroker_db_port")
79
+ self.printParamSummary(" + Database user", "mas_aibroker_db_user")
80
+ self.printParamSummary(" + Database name", "mas_aibroker_db_database")
81
+ if self.getParam("mas_app_channel_aibroker") != "9.0.x":
82
+ self.printParamSummary(" + Tenant entitlement type", "tenant_entitlement_type")
83
+ self.printParamSummary(" + Tenant start date", "tenant_entitlement_start_date")
84
+ self.printParamSummary(" + Tenant end date", "tenant_entitlement_end_date")
85
+ self.printParamSummary(" + Tenant end date", "tenant_entitlement_end_date")
86
+ self.printParamSummary(" + S3 bucket prefix", "mas_aibroker_s3_bucket_prefix")
87
+ self.printParamSummary(" + S3 endpoint url", "mas_aibroker_s3_endpoint_url")
88
+ self.printParamSummary(" + S3 bucket prefix (tenant level)", "mas_aibroker_tenant_s3_bucket_prefix")
89
+ self.printParamSummary(" + S3 region (tenant level)", "mas_aibroker_tenant_s3_region")
90
+ self.printParamSummary(" + S3 endpoint url (tenant level)", "mas_aibroker_tenant_s3_endpoint_url")
91
+ self.printParamSummary(" + RSL url", "rsl_url")
92
+ self.printParamSummary(" + ORG Id of RSL", "rsl_org_id")
93
+ self.printParamSummary(" + Token for RSL", "rsl_token")
94
+ self.printParamSummary(" + Install minio", "install_minio_aiservice")
95
+ self.printParamSummary(" + Install SLS", "install_sls_aiservice")
96
+ if self.getParam("install_sls_aiservice") != "true":
97
+ self.printParamSummary(" + SLS secret name", "mas_aibroker_sls_secret_name")
98
+ self.printParamSummary(" + SLS registration key", "mas_aibroker_sls_registration_key")
99
+ self.printParamSummary(" + SLS URL", "mas_aibroker_sls_url")
100
+ self.printParamSummary(" + Install DRO", "install_dro_aiservice")
101
+ if self.getParam("install_dro_aiservice") != "true":
102
+ self.printParamSummary(" + DRO secret name", "mas_aibroker_dro_secret_name")
103
+ self.printParamSummary(" + DRO API key", "mas_aibroker_dro_api_key")
104
+ self.printParamSummary(" + DRO URL", "mas_aibroker_dro_url")
105
+ self.printParamSummary(" + Install DB2", "install_db2_aiservice")
106
+ if self.getParam("install_db2_aiservice") != "true":
107
+ self.printParamSummary(" + DB2 username", "mas_aibroker_db2_username")
108
+ self.printParamSummary(" + DB2 JDBC URL", "mas_aibroker_db2_jdbc_url")
109
+ self.printParamSummary(" + DB2 SSL enabled", "mas_aibroker_db2_ssl_enabled")
110
+ self.printParamSummary(" + Environment type", "environment_type")
111
+
112
+ else:
113
+ self.printSummary("AI Broker", "Do Not Install")
114
+
115
+ def db2Summary(self) -> None:
116
+ if self.getParam("db2_action_system") == "install" or self.getParam("db2_action_manage") == "install":
117
+ self.printH2("IBM Db2 Univeral Operator Configuration")
118
+ self.printSummary("System Instance", "Install" if self.getParam("db2_action_system") == "install" else "Do Not Install")
119
+ self.printSummary("Dedicated Manage Instance", "Install" if self.getParam("db2_action_manage") == "install" else "Do Not Install")
120
+ self.printParamSummary(" - Type", "db2_type")
121
+ self.printParamSummary(" - Timezone", "db2_timezone")
122
+ print()
123
+ self.printParamSummary("Install Namespace", "db2_namespace")
124
+ self.printParamSummary("Subscription Channel", "db2_channel")
125
+ print()
126
+ self.printParamSummary("CPU Request", "db2_cpu_requests")
127
+ self.printParamSummary("CPU Limit", "db2_cpu_limits")
128
+ self.printParamSummary("Memory Request", "db2_memory_requests")
129
+ self.printParamSummary("Memory Limit ", "db2_memory_limits")
130
+ print()
131
+ self.printParamSummary("Meta Storage", "db2_meta_storage_size")
132
+ self.printParamSummary("Data Storage", "db2_data_storage_size")
133
+ self.printParamSummary("Backup Storage", "db2_backup_storage_size")
134
+ self.printParamSummary("Temp Storage", "db2_temp_storage_size")
135
+ self.printParamSummary("Transaction Logs Storage", "db2_logs_storage_size")
136
+ print()
137
+ if self.getParam('db2_affinity_key') != "":
138
+ self.printSummary("Node Affinity", f"{self.getParam('db2_affinity_key')}={self.getParam('db2_affinity_value')}")
139
+ else:
140
+ self.printSummary("Node Affinity", "None")
141
+
142
+ if self.getParam('db2_tolerate_key') != "":
143
+ self.printSummary("Node Tolerations", f"{self.getParam('db2_tolerate_key')}={self.getParam('db2_tolerate_value')} @ {self.getParam('db2_tolerate_effect')}")
144
+ else:
145
+ self.printSummary("Node Tolerations", "None")
146
+
147
+ def droSummary(self) -> None:
148
+ self.printH2("IBM Data Reporter Operator (DRO) Configuration")
149
+ self.printParamSummary("Contact e-mail", "uds_contact_email")
150
+ self.printParamSummary("First name", "uds_contact_firstname")
151
+ self.printParamSummary("Last name", "uds_contact_lastname")
152
+ self.printParamSummary("Install Namespace", "dro_namespace")
153
+
154
+ def slsSummary(self) -> None:
155
+ self.printH2("IBM Suite License Service")
156
+ self.printParamSummary("Namespace", "sls_namespace")
157
+ if self.getParam("sls_action") == "install":
158
+ self.printSummary("Subscription Channel", "3.x")
159
+ self.printParamSummary("IBM Open Registry", "sls_icr_cpopen")
160
+ if self.slsLicenseFileLocal:
161
+ self.printSummary("License File", self.slsLicenseFileLocal)
162
+
163
+ def mongoSummary(self) -> None:
164
+ self.printH2("MongoDb")
165
+ if self.getParam("mongodb_action") == "install":
166
+ self.printSummary("Type", "MongoCE Operator")
167
+ self.printParamSummary("Install Namespace", "mongodb_namespace")
168
+ elif self.getParam("mongodb_action") == "byo":
169
+ self.printSummary("Type", "BYO (mongodb-system.yaml)")
170
+ else:
171
+ self.fatalError(f"Unexpected value for mongodb_action parameter: {self.getParam('mongodb_action')}")
172
+
173
+ def displayInstallSummary(self) -> None:
174
+ self.printH1("Review Settings")
175
+ self.printDescription([
176
+ "Connected to:",
177
+ f" - <u>{getConsoleURL(self.dynamicClient)}</u>"
178
+ ])
179
+
180
+ logger.debug("PipelineRun parameters:")
181
+ logger.debug(yaml.dump(self.params, default_flow_style=False))
182
+
183
+ # Cluster Config & Dependencies
184
+ self.ocpSummary()
185
+ self.droSummary()
186
+ self.slsSummary()
187
+ self.masSummary()
188
+ self.printH2("IBM Maximo Application Suite Application - Aiservice")
189
+ self.aibrokerSummary()
190
+
191
+ # Application Dependencies
192
+ self.mongoSummary()
193
+ self.db2Summary()
mas/cli/cli.py CHANGED
@@ -117,7 +117,7 @@ class BaseApp(PrintMixin, PromptMixin):
117
117
  logging.getLogger('asyncio').setLevel(logging.INFO)
118
118
 
119
119
  # Supports extended semver, unlike mas.cli.__version__
120
- self.version = "13.25.1"
120
+ self.version = "13.27.0"
121
121
  self.h1count = 0
122
122
  self.h2count = 0
123
123
 
@@ -146,7 +146,16 @@ class BaseApp(PrintMixin, PromptMixin):
146
146
 
147
147
  self.compatibilityMatrix = {
148
148
  "9.1.x": {
149
- "facilities": ["9.1.x"]
149
+ "facilities": ["9.1.x"],
150
+ "assist": ["9.1.x", "9.0.x"],
151
+ "iot": ["9.1.x", "9.0.x"],
152
+ "manage": ["9.1.x", "9.0.x"],
153
+ "monitor": ["9.1.x", "9.0.x"],
154
+ "optimizer": ["9.1.x", "9.0.x"],
155
+ "predict": ["9.1.x", "9.0.x"],
156
+ "visualinspection": ["9.1.x", "9.0.x"],
157
+ "aibroker": ["9.1.x", "9.0.x"],
158
+
150
159
  },
151
160
  "9.1.x-feature": {
152
161
  "assist": ["9.0.x"],
@@ -195,10 +204,14 @@ class BaseApp(PrintMixin, PromptMixin):
195
204
  "8.11.x": " - <u>https://ibm.biz/MAS811-License</u>\n - <u>https://ibm.biz/MAXIT81-License</u>",
196
205
  "9.0.x": " - <u>https://ibm.biz/MAS90-License</u>\n - <u>https://ibm.biz/MaximoIT90-License</u>\n - <u>https://ibm.biz/MAXArcGIS90-License</u>",
197
206
  "9.1.x-feature": " - <u>https://ibm.biz/MAS90-License</u>\n - <u>https://ibm.biz/MaximoIT90-License</u>\n - <u>https://ibm.biz/MAXArcGIS90-License</u>\n\nBe aware, this channel subscription is supported for non-production use only. \nIt allows early access to new features for evaluation in non-production environments. \nThis subscription is offered alongside and in parallel with our normal maintained streams. \nWhen using this subscription, IBM Support will only accept cases for the latest available bundle deployed in a non-production environment. \nSeverity must be either 3 or 4 and cases cannot be escalated. \nPlease refer to IBM documentation for more details.\n",
207
+ "9.1.x": " - <u>https://ibm.biz/MAS91-License</u>\n - <u>https://ibm.biz/MAXIT91-License</u>\n - <u>https://ibm.biz/MAXESRI91-License</u>",
208
+ "aibroker-9.1.x": " - <u>https://ibm.biz/MAS91-License</u>",
198
209
  }
199
210
 
200
211
  self.upgrade_path = {
201
- "9.0.x": "9.1.x-feature",
212
+ "9.1.x": "9.1.x",
213
+ "9.1.x-feature": "9.1.x",
214
+ "9.0.x": "9.1.x",
202
215
  "8.11.x": "9.0.x",
203
216
  "8.10.x": "8.11.x",
204
217
  "8.9.x": "8.10.x",
mas/cli/gencfg.py CHANGED
@@ -11,6 +11,7 @@
11
11
  from os import path
12
12
  from jinja2 import Template
13
13
  from base64 import b64encode
14
+ from json import loads
14
15
 
15
16
 
16
17
  class ConfigGeneratorMixin():
@@ -88,3 +89,25 @@ class ConfigGeneratorMixin():
88
89
  with open(destination, 'w') as f:
89
90
  f.write(cfg)
90
91
  f.write('\n')
92
+
93
+ def generateFacilitiesCfg(self, destination: str) -> None:
94
+ templateFile = path.join(self.templatesDir, "facilities-configs.yml.j2")
95
+
96
+ with open(templateFile) as tFile:
97
+ template = Template(tFile.read())
98
+
99
+ dwfagents = self.getParam("mas_ws_facilities_dwfagents")
100
+ maxconnpoolsize = self.getParam("mas_ws_facilities_db_maxconnpoolsize")
101
+ userfiles_size = self.getParam("mas_ws_facilities_storage_userfiles_size")
102
+ log_size = self.getParam("mas_ws_facilities_storage_log_size")
103
+ cfg = template.render(
104
+ mas_instance_id=self.getParam("mas_instance_id"),
105
+ mas_ws_facilities_storage_log_size=log_size if log_size != "" else 30,
106
+ mas_ws_facilities_storage_userfiles_size=userfiles_size if userfiles_size != "" else 50,
107
+ mas_ws_facilities_db_maxconnpoolsize=maxconnpoolsize if maxconnpoolsize != "" else 200,
108
+ mas_ws_facilities_dwfagents=loads(dwfagents) if dwfagents != '' else ''
109
+ )
110
+
111
+ with open(destination, 'w') as f:
112
+ f.write(cfg)
113
+ f.write('\n')
mas/cli/install/app.py CHANGED
@@ -40,6 +40,7 @@ from mas.cli.validators import (
40
40
  WorkspaceNameFormatValidator,
41
41
  TimeoutFormatValidator,
42
42
  StorageClassValidator,
43
+ JsonValidator,
43
44
  OptimizerInstallPlanValidator
44
45
  )
45
46
 
@@ -375,7 +376,7 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
375
376
  self.printDescription([
376
377
  f"Unknown catalog {self.getParam('mas_catalog_version')}, please manually select the version of Cloud Pak for Data to use"
377
378
  ])
378
- self.promptForString("Cloud Pak for Data product version", "cpd_product_version", default="4.8.0")
379
+ self.promptForString("Cloud Pak for Data product version", "cpd_product_version", default="5.1.3")
379
380
  logger.debug(f"Using user-provided (prompt) CP4D product version: {self.getParam('cpd_product_version')}")
380
381
  else:
381
382
  logger.debug(f"Using user-provided (flags) CP4D product version: {self.getParam('cpd_product_version')}")
@@ -665,10 +666,6 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
665
666
  if self.installInspection:
666
667
  self.configAppChannel("visualinspection")
667
668
 
668
- self.installAiBroker = self.yesOrNo("Install AI Broker")
669
- if self.installAiBroker:
670
- self.configAppChannel("aibroker")
671
-
672
669
  if isVersionEqualOrAfter('9.1.0', self.getParam("mas_channel")) and self.getParam("mas_channel") != '9.1.x-feature':
673
670
  self.installFacilities = self.yesOrNo("Install Real Estate and Facilities")
674
671
  if self.installFacilities:
@@ -770,7 +767,6 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
770
767
  self.promptForString("IBM Cloud Resource Group", "cos_resourcegroup")
771
768
 
772
769
  @logMethodCall
773
- # TODO: Fix type for storage sizes and max conn pool size
774
770
  def facilitiesSettings(self) -> None:
775
771
  if self.installFacilities:
776
772
  self.printH1("Configure Maximo Real Estate and Facilities")
@@ -786,13 +782,17 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
786
782
  self.promptForListSelect("Select the size:", ["small", "medium", "large"], "mas_ws_facilities_size")
787
783
 
788
784
  if self.showAdvancedOptions:
785
+ self.printH2("Maximo Real Estate and Facilities Settings - Advanced")
786
+ self.printDescription([
787
+ "Advanced configurations for Real Estate and Facilities are added through an additional file called facilities-configs.yaml"
788
+ ])
789
789
  if self.yesOrNo("Supply extra XML tags for Real Estate and Facilities server.xml"):
790
790
  self.promptForString("Real Estate and Facilities Liberty Extension Secret Name", "mas_ws_facilities_liberty_extension_XML")
791
791
  if self.yesOrNo("Supply custom AES Encryption Password"):
792
792
  self.promptForString("Real Estate and Facilities AES Vault Secret Name", "mas_ws_facilities_vault_secret")
793
793
 
794
794
  self.promptForString("Set Real Estate and Facilities Routes Timeout:", "mas_ws_facilities_routes_timeout", default="600s")
795
- # self.promptForInt("Set Facilities maximum connection poll size:", default=200)
795
+ self.promptForInt("Set Facilities maximum connection poll size:", "mas_ws_facilities_db_maxconnpoolsize", default=200)
796
796
 
797
797
  self.printDescription(["Real Estate and Facilities Persistent Volume Storage Configuration"])
798
798
  defaultStorageClasses = getDefaultStorageClasses(self.dynamicClient)
@@ -810,10 +810,10 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
810
810
  ])
811
811
  storageMode = self.promptForListSelect("Select the storage mode for user files PVC:", ["ReadWriteMany", "ReadWriteOnce"], "mas_ws_facilities_storage_userfiles_mode", default=1)
812
812
  _ = self.setParam("mas_ws_facilities_storage_userfiles_class", defaultStorageClasses.rwx) if storageMode == "ReadWriteMany" else self.setParam("mas_ws_facilities_storage_userfiles_class", defaultStorageClasses.rwo)
813
- # self.promptForInt("User file PVC size (Gb):", "mas_ws_facilities_storage_userfiles_size", default=50)
813
+ self.promptForInt("User file PVC size (Gb):", "mas_ws_facilities_storage_userfiles_size", default=50)
814
814
  storageMode = self.promptForListSelect("Select the storage mode for log PVC:", ["ReadWriteMany", "ReadWriteOnce"], "mas_ws_facilities_storage_log_mode", default=1)
815
815
  _ = self.setParam("mas_ws_facilities_storage_log_class", defaultStorageClasses.rwx) if storageMode == "ReadWriteMany" else self.setParam("mas_ws_facilities_storage_log_class", defaultStorageClasses.rwo)
816
- # self.promptForInt("Log PVC size (Gb):", "mas_ws_facilities_storage_log_size", default=30)
816
+ self.promptForInt("Log PVC size (Gb):", "mas_ws_facilities_storage_log_size", default=30)
817
817
  else:
818
818
  notUseAutodetectedStorageClasses = True
819
819
  if defaultStorageClasses.provider is None or notUseAutodetectedStorageClasses:
@@ -828,11 +828,18 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
828
828
  ])
829
829
  self.promptForListSelect("Select the storage mode for user files PVC:", ["ReadWriteMany", "ReadWriteOnce"], "mas_ws_facilities_storage_userfiles_mode", default=1)
830
830
  self.promptForListSelect("Select the storage mode for log PVC:", ["ReadWriteMany", "ReadWriteOnce"], "mas_ws_facilities_storage_log_mode", default=1)
831
- # self.promptForInt("User file PVC size (Gb):", "mas_ws_facilities_storage_userfiles_size", default=50)
832
- # self.promptForInt("Log PVC size (Gb):", "mas_ws_facilities_storage_log_size", default=30)
831
+ self.promptForInt("User file PVC size (Gb):", "mas_ws_facilities_storage_userfiles_size", default=50)
832
+ self.promptForInt("Log PVC size (Gb):", "mas_ws_facilities_storage_log_size", default=30)
833
833
 
834
834
  if self.yesOrNo("Supply configuration for dedicated workflow agents"):
835
- self.promptForString("Dedicated Workflow Agent JSON:")
835
+ print_formatted_text(HTML("<LightSlateGrey> Example: '[{\"name\":\"dwfa1\",\"members\":[{\"name\": \"u1\", \"class\": \"user\"}]}, {\"name\":\"dwfa2\",\"members\":[{\"name\": \"u2\", \"class\": \"user\"},{\"name\":\"g1\", \"class\":\"group\"}]}]' </LightSlateGrey>"))
836
+ self.promptForString("Dedicated Workflow Agent JSON:", "mas_ws_facilities_dwfagents", validator=JsonValidator())
837
+
838
+ # If advanced options is selected, we need to create a file to add props not supported by Tekton
839
+ self.selectLocalConfigDir()
840
+ facilitiesConfigsPath = path.join(self.localConfigDir, "facilities-configs.yaml")
841
+ self.generateFacilitiesCfg(destination=facilitiesConfigsPath)
842
+ self.setParam("mas_ws_facilities_config_file", "/workspace/configs/facilities-configs.yaml")
836
843
 
837
844
  @logMethodCall
838
845
  def chooseInstallFlavour(self) -> None:
@@ -897,7 +904,6 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
897
904
  self.optimizerSettings()
898
905
  self.predictSettings()
899
906
  self.assistSettings()
900
- self.aibrokerSettings()
901
907
  self.facilitiesSettings()
902
908
 
903
909
  # Dependencies
@@ -928,7 +934,6 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
928
934
  self.installPredict = False
929
935
  self.installInspection = False
930
936
  self.installOptimizer = False
931
- self.installAiBroker = False
932
937
  self.installFacilities = False
933
938
  self.deployCP4D = False
934
939
  self.db2SetAffinity = False
@@ -1027,10 +1032,6 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
1027
1032
  if value is not None and value != "":
1028
1033
  self.setParam("mas_app_channel_visualinspection", value)
1029
1034
  self.installInspection = True
1030
- elif key == "aibroker_channel":
1031
- if value is not None and value != "":
1032
- self.setParam("mas_app_channel_aibroker", value)
1033
- self.installAiBroker = True
1034
1035
  elif key == "optimizer_channel":
1035
1036
  if value is not None and value != "":
1036
1037
  self.setParam("mas_app_channel_optimizer", value)
@@ -1119,6 +1120,14 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
1119
1120
  # Configure Storage and Access mode
1120
1121
  self.manageStorageAndAccessMode()
1121
1122
 
1123
+ if self.installFacilities:
1124
+ # Verifiy if any of the props that needs to be in a file are given
1125
+ if self.getParam("mas_ws_facilities_storage_log_size") != "" or self.getParam("mas_ws_facilities_storage_userfiles_size") != "" or self.getParam("mas_ws_facilities_db_maxconnpoolsize") or self.getParam("mas_ws_facilities_dwfagents"):
1126
+ self.selectLocalConfigDir()
1127
+ facilitiesConfigsPath = path.join(self.localConfigDir, "facilities-configs.yaml")
1128
+ self.generateFacilitiesCfg(destination=facilitiesConfigsPath)
1129
+ self.setParam("mas_ws_facilities_config_map_name", "facilities-config")
1130
+
1122
1131
  # Load the catalog information
1123
1132
  self.chosenCatalog = getCatalog(self.getParam("mas_catalog_version"))
1124
1133
 
@@ -1209,6 +1218,13 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
1209
1218
  self.slsLicenseFile()
1210
1219
  self.manualCertificates()
1211
1220
 
1221
+ if not self.noConfirm and not self.waitForPVC:
1222
+ self.printDescription(["If you are using storage classes that utilize 'WaitForFirstConsumer' binding mode choose 'No' at the prompt below"])
1223
+ self.waitForPVC = self.yesOrNo("Wait for PVCs to bind")
1224
+
1225
+ if not self.waitForPVC:
1226
+ self.setParam("no_wait_for_pvc", True)
1227
+
1212
1228
  # Show a summary of the installation configuration
1213
1229
  self.printH1("Non-Interactive Install Command")
1214
1230
  self.printDescription([
@@ -1236,12 +1252,6 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
1236
1252
  self.printH1("Launch Install")
1237
1253
  pipelinesNamespace = f"mas-{self.getParam('mas_instance_id')}-pipelines"
1238
1254
 
1239
- if not self.noConfirm:
1240
- self.printDescription(["If you are using storage classes that utilize 'WaitForFirstConsumer' binding mode choose 'No' at the prompt below"])
1241
- wait = self.yesOrNo("Wait for PVCs to bind")
1242
- else:
1243
- wait = False
1244
-
1245
1255
  with Halo(text='Validating OpenShift Pipelines installation', spinner=self.spinner) as h:
1246
1256
  installOpenShiftPipelines(self.dynamicClient)
1247
1257
  h.stop_and_persist(symbol=self.successIcon, text="OpenShift Pipelines Operator is installed and ready to use")
@@ -1253,7 +1263,7 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
1253
1263
  instanceId=self.getParam("mas_instance_id"),
1254
1264
  storageClass=self.pipelineStorageClass,
1255
1265
  accessMode=self.pipelineStorageAccessMode,
1256
- waitForBind=wait,
1266
+ waitForBind=self.waitForPVC,
1257
1267
  configureRBAC=(self.getParam("service_account_name") == "")
1258
1268
  )
1259
1269
  prepareInstallSecrets(
@@ -256,39 +256,39 @@ class installArgBuilderMixin():
256
256
  if self.getParam('mas_ws_facilities_vault_secret') != "":
257
257
  command += f" --facilities-vault-secret \"{self.getParam('mas_ws_facilities_vault_secret')}\"{newline}"
258
258
 
259
- # if self.getParam('mas_ws_facilities_dwfagents') != "":
260
- # command += f" --facilities-dwfagent \"{self.getParam('mas_ws_facilities_dwfagents')}\"{newline}"
259
+ if self.getParam('mas_ws_facilities_dwfagents') != "":
260
+ command += f" --facilities-dwfagent \'{self.getParam('mas_ws_facilities_dwfagents')}\'{newline}"
261
261
 
262
- # if self.getParam('mas_ws_facilities_db_maxconnpoolsize') != "":
263
- # command += f" --facilities-maxconnpoolsize \"{self.getParam('mas_ws_facilities_db_maxconnpoolsize')}\"{newline}"
262
+ if self.getParam('mas_ws_facilities_db_maxconnpoolsize') != "":
263
+ command += f" --facilities-maxconnpoolsize \"{self.getParam('mas_ws_facilities_db_maxconnpoolsize')}\"{newline}"
264
264
 
265
265
  if self.getParam('mas_ws_facilities_storage_log_class') != "":
266
266
  command += f" --facilities-log-storage-class \"{self.getParam('mas_ws_facilities_storage_log_class')}\"{newline}"
267
267
  if self.getParam('mas_ws_facilities_storage_log_mode') != "":
268
268
  command += f" --facilities-log-storage-mode \"{self.getParam('mas_ws_facilities_storage_log_mode')}\"{newline}"
269
- # if self.getParam('mas_ws_facilities_storage_log_size') != "":
270
- # command += f" --facilities-log-storage-size \"{self.getParam('mas_ws_facilities_storage_log_size')}\"{newline}"
269
+ if self.getParam('mas_ws_facilities_storage_log_size') != "":
270
+ command += f" --facilities-log-storage-size \"{self.getParam('mas_ws_facilities_storage_log_size')}\"{newline}"
271
271
 
272
272
  if self.getParam('mas_ws_facilities_storage_userfiles_class') != "":
273
273
  command += f" --facilities-userfiles-storage-class \"{self.getParam('mas_ws_facilities_storage_userfiles_class')}\"{newline}"
274
274
  if self.getParam('mas_ws_facilities_storage_userfiles_mode') != "":
275
275
  command += f" --facilities-userfiles-storage-mode \"{self.getParam('mas_ws_facilities_storage_userfiles_mode')}\"{newline}"
276
- # if self.getParam('mas_ws_facilities_storage_userfiles_size') != "":
277
- # command += f" --facilities-userfiles-storage-size \"{self.getParam('mas_ws_facilities_storage_userfiles_size')}\"{newline}"
276
+ if self.getParam('mas_ws_facilities_storage_userfiles_size') != "":
277
+ command += f" --facilities-userfiles-storage-size \"{self.getParam('mas_ws_facilities_storage_userfiles_size')}\"{newline}"
278
278
 
279
279
  # IBM Cloud Pak for Data
280
280
  # -----------------------------------------------------------------------------
281
281
  if self.getParam('cpd_product_version') != "":
282
282
  command += f" --cp4d-version \"{self.getParam('cpd_product_version')}\""
283
- if self.getParam('cpd_install_spss') == "install":
283
+ if self.getParam('cpd_install_spss') == "true":
284
284
  command += " --cp4d-install-spss"
285
- if self.getParam('cpd_install_cognos') == "install":
285
+ if self.getParam('cpd_install_cognos') == "true":
286
286
  command += " --cp4d-install-cognos"
287
- if self.getParam('cpd_install_ws') == "install":
287
+ if self.getParam('cpd_install_ws') == "true":
288
288
  command += " --cp4d-install-ws"
289
- if self.getParam('cpd_install_wml') == "install":
289
+ if self.getParam('cpd_install_wml') == "true":
290
290
  command += " --cp4d-install-wml"
291
- if self.getParam('cpd_install_ae') == "install":
291
+ if self.getParam('cpd_install_ae') == "true":
292
292
  command += " --cp4d-install-ae"
293
293
  command += newline
294
294