IBM Cloud Pak Operations CLI
Project description
IBM Cloud Pak Operations CLI
The IBM Cloud Pak Operations CLI provides basic functionality to manage Red Hat OpenShift clusters and IBM Cloud Pak for Data on various cloud platforms on top of the OpenShift CLI (oc) and the IBM Cloud Pak for Data CLI (cpd-cli).
For IBM-internal users, the IBM Cloud Pak Operations CLI additionally supports managing OpenShift clusters on Fyre.
Installation & Configuration
Installation
Python installation (3.8 or higher)
-
macOS (requires Homebrew):
brew install python
-
Windows:
-
winget install --exact --id=Python.Python.3.11
-
choco install python
-
IBM Cloud Pak Operations CLI installation and update (latest release build)
Action | Command |
---|---|
Installation (provides cpo command) |
pip3 install cloud-pak-operations-cli
|
Update |
pip3 install --upgrade cloud-pak-operations-cli
|
IBM Cloud Pak Operations CLI installation and update (latest development code)
Action | Command |
---|---|
Installation (provides cpo command) |
pip3 install git+https://git@github.com/IBM/cloud-pak-operations-cli.git
|
Update |
cpo adm update-dev
|
Configuration
Dependency download
-
Downloads dependencies (IBM Cloud CLI, IBM Cloud Pak CLI, OpenShift CLI)
cpo adm download-dependencies
Shell completion (Linux/macOS)
-
Bash: Add the following code to
.bashrc
:. $(cpo adm get-shell-completion-script-location --shell bash)
-
zsh: Add the following code to
.zshrc
:. $(cpo adm get-shell-completion-script-location --shell zsh)
Running inside a Docker container
The latest version of the IBM Cloud Pak Operations CLI on the master branch can also be run inside a Docker container:
docker run -it quay.io/ibm/cloud-pak-operations-cli:latest bash
Usage
Cluster management
Registering a generic OpenShift cluster
-
Register cluster:
cpo cluster add --alias $ALIAS --server $SERVER --username $USERNAME --password $PASSWORD
-
Use cluster:
cpo cluster use $ALIAS
-
Use cluster and log in using the OpenShift CLI:
cpo cluster use $ALIAS --login
Registering a Red Hat OpenShift on IBM Cloud cluster
-
Log in to IBM Cloud:
cpo ibmcloud login
-
Register cluster:
cpo ibmcloud oc cluster add --alias $ALIAS --cluster-name $CLUSTER_NAME
Security management
-
Obtain an OAuth access token for the current OpenShift cluster:
cpo cluster get-cluster-access-token
-
Manage the global pull secret:
cpo cluster pull-secret
Storage management
-
Deploy Kubernetes NFS Subdir External Provisioner:
cpo cluster install-nfs-storage-class
-
Deploy OpenShift Data Foundation (Linux and macOS):
cpo cluster install-odf-storage-classes
Note: Currently, opinionated configuration values are used for deploying the
StorageCluster
custom resource (see Ansible playbook).
IBM-internal
-
Enable Fyre-specific commands:
cpo adm config set --key fyre_commands --value true
Development
Known issues
OpenShift CLI (macOS)
Unable to connect to the server: dial tcp: lookup … on …:53: no such host
-
Workaround: Edit
/etc/hosts
and add IP address of OpenShift cluster-
Example:
9.AA.BBB.CC your.cluster.domain.com
-
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cloud-pak-operations-cli-0.3.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c928931c27a8acd25922040fc1742a5c9755e9d5ff92af6b44c345863aeac81 |
|
MD5 | 7ab1b7342955c9ba445098bcc0a0b2f8 |
|
BLAKE2b-256 | 910ca14a83c832ccb3dcf5342d1368c8e6ebd53e8cc34624ce6cf29cdfe14f9f |
Hashes for cloud_pak_operations_cli-0.3.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 57e0763b52c73bef63b8bc742b58979fa8857edc70ed1e17f05e128a41dbd2a1 |
|
MD5 | 96695a1ad379ef223576b4b90ae43eba |
|
BLAKE2b-256 | 13bbe809f5295558fa287ad07001ee213cb2f0c67f0ef4970a40aa76b4bfa7f5 |