Skip to content

hyperkineticnerd/openshift-disconnected

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Disconnected OpenShift with oc-mirror and openshift-install

Repository Purpose

The primary purpose of this repository is provide organization of artifacts and manifests for a disconnected/air-gapped clusters. oc-mirror is used for mirroring into a container registry, the included manifests mirrors the openshift platform, additional containers, Red Hat Operators, and Red Hat Certified Operators.

Organization

At the top-level directory, we have 3 important directories:

  • cluster/

  • install/

  • mirror/

cluster/<cluster-name> is used to store copies of the agent-based installer manifests used to build clusters. install/ is used to generate the resulting artifacts for the agent-based installer. We copy our manifests from cluster/<cluster-name> into install/<version>/<cluster-name> and run openshift-install agent create image. mirror/ contains scripts and manifest for mirroring OpenShift platform artifacts and Operators. Within mirror/, we keep our mirroring manifests within manifests/, the metadata/ we downloaded while mirroring the platform and operators, and store container archives within platform/ and operators/. We keep each operator index and the platform separate from each other for many reasons; one of which is if there’s a breaking change in an operator index, the error doesn’t invalidate the other operator indexes and the platform download.

Instructions

Download OpenShift Binaries

Run ./install/download.bash to download oc, oc-mirror, and openshift-install. Extract each tar.gz and place the binaries into /usr/local/sbin (to lock the commands to the root user). The script will also download the AWS VMDK so we can create our own custom AMI. Official Red Hat OpenShift Documentation - Uploading a custom RHCOS AMI in AWS

Mirror Artifacts

The helper scripts are written to automate downloading and pushing the OpenShift platform and 3 of the 4 operator indexes found in an Online/Connected OpenShift Cluster.

Change directory into mirror.

OpenShift Artifacts

Edit manifests/platform.yaml for our openshift release. Edit helpers/scripts/mirror.bash to only download the OpenShift platform artifacts. Execute helpers/scripts/mirror.bash to mirror the platform artifacts.

Red Hat Operators Index

Edit manifests/redhat.yaml for our chosen operators. In helpers/indexes/redhat-v4.16.txt, the full list of operators can be found. We only download the operators we want/need. Edit helpers/scripts/mirror.bash to only download the Red Hat operator artifacts. Execute helpers/scripts/mirror.bash to mirror the operators.

Air-Gapped Transfer

If we are working in an Air-gapped environment, we’ll have to sneaker-net all the downloaded artifacts to the disconnected environment and run helpers/scripts/push.bash (after we edit it).

Cluster Installation

Run our normal OpenShift Installation procedures. cluster/example/<platform>/install-config.yaml has our install config for our platform.

Post-Installation

Possible post-installation automation:

GitOps

Using the OpenShift GitOps operator, we can use manifest deployments written in Kustomize or Helm Charts to autodeploy our applications and services to the cluster.

Helm Charts

Second Best method is to having Helm Charts to deploy our resources. The Red Hat Communities of Practices on GitHub has some Helm Charts to automate deployment of Operators and other Services.

Ansible

We could also use Ansible Playbooks to deploy our Kubernetes manifests into OpenShift.

Kubernetes Manifests

Lastly, we could manually install operators and services into OpenShift, then save the manifests for later re-deployment. We could convert the our manifests (saved here) into any of the above methods.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages