Skip to main content

mas.devops

Code Style: Black Flake8: checked GitHub Actions Workflow Status PyPI - Version PyPI - Python Version PyPI - Downloads

Example

from kubernetes 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(dynamicClient, 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
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:

{"john.smith1@example.com":"primary,john1,smith1","john.smith2@example.com":"primary,john2,smith2","john.smith3@example.com":"secondary,john3,smith3"}

Metadata

Release files for mas-devops 12.15.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mas-devops 12.15.0
File Size Uploaded Provenance Actions
mas_devops-12.15.0.tar.gz 145.3 kB Without provenance Details for mas_devops-12.15.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mas-devops 12.15.0
File Interpreter ABI Platform Actions
mas_devops-12.15.0-py3-none-any.whl Python 3 none any Details for mas_devops-12.15.0-py3-none-any.whl

Total release size: 481.1 kB

Release files / mas_devops-12.15.0.tar.gz

Download URL mas_devops-12.15.0.tar.gz
Size 145.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c6580e4076fd28c7811ee9de310841fc43bb2a281be83f811237492314db83c0
BLAKE2b-256 checksum
How to use checksums
3962d1902c635144e875c02ce80b8010c9f533be7071214b75ea3663e61945a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / mas_devops-12.15.0-py3-none-any.whl

Download URL mas_devops-12.15.0-py3-none-any.whl
Size 335.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4c20300c346abdecd6a1d0394d995ccb4b8d1df62a98a5bb0b3520c0f9fbe80d
BLAKE2b-256 checksum
How to use checksums
5fcc119d5fcb1a037596aacc5c0b8af57b0fec151a9d47ee139d8d1932da077a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for mas-devops 12.15.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

12.15.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page