mas.devops
==========
|Code style: PEP8| |Flake8: checked| |GitHub Actions Workflow Status|
|PyPI - Version| |PyPI - Python Version| |PyPI - Downloads|
Example
-------
.. code:: python
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)
mas-devops-create-initial-users
-------------------------------
Add to /etc/hosts
::
127.0.0.1 tgk01-masdev.mas-tgk01-manage.svc.cluster.local
127.0.0.1 coreapi.mas-tgk01-core.svc.cluster.local
127.0.0.1 admin-dashboard.mas-tgk01-core.svc.cluster.local
.. code:: bash
SM_AWS_REGION=""
SM_AWS_ACCESS_KEY_ID=""
SM_AWS_SECRET_ACCESS_KEY=""
aws configure set default.region ${SM_AWS_REGION}
aws configure set aws_access_key_id ${SM_AWS_ACCESS_KEY_ID}
aws configure set aws_secret_access_key ${SM_AWS_SECRET_ACCESS_KEY}
oc login --token=sha256~xxx --server=https://xxx:6443
oc port-forward service/admin-dashboard 8445:443 -n mas-tgk01-core
oc port-forward service/coreapi 8444:443 -n mas-tgk01-core
oc port-forward service/tgk01-masdev 8443:443 -n mas-tgk01-manage
mas-devops-create-initial-users-for-saas \
--mas-instance-id tgk01 \
--mas-workspace-id masdev \
--log-level INFO \
--initial-users-secret-name "aws-dev/noble4/tgk01/initial_users" \
--manage-api-port 8443 \
--coreapi-port 8444 \
--admin-dashboard-port 8445
mas-devops-create-initial-users-for-saas \
--mas-instance-id tgk01 \
--mas-workspace-id masdev \
--log-level INFO \
--initial-users-yaml-file /home/tom/workspaces/notes/mascore3423/example-users-single.yaml \
--manage-api-port 8443 \
--coreapi-port 8444 \
--admin-dashboard-port 8445
Example of initial_users secret:
.. code:: json
{"john.smith1@example.com":"primary,john1,smith1","john.smith2@example.com":"primary,john2,smith2","john.smith3@example.com":"secondary,john3,smith3"}
.. |Code style: PEP8| image:: https://img.shields.io/badge/code%20style-PEP--8-blue.svg
:target: https://peps.python.org/pep-0008/
.. |Flake8: checked| image:: https://img.shields.io/badge/flake8-checked-blueviolet
:target: https://flake8.pycqa.org/en/latest/
.. |GitHub Actions Workflow Status| image:: https://img.shields.io/github/actions/workflow/status/ibm-mas/python-devops/python-release.yml
.. |PyPI - Version| image:: https://img.shields.io/pypi/v/mas.devops
:target: https://pypi.org/project/mas-devops
.. |PyPI - Python Version| image:: https://img.shields.io/pypi/pyversions/mas.devops
.. |PyPI - Downloads| image:: https://img.shields.io/pypi/dm/mas.devops
Raw data
{
"_id": null,
"home_page": "https://github.com/ibm-mas/python-devops",
"name": "mas-devops",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "David Parker",
"author_email": "parkerda@uk.ibm.com",
"download_url": "https://files.pythonhosted.org/packages/ed/aa/02ca2d125ca8bb1ec6d4efbce14b946be285eb8b07226089995012724a79/mas_devops-3.13.0.tar.gz",
"platform": null,
"description": "mas.devops\n==========\n\n|Code style: PEP8| |Flake8: checked| |GitHub Actions Workflow Status|\n|PyPI - Version| |PyPI - Python Version| |PyPI - Downloads|\n\nExample\n-------\n\n.. code:: python\n\n from openshift import dynamic\n from kubernetes import config\n from kubernetes.client import api_client\n\n from mas.devops.ocp import createNamespace\n from mas.devops.tekton import installOpenShiftPipelines, updateTektonDefinitions, launchUpgradePipeline\n\n instanceId = \"mymas\"\n pipelinesNamespace = f\"mas-{instanceId}-pipelines\"\n\n # Create an OpenShift client\n dynClient = dynamic.DynamicClient(\n api_client.ApiClient(configuration=config.load_kube_config())\n )\n\n # Install OpenShift Pipelines Operator\n installOpenShiftPipelines(dynamicClient)\n\n # Create the pipelines namespace and install the MAS tekton definitions\n createNamespace(dynamicClient, pipelinesNamespace)\n updateTektonDefinitions(pipelinesNamespace, \"/mascli/templates/ibm-mas-tekton.yaml\")\n\n # Launch the upgrade pipeline and print the URL to view the pipeline run\n pipelineURL = launchUpgradePipeline(self.dynamicClient, instanceId)\n print(pipelineURL)\n\nmas-devops-create-initial-users\n-------------------------------\n\nAdd to /etc/hosts\n\n::\n\n 127.0.0.1 tgk01-masdev.mas-tgk01-manage.svc.cluster.local\n 127.0.0.1 coreapi.mas-tgk01-core.svc.cluster.local\n 127.0.0.1 admin-dashboard.mas-tgk01-core.svc.cluster.local\n\n.. code:: bash\n\n SM_AWS_REGION=\"\"\n SM_AWS_ACCESS_KEY_ID=\"\"\n SM_AWS_SECRET_ACCESS_KEY=\"\"\n\n aws configure set default.region ${SM_AWS_REGION}\n aws configure set aws_access_key_id ${SM_AWS_ACCESS_KEY_ID}\n aws configure set aws_secret_access_key ${SM_AWS_SECRET_ACCESS_KEY}\n\n\n oc login --token=sha256~xxx --server=https://xxx:6443\n\n oc port-forward service/admin-dashboard 8445:443 -n mas-tgk01-core\n oc port-forward service/coreapi 8444:443 -n mas-tgk01-core\n oc port-forward service/tgk01-masdev 8443:443 -n mas-tgk01-manage\n\n mas-devops-create-initial-users-for-saas \\\n --mas-instance-id tgk01 \\\n --mas-workspace-id masdev \\\n --log-level INFO \\\n --initial-users-secret-name \"aws-dev/noble4/tgk01/initial_users\" \\\n --manage-api-port 8443 \\\n --coreapi-port 8444 \\\n --admin-dashboard-port 8445\n \n\n mas-devops-create-initial-users-for-saas \\\n --mas-instance-id tgk01 \\\n --mas-workspace-id masdev \\\n --log-level INFO \\\n --initial-users-yaml-file /home/tom/workspaces/notes/mascore3423/example-users-single.yaml \\\n --manage-api-port 8443 \\\n --coreapi-port 8444 \\\n --admin-dashboard-port 8445\n\nExample of initial_users secret:\n\n.. code:: json\n\n {\"john.smith1@example.com\":\"primary,john1,smith1\",\"john.smith2@example.com\":\"primary,john2,smith2\",\"john.smith3@example.com\":\"secondary,john3,smith3\"}\n\n.. |Code style: PEP8| image:: https://img.shields.io/badge/code%20style-PEP--8-blue.svg\n :target: https://peps.python.org/pep-0008/\n.. |Flake8: checked| image:: https://img.shields.io/badge/flake8-checked-blueviolet\n :target: https://flake8.pycqa.org/en/latest/\n.. |GitHub Actions Workflow Status| image:: https://img.shields.io/github/actions/workflow/status/ibm-mas/python-devops/python-release.yml\n.. |PyPI - Version| image:: https://img.shields.io/pypi/v/mas.devops\n :target: https://pypi.org/project/mas-devops\n.. |PyPI - Python Version| image:: https://img.shields.io/pypi/pyversions/mas.devops\n.. |PyPI - Downloads| image:: https://img.shields.io/pypi/dm/mas.devops\n",
"bugtrack_url": null,
"license": "Eclipse Public License - v1.0",
"summary": "Python for Maximo Application Suite Dev/Ops",
"version": "3.13.0",
"project_urls": {
"Homepage": "https://github.com/ibm-mas/python-devops"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "1cb0eaf96e6dd8bba32ac3497f6fa4dc80ad9c384159a0afbf2455dab1d539e0",
"md5": "96d57077902dc23ba4063339905c84cd",
"sha256": "471a746d94cce7565bc55c85de50e27beb915a701320a3f4ac0fd29169d1a193"
},
"downloads": -1,
"filename": "mas_devops-3.13.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "96d57077902dc23ba4063339905c84cd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 101884,
"upload_time": "2025-07-14T10:09:01",
"upload_time_iso_8601": "2025-07-14T10:09:01.502830Z",
"url": "https://files.pythonhosted.org/packages/1c/b0/eaf96e6dd8bba32ac3497f6fa4dc80ad9c384159a0afbf2455dab1d539e0/mas_devops-3.13.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "edaa02ca2d125ca8bb1ec6d4efbce14b946be285eb8b07226089995012724a79",
"md5": "4d2e75ed8da423f246dd32ccf9b68e23",
"sha256": "3127a599d6402a66089f0ee8aa65ee8c75c5016dea6b0b64a738be11f67673ea"
},
"downloads": -1,
"filename": "mas_devops-3.13.0.tar.gz",
"has_sig": false,
"md5_digest": "4d2e75ed8da423f246dd32ccf9b68e23",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 53702,
"upload_time": "2025-07-14T10:09:03",
"upload_time_iso_8601": "2025-07-14T10:09:03.026875Z",
"url": "https://files.pythonhosted.org/packages/ed/aa/02ca2d125ca8bb1ec6d4efbce14b946be285eb8b07226089995012724a79/mas_devops-3.13.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-14 10:09:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ibm-mas",
"github_project": "python-devops",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "mas-devops"
}