Skip to content

Commit af3931e

Browse files
Update readme (#507)
* update readme * update readme * Update README.md Co-authored-by: Ruth Netser <rnetser@redhat.com> --------- Co-authored-by: Ruth Netser <rnetser@redhat.com>
1 parent b06fcc0 commit af3931e

File tree

2 files changed

+28
-13
lines changed

2 files changed

+28
-13
lines changed

README.md

+27-12
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
## ocp-addons-operators-cli
2+
23
CLI to Install/Uninstall Addons/operators on OCM/OCP clusters.
34

45
### Container
5-
image locate at [ocp-addons-operators-cli](https://quay.io/repository/redhat_msi/ocp-addons-operators-cli)
6+
7+
Image locate at [ocp-addons-operators-cli](https://quay.io/repository/redhat_msi/ocp-addons-operators-cli)
68
To pull the image: `podman pull quay.io/redhat_msi/ocp-addons-operators-cli`
79

810
### Local run
911

10-
clone the [repository](https://github.com/RedHatQE/ocp-addons-operators-cli.git)
12+
Clone the [repository](https://github.com/RedHatQE/ocp-addons-operators-cli.git)
1113

1214
```
1315
git clone https://github.com/RedHatQE/ocp-addons-operators-cli.git
@@ -23,7 +25,9 @@ poetry run python ocp_addons_operators_cli/cli.py --help
2325
```
2426

2527
### Usages
28+
2629
#### Install/uninstall addons and/or operators from YAML file
30+
2731
User can install/uninstall addons and/or operators by sending YAML file instead with CLI args
2832
Example YAML file can be found [here](ocp_addons_operators_cli/manifests/addons-operators.yaml.example)
2933
pass `--yaml-config-file=.local/addons-operators.yaml` to use YAML file.
@@ -35,46 +39,52 @@ podman run quay.io/redhat_msi/ocp-addons-operators-cli --help
3539
```
3640

3741
### Global CLI configuration
42+
3843
* `--action`: install/uninstall product(s)
39-
* `--brew-token`: Brew token (needed to install managed-odh addon in stage). Default value is taken from environment variable `BREW_TOKEN`.
44+
* `--brew-token`: Brew token (needed to install managed-odh addon in stage). Also required for operators IIB installation. Default value is taken from environment variable `BREW_TOKEN`.
4045
* `--debug`: Enable debug logs
4146
* `--parallel`: Run install/uninstall in parallel
4247
* `--must-gather-output-dir`: Path to must-gather output dir. `must-gather` will try to collect data when addon/operator installation fails and cluster can be accessed.
4348

4449
* Operators configuration
4550
* `--kubeconfig`: Path to kubeconfig; can be overwritten by cluster-specific configuration
46-
To install operators from saved IIB json, created by [ci-jobs-trigger](https://github.com/RedHatQE/ci-jobs-trigger):
47-
* `--local-operators-latest-iib-path`: Path to local file containing IIB and jobs data
48-
* `--s3-bucket-operators-latest-iib-path`: Path to S3 object containing IIB and jobs data
49-
* `--aws-access-key-id`: AWS access key id
50-
* `--aws-secret-access-key`: AWS secret access key
51-
* `--aws-region`: AWS region
52-
- `PARENT_JOB_NAME` and `OCP_VERSION` environment variables should be set
51+
* To install operators from saved IIB json, created by [ci-jobs-trigger](https://github.com/RedHatQE/ci-jobs-trigger), following args are required:
52+
* `--local-operators-latest-iib-path`: Path to local file containing IIB and jobs data
53+
* `--s3-bucket-operators-latest-iib-path`: Path to S3 object containing IIB and jobs data
54+
* `--aws-access-key-id`: AWS access key id, needed when using --s3-bucket-operators-latest-iib-path.
55+
* `--aws-secret-access-key`: AWS secret access key, needed when using --s3-bucket-operators-latest-iib-path.
56+
* `--aws-region`: AWS region, needed when using --s3-bucket-operators-latest-iib-path.
57+
* `PARENT_JOB_NAME` environment variable should be set
58+
5359
* Addons configuration
5460
* `--endpoint`: SSO endpoint url, defaults to https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token
5561
* `--ocm-token`: OCM token, defaults to `OCM_TOKEN` environment variable
5662
* `--cluster-name`: Addon's cluster name; can be overwritten by cluster-specific configuration
5763

5864
### Addon/Operator user args
5965

60-
Each `--addon` or `operator` accept args, the format is `arg=value;`
66+
Each `--addon` or `--operator` accept args, the format is `arg=value;`
67+
6168
###### Common args:
69+
6270
* `name=name`: Name of the operator/addon to install/uninstall
6371
* `timeout=300`: timeout to wait for the operator/addon to be installed/uninstalled; format examples: `1h`, `30m`, `3600s`
6472

6573
###### Addon args:
74+
6675
* `rosa=true`: Use rosa cli to install/uninstall the addon
6776
* `cluster-name=cluster`: Addon's cluster name; if not provided, global configuration will be used
6877

6978
###### Operator args:
79+
7080
* `iib=/path/to/iib:123456`: Install the operator using the provided IIB
7181
* `channel=stable`: Operator channel to install from, default: 'stable'
7282
* `source=redhat-operators`: Operator source, default: 'redhat-operators'
7383
* `source-image=registry/redhat/operator-index:v4.13`: Install Operator using provided CatalogSource Image
7484
* `kubeconfig`: Path to kubeconfig; if not provided, global configuration will be used
7585

76-
7786
#### Install Addon
87+
7888
##### One addon
7989

8090
```
@@ -99,6 +109,7 @@ podman run quay.io/redhat_msi/ocp-addons-operators-cli \
99109
```
100110

101111
#### Uninstall Addon
112+
102113
##### One addon
103114

104115
```
@@ -135,6 +146,7 @@ podman run quay.io/redhat_msi/ocp-addons-operators-cli \
135146
```
136147

137148
#### ROSA cli
149+
138150
Pass 'rosa=true' in the addon `-a` arg.
139151

140152
```
@@ -147,7 +159,9 @@ podman run quay.io/redhat_msi/ocp-addons-operators-cli \
147159
Only addons `ocm-addon-test-operator-1` and `ocm-addon-test-operator-3` will be installed with ROSA cli.
148160

149161
### Operators
162+
150163
#### Install Operator
164+
151165
##### One operator
152166

153167
```
@@ -200,6 +214,7 @@ podman run quay.io/redhat_msi/ocp-addons-operators-cli \
200214
```
201215

202216
#### Uninstall Operator
217+
203218
##### One operator
204219

205220
```

ocp_addons_operators_cli/cli.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
"--brew-token",
8686
help="""
8787
\b
88-
Brew token (needed to install managed-odh addon in stage).
88+
Brew token (needed to install managed-odh addon in stage and for operators IIB installation).
8989
Default value is taken from environment variable `BREW_TOKEN`, else will be taken from --brew-token flag.
9090
""",
9191
default=os.environ.get("BREW_TOKEN"),

0 commit comments

Comments
 (0)