From 3c2641227b49c963cbc11c7a9671bdbaf9620478 Mon Sep 17 00:00:00 2001 From: John Call Date: Wed, 1 May 2024 23:57:46 -0600 Subject: [PATCH] try using a custom image for lab04.adoc --- .../assets/images/install-overview-disco.png | 1 + content/modules/ROOT/pages/lab04.adoc | 43 +++++++++++-------- 2 files changed, 26 insertions(+), 18 deletions(-) create mode 100644 content/modules/ROOT/assets/images/install-overview-disco.png diff --git a/content/modules/ROOT/assets/images/install-overview-disco.png b/content/modules/ROOT/assets/images/install-overview-disco.png new file mode 100644 index 0000000..5f02348 --- /dev/null +++ b/content/modules/ROOT/assets/images/install-overview-disco.png @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/content/modules/ROOT/pages/lab04.adoc b/content/modules/ROOT/pages/lab04.adoc index f496d9d..99e8895 100644 --- a/content/modules/ROOT/pages/lab04.adoc +++ b/content/modules/ROOT/pages/lab04.adoc @@ -8,7 +8,7 @@ image::disco-3.svg[disco diagram,800] Here's a diagram describing the inputs and outputs of the installation configuration process: -image::install-overview.png[Install Overview] +image::install-overview-disco.png[Install Overview] {counter:install}. Let's start by creating a workspace on the [.highside]#*highside* system# to house our installation materials: @@ -23,24 +23,21 @@ Create an initial `install-config.yaml`: [.highside,source,yaml,role=execute,subs="attributes"] ---- cat << EOF > /mnt/high-side-data/install/install-config.yaml -additionalTrustBundlePolicy: Always +--- apiVersion: v1 +metadata: + name: disco baseDomain: lab compute: - architecture: amd64 hyperthreading: Enabled name: worker - platform: {} replicas: 0 controlPlane: architecture: amd64 hyperthreading: Enabled name: master - platform: {} replicas: 1 -metadata: - creationTimestamp: null - name: disco networking: clusterNetwork: - cidr: 10.128.0.0/14 @@ -56,6 +53,7 @@ platform: subnets: - {PrivateSubnet1} publish: Internal +additionalTrustBundlePolicy: Always EOF ---- @@ -63,12 +61,12 @@ EOF [.highside,source,bash,role=execute,subs="attributes"] ---- -ssh-keygen -C "Cluster Debug Key" -N "" -f /mnt/high-side-data/id_rsa +ssh-keygen -C "OpenShift Debug" -N "" -f /mnt/high-side-data/id_rsa echo "sshKey: $(cat /mnt/high-side-data/id_rsa.pub)" >> /mnt/high-side-data/install/install-config.yaml ---- [NOTE] -The SSH key will be installed on all cluster nodes but is primarily for troubleshooting. +The SSH key for OpenShift is only used for troubleshooting. {counter:install}. Use `jq` to minify your container registry pull secret and add it to the `install-config.yaml` @@ -79,16 +77,23 @@ echo "pullSecret: '$(jq -c . $XDG_RUNTIME_DIR/containers/auth.json)'" >> /mnt/hi [NOTE] -- -For connected installations, you would use the secret from the Hybrid Cloud Console, but for our use case, the mirror registry is the only one OpenShift will need to authenticate to. +For connected installations, you would use your _pull secret_ from the Hybrid Cloud Console, but for our use case, the `mirror-registry` is the only _image registry_ OpenShift will need to authenticate to. -- === Add the `imageContentSources` that `oc mirror` produced to ensure image mappings happen correctly. *Before continuing*, make sure the second stage of your mirror is done by checking that the `imageContentSourcePolicy.yaml` file exists on disk. +// while true ; do if (test -e /mnt/high-side-data/oc-mirror-workspace/results-*/imageContentSourcePolicy.yaml) ; then break; fi; sleep 5; done + [.highside,source,bash,role=execute,subs="attributes"] ---- -while true ; do if (test -e /mnt/high-side-data/oc-mirror-workspace/results-*/imageContentSourcePolicy.yaml) ; then break; fi; sleep 5; done +if (test -e /mnt/high-side-data/oc-mirror-workspace/results-*/imageContentSourcePolicy.yaml) + then + echo "Looks good, go ahead!" + else + echo "Uh oh, something is wrong..." +fi ---- Then you can append the relevant snippet to your `install-config.yaml` by running this command: @@ -106,9 +111,6 @@ They'll look something like this: [source,yaml] ---- imageContentSources: - - mirrors: - - ip-10-0-51-206.ec2.internal:8443/ubi8/ubi - source: registry.redhat.io/ubi8/ubi - mirrors: - ip-10-0-51-206.ec2.internal:8443/openshift/release-images source: quay.io/openshift-release-dev/ocp-release @@ -117,7 +119,7 @@ imageContentSources: source: quay.io/openshift-release-dev/ocp-v4.0-art-dev ---- -** Add the root CA of our mirror registry to the trust bundle using the `additionalTrustBundle` field by running this command: +Add the root CA of our mirror registry to the trust bundle using the `additionalTrustBundle` field by running this command: [.highside,source,bash,role=execute] ---- @@ -137,11 +139,14 @@ additionalTrustBundle: | -----END CERTIFICATE----- ---- -. Then make a backup of your `install-config.yaml` since the installer will consume (and delete) it: +Then make a backup of your `install-config.yaml` since the installer will consume (and delete) it: + +//TODO - the command block below wasn't rendering properly for jcall + [.highside,source,bash,role=execute,subs="attributes"] ---- cd /mnt/high-side-data/install -cp install-config.yaml install-config.yaml.backup +cp -v install-config.yaml install-config.yaml.backup ---- == Running the Installation @@ -151,7 +156,9 @@ Let's kick off the cluster installation: [NOTE] -- -The OpenShift tooling is built for every release and version data is encoded in each binary. +The OpenShift Installer (`openshift-install`) is rebuilt for every release (`{openshift_version}`). + +This means that you can't use `openshift-install` version `{openshift_min_version}` to install OpenShift `{openshift_max_version}`. --