diff --git a/svt-notes/OCP4/install-downstream-operators.md b/svt-notes/OCP4/install-downstream-operators.md index 35e0f08..4a2978c 100644 --- a/svt-notes/OCP4/install-downstream-operators.md +++ b/svt-notes/OCP4/install-downstream-operators.md @@ -9,13 +9,15 @@ $ git clone http://git.app.eng.bos.redhat.com/git/openshift-misc.git/ $ cd jenkins/v4-image-test/app_registry_tools ``` - **make sure Python 3 is active either as the system python or via virtualenv** -- edit getOperatorSourceMetadata.sh and set REPOSITORYS for the operators you want. Examples: +- edit `get_medadata_from_app_registry.sh` and set REPOSITORYS for the operators you want. +Examples: ``` REPOSITORYS="nfd elasticsearch-operator cluster-logging openshifttemplateservicebroker openshiftansibleservicebroker sriov-network-operator" REPOSITORYS="nfd elasticsearch-operator cluster-logging" ``` -- Run **./getOperatorSourceMetadata.sh rh-osbs-operators 4.2** (if you see an AttributeError complaining about no FullLoader, you ignored the step on Python 3 above) +- Run **./get_medadata_from_app_registry.sh rh-osbs-operators 4.2** (if you see an AttributeError complaining about no FullLoader, you ignored the step on Python 3 above) +*NOTE: This script is actively being developed and may require some tweaking to work.* - That will download the metadata for the operator. Next, mirror the images to your cluster - may take a while depending on the number of images - **./sync_images_to_internal_registry.sh rh-osbs-operators 4.2** @@ -24,7 +26,11 @@ First you need to get a login token for quay.io after you have been added to the - Get your quay user token using command (only have to do this once, can reuse the token when creating the secret on subsequent clusters): -***quay_token=$(curl -sH "Content-Type: application/json" -XPOST https://quay.io/cnr/api/v1/users/login -d '{ "user": { "username": "'"${QUAY_USERNAME}"'","password": "'"${QUAY_PASSWORD}"'"}}' | jq -r '.token')*** +```sh +QUAY_USERNAME= +QUAY_PASSWORD='' +curl -sH "Content-Type: application/json" -XPOST https://quay.io/cnr/api/v1/users/login -d '{ "user": { "username": "'"${QUAY_USERNAME}"'","password": "'"${QUAY_PASSWORD}"'"}}' | jq -r '.token' | tee quay.token +``` - Create a secret with that token data in the openshift-marketplace namespace example yaml to use: ```yaml