CLI to Install/Uninstall Addons/operators on OCM/OCP clusters.
image locate at ocp-addons-operators-cli
To pull the image: podman pull quay.io/redhat_msi/ocp-addons-operators-cli
podman run quay.io/redhat_msi/ocp-addons-operators-cli --help
podman run quay.io/redhat_msi/ocp-addons-operators-cli addons --help
podman run quay.io/redhat_msi/ocp-addons-operators-cli addons install --help
podman run quay.io/redhat_msi/ocp-addons-operators-cli addons uninstall --help
podman run quay.io/redhat_msi/ocp-addons-operators-cli operators --help
podman run quay.io/redhat_msi/ocp-addons-operators-cli operators install --help
podman run quay.io/redhat_msi/ocp-addons-operators-cli operators uninstall --help
clone the repository
git clone https://github.com/RedHatQE/ocp-addons-operators-cli.git
Install poetry
Use poetry run app/cli.py
to execute the cli.
poetry install
poetry run python app/cli.py --help
Each command can be run via container podman run quay.io/redhat_msi/ocp-addons-operators-cli
or via poetry command poetry run app/cli.py
Each --addon
or operator
accept args, the format is arg=value;
name=name
: Name of the operator/addon to install/uninstalltimeout=300
: timeout in seconds to wait for the operator/addon to be installed/uninstalled
rosa=true
: Use rosa cli to install/uninstall the addon
iib=/path/to/iib:123456
: Install the operator using the provided IIBchannel=stable
: Operator channel to install from, default: 'stable'source=redhat-operators
: Operator source, default: 'redhat-operators'
podman run quay.io/redhat_msi/ocp-addons-operators-cli \
addons \
-t $OCM_TOKEN \
-a 'name=ocm-addon-test-operator;has-external-resources=false;aws-cluster-test-param=false;timeout=600' \
-c cluster-name \
install
To run multiple addons install in parallel pass -p,--parallel.
podman run quay.io/redhat_msi/ocp-addons-operators-cli \
addons \
-t $OCM_TOKEN \
-a 'name=ocm-addon-test-operator;has-external-resources=false;aws-cluster-test-param=false;timeout=600' \
-a 'name=ocm-addon-test-operator-2;has-external-resources=false;aws-cluster-test-param=false;timeout=600' \
-c cluster-name \
install
podman run quay.io/redhat_msi/ocp-addons-operators-cli \
addons \
-t $OCM_TOKEN \
-a 'name=ocm-addon-test-operator' \
-c cluster-name \
uninstall
To run multiple addons uninstall in parallel pass -p,--parallel.
podman run quay.io/redhat_msi/ocp-addons-operators-cli \
addons \
-t $OCM_TOKEN \
-a 'name=ocm-addon-test-operator' \
-a 'name=ocm-addon-test-operator-2' \
-c cluster-name \
uninstall
Pass 'rosa=true' in the addon -a
arg.
podman run quay.io/redhat_msi/ocp-addons-operators-cli \
addon \
-t $OCM_TOKEN \
-a 'name=ocm-addon-test-operator;has-external-resources=false;aws-cluster-test-param=false;rosa=true;timeout=600'
-c cluster-name \
install
Only addons ocm-addon-test-operator-1
and ocm-addon-test-operator-3
will be installed with ROSA cli.
podman run quay.io/redhat_msi/ocp-addons-operators-cli \
operators \
--kubeconfig ~/work/CSPI/kubeconfig/rosa-myk412 \
-o 'name=rhods-operator;namespace=redhat-ods-operator' \
install
To run multiple operators install in parallel pass -p,--parallel.
podman run quay.io/redhat_msi/ocp-addons-operators-cli \
operators \
--kubeconfig ~/work/CSPI/kubeconfig/rosa-myk412 \
-o 'name=rhods-operator;namespace=redhat-ods-operator;timeout=600' \
-o 'name=servicemeshoperator' \
install
podman run quay.io/redhat_msi/ocp-addons-operators-cli \
operators \
--kubeconfig ~/work/CSPI/kubeconfig/rosa-myk412 \
--brew-token token \
-o 'name=rhods-operator;namespace=redhat-ods-operator;iib=/path/to/iib:123456' \
install
podman run quay.io/redhat_msi/ocp-addons-operators-cli \
operators \
--kubeconfig ~/work/CSPI/kubeconfig/rosa-myk412 \
-o 'name=servicemeshoperator'
uninstall
To run multiple operators uninstall in parallel pass -p,--parallel.
podman run quay.io/redhat_msi/ocp-addons-operators-cli \
operators \
--kubeconfig ~/work/CSPI/kubeconfig/rosa-myk412 \
-o 'name=rhods-operator;namespace=redhat-ods-operator' \
-o 'name=servicemeshoperator;timeout=600' \
uninstall