mas-cli 19.7.0__tar.gz → 19.9.0__tar.gz
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.
- {mas_cli-19.7.0/src/mas_cli.egg-info → mas_cli-19.9.0}/PKG-INFO +28 -25
- mas_cli-19.9.0/README.md +35 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/pyproject.toml +1 -2
- {mas_cli-19.7.0 → mas_cli-19.9.0}/setup.py +2 -6
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/__init__.py +1 -1
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/aiservice/install/app.py +3 -1
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/aiservice/install/params.py +4 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/aiservice/install/summarizer.py +10 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/cli.py +2 -1
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/install/app.py +18 -19
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/install/argBuilder.py +5 -5
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/install/argParser.py +12 -12
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/install/params.py +5 -1
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/install/settings/__init__.py +1 -2
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/install/settings/kafkaSettings.py +2 -9
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/install/settings/manageSettings.py +0 -4
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/install/summarizer.py +10 -8
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/mirror/app.py +207 -88
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/mirror/config.py +2 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/ibm-mas-tekton.yaml +3738 -438
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/uninstall/app.py +4 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/uninstall/argParser.py +20 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/update/app.py +33 -4
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/update/argParser.py +20 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/upgrade/app.py +4 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/upgrade/argParser.py +20 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0/src/mas_cli.egg-info}/PKG-INFO +28 -25
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas_cli.egg-info/SOURCES.txt +3 -3
- mas_cli-19.9.0/test/test_slack_params.py +57 -0
- mas_cli-19.7.0/README.rst +0 -34
- mas_cli-19.7.0/src/mas/cli/install/settings/redisSettings.py +0 -70
- {mas_cli-19.7.0 → mas_cli-19.9.0}/MANIFEST.in +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/setup.cfg +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/aiservice/install/__init__.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/aiservice/install/argBuilder.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/aiservice/install/argParser.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/aiservice/upgrade/__init__.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/aiservice/upgrade/app.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/aiservice/upgrade/argParser.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/backup/__init__.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/backup/app.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/backup/argParser.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/displayMixins.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/gencfg.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/install/__init__.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/install/catalogs.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/install/settings/additionalConfigs.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/install/settings/db2Settings.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/install/settings/mongodbSettings.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/mirror/__init__.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/mirror/argParser.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/restore/__init__.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/restore/app.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/restore/argParser.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/facilities-configs.yml.j2 +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/jdbccfg.yml.j2 +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-data-dictionary-assetdatadictionary.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-bascfg.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-coreidp.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-actions.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-auth.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-datapower.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-devops.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-dm.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-dsc.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-edgeconfig.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-fpl.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-guardian.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-iot.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-mbgx.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-mfgx.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-monitor.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-orgmgmt.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-provision.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-registry.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-state.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-webui.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-healthextaccelerator.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-healthextworkspace.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-imagestitching.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-manageaccelerators.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-manageapp.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-manageworkspace.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-slackproxy.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-pushnotificationcfg.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-scimcfg.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-slscfg.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-smtpcfg.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-suite.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-visualinspection.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-sls-licenseservice.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-data-dictionary-assetdatadictionary.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-bascfg.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-coreidp.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-actions.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-auth.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-datapower.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-devops.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-dm.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-dsc.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-edgeconfig.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-fpl.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-guardian.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-iot.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-mbgx.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-mfgx.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-monitor.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-orgmgmt.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-provision.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-registry.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-state.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-webui.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-healthextaccelerator.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-healthextworkspace.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-imagestitching.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-manageaccelerators.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-manageapp.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-manageworkspace.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-slackproxy.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-pushnotificationcfg.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-scimcfg.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-slscfg.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-smtpcfg.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-suite.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-visualinspection.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-sls-licenseservice.yml +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/templates/suite_mongocfg.yml.j2 +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/uninstall/__init__.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/update/__init__.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/upgrade/__init__.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/upgrade/settings/__init__.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas/cli/validators.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas-cli +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas_cli.egg-info/dependency_links.txt +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas_cli.egg-info/requires.txt +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/src/mas_cli.egg-info/top_level.txt +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/test/test_baseapp.py +0 -0
- {mas_cli-19.7.0 → mas_cli-19.9.0}/test/test_help.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mas-cli
|
|
3
|
-
Version: 19.
|
|
3
|
+
Version: 19.9.0
|
|
4
4
|
Summary: Python Admin CLI for Maximo Application Suite
|
|
5
5
|
Home-page: https://github.com/ibm-mas/cli
|
|
6
6
|
Author: David Parker
|
|
@@ -15,6 +15,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
15
15
|
Classifier: Topic :: Communications
|
|
16
16
|
Classifier: Topic :: Internet
|
|
17
17
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
18
19
|
Requires-Dist: mas-devops>=5.2.0
|
|
19
20
|
Requires-Dist: alive-progress
|
|
20
21
|
Requires-Dist: halo
|
|
@@ -31,6 +32,7 @@ Dynamic: author
|
|
|
31
32
|
Dynamic: author-email
|
|
32
33
|
Dynamic: classifier
|
|
33
34
|
Dynamic: description
|
|
35
|
+
Dynamic: description-content-type
|
|
34
36
|
Dynamic: home-page
|
|
35
37
|
Dynamic: license
|
|
36
38
|
Dynamic: provides-extra
|
|
@@ -38,36 +40,37 @@ Dynamic: requires-dist
|
|
|
38
40
|
Dynamic: summary
|
|
39
41
|
|
|
40
42
|
mas.devops
|
|
41
|
-
|
|
43
|
+
-------------------------------------------------------------------------------
|
|
42
44
|
|
|
43
|
-
Example
|
|
44
|
-
=======
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
Example
|
|
47
|
+
===============================================================================
|
|
48
|
+
```python
|
|
49
|
+
from openshift import dynamic
|
|
50
|
+
from kubernetes import config
|
|
51
|
+
from kubernetes.client import api_client
|
|
47
52
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
from kubernetes.client import api_client
|
|
53
|
+
from mas.devops.ocp import createNamespace
|
|
54
|
+
from mas.devops.tekton import installOpenShiftPipelines, updateTektonDefinitions, launchUpgradePipeline
|
|
51
55
|
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
instanceId = "mymas"
|
|
57
|
+
pipelinesNamespace = f"mas-{instanceId}-pipelines"
|
|
54
58
|
|
|
55
|
-
|
|
56
|
-
|
|
59
|
+
# Create an OpenShift client
|
|
60
|
+
dynClient = dynamic.DynamicClient(
|
|
61
|
+
api_client.ApiClient(configuration=config.load_kube_config())
|
|
62
|
+
)
|
|
57
63
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
)
|
|
64
|
+
# Install OpenShift Pipelines Operator
|
|
65
|
+
success = installOpenShiftPipelines(dynamicClient)
|
|
66
|
+
assert success is True
|
|
62
67
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
68
|
+
# Create the pipelines namespace and install the MAS tekton definitions
|
|
69
|
+
createNamespace(dynamicClient, pipelinesNamespace)
|
|
70
|
+
updateTektonDefinitions(pipelinesNamespace)
|
|
66
71
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
# Launch the upgrade pipeline and print the URL to view the pipeline run
|
|
73
|
+
pipelineURL = launchUpgradePipeline(self.dynamicClient, instanceId)
|
|
74
|
+
print(pipelineURL)
|
|
75
|
+
```
|
|
70
76
|
|
|
71
|
-
# Launch the upgrade pipeline and print the URL to view the pipeline run
|
|
72
|
-
pipelineURL = launchUpgradePipeline(self.dynamicClient, instanceId)
|
|
73
|
-
print(pipelineURL)
|
mas_cli-19.9.0/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
mas.devops
|
|
2
|
+
-------------------------------------------------------------------------------
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
Example
|
|
6
|
+
===============================================================================
|
|
7
|
+
```python
|
|
8
|
+
from openshift import dynamic
|
|
9
|
+
from kubernetes import config
|
|
10
|
+
from kubernetes.client import api_client
|
|
11
|
+
|
|
12
|
+
from mas.devops.ocp import createNamespace
|
|
13
|
+
from mas.devops.tekton import installOpenShiftPipelines, updateTektonDefinitions, launchUpgradePipeline
|
|
14
|
+
|
|
15
|
+
instanceId = "mymas"
|
|
16
|
+
pipelinesNamespace = f"mas-{instanceId}-pipelines"
|
|
17
|
+
|
|
18
|
+
# Create an OpenShift client
|
|
19
|
+
dynClient = dynamic.DynamicClient(
|
|
20
|
+
api_client.ApiClient(configuration=config.load_kube_config())
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
# Install OpenShift Pipelines Operator
|
|
24
|
+
success = installOpenShiftPipelines(dynamicClient)
|
|
25
|
+
assert success is True
|
|
26
|
+
|
|
27
|
+
# Create the pipelines namespace and install the MAS tekton definitions
|
|
28
|
+
createNamespace(dynamicClient, pipelinesNamespace)
|
|
29
|
+
updateTektonDefinitions(pipelinesNamespace)
|
|
30
|
+
|
|
31
|
+
# Launch the upgrade pipeline and print the URL to view the pipeline run
|
|
32
|
+
pipelineURL = launchUpgradePipeline(self.dynamicClient, instanceId)
|
|
33
|
+
print(pipelineURL)
|
|
34
|
+
```
|
|
35
|
+
|
|
@@ -14,13 +14,8 @@ import os
|
|
|
14
14
|
sys.path.insert(0, 'src')
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
if not os.path.exists('README.rst'):
|
|
18
|
-
import pypandoc
|
|
19
|
-
pypandoc.download_pandoc(targetfolder='~/bin/')
|
|
20
|
-
pypandoc.convert_file('README.md', 'rst', outputfile='README.rst')
|
|
21
|
-
|
|
22
17
|
here = os.path.abspath(os.path.dirname(__file__))
|
|
23
|
-
with open(os.path.join(here, 'README.
|
|
18
|
+
with open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
|
|
24
19
|
long_description = f.read()
|
|
25
20
|
|
|
26
21
|
# Maintain a single source of versioning
|
|
@@ -57,6 +52,7 @@ setup(
|
|
|
57
52
|
license='Eclipse Public License - v1.0',
|
|
58
53
|
description='Python Admin CLI for Maximo Application Suite',
|
|
59
54
|
long_description=long_description,
|
|
55
|
+
long_description_content_type='text/markdown',
|
|
60
56
|
install_requires=[
|
|
61
57
|
'mas-devops >= 5.2.0', # EPL
|
|
62
58
|
'alive-progress', # MIT License
|
|
@@ -493,7 +493,9 @@ class AiServiceInstallApp(BaseApp, aiServiceInstallArgBuilderMixin, aiServiceIns
|
|
|
493
493
|
slsLicenseFile=self.slsLicenseFileSecret,
|
|
494
494
|
additionalConfigs=self.additionalConfigsSecret,
|
|
495
495
|
podTemplates=self.podTemplatesSecret,
|
|
496
|
-
certs=self.certsSecret
|
|
496
|
+
certs=self.certsSecret,
|
|
497
|
+
slack_token=self.getParam("slack_token"),
|
|
498
|
+
slack_channel=self.getParam("slack_channel")
|
|
497
499
|
)
|
|
498
500
|
|
|
499
501
|
self.setupApprovals(pipelinesNamespace)
|
|
@@ -110,6 +110,13 @@ class aiServiceInstallSummarizerMixin():
|
|
|
110
110
|
else:
|
|
111
111
|
self.fatalError(f"Unexpected value for mongodb_action parameter: {self.getParam('mongodb_action')}")
|
|
112
112
|
|
|
113
|
+
def slackSummary(self) -> None:
|
|
114
|
+
self.printH2("Slack Integration")
|
|
115
|
+
if self.getParam("slack_channel") != "":
|
|
116
|
+
self.printParamSummary("Slack Channel", "slack_channel")
|
|
117
|
+
else:
|
|
118
|
+
self.printSummary("Slack Channel", "Not Configured")
|
|
119
|
+
|
|
113
120
|
def displayInstallSummary(self) -> None:
|
|
114
121
|
self.printH1("Review Settings")
|
|
115
122
|
self.printDescription([
|
|
@@ -129,3 +136,6 @@ class aiServiceInstallSummarizerMixin():
|
|
|
129
136
|
self.slsSummary()
|
|
130
137
|
self.mongoSummary()
|
|
131
138
|
self.db2Summary()
|
|
139
|
+
|
|
140
|
+
# Notification Integration
|
|
141
|
+
self.slackSummary()
|
|
@@ -120,7 +120,7 @@ class BaseApp(PrintMixin, PromptMixin):
|
|
|
120
120
|
logging.getLogger('asyncio').setLevel(logging.INFO)
|
|
121
121
|
|
|
122
122
|
# Supports extended semver, unlike mas.cli.__version__
|
|
123
|
-
self.version: str = "19.
|
|
123
|
+
self.version: str = "19.9.0"
|
|
124
124
|
self.h1count: int = 0
|
|
125
125
|
self.h2count: int = 0
|
|
126
126
|
|
|
@@ -155,6 +155,7 @@ class BaseApp(PrintMixin, PromptMixin):
|
|
|
155
155
|
"visualinspection": ["9.2.x-feature", "9.1.x"],
|
|
156
156
|
"iot": ["9.2.x-feature", "9.1.x"],
|
|
157
157
|
"monitor": ["9.2.x-feature", "9.1.x"],
|
|
158
|
+
"facilities": ["9.2.x-feature", "9.1.x"],
|
|
158
159
|
},
|
|
159
160
|
"9.1.x": {
|
|
160
161
|
"facilities": ["9.1.x"],
|
|
@@ -846,11 +846,7 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
|
|
|
846
846
|
if self.isSNO():
|
|
847
847
|
self.setParam("mongodb_replicas", "1")
|
|
848
848
|
self.setParam("mongodb_cpu_requests", "500m")
|
|
849
|
-
self.setParam("redis_replicas", "1")
|
|
850
849
|
self.setParam("mas_app_settings_aio_flag", "false")
|
|
851
|
-
else:
|
|
852
|
-
# Multi-node cluster: use 3 replicas for Redis HA
|
|
853
|
-
self.setParam("redis_replicas", "3")
|
|
854
850
|
|
|
855
851
|
@logMethodCall
|
|
856
852
|
def configDNSAndCerts(self):
|
|
@@ -1634,6 +1630,14 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
|
|
|
1634
1630
|
self.setParam("mongodb_action", "byo")
|
|
1635
1631
|
self.setParam("sls_mongodb_cfg_file", "/workspace/additional-configs/mongodb-system.yaml")
|
|
1636
1632
|
|
|
1633
|
+
# If there is a file named kafka-<instance>-system.yaml we will use this as a BYO Kafka datasource
|
|
1634
|
+
if self.localConfigDir is not None:
|
|
1635
|
+
instanceId = self.getParam("mas_instance_id")
|
|
1636
|
+
if instanceId is not None and instanceId != "":
|
|
1637
|
+
kafkaConfigFile = path.join(self.localConfigDir, f"kafka-{instanceId}-system.yaml")
|
|
1638
|
+
if path.exists(kafkaConfigFile):
|
|
1639
|
+
self.setParam("kafka_action_system", "byo")
|
|
1640
|
+
|
|
1637
1641
|
elif key == "pod_templates":
|
|
1638
1642
|
# For the named configurations we will convert into the path
|
|
1639
1643
|
if value in ["best-effort", "guaranteed"]:
|
|
@@ -1722,12 +1726,6 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
|
|
|
1722
1726
|
if value is not None and value != "":
|
|
1723
1727
|
self.setParam(key, value)
|
|
1724
1728
|
self.setParam("sls_mongodb_cfg_file", f"/workspace/configs/mongo-{value}.yml")
|
|
1725
|
-
# Redis
|
|
1726
|
-
elif key == "redis_namespace":
|
|
1727
|
-
if value is not None and value != "":
|
|
1728
|
-
self.setParam(key, value)
|
|
1729
|
-
self.setParam("redis_action", "install")
|
|
1730
|
-
self.setParam("redis_cfg_file", f"/workspace/configs/redis-{value}.yml")
|
|
1731
1729
|
|
|
1732
1730
|
# SLS
|
|
1733
1731
|
elif key == "license_file":
|
|
@@ -1880,14 +1878,6 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
|
|
|
1880
1878
|
if ((self.getParam("mas_app_channel_predict") is not None and self.getParam("mas_app_channel_predict") != "") and 'health' not in self.getParam("mas_appws_components")):
|
|
1881
1879
|
self.fatalError("--manage-components must include 'health' component when installing Predict")
|
|
1882
1880
|
|
|
1883
|
-
# Configure Redis if Collaborate addon is enabled
|
|
1884
|
-
if self.installManage and "collaborate=" in self.getParam("mas_appws_components"):
|
|
1885
|
-
logger.debug("Collaborate addon detected in mas_appws_components, configuring Redis")
|
|
1886
|
-
self.setParam("redis_action", "install")
|
|
1887
|
-
if self.getParam("redis_namespace") == "":
|
|
1888
|
-
self.setParam("redis_namespace", "redis")
|
|
1889
|
-
self.setParam("redis_cfg_file", f"/workspace/configs/redis-{self.getParam('redis_namespace')}.yml")
|
|
1890
|
-
|
|
1891
1881
|
# Validate ArcGIS installation requirements in non-interactive mode
|
|
1892
1882
|
if self.installArcgis:
|
|
1893
1883
|
hasSpatial = self.installManage and "spatial=" in self.getParam("mas_appws_components")
|
|
@@ -1902,6 +1892,13 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
|
|
|
1902
1892
|
if arcgis_channel and not isVersionEqualOrAfter('9.0.0', arcgis_channel):
|
|
1903
1893
|
self.fatalError(f"--arcgis-channel must be 9.0 or later (current: {arcgis_channel})")
|
|
1904
1894
|
|
|
1895
|
+
# Validate Kafka requirements for IoT installation in non-interactive mode
|
|
1896
|
+
if self.installIoT:
|
|
1897
|
+
kafkaAction = self.getParam("kafka_action_system")
|
|
1898
|
+
hasKafkaConfig = kafkaAction in ["install", "byo"]
|
|
1899
|
+
if not hasKafkaConfig:
|
|
1900
|
+
self.fatalError("--iot-channel requires Kafka configuration. Provide Kafka install arguments such as --kafka-provider, or supply a BYO Kafka config file named kafka-<mas-instance-id>-system.yaml using --additional-configs")
|
|
1901
|
+
|
|
1905
1902
|
@logMethodCall
|
|
1906
1903
|
def install(self, argv):
|
|
1907
1904
|
"""
|
|
@@ -2138,7 +2135,9 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
|
|
|
2138
2135
|
slsLicenseFile=self.slsLicenseFileSecret,
|
|
2139
2136
|
additionalConfigs=self.additionalConfigsSecret,
|
|
2140
2137
|
podTemplates=self.podTemplatesSecret,
|
|
2141
|
-
certs=self.certsSecret
|
|
2138
|
+
certs=self.certsSecret,
|
|
2139
|
+
slack_token=self.getParam("slack_token"),
|
|
2140
|
+
slack_channel=self.getParam("slack_channel")
|
|
2142
2141
|
)
|
|
2143
2142
|
|
|
2144
2143
|
self.setupApprovals(pipelinesNamespace)
|
|
@@ -180,11 +180,6 @@ class installArgBuilderMixin():
|
|
|
180
180
|
if self.getParam('mongodb_namespace') != "":
|
|
181
181
|
command += f" --mongodb-namespace \"{self.getParam('mongodb_namespace')}\"{newline}"
|
|
182
182
|
|
|
183
|
-
# Redis Configuration
|
|
184
|
-
# -----------------------------------------------------------------------------
|
|
185
|
-
if self.getParam('redis_namespace') != "":
|
|
186
|
-
command += f" --redis-namespace \"{self.getParam('redis_namespace')}\"{newline}"
|
|
187
|
-
|
|
188
183
|
# OCP Configuration
|
|
189
184
|
# -----------------------------------------------------------------------------
|
|
190
185
|
if self.getParam('ocp_ingress_tls_secret_name') != "":
|
|
@@ -584,6 +579,11 @@ class installArgBuilderMixin():
|
|
|
584
579
|
if self.getParam('approval_aiservice') != "":
|
|
585
580
|
command += f" --approval-aiservice \"{self.getParam('approval_aiservice')}\"{newline}"
|
|
586
581
|
|
|
582
|
+
# Slack
|
|
583
|
+
# -----------------------------------------------------------------------------
|
|
584
|
+
if self.getParam('slack_channel') != "" and self.getParam('slack_token'):
|
|
585
|
+
command += f" --slack-channel \"{self.getParam('slack_channel')}\" --slack-token $SLACK_TOKEN{newline}"
|
|
586
|
+
|
|
587
587
|
# More Options
|
|
588
588
|
# -----------------------------------------------------------------------------
|
|
589
589
|
if self.devMode:
|
|
@@ -423,18 +423,6 @@ mongoArgGroup.add_argument(
|
|
|
423
423
|
help="Namespace for MongoDB Community Operator"
|
|
424
424
|
)
|
|
425
425
|
|
|
426
|
-
# Redis Configuration
|
|
427
|
-
# -----------------------------------------------------------------------------
|
|
428
|
-
redisArgGroup = installArgParser.add_argument_group(
|
|
429
|
-
"Redis",
|
|
430
|
-
"Configure the namespace for Redis deployment (required for Collaborate addon)."
|
|
431
|
-
)
|
|
432
|
-
redisArgGroup.add_argument(
|
|
433
|
-
"--redis-namespace",
|
|
434
|
-
required=False,
|
|
435
|
-
help="Namespace for Redis deployment (default: redis)"
|
|
436
|
-
)
|
|
437
|
-
|
|
438
426
|
# OCP Configuration
|
|
439
427
|
# -----------------------------------------------------------------------------
|
|
440
428
|
ocpArgGroup = installArgParser.add_argument_group(
|
|
@@ -1593,6 +1581,18 @@ otherArgGroup.add_argument(
|
|
|
1593
1581
|
default=False,
|
|
1594
1582
|
help="Don't show advanced install options (in interactive mode)"
|
|
1595
1583
|
)
|
|
1584
|
+
otherArgGroup.add_argument(
|
|
1585
|
+
"--slack-token",
|
|
1586
|
+
dest="slack_token",
|
|
1587
|
+
required=False,
|
|
1588
|
+
help="Slack bot token for sending pipeline notifications"
|
|
1589
|
+
)
|
|
1590
|
+
otherArgGroup.add_argument(
|
|
1591
|
+
"--slack-channel",
|
|
1592
|
+
dest="slack_channel",
|
|
1593
|
+
required=False,
|
|
1594
|
+
help="Slack channel(s) for notifications (comma-separated for multiple channels)"
|
|
1595
|
+
)
|
|
1596
1596
|
|
|
1597
1597
|
otherArgGroup.add_argument(
|
|
1598
1598
|
"--accept-license",
|
|
@@ -10,13 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
from .db2Settings import Db2SettingsMixin
|
|
12
12
|
from .mongodbSettings import MongoDbSettingsMixin
|
|
13
|
-
from .redisSettings import RedisSettingsMixin
|
|
14
13
|
from .kafkaSettings import KafkaSettingsMixin
|
|
15
14
|
from .manageSettings import ManageSettingsMixin
|
|
16
15
|
from .additionalConfigs import AdditionalConfigsMixin
|
|
17
16
|
|
|
18
17
|
|
|
19
|
-
class InstallSettingsMixin(Db2SettingsMixin, MongoDbSettingsMixin,
|
|
18
|
+
class InstallSettingsMixin(Db2SettingsMixin, MongoDbSettingsMixin, KafkaSettingsMixin, ManageSettingsMixin, AdditionalConfigsMixin):
|
|
20
19
|
"""
|
|
21
20
|
This class collects all the Mixins providing interactive prompts for mas-install
|
|
22
21
|
"""
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
from typing import TYPE_CHECKING, Dict, List, NoReturn
|
|
12
12
|
from os import path
|
|
13
13
|
from prompt_toolkit import print_formatted_text
|
|
14
|
-
from mas.devops.utils import isVersionEqualOrAfter
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
if TYPE_CHECKING:
|
|
@@ -24,7 +23,6 @@ class KafkaSettingsMixin():
|
|
|
24
23
|
# Attributes from BaseApp and other mixins
|
|
25
24
|
params: Dict[str, str]
|
|
26
25
|
installIoT: bool
|
|
27
|
-
installMonitor: bool
|
|
28
26
|
showAdvancedOptions: bool
|
|
29
27
|
localConfigDir: str | None
|
|
30
28
|
|
|
@@ -74,15 +72,10 @@ class KafkaSettingsMixin():
|
|
|
74
72
|
...
|
|
75
73
|
|
|
76
74
|
def configKafka(self) -> None:
|
|
77
|
-
|
|
78
|
-
monitorChannel = self.getParam("mas_app_channel_monitor")
|
|
79
|
-
useNewDependency = monitorChannel and isVersionEqualOrAfter('9.2.0', monitorChannel)
|
|
80
|
-
|
|
81
|
-
if (useNewDependency and self.installMonitor) or (not useNewDependency and self.installIoT):
|
|
82
|
-
appName = "Monitor" if (useNewDependency and self.installMonitor) else "IoT"
|
|
75
|
+
if self.installIoT:
|
|
83
76
|
self.printH1("Configure Kafka")
|
|
84
77
|
self.printDescription([
|
|
85
|
-
|
|
78
|
+
"Maximo IoT requires a shared system-scope Kafka instance",
|
|
86
79
|
"Supported Kafka providers: Strimzi, Red Hat AMQ Streams, IBM Cloud Event Streams and AWS MSK",
|
|
87
80
|
"You may also choose to configure MAS to use an existing Kafka instance by providing a pre-existing configuration file"
|
|
88
81
|
])
|
|
@@ -176,10 +176,6 @@ class ManageSettingsMixin():
|
|
|
176
176
|
self.params["mas_appws_components"] += ",aip=latest"
|
|
177
177
|
if self.yesOrNo(" - Vegetation Management"):
|
|
178
178
|
self.params["mas_appws_components"] += ",vegm=latest"
|
|
179
|
-
if self.yesOrNo(" - Collaborate"):
|
|
180
|
-
self.params["mas_appws_components"] += ",collaborate=latest"
|
|
181
|
-
# Configure Redis for Collaborate addon
|
|
182
|
-
self.configRedis()
|
|
183
179
|
logger.debug(f"Generated mas_appws_components = {self.params['mas_appws_components']}")
|
|
184
180
|
|
|
185
181
|
if ",icd=" in self.params["mas_appws_components"]:
|
|
@@ -198,7 +198,6 @@ class InstallSummarizerMixin():
|
|
|
198
198
|
self.printSummary(" + Workday Applications", "Enabled" if "workday=" in self.getParam("mas_appws_components") else "Disabled")
|
|
199
199
|
self.printSummary(" + AIP", "Enabled" if "aip=" in self.getParam("mas_appws_components") else "Disabled")
|
|
200
200
|
self.printSummary(" + Vegetation Management", "Enabled" if "vegm=" in self.getParam("mas_appws_components") else "Disabled")
|
|
201
|
-
self.printSummary(" + Collaborate", "Enabled" if "collaborate=" in self.getParam("mas_appws_components") else "Disabled")
|
|
202
201
|
|
|
203
202
|
self.printParamSummary("+ Upgrade Type", "mas_appws_upgrade_type")
|
|
204
203
|
|
|
@@ -376,12 +375,6 @@ class InstallSummarizerMixin():
|
|
|
376
375
|
else:
|
|
377
376
|
self.fatalError(f"Unexpected value for mongodb_action parameter: {self.getParam('mongodb_action')}")
|
|
378
377
|
|
|
379
|
-
def redisSummary(self) -> None:
|
|
380
|
-
if self.getParam("redis_action") == "install":
|
|
381
|
-
self.printH2("Redis")
|
|
382
|
-
self.printSummary("Type", "Redis with Sentinel HA")
|
|
383
|
-
self.printParamSummary("Install Namespace", "redis_namespace")
|
|
384
|
-
|
|
385
378
|
def kafkaSummary(self) -> None:
|
|
386
379
|
if self.getParam("kafka_action_system") != "":
|
|
387
380
|
self.printH2("Kafka")
|
|
@@ -418,6 +411,13 @@ class InstallSummarizerMixin():
|
|
|
418
411
|
else:
|
|
419
412
|
self.printSummary("Install Grafana", "Do Not Install")
|
|
420
413
|
|
|
414
|
+
def slackSummary(self) -> None:
|
|
415
|
+
self.printH2("Slack Integration")
|
|
416
|
+
if self.getParam("slack_channel") != "":
|
|
417
|
+
self.printParamSummary("Slack Channel", "slack_channel")
|
|
418
|
+
else:
|
|
419
|
+
self.printSummary("Slack Channel", "Not Configured")
|
|
420
|
+
|
|
421
421
|
def installSummary(self) -> None:
|
|
422
422
|
pass
|
|
423
423
|
# self.printH2("Install Process")
|
|
@@ -452,12 +452,14 @@ class InstallSummarizerMixin():
|
|
|
452
452
|
|
|
453
453
|
# Application Dependencies
|
|
454
454
|
self.mongoSummary()
|
|
455
|
-
self.redisSummary()
|
|
456
455
|
self.db2Summary()
|
|
457
456
|
self.cosSummary()
|
|
458
457
|
self.kafkaSummary()
|
|
459
458
|
self.cp4dSummary()
|
|
460
459
|
self.grafanaSummary()
|
|
461
460
|
|
|
461
|
+
# Notification Integration
|
|
462
|
+
self.slackSummary()
|
|
463
|
+
|
|
462
464
|
# Install options
|
|
463
465
|
self.installSummary()
|