mas-cli 13.16.0__py3-none-any.whl → 13.17.2__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.16.0"
120
+ self.version = "13.17.2"
121
121
  self.h1count = 0
122
122
  self.h2count = 0
123
123
 
@@ -145,6 +145,18 @@ class BaseApp(PrintMixin, PromptMixin):
145
145
  self.architecture = None
146
146
 
147
147
  self.compatibilityMatrix = {
148
+ "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
+
159
+ },
148
160
  "9.1.x-feature": {
149
161
  "assist": ["9.0.x"],
150
162
  "iot": ["9.0.x"],
@@ -192,10 +204,14 @@ class BaseApp(PrintMixin, PromptMixin):
192
204
  "8.11.x": " - <u>https://ibm.biz/MAS811-License</u>\n - <u>https://ibm.biz/MAXIT81-License</u>",
193
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>",
194
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>",
195
209
  }
196
210
 
197
211
  self.upgrade_path = {
198
- "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",
199
215
  "8.11.x": "9.0.x",
200
216
  "8.10.x": "8.11.x",
201
217
  "8.9.x": "8.10.x",
@@ -380,7 +396,7 @@ class BaseApp(PrintMixin, PromptMixin):
380
396
  self.architecture = nodes[0]["status"]["nodeInfo"]["architecture"]
381
397
  logger.debug(f"Target architecture: {self.architecture}")
382
398
 
383
- if self.architecture not in ["amd64", "s390x"]:
399
+ if self.architecture not in ["amd64", "s390x", "ppc64le"]:
384
400
  self.fatalError(f"Unsupported worker node architecture: {self.architecture}")
385
401
 
386
402
  @logMethodCall
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')