mas-cli 12.1.0__py3-none-any.whl → 12.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.
- mas/cli/__init__.py +1 -1
- mas/cli/aiservice/install/__init__.py +11 -0
- mas/cli/aiservice/install/app.py +810 -0
- mas/cli/aiservice/install/argBuilder.py +232 -0
- mas/cli/aiservice/install/argParser.py +742 -0
- mas/cli/aiservice/install/params.py +120 -0
- mas/cli/aiservice/install/summarizer.py +193 -0
- mas/cli/cli.py +36 -9
- mas/cli/gencfg.py +23 -0
- mas/cli/install/app.py +295 -85
- mas/cli/install/argBuilder.py +92 -14
- mas/cli/install/argParser.py +200 -147
- mas/cli/install/catalogs.py +11 -6
- mas/cli/install/params.py +32 -6
- mas/cli/install/settings/additionalConfigs.py +18 -1
- mas/cli/install/settings/db2Settings.py +121 -72
- mas/cli/install/settings/kafkaSettings.py +2 -2
- mas/cli/install/settings/manageSettings.py +154 -159
- mas/cli/install/settings/mongodbSettings.py +1 -1
- mas/cli/install/settings/turbonomicSettings.py +1 -3
- mas/cli/install/summarizer.py +85 -68
- mas/cli/templates/facilities-configs.yml.j2 +25 -0
- mas/cli/templates/ibm-mas-tekton.yaml +13428 -4725
- mas/cli/update/app.py +42 -8
- mas/cli/upgrade/app.py +52 -15
- mas/cli/upgrade/argParser.py +7 -0
- mas/cli/upgrade/settings/__init__.py +19 -0
- mas/cli/validators.py +13 -0
- {mas_cli-12.1.0.data → mas_cli-12.27.0.data}/scripts/mas-cli +5 -1
- {mas_cli-12.1.0.dist-info → mas_cli-12.27.0.dist-info}/METADATA +12 -3
- {mas_cli-12.1.0.dist-info → mas_cli-12.27.0.dist-info}/RECORD +33 -25
- {mas_cli-12.1.0.dist-info → mas_cli-12.27.0.dist-info}/WHEEL +1 -1
- {mas_cli-12.1.0.dist-info → mas_cli-12.27.0.dist-info}/top_level.txt +0 -0
|
@@ -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 = "12.
|
|
120
|
+
self.version = "12.27.0"
|
|
121
121
|
self.h1count = 0
|
|
122
122
|
self.h2count = 0
|
|
123
123
|
|
|
@@ -132,17 +132,31 @@ class BaseApp(PrintMixin, PromptMixin):
|
|
|
132
132
|
# Initialize the dictionary that will hold the parameters we pass to a PipelineRun
|
|
133
133
|
self.params = dict()
|
|
134
134
|
|
|
135
|
-
# These dicts will hold the additional-configs, pod-templates and manual certificates secrets
|
|
135
|
+
# These dicts will hold the additional-configs, pod-templates, sls license file and manual certificates secrets
|
|
136
136
|
self.additionalConfigsSecret = None
|
|
137
137
|
self.podTemplatesSecret = None
|
|
138
|
+
self.slsLicenseFileSecret = None
|
|
138
139
|
self.certsSecret = None
|
|
139
140
|
|
|
140
141
|
self._isSNO = None
|
|
142
|
+
self._isAirgap = None
|
|
141
143
|
|
|
142
144
|
# Until we connect to the cluster we don't know what architecture it's worker nodes are
|
|
143
145
|
self.architecture = None
|
|
144
146
|
|
|
145
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
|
+
},
|
|
146
160
|
"9.1.x-feature": {
|
|
147
161
|
"assist": ["9.0.x"],
|
|
148
162
|
"iot": ["9.0.x"],
|
|
@@ -190,10 +204,14 @@ class BaseApp(PrintMixin, PromptMixin):
|
|
|
190
204
|
"8.11.x": " - <u>https://ibm.biz/MAS811-License</u>\n - <u>https://ibm.biz/MAXIT81-License</u>",
|
|
191
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>",
|
|
192
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>",
|
|
193
209
|
}
|
|
194
210
|
|
|
195
211
|
self.upgrade_path = {
|
|
196
|
-
"9.
|
|
212
|
+
"9.1.x": "9.1.x",
|
|
213
|
+
"9.1.x-feature": "9.1.x",
|
|
214
|
+
"9.0.x": "9.1.x",
|
|
197
215
|
"8.11.x": "9.0.x",
|
|
198
216
|
"8.10.x": "8.11.x",
|
|
199
217
|
"8.9.x": "8.10.x",
|
|
@@ -280,6 +298,16 @@ class BaseApp(PrintMixin, PromptMixin):
|
|
|
280
298
|
self._isSNO = isSNO(self.dynamicClient)
|
|
281
299
|
return self._isSNO
|
|
282
300
|
|
|
301
|
+
@logMethodCall
|
|
302
|
+
def isAirgap(self):
|
|
303
|
+
if self._isAirgap is None:
|
|
304
|
+
# First check if the legacy ICSP is installed. If it is raise an error and instruct the user to re-run configure-airgap to
|
|
305
|
+
# migrate the cluster from ICSP to IDMS
|
|
306
|
+
if isAirgapInstall(self.dynamicClient, checkICSP=True):
|
|
307
|
+
self.fatalError("Deprecated Maximo Application Suite ImageContentSourcePolicy detected on the target cluster. Run 'mas configure-airgap' to migrate to the replacement ImageDigestMirrorSet beofre proceeding.")
|
|
308
|
+
self._isAirgap = isAirgapInstall(self.dynamicClient)
|
|
309
|
+
return self._isAirgap
|
|
310
|
+
|
|
283
311
|
def setParam(self, param: str, value: str):
|
|
284
312
|
self.params[param] = value
|
|
285
313
|
|
|
@@ -368,11 +396,11 @@ class BaseApp(PrintMixin, PromptMixin):
|
|
|
368
396
|
self.architecture = nodes[0]["status"]["nodeInfo"]["architecture"]
|
|
369
397
|
logger.debug(f"Target architecture: {self.architecture}")
|
|
370
398
|
|
|
371
|
-
if self.architecture not in ["amd64", "s390x"]:
|
|
399
|
+
if self.architecture not in ["amd64", "s390x", "ppc64le"]:
|
|
372
400
|
self.fatalError(f"Unsupported worker node architecture: {self.architecture}")
|
|
373
401
|
|
|
374
402
|
@logMethodCall
|
|
375
|
-
def initializeApprovalConfigMap(self, namespace: str, id: str,
|
|
403
|
+
def initializeApprovalConfigMap(self, namespace: str, id: str, enabled: bool, maxRetries: int = 100, delay: int = 300, ignoreFailure: bool = True) -> None:
|
|
376
404
|
"""
|
|
377
405
|
Set key = None if you don't want approval workflow enabled
|
|
378
406
|
"""
|
|
@@ -388,8 +416,7 @@ class BaseApp(PrintMixin, PromptMixin):
|
|
|
388
416
|
"MAX_RETRIES": str(maxRetries),
|
|
389
417
|
"DELAY": str(delay),
|
|
390
418
|
"IGNORE_FAILURE": str(ignoreFailure),
|
|
391
|
-
"
|
|
392
|
-
key: ""
|
|
419
|
+
"STATUS": ""
|
|
393
420
|
}
|
|
394
421
|
}
|
|
395
422
|
|
|
@@ -400,6 +427,6 @@ class BaseApp(PrintMixin, PromptMixin):
|
|
|
400
427
|
except NotFoundError:
|
|
401
428
|
pass
|
|
402
429
|
|
|
403
|
-
if
|
|
404
|
-
logger.debug(f"Enabling approval workflow for {id}
|
|
430
|
+
if enabled:
|
|
431
|
+
logger.debug(f"Enabling approval workflow for {id} with {maxRetries} max retries on a {delay}s delay ({'ignoring failures' if ignoreFailure else 'abort on failure'})")
|
|
405
432
|
cmAPI.create(body=configMap, namespace=namespace)
|
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')
|