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.
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.
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
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
.
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.
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.
Run our normal OpenShift Installation procedures.
cluster/example/<platform>/install-config.yaml
has our install config for our platform.
Possible post-installation automation:
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.
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.
We could also use Ansible Playbooks to deploy our Kubernetes manifests into OpenShift.