mas-cli 19.8.0__tar.gz → 20.0.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.8.0/src/mas_cli.egg-info → mas_cli-20.0.0}/PKG-INFO +28 -25
- mas_cli-20.0.0/README.md +35 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/pyproject.toml +1 -2
- {mas_cli-19.8.0 → mas_cli-20.0.0}/setup.py +2 -6
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/__init__.py +1 -1
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/aiservice/install/app.py +3 -1
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/aiservice/install/params.py +4 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/aiservice/install/summarizer.py +10 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/cli.py +2 -1
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/install/app.py +18 -1
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/install/argBuilder.py +5 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/install/argParser.py +12 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/install/params.py +5 -1
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/install/settings/kafkaSettings.py +2 -9
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/install/summarizer.py +10 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/mirror/app.py +207 -88
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/mirror/config.py +2 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/ibm-mas-tekton.yaml +3787 -271
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/uninstall/app.py +4 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/uninstall/argParser.py +20 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/update/app.py +33 -4
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/update/argParser.py +20 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/upgrade/app.py +4 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/upgrade/argParser.py +20 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0/src/mas_cli.egg-info}/PKG-INFO +28 -25
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas_cli.egg-info/SOURCES.txt +3 -2
- mas_cli-20.0.0/test/test_slack_params.py +57 -0
- mas_cli-19.8.0/README.rst +0 -34
- {mas_cli-19.8.0 → mas_cli-20.0.0}/MANIFEST.in +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/setup.cfg +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/aiservice/install/__init__.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/aiservice/install/argBuilder.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/aiservice/install/argParser.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/aiservice/upgrade/__init__.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/aiservice/upgrade/app.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/aiservice/upgrade/argParser.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/backup/__init__.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/backup/app.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/backup/argParser.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/displayMixins.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/gencfg.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/install/__init__.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/install/catalogs.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/install/settings/__init__.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/install/settings/additionalConfigs.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/install/settings/db2Settings.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/install/settings/manageSettings.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/install/settings/mongodbSettings.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/mirror/__init__.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/mirror/argParser.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/restore/__init__.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/restore/app.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/restore/argParser.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/facilities-configs.yml.j2 +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/jdbccfg.yml.j2 +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-data-dictionary-assetdatadictionary.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-bascfg.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-coreidp.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-actions.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-auth.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-datapower.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-devops.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-dm.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-dsc.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-edgeconfig.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-fpl.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-guardian.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-iot.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-mbgx.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-mfgx.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-monitor.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-orgmgmt.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-provision.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-registry.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-state.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-iot-webui.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-healthextaccelerator.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-healthextworkspace.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-imagestitching.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-manageaccelerators.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-manageapp.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-manageworkspace.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-manage-slackproxy.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-pushnotificationcfg.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-scimcfg.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-slscfg.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-smtpcfg.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-suite.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-mas-visualinspection.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/best-effort/ibm-sls-licenseservice.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-data-dictionary-assetdatadictionary.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-bascfg.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-coreidp.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-actions.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-auth.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-datapower.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-devops.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-dm.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-dsc.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-edgeconfig.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-fpl.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-guardian.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-iot.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-mbgx.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-mfgx.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-monitor.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-orgmgmt.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-provision.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-registry.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-state.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-iot-webui.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-healthextaccelerator.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-healthextworkspace.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-imagestitching.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-manageaccelerators.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-manageapp.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-manageworkspace.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-manage-slackproxy.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-pushnotificationcfg.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-scimcfg.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-slscfg.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-smtpcfg.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-suite.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-mas-visualinspection.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/pod-templates/guaranteed/ibm-sls-licenseservice.yml +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/templates/suite_mongocfg.yml.j2 +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/uninstall/__init__.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/update/__init__.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/upgrade/__init__.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/upgrade/settings/__init__.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas/cli/validators.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas-cli +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas_cli.egg-info/dependency_links.txt +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas_cli.egg-info/requires.txt +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/src/mas_cli.egg-info/top_level.txt +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/test/test_baseapp.py +0 -0
- {mas_cli-19.8.0 → mas_cli-20.0.0}/test/test_help.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mas-cli
|
|
3
|
-
Version:
|
|
3
|
+
Version: 20.0.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-20.0.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 = "
|
|
123
|
+
self.version: str = "20.0.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"],
|
|
@@ -1630,6 +1630,14 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
|
|
|
1630
1630
|
self.setParam("mongodb_action", "byo")
|
|
1631
1631
|
self.setParam("sls_mongodb_cfg_file", "/workspace/additional-configs/mongodb-system.yaml")
|
|
1632
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
|
+
|
|
1633
1641
|
elif key == "pod_templates":
|
|
1634
1642
|
# For the named configurations we will convert into the path
|
|
1635
1643
|
if value in ["best-effort", "guaranteed"]:
|
|
@@ -1884,6 +1892,13 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
|
|
|
1884
1892
|
if arcgis_channel and not isVersionEqualOrAfter('9.0.0', arcgis_channel):
|
|
1885
1893
|
self.fatalError(f"--arcgis-channel must be 9.0 or later (current: {arcgis_channel})")
|
|
1886
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
|
+
|
|
1887
1902
|
@logMethodCall
|
|
1888
1903
|
def install(self, argv):
|
|
1889
1904
|
"""
|
|
@@ -2120,7 +2135,9 @@ class InstallApp(BaseApp, InstallSettingsMixin, InstallSummarizerMixin, ConfigGe
|
|
|
2120
2135
|
slsLicenseFile=self.slsLicenseFileSecret,
|
|
2121
2136
|
additionalConfigs=self.additionalConfigsSecret,
|
|
2122
2137
|
podTemplates=self.podTemplatesSecret,
|
|
2123
|
-
certs=self.certsSecret
|
|
2138
|
+
certs=self.certsSecret,
|
|
2139
|
+
slack_token=self.getParam("slack_token"),
|
|
2140
|
+
slack_channel=self.getParam("slack_channel")
|
|
2124
2141
|
)
|
|
2125
2142
|
|
|
2126
2143
|
self.setupApprovals(pipelinesNamespace)
|
|
@@ -579,6 +579,11 @@ class installArgBuilderMixin():
|
|
|
579
579
|
if self.getParam('approval_aiservice') != "":
|
|
580
580
|
command += f" --approval-aiservice \"{self.getParam('approval_aiservice')}\"{newline}"
|
|
581
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
|
+
|
|
582
587
|
# More Options
|
|
583
588
|
# -----------------------------------------------------------------------------
|
|
584
589
|
if self.devMode:
|
|
@@ -1581,6 +1581,18 @@ otherArgGroup.add_argument(
|
|
|
1581
1581
|
default=False,
|
|
1582
1582
|
help="Don't show advanced install options (in interactive mode)"
|
|
1583
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
|
+
)
|
|
1584
1596
|
|
|
1585
1597
|
otherArgGroup.add_argument(
|
|
1586
1598
|
"--accept-license",
|
|
@@ -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
|
])
|
|
@@ -411,6 +411,13 @@ class InstallSummarizerMixin():
|
|
|
411
411
|
else:
|
|
412
412
|
self.printSummary("Install Grafana", "Do Not Install")
|
|
413
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
|
+
|
|
414
421
|
def installSummary(self) -> None:
|
|
415
422
|
pass
|
|
416
423
|
# self.printH2("Install Process")
|
|
@@ -451,5 +458,8 @@ class InstallSummarizerMixin():
|
|
|
451
458
|
self.cp4dSummary()
|
|
452
459
|
self.grafanaSummary()
|
|
453
460
|
|
|
461
|
+
# Notification Integration
|
|
462
|
+
self.slackSummary()
|
|
463
|
+
|
|
454
464
|
# Install options
|
|
455
465
|
self.installSummary()
|