@@ -57,42 +57,32 @@ $ sudo semanage fcontext -a -t httpd_sys_content_t "/home/kni/rhcos_image_cache(
57
57
$ sudo restorecon -Rv /home/kni/rhcos_image_cache/
58
58
----
59
59
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
-
70
60
. Get the URI for the {op-system} image that the installation program will deploy on the bootstrap VM:
71
61
+
72
62
[source,terminal]
73
63
----
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')
75
65
----
76
66
77
67
. Get the path where the image is published:
78
68
+
79
69
[source,terminal]
80
70
----
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"] ')
82
72
----
83
73
84
74
. Get the SHA hash for the {op-system} image that will be deployed on the bootstrap VM:
85
75
+
86
76
[source,terminal]
87
77
----
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"]')
89
79
----
90
80
91
81
. Download the image and place it in the `/home/kni/rhcos_image_cache` directory:
92
82
+
93
83
[source,terminal]
94
84
----
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 }
96
86
----
97
87
98
88
. 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
125
115
+
126
116
[source,terminal]
127
117
----
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}"
134
119
----
135
120
+
136
121
[source,terminal]
@@ -144,7 +129,7 @@ $ echo " bootstrapOSImage=${BOOTSTRAP_OS_IMAGE}"
144
129
----
145
130
platform:
146
131
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 >
148
133
----
149
134
+
150
135
See the "Configuration files" section for additional details.
0 commit comments