This playbook is designed to create a data folder for internal registry at the restricted network environment.
@bvaturi add youtube recording
-
Access: https://console.redhat.com/openshift/install/pull-secret and download a pull-secret.json file to
/tmp/pull-secret.json
Also do the next command and enter your credentials: sudo podman login registry.redhat.io
-
Make sure you have enough space available on the disk (more than 50GB) *** If you use partitions make sure /var have at least 5GB and other memory is at /
-
Run:
sudo ansible-galaxy collection install community.crypto
sudo ansible-galaxy collection install containers.podman
sudo ansible-galaxy collection install community.general
-
Run the playbook as
root
-
The playbook will create:
i. data_<operator_name>.tar.gz file at extfiles
ii. latest
oc
binary iii. latestopm
binary iv.grpcurl
v.kubectl
iii. A
manifests_<operator_name>
file at therun
directory (where you ran the playbook)
-
ocpver this is the parameter that define what openshift cluster version is needed, ie: v4.8
-
index_image Choose one of the following: redhat-operator/certified-operator/community-operator
-
un-tar the data.tar.gz
tar -zxvf data_<operator_name>.tar.gz
-
start your local registry
-
create a softlink for local registry data file --> data_<operator_name>
-
restart the registry container
@bvaturi add youtube recording
- Now you have a registry with the data on it. please check:
curl -u admin:redhat -k https://${Local_registry}:5000/v2/_catalog
You will see the output with all the images.
-
Please push the images to your artifactory / registry
-
change the image content policy and the catalog source to point to YOUR registry / artifactory
-
Apply the image content policy and the catalog from the manifest folder.
oc apply -f <the files>
- V2 - In case the user of the automation wants to mirror multiple operators, generate each of them an index image so they will be decoupled when deployed on OCP