Python for Maximo Application Suite Dev/Ops
Project description
from openshift import dynamic
from kubernetes import config
from kubernetes.client import api_client
from mas.devops.ocp import createNamespace
from mas.devops.tekton import installOpenShiftPipelines, updateTektonDefinitions, launchUpgradePipeline
instanceId = "mymas"
pipelinesNamespace = f"mas-{instanceId}-pipelines"
# Create an OpenShift client
dynClient = dynamic.DynamicClient(
api_client.ApiClient(configuration=config.load_kube_config())
)
# Install OpenShift Pipelines Operator
installOpenShiftPipelines(dynamicClient)
# Create the pipelines namespace and install the MAS tekton definitions
createNamespace(dynamicClient, pipelinesNamespace)
updateTektonDefinitions(pipelinesNamespace, "/mascli/templates/ibm-mas-tekton.yaml")
# Launch the upgrade pipeline and print the URL to view the pipeline run
pipelineURL = launchUpgradePipeline(self.dynamicClient, instanceId)
print(pipelineURL)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mas_devops-1.0.0.tar.gz
(12.1 kB
view hashes)
Built Distribution
mas_devops-1.0.0-py3-none-any.whl
(13.3 kB
view hashes)
Close
Hashes for mas_devops-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e65212692bfffd78d3bdc6707390f44ee35094b02d3c8eb45c58ce90d782b55 |
|
MD5 | 8b4b6ffd0c5b8fcb0c8565df5530befb |
|
BLAKE2b-256 | 1b4d68508214f669b2e9bb7686b55a23e53e34bcf3754b18cbff9cc17a0b1923 |