@@ -57,42 +57,32 @@ $ sudo semanage fcontext -a -t httpd_sys_content_t "/home/kni/rhcos_image_cache(
5757$ sudo restorecon -Rv /home/kni/rhcos_image_cache/
5858----
5959
60-
61- . Get the commit ID from the installation program:
62- +
63- [source,terminal]
64- ----
65- $ export COMMIT_ID=$(/usr/local/bin/openshift-baremetal-install version | grep '^built from commit' | awk '{print $4}')
66- ----
67- +
68- The ID determines which image the installation program must download.
69-
7060. Get the URI for the {op-system} image that the installation program will deploy on the bootstrap VM:
7161+
7262[source,terminal]
7363----
74- $ export RHCOS_QEMU_URI=$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/ coreos/rhcos. json | jq -r '.architectures.x86_64. artifacts.qemu.formats["qcow2.gz"].disk.location'
64+ $ export RHCOS_QEMU_URI=$(/usr/local/bin/openshift-baremetal-install coreos print-stream- json | jq -r --arg ARCH "$(arch)" '.architectures[$ARCH]. artifacts.qemu.formats["qcow2.gz"].disk.location')
7565----
7666
7767. Get the path where the image is published:
7868+
7969[source,terminal]
8070----
81- $ export RHCOS_PATH =$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/ coreos/rhcos. json | jq .baseURI | sed 's/"//g ')
71+ $ export RHCOS_QEMU_PATH =$(/usr/local/bin/openshift-baremetal-install coreos print-stream- json | jq -r --arg ARCH "$(arch)" '.architectures[$ARCH].artifacts.qemu.formats["qcow2.gz"].disk["sha256"] ')
8272----
8373
8474. Get the SHA hash for the {op-system} image that will be deployed on the bootstrap VM:
8575+
8676[source,terminal]
8777----
88- $ export RHCOS_QEMU_SHA_UNCOMPRESSED =$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/ coreos/rhcos. json | jq -r '.images. qemu["uncompressed-sha256"]')
78+ $ export RHCOS_QEMU_UNCOMPRESSED_SHA256 =$(/usr/local/bin/openshift-baremetal-install coreos print-stream- json | jq -r --arg ARCH "$(arch)" '.architectures[$ARCH].artifacts. qemu.formats["qcow2.gz"].disk ["uncompressed-sha256"]')
8979----
9080
9181. Download the image and place it in the `/home/kni/rhcos_image_cache` directory:
9282+
9383[source,terminal]
9484----
95- $ curl -L ${RHCOS_PATH}${ RHCOS_QEMU_URI} -o /home/kni/rhcos_image_cache/${RHCOS_QEMU_URI }
85+ $ curl -L ${RHCOS_QEMU_URI} -o /home/kni/rhcos_image_cache/${RHCOS_QEMU_PATH }
9686----
9787
9888. Confirm SELinux type is of `httpd_sys_content_t` for the new file:
@@ -125,12 +115,7 @@ $ export BAREMETAL_IP=$(ip addr show dev baremetal | awk '/inet /{print $2}' | c
125115+
126116[source,terminal]
127117----
128- $ export RHCOS_QEMU_SHA256=$(zcat /home/kni/rhcos_image_cache/${RHCOS_QEMU_URI} | sha256sum | awk '{print $1}')
129- ----
130- +
131- [source,terminal]
132- ----
133- $ export BOOTSTRAP_OS_IMAGE="http://${BAREMETAL_IP}:8080/${RHCOS_QEMU_URI}?sha256=${RHCOS_QEMU_SHA256}"
118+ $ export BOOTSTRAP_OS_IMAGE="http://${BAREMETAL_IP}:8080/${RHCOS_QEMU_PATH}?sha256=${RHCOS_QEMU_UNCOMPRESSED_SHA256}"
134119----
135120+
136121[source,terminal]
@@ -144,7 +129,7 @@ $ echo " bootstrapOSImage=${BOOTSTRAP_OS_IMAGE}"
144129----
145130platform:
146131 baremetal:
147- bootstrapOSImage: http://<BAREMETAL_IP>:8080/<RHCOS_QEMU_URI >?sha256=<RHCOS_QEMU_SHA256 >
132+ bootstrapOSImage: http://<BAREMETAL_IP>:8080/<RHCOS_QEMU_PATH >?sha256=<RHCOS_QEMU_UNCOMPRESSED_SHA256 >
148133----
149134+
150135See the "Configuration files" section for additional details.
0 commit comments