Skip to content

Latest commit

 

History

History
80 lines (49 loc) · 2.2 KB

README.md

File metadata and controls

80 lines (49 loc) · 2.2 KB

olm-auto - BETA version :) Linux Dependent

Intro

This playbook is designed to create a data folder for internal registry at the restricted network environment.

@bvaturi add youtube recording

Before Running the playbook

  1. 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

  2. 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 /

  3. Run:

sudo ansible-galaxy collection install community.crypto
sudo ansible-galaxy collection install containers.podman
sudo ansible-galaxy collection install community.general
  1. Run the playbook as root

  2. The playbook will create:

    i. data_<operator_name>.tar.gz file at extfiles

    ii. latest oc binary iii. latest opm binary iv. grpcurl v. kubectl

    iii. A manifests_<operator_name> file at the run directory (where you ran the playbook)

changeable params:

  1. ocpver this is the parameter that define what openshift cluster version is needed, ie: v4.8

  2. index_image Choose one of the following: redhat-operator/certified-operator/community-operator

Post run

  1. un-tar the data.tar.gz tar -zxvf data_<operator_name>.tar.gz

  2. start your local registry

  3. create a softlink for local registry data file --> data_<operator_name>

  4. restart the registry container

@bvaturi add youtube recording

  1. 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.

  1. Please push the images to your artifactory / registry

  2. change the image content policy and the catalog source to point to YOUR registry / artifactory

  3. Apply the image content policy and the catalog from the manifest folder.

oc apply -f <the files> 

TODO

  1. 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