Skip to content

Some scripts for gathering the images you need for deploying an air-gapped OCP 3.11 cluster

Notifications You must be signed in to change notification settings

devopstf/ocp-disconnected

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Disconnected OCP 3.11 cluster deployment

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 within openshift3 repository. They are listed within openshift3-images file.
  • Required images (latest tag) for optional components (CFME, and GlusterFS). They are listed within cfme-images and rhgs3-images files.
  • Builder images (tagged with the selected version label, i.e. v3.11.zz) for s2i. They are listed within builder-images file.
  • The etcd image from RHEL 7 repos, named registry.redhat.io/rhel7/etcd:3.2.22. It has been listed within etcd-images file.

Pre-requisites

  • 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

Ansible playbook Usage

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

  1. You'll be prompted for RH registry credentials

  2. Images will be pulled, retagged, pushed to your local registry available at localhost:5000, and removed.

  3. Pulled images will be removed.

Shell scripts Usage

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.

Assumptions

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.

Tests

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 lighter nginx 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.

Development

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.

About

Some scripts for gathering the images you need for deploying an air-gapped OCP 3.11 cluster

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages