The files in this repo are intended to be used as part of a disconnected installation of OCP 3.11
You can find here a series of ansible playbooks for pulling, retagging, and pushing the images you need, as described within RH documentation, to an internal docker registry the machines within your cluster(s) can reach.
Images required within the documentation are splitted into different groups:
- Required images (tagged with the selected version label, i.e.
v3.11.zz
) for infrastructure components, and optional components withinopenshift3
repository. They are listed withinopenshift3-images
file. - Required images (
latest
tag) for optional components (CFME, and GlusterFS). They are listed withincfme-images
andrhgs3-images
files. - Builder images (tagged with the selected version label, i.e.
v3.11.zz
) fors2i
. They are listed withinbuilder-images
file. - The
etcd
image from RHEL 7 repos, namedregistry.redhat.io/rhel7/etcd:3.2.22
. It has been listed withinetcd-images
file.
- Bastion host properly provisioned with Internet access to RH registries
- Docker installed
- Ansible installed
- Local docker registry container running
$ docker run -d \
-p 5000:5000 \
--restart=always \
--name registry \
registry:2
- Issue the following command:
ansible-playbook openshift3-images.yml
You can find additional playbooks named builder-images.yml
, etcd-images
, cfme-images
and rhgs3-images.yml
.
-
You'll be prompted for RH registry credentials
-
Images will be pulled, retagged, pushed to your local registry available at
localhost:5000
, and removed. -
Pulled images will be removed.
If you've been able to use docker save
and docker load
for bundling images into .tar
balls,
and transferring them to bastion host machine, you can use retag-xxxxxxxxxx.sh
scripts for having them retagged,
pushed to local docker registry running in localhost:5000
, and removed.
We are assuming that:
- As for the scenario based on the shell scripts described before, all the downloaded images are tagged as
latest
. - We are considering an air-gapped scenario for deploying an OCP 3.11 cluster.
- We are using a linux box with docker installed, and a local docker registry up & running.
- Our user on such a host machine has sudo/root privileges.
We are including a tests
folder where you can find:
- A simple Ansible playbook for testing the same tasks from the ones includend within the
ansible
folder using an lighternginx
image from Docker Hub public registry. - A shell script resembling the procedure coded into the
scripts
folder. - A simple test for validating the way we are using for populating Ansible vars from tasks' results.
The Ansible playbooks should be refined, and leveraged for becoming a consistent, tested and reliable Ansible role to be provided for any disconnected OCP cluster deployment.