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

Files changed (95) hide show
  1. mas/cli/__init__.py +1 -1
  2. mas/cli/cli.py +82 -65
  3. mas/cli/displayMixins.py +110 -0
  4. mas/cli/gencfg.py +65 -0
  5. mas/cli/install/__init__.py +9 -0
  6. mas/cli/install/argParser.py +792 -0
  7. mas/cli/install/settings/__init__.py +21 -0
  8. mas/cli/install/settings/additionalConfigs.py +150 -0
  9. mas/cli/install/settings/db2Settings.py +173 -0
  10. mas/cli/install/settings/kafkaSettings.py +103 -0
  11. mas/cli/install/settings/manageSettings.py +218 -0
  12. mas/cli/install/settings/turbonomicSettings.py +25 -0
  13. mas/cli/install/summarizer.py +328 -0
  14. mas/cli/templates/ibm-mas-tekton.yaml +10813 -0
  15. mas/cli/templates/jdbccfg.yml.j2 +52 -0
  16. mas/cli/templates/pod-templates/best-effort/ibm-data-dictionary-assetdatadictionary.yml +26 -0
  17. mas/cli/templates/pod-templates/best-effort/ibm-mas-bascfg.yml +56 -0
  18. mas/cli/templates/pod-templates/best-effort/ibm-mas-coreidp.yml +21 -0
  19. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-actions.yml +28 -0
  20. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-auth.yml +32 -0
  21. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-datapower.yml +12 -0
  22. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-devops.yml +14 -0
  23. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-dm.yml +22 -0
  24. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-dsc.yml +40 -0
  25. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-edgeconfig.yml +10 -0
  26. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-fpl.yml +24 -0
  27. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-guardian.yml +20 -0
  28. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-iot.yml +10 -0
  29. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-mbgx.yml +18 -0
  30. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-mfgx.yml +14 -0
  31. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-monitor.yml +18 -0
  32. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-orgmgmt.yml +48 -0
  33. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-provision.yml +28 -0
  34. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-registry.yml +26 -0
  35. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-state.yml +40 -0
  36. mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-webui.yml +22 -0
  37. mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-healthextaccelerator.yml +13 -0
  38. mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-healthextworkspace.yml +10 -0
  39. mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-imagestitching.yml +10 -0
  40. mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-manageaccelerators.yml +10 -0
  41. mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-manageapp.yml +46 -0
  42. mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-manageworkspace.yml +48 -0
  43. mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-slackproxy.yml +10 -0
  44. mas/cli/templates/pod-templates/best-effort/ibm-mas-pushnotificationcfg.yml +13 -0
  45. mas/cli/templates/pod-templates/best-effort/ibm-mas-scimcfg.yml +14 -0
  46. mas/cli/templates/pod-templates/best-effort/ibm-mas-slscfg.yml +10 -0
  47. mas/cli/templates/pod-templates/best-effort/ibm-mas-smtpcfg.yml +10 -0
  48. mas/cli/templates/pod-templates/best-effort/ibm-mas-suite.yml +136 -0
  49. mas/cli/templates/pod-templates/best-effort/ibm-mas-visualinspection.yml +34 -0
  50. mas/cli/templates/pod-templates/best-effort/ibm-sls-licenseservice.yml +10 -0
  51. mas/cli/templates/pod-templates/guaranteed/ibm-data-dictionary-assetdatadictionary.yml +56 -0
  52. mas/cli/templates/pod-templates/guaranteed/ibm-mas-bascfg.yml +140 -0
  53. mas/cli/templates/pod-templates/guaranteed/ibm-mas-coreidp.yml +45 -0
  54. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-actions.yml +70 -0
  55. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-auth.yml +80 -0
  56. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-datapower.yml +24 -0
  57. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-devops.yml +26 -0
  58. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-dm.yml +52 -0
  59. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-dsc.yml +106 -0
  60. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-edgeconfig.yml +16 -0
  61. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-fpl.yml +62 -0
  62. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-guardian.yml +44 -0
  63. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-iot.yml +16 -0
  64. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-mbgx.yml +42 -0
  65. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-mfgx.yml +32 -0
  66. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-monitor.yml +42 -0
  67. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-orgmgmt.yml +126 -0
  68. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-provision.yml +70 -0
  69. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-registry.yml +62 -0
  70. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-state.yml +106 -0
  71. mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-webui.yml +52 -0
  72. mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-healthextaccelerator.yml +28 -0
  73. mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-healthextworkspace.yml +18 -0
  74. mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-imagestitching.yml +16 -0
  75. mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-manageaccelerators.yml +16 -0
  76. mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-manageapp.yml +106 -0
  77. mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-manageworkspace.yml +126 -0
  78. mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-slackproxy.yml +16 -0
  79. mas/cli/templates/pod-templates/guaranteed/ibm-mas-pushnotificationcfg.yml +25 -0
  80. mas/cli/templates/pod-templates/guaranteed/ibm-mas-scimcfg.yml +26 -0
  81. mas/cli/templates/pod-templates/guaranteed/ibm-mas-slscfg.yml +16 -0
  82. mas/cli/templates/pod-templates/guaranteed/ibm-mas-smtpcfg.yml +16 -0
  83. mas/cli/templates/pod-templates/guaranteed/ibm-mas-suite.yml +340 -0
  84. mas/cli/templates/pod-templates/guaranteed/ibm-mas-visualinspection.yml +76 -0
  85. mas/cli/templates/pod-templates/guaranteed/ibm-sls-licenseservice.yml +16 -0
  86. mas/cli/templates/pod-templates/saas-essentials/ibm-mas-visualinspection.yml +46 -0
  87. mas/cli/validators.py +126 -0
  88. mas_cli-10.0.1.data/scripts/mas-install +978 -0
  89. {mas_cli-9.5.0.data → mas_cli-10.0.1.data}/scripts/mas-uninstall +11 -8
  90. {mas_cli-9.5.0.data → mas_cli-10.0.1.data}/scripts/mas-upgrade +6 -4
  91. {mas_cli-9.5.0.dist-info → mas_cli-10.0.1.dist-info}/METADATA +2 -1
  92. mas_cli-10.0.1.dist-info/RECORD +94 -0
  93. mas_cli-9.5.0.dist-info/RECORD +0 -8
  94. {mas_cli-9.5.0.dist-info → mas_cli-10.0.1.dist-info}/WHEEL +0 -0
  95. {mas_cli-9.5.0.dist-info → mas_cli-10.0.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,218 @@
1
+ # *****************************************************************************
2
+ # Copyright (c) 2024 IBM Corporation and other Contributors.
3
+ #
4
+ # All rights reserved. This program and the accompanying materials
5
+ # are made available under the terms of the Eclipse Public License v1.0
6
+ # which accompanies this distribution, and is available at
7
+ # http://www.eclipse.org/legal/epl-v10.html
8
+ #
9
+ # *****************************************************************************
10
+
11
+ class ManageSettingsMixin():
12
+
13
+ def arcgisSettings(self) -> None:
14
+ # If Spatial is selected, then prompt to choose to add IBM Maximo Location Services for Esri, and prompt license
15
+ if "spatial=" in self.getParam("mas_appws_components") and self.getParam("mas_app_channel_manage").startswith("9."):
16
+ self.printDescription([
17
+ "",
18
+ "Maximo Spatial requires a map server provider in order to enable geospatial capabilities",
19
+ "You may choose your preferred map provider later or you can enable IBM Maximo Location Services for Esri now",
20
+ "This includes ArcGIS Enterprise as part of the Manage and Maximo Spatial bundle (Additional AppPoints required)."
21
+ ])
22
+
23
+ if self.yesOrNo("Include IBM Maximo Location Services for Esri"):
24
+ self.setParam("install_arcgis", "true")
25
+ self.setParam("mas_arcgis_channel", self.getParam("mas_app_channel_manage"))
26
+
27
+ self.printDescription([
28
+ "",
29
+ "IBM Maximo Location Services for Esri License Terms",
30
+ "For information about your IBM Maximo Location Services for Esri License visit: ",
31
+ " <u>https://ibm.biz/MAXArcGIS90-License</u>",
32
+ "To continue with the installation, you must accept these additional license terms"
33
+ ])
34
+
35
+ if not self.yesOrNo("Do you accept the license terms"):
36
+ exit(1)
37
+
38
+ def manageSettings(self) -> None:
39
+ if self.installManage:
40
+ self.printH1("Configure Maximo Manage")
41
+ self.printDescription(["Customize your Manage installation, refer to the product documentation for more information"])
42
+
43
+ self.manageSettingsComponents()
44
+ self.arcgisSettings()
45
+
46
+ self.manageSettingsServerBundleConfig()
47
+ self.manageSettingsJMS()
48
+ self.manageSettingsDatabase()
49
+ self.manageSettingsCustomizationArchive()
50
+ self.manageSettingsOther()
51
+
52
+ self.setParam("mas_app_settings_doclinks_pvc_storage_class", self.getParam("storage_class_rwx"))
53
+ self.setParam("mas_app_settings_bim_pvc_storage_class", self.getParam("storage_class_rwx"))
54
+ self.setParam("mas_app_settings_jms_queue_pvc_storage_class", self.getParam("storage_class_rwx"))
55
+
56
+ self.setParam("mas_app_settings_doclinks_pvc_accessmode", "ReadWriteMany")
57
+ self.setParam("mas_app_settings_bim_pvc_accessmode", "ReadWriteMany")
58
+ self.setParam("mas_app_settings_jms_queue_pvc_accessmode", "ReadWriteMany")
59
+
60
+ def manageSettingsComponents(self) -> None:
61
+ self.printH2("Maximo Manage Components")
62
+ self.printDescription(["The default configuration will install Manage with Health enabled, alternatively choose exactly what industry solutions and add-ons will be configured"])
63
+
64
+ self.params["mas_appws_components"] = "base=latest,health=latest"
65
+ if self.yesOrNo("Select components to enable"):
66
+ self.params["mas_appws_components"] = "base=latest"
67
+ if self.yesOrNo(" - Asset Configuration Manager"): self.params["mas_appws_components"] += ",acm=latest"
68
+ if self.yesOrNo(" - Aviation"): self.params["mas_appws_components"] += ",acm=latest"
69
+ if self.yesOrNo(" - Civil Infrastructure"): self.params["mas_appws_components"] += ",civil=latest"
70
+ if self.yesOrNo(" - Envizi"): self.params["mas_appws_components"] += ",envizi=latest"
71
+ if self.yesOrNo(" - Health"): self.params["mas_appws_components"] += ",health=latest"
72
+ if self.yesOrNo(" - Health, Safety and Environment"): self.params["mas_appws_components"] += ",hse=latest"
73
+ if self.yesOrNo(" - Maximo IT"): self.params["mas_appws_components"] += ",icd=latest"
74
+ if self.yesOrNo(" - Nuclear"): self.params["mas_appws_components"] += ",nuclear=latest"
75
+ if self.yesOrNo(" - Oil & Gas"): self.params["mas_appws_components"] += ",oilandgas=latest"
76
+ if self.yesOrNo(" - Connector for Oracle Applications"): self.params["mas_appws_components"] += ",oracleadapter=latest"
77
+ if self.yesOrNo(" - Connector for SAP Application"): self.params["mas_appws_components"] += ",sapadapter=latest"
78
+ if self.yesOrNo(" - Service Provider"): self.params["mas_appws_components"] += ",serviceprovider=latest"
79
+ if self.yesOrNo(" - Spatial"): self.params["mas_appws_components"] += ",spatial=latest"
80
+ if self.yesOrNo(" - Strategize"): self.params["mas_appws_components"] += ",strategize=latest"
81
+ if self.yesOrNo(" - Transportation"): self.params["mas_appws_components"] += ",transportation=latest"
82
+ if self.yesOrNo(" - Tririga"): self.params["mas_appws_components"] += ",tririga=latest"
83
+ if self.yesOrNo(" - Utilities"): self.params["mas_appws_components"] += ",utilities=latest"
84
+ if self.yesOrNo(" - Workday Applications"): self.params["mas_appws_components"] += ",workday=latest"
85
+
86
+ if ",icd=" in self.params["mas_appws_components"]:
87
+ self.printH2("Maximo IT License Terms")
88
+ self.printDescription([
89
+ "For information about your Maximo IT License, see https://ibm.biz/MAXIT81-License",
90
+ "To continue with the installation, you must accept these additional license terms"
91
+ ])
92
+
93
+ if not self.yesOrNo("Do you accept the license terms"):
94
+ exit(1)
95
+
96
+ def manageSettingsDatabase(self) -> None:
97
+ self.printH2("Maximo Manage Settings - Database")
98
+ self.printDescription(["Customise the schema, tablespace, indexspace, and encryption settings used by Manage"])
99
+
100
+ self.params["mas_appws_components"] = "base=latest,health=latest"
101
+ if self.yesOrNo("Customize database settings"):
102
+ self.promptForString("Schema", "mas_app_settings_db2_schema", default="maximo")
103
+ self.promptForString("Tablespace", "mas_app_settings_db2_tablespace", default="MAXDATA")
104
+ self.promptForString("Indexspace", "mas_app_settings_db2_indexspace", default="MAXINDEX")
105
+
106
+ if self.yesOrNo("Customize database encryption settings"):
107
+ self.promptForString("MXE_SECURITY_CRYPTO_KEY", "mxe_security_crypto_key")
108
+ self.promptForString("MXE_SECURITY_CRYPTOX_KEY", "mxe_security_cryptox_key")
109
+ self.promptForString("MXE_SECURITY_OLD_CRYPTO_KEY", "mxe_security_old_crypto_key")
110
+ self.promptForString("MXE_SECURITY_OLD_CRYPTOX_KEY", "mxe_security_old_cryptox_key")
111
+ self.yesOrNo("Override database encryption secrets with provided keys", "mas_app_settings_override_encryption_secrets_flag")
112
+
113
+ def manageSettingsServerBundleConfig(self) -> None:
114
+ self.printH2("Maximo Manage Settings - Server Bundles")
115
+ self.printDescription([
116
+ "Define how you want to configure Manage servers:",
117
+ " - You can have one or multiple Manage servers distributing workload",
118
+ " - Additionally, you can choose to include JMS server for messaging queues",
119
+ "",
120
+ "Configurations:",
121
+ " 1. Deploy the 'all' server pod only (workload is concentrated in just one server pod but consumes less resource)",
122
+ " 2. Deploy the 'all' and 'jms' bundle pods (workload is concentrated in just one server pod and includes jms server)"
123
+ ])
124
+
125
+ if not self.isSNO():
126
+ self.printDescription([
127
+ " 3. Deploy the 'mea', 'report', 'ui' and 'cron' bundle pods (workload is distributed across multiple server pods)",
128
+ " 4. Deploy the 'mea', 'report', 'ui', 'cron' and 'jms' bundle pods (workload is distributed across multiple server pods and includes jms server)"
129
+ ])
130
+
131
+ manageServerBundleSelection = self.promptForString("Select a server bundle configuration")
132
+
133
+ if manageServerBundleSelection == "1":
134
+ self.setParam("mas_app_settings_server_bundles_size", "dev")
135
+ elif manageServerBundleSelection == "2":
136
+ self.setParam("mas_app_settings_server_bundles_size", "snojms")
137
+ self.setParam("mas_app_settings_persistent_volumes_flag", "true")
138
+ elif manageServerBundleSelection == "3":
139
+ self.setParam("mas_app_settings_server_bundles_size", "small")
140
+ elif manageServerBundleSelection == "4":
141
+ self.setParam("mas_app_settings_server_bundles_size", "jms")
142
+ self.setParam("mas_app_settings_persistent_volumes_flag", "true")
143
+ else:
144
+ self.fatalError("Invalid selection")
145
+
146
+ def manageSettingsJMS (self) -> None:
147
+ if self.getParam("mas_app_settings_server_bundles_size") in ["jms", "snojms"]:
148
+ self.printDescription([
149
+ "Only Manage JMS sequential queues (sqin and sqout) are enabled by default.",
150
+ "However, you can enable both sequential (sqin and sqout) and continuous queues (cqin and cqout)"
151
+ ])
152
+
153
+ self.yesOrNo("Enable both Manage JMS sequential and continuous queues", "mas_app_settings_default_jms")
154
+
155
+ def manageSettingsCustomizationArchive(self) -> None:
156
+ self.printH2("Maximo Manage Settings - Customization")
157
+ self.printDescription([
158
+ "Provide a customization archive to be used in the Manage build process"
159
+ ])
160
+
161
+ if self.yesOrNo("Include customization archive"):
162
+ self.promptForString("Customization archive name", "mas_app_settings_customization_archive_name")
163
+ self.promptForString("Customization archive path/url", "mas_app_settings_customization_archive_url")
164
+ if self.yesOrNo("Provide authentication to access customization archive URL"):
165
+ self.promptForString("Username", "mas_app_settings_customization_archive_username")
166
+ self.promptForString("Password", "mas_app_settings_customization_archive_password", isPassword=True)
167
+
168
+ def manageSettingsDemodata(self) -> None:
169
+ self.yesOrNo("Create demo data", "masp_app_settings_demodata")
170
+
171
+ def manageSettingsTimezone(self) -> None:
172
+ self.promptForString("Manage server timezone", "mas_app_settings_server_timezone", default="GMT")
173
+ # Set Manage dedicated Db2 instance timezone to be same as Manage server timezone
174
+ self.setParam("db2_timezone", self.getParam("mas_app_settings_server_timezone"))
175
+
176
+ def manageSettingsLanguages(self) -> None:
177
+ self.printH2("Maximo Manage Settings - Languages")
178
+ self.printDescription([
179
+ "Define the base language for Maximo Manage"
180
+ ])
181
+ self.promptForString("Base language", "mas_app_settings_base_lang", default="EN")
182
+
183
+ self.printDescription([
184
+ "Define the additional languages to be configured in Maximo Manage. provide a comma-separated list of supported languages codes, for example: 'JA,DE,AR'",
185
+ "A complete list of available language codes is available online:",
186
+ " <u>https://www.ibm.com/docs/en/mas-cd/mhmpmh-and-p-u/continuous-delivery?topic=deploy-language-support</u>"
187
+ ])
188
+
189
+ self.promptForString("Secondary languages", "mas_app_settings_secondary_langs")
190
+
191
+ def manageSettingsCP4D(self) -> None:
192
+ if self.getParam("mas_app_channel_manage") in ["8.7.x", "9.0.x"]:
193
+ self.printDescription([
194
+ "Integration with Cognos Analytics provides additional support for reporting features in Maximo Manage, for more information refer to the documentation online: ",
195
+ " <u>https://ibm.biz/BdMuxs</u>"
196
+ ])
197
+ self.yesOrNo("Enable integration with Cognos Analytics", "cpd_install_cognos")
198
+ self.yesOrNo("Enable integration with Watson Studio Local", "mas_appws_bindings_health_flag")
199
+
200
+ if self.getParam("cpd_install_cognos") == "true" or self.getParam("mas_appws_bindings_health_flag") == "true":
201
+ self.configCP4D()
202
+
203
+ def manageSettingsOther(self) -> None:
204
+ self.printH2("Maximo Manage Settings - Other")
205
+ self.printDescription([
206
+ "Configure additional settings:",
207
+ " - Demo data",
208
+ " - Base and additional languages",
209
+ " - Server timezone",
210
+ " - Cognos integration (install Cloud Pak for Data)",
211
+ " - Watson Studio Local integration (install Cloud Pak for Data)"
212
+ ])
213
+
214
+ if self.yesOrNo("Configure Additional Settings"):
215
+ self.manageSettingsDemodata()
216
+ self.manageSettingsTimezone()
217
+ self.manageSettingsLanguages()
218
+ self.manageSettingsCP4D()
@@ -0,0 +1,25 @@
1
+ # *****************************************************************************
2
+ # Copyright (c) 2024 IBM Corporation and other Contributors.
3
+ #
4
+ # All rights reserved. This program and the accompanying materials
5
+ # are made available under the terms of the Eclipse Public License v1.0
6
+ # which accompanies this distribution, and is available at
7
+ # http://www.eclipse.org/legal/epl-v10.html
8
+ #
9
+ # *****************************************************************************
10
+
11
+ class TurbonomicSettingsMixin():
12
+
13
+ def configTurbonomic(self) -> None:
14
+ self.printH1("Configure Turbonomic")
15
+ self.printDescription([
16
+ "The IBM Turbonomic hybrid cloud cost optimization platform allows you to eliminate this guesswork with solutions that save time and optimize costs",
17
+ " - Learn more: <u>https://www.ibm.com/products/turbonomic</u>"
18
+ ])
19
+
20
+ if self.yesOrNo("Configure IBM Turbonomic integration"):
21
+ self.promptForString("Turbonomic Target Name", "turbonomic_target_name")
22
+ self.promptForString("Turbonomic Server URL", "turbonomic_server_url")
23
+ self.promptForString("Turbonomic Server Version", "turbonomic_server_version")
24
+ self.promptForString("Turbonomic Username", "turbonomic_username")
25
+ self.promptForString("Turbonomic Password", "turbonomic_password", isPassword=True)
@@ -0,0 +1,328 @@
1
+ # *****************************************************************************
2
+ # Copyright (c) 2024 IBM Corporation and other Contributors.
3
+ #
4
+ # All rights reserved. This program and the accompanying materials
5
+ # are made available under the terms of the Eclipse Public License v1.0
6
+ # which accompanies this distribution, and is available at
7
+ # http://www.eclipse.org/legal/epl-v10.html
8
+ #
9
+ # *****************************************************************************
10
+
11
+ import logging
12
+ import yaml
13
+ from prompt_toolkit import print_formatted_text, HTML
14
+ from mas.devops.mas import isAirgapInstall
15
+ from mas.devops.ocp import getConsoleURL
16
+
17
+ logger = logging.getLogger(__name__)
18
+
19
+ class InstallSummarizerMixin():
20
+ def ocpSummary(self) -> None:
21
+ self.printH2("OpenShift Container Platform")
22
+ self.printSummary("Storage Class Provider", self.storageClassProvider)
23
+ self.printParamSummary("ReadWriteOnce Storage Class", "storage_class_rwo")
24
+ self.printParamSummary("ReadWriteMany Storage Class", "storage_class_rwx")
25
+
26
+ self.printParamSummary("Certificate Manager", "cert_manager_provider")
27
+ self.printParamSummary("Cluster Ingress Certificate Secret", "ocp_ingress_tls_secret_name")
28
+
29
+ if self.isSNO():
30
+ self.printSummary("Single Node OpenShift", "Yes")
31
+ else:
32
+ self.printSummary("Single Node OpenShift", "No")
33
+
34
+ self.printSummary("Skip Pre-Install Healthcheck", "Yes" if self.getParam('skip_pre_check') == "true" else "No")
35
+
36
+ def icrSummary(self) -> None:
37
+ self.printH2("IBM Container Registry Credentials")
38
+ self.printSummary("IBM Entitlement Key", f"{self.params['ibm_entitlement_key'][0:8]}&lt;snip&gt;")
39
+ if self.args.dev_mode:
40
+ self.printSummary("Artifactory Username", self.params['artifactory_username'])
41
+ self.printSummary("Artifactory Token", f"{self.params['artifactory_token'][0:8]}&lt;snip&gt;")
42
+
43
+ def masSummary(self) -> None:
44
+ operationalModeNames=["", "Production", "Non-Production"]
45
+
46
+ self.printH2("IBM Maximo Application Suite")
47
+ self.printParamSummary("Instance ID", "mas_instance_id")
48
+ self.printParamSummary("Workspace ID", "mas_workspace_id")
49
+ self.printParamSummary("Workspace Name", "mas_workspace_name")
50
+
51
+ print()
52
+ self.printSummary(f"Operational Mode", operationalModeNames[self.operationalMode])
53
+ if isAirgapInstall(self.dynamicClient):
54
+ self.printSummary("Install Mode", "Disconnected Install")
55
+ else:
56
+ self.printSummary("Install Mode", "Connected Install")
57
+
58
+ if "mas_domain" in self.params:
59
+ print()
60
+ self.printParamSummary("Domain Name", "mas_domain")
61
+ self.printParamSummary("DNS Provider", "dns_provider")
62
+ self.printParamSummary("Certificate Issuer", "mas_cluster_issuer")
63
+
64
+ if self.params['dns_provider'] == "cloudflare":
65
+ self.printParamSummary("CloudFlare e-mail", "cloudflare_email")
66
+ self.printParamSummary("CloudFlare API token", "cloudflare_apitoken")
67
+ self.printParamSummary("CloudFlare zone", "cloudflare_zone")
68
+ self.printParamSummary("CloudFlare subdomain", "cloudflare_subdomain")
69
+ elif self.params['dns_provider'] == "cis":
70
+ pass
71
+ elif self.params['dns_provider'] == "route53":
72
+ pass
73
+ elif self.params['dns_provider'] == "":
74
+ pass
75
+
76
+ print()
77
+ self.printParamSummary("Catalog Version", "mas_catalog_version")
78
+ self.printParamSummary("Subscription Channel", "mas_channel")
79
+
80
+ print()
81
+ self.printParamSummary("IBM Entitled Registry", "mas_icr_cp")
82
+ self.printParamSummary("IBM Open Registry", "mas_icr_cpopen")
83
+
84
+ print()
85
+ self.printParamSummary("Trust Default Cert Authorities", "mas_trust_default_cas")
86
+
87
+ print()
88
+ if self.localConfigDir is not None:
89
+ self.printSummary("Additional Config", self.localConfigDir)
90
+ else:
91
+ self.printSummary("Additional Config", "Not Configured")
92
+ if "mas_pod_templates_dir" in self.params:
93
+ self.printParamSummary("Pod Templates", "mas_pod_templates_dir")
94
+ else:
95
+ self.printSummary("Pod Templates", "Not Configured")
96
+
97
+ def iotSummary(self) -> None:
98
+ if self.installIoT:
99
+ self.printSummary("IoT", self.params["mas_app_channel_iot"])
100
+ self.printSummary("+ MQTT Broker Storage Class", self.params["mas_app_settings_iot_mqttbroker_pvc_storage_class"])
101
+ self.printSummary("+ FPL Storage Class", self.params["mas_app_settings_iot_fpl_pvc_storage_class"])
102
+ else:
103
+ self.printSummary("IoT", "Do Not Install")
104
+
105
+ def monitorSummary(self) -> None:
106
+ if self.installMonitor:
107
+ self.printSummary("Monitor", self.params["mas_app_channel_monitor"])
108
+ else:
109
+ self.printSummary("Monitor", "Do Not Install")
110
+
111
+ def arcgisSummary(self) -> None:
112
+ if self.getParam("install_arcgis") != "":
113
+ self.printSummary("Loc Srv Esri (arcgis)", self.params["mas_arcgis_channel"])
114
+ else:
115
+ self.printSummary("Loc Srv Esri (arcgis)", "Do Not Install")
116
+
117
+
118
+ def predictSummary(self) -> None:
119
+ if self.installPredict:
120
+ self.printSummary("Predict", self.params["mas_app_channel_predict"])
121
+ else:
122
+ self.printSummary("Predict", "Do Not Install")
123
+
124
+ def optimizerSummary(self) -> None:
125
+ if self.installOptimizer:
126
+ self.printSummary("Optimizer", self.params["mas_app_channel_optimizer"])
127
+ self.printSummary(" + Plan", self.params["mas_app_plan_optimizer"])
128
+ else:
129
+ self.printSummary("Optimizer", "Do Not Install")
130
+
131
+ def assistSummary(self) -> None:
132
+ if self.installAssist:
133
+ self.printSummary("Assist", self.params["mas_app_channel_assist"])
134
+ else:
135
+ self.printSummary("Assist", "Do Not Install")
136
+
137
+ def inspectionSummary(self) -> None:
138
+ if self.installInspection:
139
+ self.printSummary("Visual Inspection", self.params["mas_app_channel_visualinspection"])
140
+ self.printSummary(" + Storage Class", self.params["storage_class_rwx"])
141
+ else:
142
+ self.printSummary("Visual Inspection", "Do Not Install")
143
+
144
+ def manageSummary(self) -> None:
145
+ if self.installManage:
146
+ self.printSummary("Manage", self.params["mas_app_channel_manage"])
147
+ print_formatted_text(HTML(f" <SkyBlue>+ Components</SkyBlue>"))
148
+ self.printSummary(" + ACM", "Enabled" if "acm=" in self.getParam("mas_appws_components") else "Disabled")
149
+ self.printSummary(" + Aviation", "Enabled" if "aviation=" in self.getParam("mas_appws_components") else "Disabled")
150
+ self.printSummary(" + Civil Infrastructure", "Enabled" if "acm=" in self.getParam("mas_appws_components") else "Disabled")
151
+ self.printSummary(" + Envizi", "Enabled" if "envizi=" in self.getParam("mas_appws_components") else "Disabled")
152
+ self.printSummary(" + Health", "Enabled" if "health=" in self.getParam("mas_appws_components") else "Disabled")
153
+ self.printSummary(" + HSE", "Enabled" if "hse=" in self.getParam("mas_appws_components") else "Disabled")
154
+ self.printSummary(" + Maximo IT", "Enabled" if "icd=" in self.getParam("mas_appws_components") else "Disabled")
155
+ self.printSummary(" + Nuclear", "Enabled" if "nuclear=" in self.getParam("mas_appws_components") else "Disabled")
156
+ self.printSummary(" + Oil & Gas", "Enabled" if "oilandgas=" in self.getParam("mas_appws_components") else "Disabled")
157
+ self.printSummary(" + Connector for Oracle", "Enabled" if "oracleadapter=" in self.getParam("mas_appws_components") else "Disabled")
158
+ self.printSummary(" + Connector for SAP", "Enabled" if "sapadapter=" in self.getParam("mas_appws_components") else "Disabled")
159
+ self.printSummary(" + Service Provider", "Enabled" if "serviceprovider=" in self.getParam("mas_appws_components") else "Disabled")
160
+ self.printSummary(" + Spatial", "Enabled" if "spatial=" in self.getParam("mas_appws_components") else "Disabled")
161
+ self.printSummary(" + Strategize", "Enabled" if "strategize=" in self.getParam("mas_appws_components") else "Disabled")
162
+ self.printSummary(" + Transportation", "Enabled" if "transportation=" in self.getParam("mas_appws_components") else "Disabled")
163
+ self.printSummary(" + Tririga", "Enabled" if "tririga=" in self.getParam("mas_appws_components") else "Disabled")
164
+ self.printSummary(" + Utilities", "Enabled" if "utilities=" in self.getParam("mas_appws_components") else "Disabled")
165
+ self.printSummary(" + Workday Applications", "Enabled" if "workday=" in self.getParam("mas_appws_components") else "Disabled")
166
+
167
+ self.printParamSummary("+ Server bundle size", "mas_app_settings_server_bundles_size")
168
+ self.printParamSummary("+ Enable JMS queues", "mas_app_settings_default_jms")
169
+ self.printParamSummary("+ Server Timezone", "mas_app_settings_server_timezone")
170
+ self.printParamSummary("+ Base Language", "mas_app_settings_base_lang")
171
+ self.printParamSummary("+ Additional Languages", "mas_app_settings_secondary_langs")
172
+
173
+ print_formatted_text(HTML(f" <SkyBlue>+ Database Settings</SkyBlue>"))
174
+ self.printParamSummary(" + Schema", "mas_app_settings_indexspace")
175
+ self.printParamSummary(" + Username", "mas_app_settings_db2_schema")
176
+ self.printParamSummary(" + Tablespace", "mas_app_settings_tablespace")
177
+ self.printParamSummary(" + Indexspace", "mas_app_settings_indexspace")
178
+
179
+ else:
180
+ self.printSummary("Manage", "Do Not Install")
181
+
182
+ def db2Summary(self) -> None:
183
+ if self.getParam("db2_action_system") == "install" or self.getParam("db2_action_manage") == "install":
184
+ self.printH2("IBM Db2 Univeral Operator Configuration")
185
+ self.printSummary("System Instance", "Install" if self.getParam("db2_action_system") == "install" else "Do Not Install")
186
+ self.printSummary("Dedicated Manage Instance", "Install" if self.getParam("db2_action_manage") == "install" else "Do Not Install")
187
+ self.printParamSummary(" - Type", "db2_type")
188
+ self.printParamSummary(" - Timezone", "db2_timezone")
189
+ print()
190
+ self.printParamSummary("Install Namespace", "db2_namespace")
191
+ self.printParamSummary("Subscription Channel", "db2_channel")
192
+ print()
193
+ self.printParamSummary("CPU Request", "db2_cpu_requests")
194
+ self.printParamSummary("CPU Limit", "db2_cpu_limits")
195
+ self.printParamSummary("Memory Request", "db2_memory_requests")
196
+ self.printParamSummary("Memory Limit ", "db2_memory_limits")
197
+ print()
198
+ self.printParamSummary("Meta Storage", "db2_meta_storage_size")
199
+ self.printParamSummary("Data Storage", "db2_data_storage_size")
200
+ self.printParamSummary("Backup Storage", "db2_backup_storage_size")
201
+ self.printParamSummary("Temp Storage", "db2_temp_storage_size")
202
+ self.printParamSummary("Transaction Logs Storage", "db2_logs_storage_size")
203
+ print()
204
+ if self.getParam('db2_affinity_key') != "":
205
+ self.printSummary("Node Affinity", f"{self.getParam('db2_affinity_key')}={self.getParam('db2_affinity_value')}")
206
+ else:
207
+ self.printSummary("Node Affinity", "None")
208
+
209
+ if self.getParam('db2_tolerate_key') != "":
210
+ self.printSummary("Node Tolerations", f"{self.getParam('db2_tolerate_key')}={self.getParam('db2_tolerate_value')} @ {self.getParam('db2_tolerate_effect')}")
211
+ else:
212
+ self.printSummary("Node Tolerations", "None")
213
+
214
+ def cp4dSummary(self) -> None:
215
+ if self.deployCP4D:
216
+ self.printH2("IBM Cloud Pak for Data Configuration")
217
+ self.printParamSummary("Version", "cpd_product_version")
218
+ if self.installPredict:
219
+ self.printSummary("Watson Studio Local", "Install (Required by Maximo Predict)")
220
+ self.printSummary("Watson Machine Learning", "Install (Required by Maximo Predict)")
221
+ self.printSummary("Analytics Engine", "Install (Required by Maximo Predict)")
222
+ self.printSummary("Watson Openscale", "Install" if self.getParam("cpd_install_openscale") == "true" else "Do Not Install")
223
+ self.printSummary("SPSS Modeler", "Install" if self.getParam("cpd_install_spss") == "true" else "Do Not Install")
224
+ self.printSummary("Cognos Analytics", "Install" if self.getParam("cpd_install_cognos") == "true" else "Do Not Install")
225
+
226
+ def droSummary(self) -> None:
227
+ self.printH2("IBM Data Reporter Operator (DRO) Configuration")
228
+ self.printParamSummary("Contact e-mail", "uds_contact_email")
229
+ self.printParamSummary("First name", "uds_contact_firstname")
230
+ self.printParamSummary("Last name", "uds_contact_lastname")
231
+ self.printParamSummary("Install Namespace", "dro_namespace")
232
+
233
+ def slsSummary(self) -> None:
234
+ self.printH2("IBM Suite License Service")
235
+ self.printSummary("License File", self.slsLicenseFileLocal)
236
+ self.printParamSummary("IBM Open Registry", "sls_icr_cpopen")
237
+
238
+ def eckSummary(self) -> None:
239
+ self.printH2("Elastic Cloud on Kubernetes")
240
+ if self.getParam("eck_action") == "install":
241
+ self.printSummary("ECK Integration", "Enabled")
242
+ self.printParamSummary("Logstash", "eck_enable_logstash")
243
+ self.printParamSummary("Remote Elasticsearch hosts", "eck_remote_es_hosts")
244
+ self.printParamSummary("Remote Elasticsearch username", "eck_remote_es_username")
245
+ else:
246
+ self.printSummary("ECK Integration", "Disabled")
247
+
248
+ def turbonomicSummary(self) -> None:
249
+ self.printH2("Turbonomic")
250
+ if self.getParam("turbonomic_server_url") != "":
251
+ self.printSummary("Turbonomic Integration", "Enabled")
252
+ self.printParamSummary("Server URL", "turbonomic_server_url")
253
+ self.printParamSummary("Server version", "turbonomic_server_version")
254
+ self.printParamSummary("Target name", "turbonomic_target_name")
255
+ self.printParamSummary("Username", "turbonomic_username")
256
+ self.printSummary("Password", f"{self.getParam('turbonomic_password')[0:8]}&lt;snip&gt;")
257
+ else:
258
+ self.printSummary("Turbonomic Integration", "Disabled")
259
+
260
+ def mongoSummary(self) -> None:
261
+ self.printH2("MongoDb")
262
+ self.printParamSummary("Install Namespace", "mongodb_namespace")
263
+
264
+ def kafkaSummary(self) -> None:
265
+ if self.getParam("kafka_action_system") != "":
266
+ self.printH2("Kafka")
267
+
268
+ if self.getParam("kafka_provider") in ["strimzi", "redhat"]:
269
+ self.printParamSummary("Provider", "kafka_provider")
270
+ self.printParamSummary("Version", "kafka_version")
271
+ self.printParamSummary("Install Namespace", "kafka_namespace")
272
+
273
+ elif self.getParam("kafka_provider") == "ibm":
274
+ self.printParamSummary("Resource group", "eventstreams_resourcegroup")
275
+ self.printParamSummary("Instance name", "eventstreams_name")
276
+ self.printParamSummary("Instance location", "eventstreams_location")
277
+
278
+ elif self.getParam("kafka_provider") == "aws":
279
+ self.printParamSummary("VPC ID", "vpc_id")
280
+ self.printParamSummary("Instance region", "aws_region")
281
+ self.printParamSummary("Instance username", "aws_kafka_user_name")
282
+ self.printParamSummary("Instance type", "aws_msk_instance_type")
283
+ self.printParamSummary("Number of broker nodes", "aws_msk_instance_number")
284
+ self.printParamSummary("Storage size (GB)", "aws_msk_volume_size")
285
+ self.printParamSummary("Availability Zone 1 CIDR", "aws_msk_cidr_az1")
286
+ self.printParamSummary("Availability Zone 2 CIDR", "aws_msk_cidr_az2")
287
+ self.printParamSummary("Availability Zone 3 CIDR", "aws_msk_cidr_az3")
288
+ self.printParamSummary("Ingress CIDR", "aws_msk_ingress_cidr")
289
+ self.printParamSummary("Egress CIDR", "aws_msk_egress_cidr")
290
+
291
+ def grafanaSummary(self) -> None:
292
+ self.printH2("Grafana")
293
+ self.printSummary("Install Grafana", "Install" if self.getParam("grafana_action") == "install" else "Do Not Install")
294
+
295
+ def displayInstallSummary(self) -> None:
296
+ self.printH1("Review Settings")
297
+ self.printDescription([
298
+ "Connected to:",
299
+ f" - <u>{getConsoleURL(self.dynamicClient)}</u>"
300
+ ])
301
+
302
+ logger.debug("PipelineRun parameters:")
303
+ logger.debug(yaml.dump(self.params, default_flow_style = False))
304
+
305
+ # Cluster Config & Dependencies
306
+ self.ocpSummary()
307
+ self.icrSummary()
308
+ self.droSummary()
309
+ self.slsSummary()
310
+ self.masSummary()
311
+
312
+ self.printH2("IBM Maximo Application Suite Applications")
313
+ self.iotSummary()
314
+ self.monitorSummary()
315
+ self.manageSummary()
316
+ self.arcgisSummary()
317
+ self.predictSummary()
318
+ self.optimizerSummary()
319
+ self.assistSummary()
320
+ self.inspectionSummary()
321
+
322
+ # Application Dependencies
323
+ self.mongoSummary()
324
+ self.db2Summary()
325
+ self.kafkaSummary()
326
+ self.cp4dSummary()
327
+ self.grafanaSummary()
328
+ self.turbonomicSummary()