mas-cli 13.26.0__py3-none-any.whl → 13.27.1__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 +2 -1
- mas/cli/install/app.py +8 -17
- mas/cli/install/argBuilder.py +5 -5
- mas/cli/install/argParser.py +0 -142
- mas/cli/install/settings/manageSettings.py +0 -26
- mas/cli/install/summarizer.py +7 -27
- mas/cli/templates/ibm-mas-tekton.yaml +4230 -557
- mas/cli/update/app.py +2 -1
- {mas_cli-13.26.0.data → mas_cli-13.27.1.data}/scripts/mas-cli +4 -0
- {mas_cli-13.26.0.dist-info → mas_cli-13.27.1.dist-info}/METADATA +1 -1
- {mas_cli-13.26.0.dist-info → mas_cli-13.27.1.dist-info}/RECORD +20 -14
- {mas_cli-13.26.0.dist-info → mas_cli-13.27.1.dist-info}/WHEEL +0 -0
- {mas_cli-13.26.0.dist-info → mas_cli-13.27.1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,232 @@
|
|
|
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
|
+
|
|
13
|
+
logger = logging.getLogger(__name__)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class aiServiceInstallArgBuilderMixin():
|
|
17
|
+
def buildCommand(self) -> str:
|
|
18
|
+
# MAS Catalog Selection & Entitlement
|
|
19
|
+
# -----------------------------------------------------------------------------
|
|
20
|
+
newline = " \\\n"
|
|
21
|
+
command = "export IBM_ENTITLEMENT_KEY=x\n"
|
|
22
|
+
if self.getParam('ibmcloud_apikey') != "":
|
|
23
|
+
command += "export IBMCLOUD_APIKEY=x\n"
|
|
24
|
+
if self.getParam('aws_access_key_id') != "":
|
|
25
|
+
command += "export AWS_ACCESS_KEY_ID=x\n"
|
|
26
|
+
if self.getParam('secret_access_key') != "":
|
|
27
|
+
command += "export SECRET_ACCESS_KEY=x\n"
|
|
28
|
+
if self.getParam('artifactory_username') != "":
|
|
29
|
+
command += "export ARTIFACTORY_USERNAME=x\nexport ARTIFACTORY_TOKEN=x\n"
|
|
30
|
+
|
|
31
|
+
command += f"mas aiservice-install --mas-catalog-version {self.getParam('mas_catalog_version')}"
|
|
32
|
+
|
|
33
|
+
# MAS Advanced Configuration
|
|
34
|
+
# -----------------------------------------------------------------------------
|
|
35
|
+
|
|
36
|
+
if self.localConfigDir is not None:
|
|
37
|
+
command += f" --additional-configs \"{self.localConfigDir}\"{newline}"
|
|
38
|
+
|
|
39
|
+
# Storage
|
|
40
|
+
# -----------------------------------------------------------------------------
|
|
41
|
+
command += f" --storage-class-rwo \"{self.getParam('storage_class_rwo')}\""
|
|
42
|
+
command += f" --storage-class-rwx \"{self.getParam('storage_class_rwx')}\"{newline}"
|
|
43
|
+
command += f" --storage-pipeline \"{self.pipelineStorageClass}\""
|
|
44
|
+
command += f" --storage-accessmode \"{self.pipelineStorageAccessMode}\"{newline}"
|
|
45
|
+
|
|
46
|
+
# IBM Suite License Service
|
|
47
|
+
# -----------------------------------------------------------------------------
|
|
48
|
+
if self.getParam("sls_namespace") and self.getParam("sls_namespace") != "ibm-sls":
|
|
49
|
+
if self.getParam("aibroker_instance_id") and self.getParam("sls_namespace") == f"mas-{self.getParam('mas_instance_id')}-sls":
|
|
50
|
+
command += " --dedicated-sls"
|
|
51
|
+
else:
|
|
52
|
+
command += f" --sls-namespace \"{self.getParam('sls_namespace')}\""
|
|
53
|
+
if self.slsLicenseFileLocal:
|
|
54
|
+
command += f" --license-file \"{self.slsLicenseFileLocal}\""
|
|
55
|
+
if self.getParam("sls_namespace") and self.getParam("sls_namespace") != "ibm-sls" or self.slsLicenseFileLocal:
|
|
56
|
+
command += newline
|
|
57
|
+
|
|
58
|
+
# IBM Data Reporting Operator (DRO)
|
|
59
|
+
# -----------------------------------------------------------------------------
|
|
60
|
+
command += f" --uds-email \"{self.getParam('uds_contact_email')}\""
|
|
61
|
+
command += f" --uds-firstname \"{self.getParam('uds_contact_firstname')}\""
|
|
62
|
+
command += f" --uds-lastname \"{self.getParam('uds_contact_lastname')}\"{newline}"
|
|
63
|
+
if self.getParam('dro_namespace') != "":
|
|
64
|
+
command += f" --dro-namespace \"{self.getParam('dro_namespace')}\"{newline}"
|
|
65
|
+
|
|
66
|
+
# MongoDb Community Operator
|
|
67
|
+
# -----------------------------------------------------------------------------
|
|
68
|
+
if self.getParam('mongodb_namespace') != "":
|
|
69
|
+
command += f" --mongodb-namespace \"{self.getParam('mongodb_namespace')}\"{newline}"
|
|
70
|
+
|
|
71
|
+
# Aibroker Channel
|
|
72
|
+
# -----------------------------------------------------------------------------
|
|
73
|
+
if self.installAiBroker:
|
|
74
|
+
command += f" --aibroker-channel \"{self.getParam('mas_app_channel_aibroker')}\"{newline}"
|
|
75
|
+
|
|
76
|
+
# IBM Db2 Universal Operator
|
|
77
|
+
# -----------------------------------------------------------------------------
|
|
78
|
+
if self.getParam('db2_action_system') == "install" or self.getParam('db2_action_manage') == "install" or self.getParam('db2_action_facilities') == "install":
|
|
79
|
+
if self.getParam('db2_action_system') == "install":
|
|
80
|
+
command += f" --db2-system{newline}"
|
|
81
|
+
if self.getParam('db2_action_manage') == "install":
|
|
82
|
+
command += f" --db2-manage{newline}"
|
|
83
|
+
if self.getParam('db2_action_facilities') == "install":
|
|
84
|
+
command += f" --db2-facilities{newline}"
|
|
85
|
+
|
|
86
|
+
if self.getParam('db2_channel') != "":
|
|
87
|
+
command += f" --db2-channel \"{self.getParam('db2_channel')}\"{newline}"
|
|
88
|
+
if self.getParam('db2_namespace') != "":
|
|
89
|
+
command += f" --db2-namespace \"{self.getParam('db2_namespace')}\"{newline}"
|
|
90
|
+
|
|
91
|
+
if self.getParam('db2_type') != "":
|
|
92
|
+
command += f" --db2-type \"{self.getParam('db2_type')}\"{newline}"
|
|
93
|
+
if self.getParam('db2_timezone') != "":
|
|
94
|
+
command += f" --db2-timezone \"{self.getParam('db2_timezone')}\"{newline}"
|
|
95
|
+
|
|
96
|
+
if self.getParam('db2_affinity_key') != "":
|
|
97
|
+
command += f" --db2-affinity-key \"{self.getParam('db2_affinity_key')}\"{newline}"
|
|
98
|
+
if self.getParam('db2_affinity_value') != "":
|
|
99
|
+
command += f" --db2-affinity_value \"{self.getParam('db2_affinity_value')}\"{newline}"
|
|
100
|
+
|
|
101
|
+
if self.getParam('db2_tolerate_key') != "":
|
|
102
|
+
command += f" --db2-tolerate-key \"{self.getParam('db2_tolerate_key')}\"{newline}"
|
|
103
|
+
if self.getParam('db2_tolerate_value') != "":
|
|
104
|
+
command += f" --db2-tolerate-value \"{self.getParam('db2_tolerate_value')}\"{newline}"
|
|
105
|
+
if self.getParam('db2_tolerate_effect') != "":
|
|
106
|
+
command += f" --db2-tolerate-effect \"{self.getParam('db2_tolerate_effect')}\"{newline}"
|
|
107
|
+
|
|
108
|
+
if self.getParam('db2_cpu_requests') != "":
|
|
109
|
+
command += f" --db2-cpu-requests \"{self.getParam('db2_cpu_requests')}\"{newline}"
|
|
110
|
+
if self.getParam('db2_cpu_limits') != "":
|
|
111
|
+
command += f" --db2-cpu-limits \"{self.getParam('db2_cpu_limits')}\"{newline}"
|
|
112
|
+
|
|
113
|
+
if self.getParam('db2_memory_requests') != "":
|
|
114
|
+
command += f" --db2-memory-requests \"{self.getParam('db2_memory_requests')}\"{newline}"
|
|
115
|
+
if self.getParam('db2_memory_limits') != "":
|
|
116
|
+
command += f" --db2-memory-limits \"{self.getParam('db2_memory_limits')}\"{newline}"
|
|
117
|
+
|
|
118
|
+
if self.getParam('db2_backup_storage_size') != "":
|
|
119
|
+
command += f" --db2-backup-storage \"{self.getParam('db2_backup_storage_size')}\"{newline}"
|
|
120
|
+
if self.getParam('db2_data_storage_size') != "":
|
|
121
|
+
command += f" --db2-data-storage \"{self.getParam('db2_data_storage_size')}\"{newline}"
|
|
122
|
+
if self.getParam('db2_logs_storage_size') != "":
|
|
123
|
+
command += f" --db2-logs-storage \"{self.getParam('db2_logs_storage_size')}\"{newline}"
|
|
124
|
+
if self.getParam('db2_meta_storage_size') != "":
|
|
125
|
+
command += f" --db2-meta-storage \"{self.getParam('db2_meta_storage_size')}\"{newline}"
|
|
126
|
+
if self.getParam('db2_temp_storage_size') != "":
|
|
127
|
+
command += f" --db2-temp-storage \"{self.getParam('db2_temp_storage_size')}\"{newline}"
|
|
128
|
+
|
|
129
|
+
# Development Mode
|
|
130
|
+
# -----------------------------------------------------------------------------
|
|
131
|
+
if self.getParam('artifactory_username') != "":
|
|
132
|
+
command += f" --artifactory-username $ARTIFACTORY_USERNAME --artifactory-token $ARTIFACTORY_TOKEN{newline}"
|
|
133
|
+
|
|
134
|
+
# Approvals
|
|
135
|
+
# -----------------------------------------------------------------------------
|
|
136
|
+
if self.getParam('approval_aibroker') != "":
|
|
137
|
+
command += f" --approval-aibroker \"{self.getParam('approval_aibroker')}\"{newline}"
|
|
138
|
+
|
|
139
|
+
# More Options
|
|
140
|
+
# -----------------------------------------------------------------------------
|
|
141
|
+
if self.devMode:
|
|
142
|
+
command += f" --dev-mode{newline}"
|
|
143
|
+
if not self.waitForPVC:
|
|
144
|
+
command += f" --no-wait-for-pvc{newline}"
|
|
145
|
+
if self.getParam('skip_pre_check') is True:
|
|
146
|
+
command += f" --skip-pre-check{newline}"
|
|
147
|
+
if self.getParam('skip_grafana_install') is True:
|
|
148
|
+
command += f" --skip-grafana-install{newline}"
|
|
149
|
+
if self.getParam('image_pull_policy') != "":
|
|
150
|
+
command += f" --image-pull-policy {self.getParam('image_pull_policy')}{newline}"
|
|
151
|
+
if self.getParam('service_account_name') != "":
|
|
152
|
+
command += f" --service-account {self.getParam('service_account_name')}{newline}"
|
|
153
|
+
|
|
154
|
+
# Aibroker Advanced Settings
|
|
155
|
+
# -----------------------------------------------------------------------------
|
|
156
|
+
if self.getParam('mas_aibroker_storage_provider') != "":
|
|
157
|
+
command += f" --mas-aibroker-storage-provider \"{self.getParam('mas_aibroker_storage_provider')}\"{newline}"
|
|
158
|
+
if self.getParam('mas_aibroker_storage_accesskey') != "":
|
|
159
|
+
command += f" --mas-aibroker-storage-accesskey \"{self.getParam('mas_aibroker_storage_accesskey')}\"{newline}"
|
|
160
|
+
if self.getParam('mas_aibroker_storage_secretkey') != "":
|
|
161
|
+
command += f" --mas-aibroker-storage-secretkey \"{self.getParam('mas_aibroker_storage_secretkey')}\"{newline}"
|
|
162
|
+
if self.getParam('mas_aibroker_storage_host') != "":
|
|
163
|
+
command += f" --mas-aibroker-storage-host \"{self.getParam('mas_aibroker_storage_host')}\"{newline}"
|
|
164
|
+
if self.getParam('mas_aibroker_storage_port') != "":
|
|
165
|
+
command += f" --mas-aibroker-storage-port \"{self.getParam('mas_aibroker_storage_port')}\"{newline}"
|
|
166
|
+
if self.getParam('mas_aibroker_storage_ssl') != "":
|
|
167
|
+
command += f" --mas-aibroker-storage-ssl \"{self.getParam('mas_aibroker_storage_ssl')}\"{newline}"
|
|
168
|
+
if self.getParam('mas_aibroker_storage_region') != "":
|
|
169
|
+
command += f" --mas-aibroker-storage-region \"{self.getParam('mas_aibroker_storage_region')}\"{newline}"
|
|
170
|
+
if self.getParam('mas_aibroker_storage_pipelines_bucket') != "":
|
|
171
|
+
command += f" --mas-aibroker-storage-pipelines-bucket \"{self.getParam('mas_aibroker_storage_pipelines_bucket')}\"{newline}"
|
|
172
|
+
if self.getParam('mas_aibroker_storage_tenants_bucket') != "":
|
|
173
|
+
command += f" --mas-aibroker-storage-tenants-bucket \"{self.getParam('mas_aibroker_storage_tenants_bucket')}\"{newline}"
|
|
174
|
+
if self.getParam('mas_aibroker_storage_templates_bucket') != "":
|
|
175
|
+
command += f" --mas-aibroker-storage-templates-bucket \"{self.getParam('mas_aibroker_storage_templates_bucket')}\"{newline}"
|
|
176
|
+
if self.getParam('mas_aibroker_tenant_name') != "":
|
|
177
|
+
command += f" --mas-aibroker-tenant-name \"{self.getParam('mas_aibroker_tenant_name')}\"{newline}"
|
|
178
|
+
if self.getParam('mas_aibroker_watsonxai_apikey') != "":
|
|
179
|
+
command += f" --mas-aibroker-watsonxai-apikey \"{self.getParam('mas_aibroker_watsonxai_apikey')}\"{newline}"
|
|
180
|
+
if self.getParam('mas_aibroker_watsonxai_url') != "":
|
|
181
|
+
command += f" --mas-aibroker-watsonxai-url \"{self.getParam('mas_aibroker_watsonxai_url')}\"{newline}"
|
|
182
|
+
if self.getParam('mas_aibroker_watsonxai_project_id') != "":
|
|
183
|
+
command += f" --mas-aibroker-watsonxai-project-id \"{self.getParam('mas_aibroker_watsonxai_project_id')}\"{newline}"
|
|
184
|
+
if self.getParam('mas_aibroker_watsonx_action') != "":
|
|
185
|
+
command += f" --mas-aibroker-watsonx-action \"{self.getParam('mas_aibroker_watsonx_action')}\"{newline}"
|
|
186
|
+
if self.getParam('mas_aibroker_db_host') != "":
|
|
187
|
+
command += f" --mas-aibroker-db-host \"{self.getParam('mas_aibroker_db_host')}\"{newline}"
|
|
188
|
+
if self.getParam('mas_aibroker_db_port') != "":
|
|
189
|
+
command += f" --mas-aibroker-db-port \"{self.getParam('mas_aibroker_db_port')}\"{newline}"
|
|
190
|
+
if self.getParam('mas_aibroker_db_user') != "":
|
|
191
|
+
command += f" --mas-aibroker-db-user \"{self.getParam('mas_aibroker_db_user')}\"{newline}"
|
|
192
|
+
if self.getParam('mas_aibroker_db_database') != "":
|
|
193
|
+
command += f" --mas-aibroker-db-database \"{self.getParam('mas_aibroker_db_database')}\"{newline}"
|
|
194
|
+
if self.getParam('mas_aibroker_db_secret_name') != "":
|
|
195
|
+
command += f" --mas-aibroker-db-secret-name \"{self.getParam('mas_aibroker_db_secret_name')}\"{newline}"
|
|
196
|
+
if self.getParam('mas_aibroker_db_secret_key') != "":
|
|
197
|
+
command += f" --mas-aibroker-db-secret-key \"{self.getParam('mas_aibroker_db_secret_key')}\"{newline}"
|
|
198
|
+
if self.getParam('mas_aibroker_db_secret_value') != "":
|
|
199
|
+
command += f" --mas-aibroker-db-secret-value \"{self.getParam('mas_aibroker_db_secret_value')}\"{newline}"
|
|
200
|
+
if self.getParam('mariadb_user') != "":
|
|
201
|
+
command += f" --mariadb-user \"{self.getParam('mariadb_user')}\"{newline}"
|
|
202
|
+
if self.getParam('mariadb_password') != "":
|
|
203
|
+
command += f" --mariadb-password \"{self.getParam('mariadb_password')}\"{newline}"
|
|
204
|
+
if self.getParam('minio_root_user') != "":
|
|
205
|
+
command += f" --minio-root-user \"{self.getParam('minio_root_user')}\"{newline}"
|
|
206
|
+
if self.getParam('minio_root_password') != "":
|
|
207
|
+
command += f" --minio-root-password \"{self.getParam('minio_root_password')}\"{newline}"
|
|
208
|
+
if self.getParam('tenant_entitlement_type') != "":
|
|
209
|
+
command += f" --tenant-entitlement-type \"{self.getParam('tenant_entitlement_type')}\"{newline}"
|
|
210
|
+
if self.getParam('tenant_entitlement_start_date') != "":
|
|
211
|
+
command += f" --tenant-entitlement-start-date \"{self.getParam('tenant_entitlement_start_date')}\"{newline}"
|
|
212
|
+
if self.getParam('tenant_entitlement_end_date') != "":
|
|
213
|
+
command += f" --tenant-entitlement-end-date \"{self.getParam('tenant_entitlement_end_date')}\"{newline}"
|
|
214
|
+
if self.getParam('tenant_entitlement_end_date') != "":
|
|
215
|
+
command += f" --mas-aibroker-s3-bucket-prefix \"{self.getParam('mas_aibroker_s3_bucket_prefix')}\"{newline}"
|
|
216
|
+
if self.getParam('tenant_entitlement_end_date') != "":
|
|
217
|
+
command += f" --mas-aibroker-s3-endpoint-url \"{self.getParam('mas_aibroker_s3_endpoint_url')}\"{newline}"
|
|
218
|
+
if self.getParam('tenant_entitlement_end_date') != "":
|
|
219
|
+
command += f" --mas-aibroker-s3-region \"{self.getParam('mas_aibroker_s3_region')}\"{newline}"
|
|
220
|
+
if self.getParam('tenant_entitlement_end_date') != "":
|
|
221
|
+
command += f" --mas-aibroker-tenant-s3-bucket-prefix \"{self.getParam('mas_aibroker_tenant_s3_bucket_prefix')}\"{newline}"
|
|
222
|
+
if self.getParam('tenant_entitlement_end_date') != "":
|
|
223
|
+
command += f" --mas-aibroker-tenant-s3-region \"{self.getParam('mas_aibroker_tenant_s3_region')}\"{newline}"
|
|
224
|
+
if self.getParam('tenant_entitlement_end_date') != "":
|
|
225
|
+
command += f" --mas-aibroker-tenant-s3-endpoint-url \"{self.getParam('mas_aibroker_tenant_s3_endpoint_url')}\"{newline}"
|
|
226
|
+
if self.getParam('tenant_entitlement_end_date') != "":
|
|
227
|
+
command += f" --mas-aibroker-tenant-s3-access-key \"{self.getParam('mas_aibroker_tenant_s3_access_key')}\"{newline}"
|
|
228
|
+
if self.getParam('tenant_entitlement_end_date') != "":
|
|
229
|
+
command += f" --mas-aibroker-tenant-s3-secret-key \"{self.getParam('mas_aibroker_tenant_s3_secret_key')}\"{newline}"
|
|
230
|
+
|
|
231
|
+
command += " --accept-license --no-confirm"
|
|
232
|
+
return command
|