Skip to content

Commit 8452ab8

Browse files
authored
Merge pull request #32588 from johnwilkins/fix-for-29155
2 parents 0f8d463 + 2694bda commit 8452ab8

File tree

5 files changed

+119
-35
lines changed

5 files changed

+119
-35
lines changed

installing/installing_bare_metal_ipi/ipi-install-configuration-files.adoc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,9 @@
44

55
include::modules/ipi-install-configuring-the-install-config-file.adoc[leveloffset=+1]
66

7-
ifeval::[{product-version} <= 4.3]
8-
include::modules/ipi-install-configuring-the-metal3-config-file.adoc[leveloffset=+1]
9-
endif::[]
10-
11-
ifeval::[{product-version} >= 4.4]
127
include::modules/ipi-install-setting-proxy-settings-within-install-config.adoc[leveloffset=+1]
13-
endif::[]
148

15-
ifeval::[{product-version} >= 4.6]
169
include::modules/ipi-install-modifying-install-config-for-no-provisioning-network.adoc[leveloffset=+1]
17-
endif::[]
1810

1911
ifeval::[{product-version} > 4.7]
2012
include::modules/ipi-install-modifying-install-config-for-dual-stack-network.adoc[leveloffset=+1]

installing/installing_bare_metal_ipi/ipi-install-installation-workflow.adoc

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,17 @@ include::modules/ipi-install-preparing-the-provisioner-node-for-openshift-instal
1111

1212
include::modules/ipi-install-retrieving-the-openshift-installer.adoc[leveloffset=+1]
1313

14-
.Additional resources
15-
16-
* See xref:../../updating/updating-cluster-between-minor.adoc#understanding-upgrade-channels_updating-cluster-between-minor[{product-title} upgrade channels and releases] for an explanation of the different release channels.
17-
1814
include::modules/ipi-install-extracting-the-openshift-installer.adoc[leveloffset=+1]
1915

2016
include::modules/ipi-install-creating-an-rhcos-images-cache.adoc[leveloffset=+1]
2117

18+
ifdef::upstream[]
19+
include::ipi-install-configuration-files.adoc[leveloffset=+1]
20+
endif::[]
21+
22+
ifndef::upstream[]
2223
include::installing/installing_bare_metal_ipi/ipi-install-configuration-files.adoc[leveloffset=+1]
24+
endif::[]
2325

2426
include::modules/ipi-install-creating-a-disconnected-registry.adoc[leveloffset=+1]
2527

@@ -30,3 +32,9 @@ include::modules/ipi-install-validation-checklist-for-installation.adoc[leveloff
3032
include::modules/ipi-install-deploying-the-cluster-via-the-openshift-installer.adoc[leveloffset=+1]
3133

3234
include::modules/ipi-install-following-the-installation.adoc[leveloffset=+1]
35+
36+
include::modules/ipi-install-verifying-static-ip-address-configuration.adoc[leveloffset=+1]
37+
38+
.Additional resources
39+
40+
* See xref:../../updating/updating-cluster-between-minor.adoc#understanding-upgrade-channels_updating-cluster-between-minor[{product-title} upgrade channels and releases] for an explanation of the different release channels.

installing/installing_bare_metal_ipi/ipi-install-prerequisites.adoc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,8 @@ endif::[]
2727
Before starting an installer-provisioned installation of {product-title}, ensure the hardware environment meets the following requirements.
2828

2929
include::modules/ipi-install-node-requirements.adoc[leveloffset=+1]
30-
ifeval::[{product-version} >= 4.6]
3130
include::modules/ipi-install-firmware-requirements-for-installing-with-virtual-media.adoc[leveloffset=+1]
32-
endif::[]
3331
include::modules/ipi-install-network-requirements.adoc[leveloffset=+1]
34-
ifdef::upstream[]
35-
ifeval::[{product-version} >= 4.5]
36-
// Include IPv6 information only in DRAFT documentation
37-
include::modules/ipi-install-ipv6-network-requirements.adoc[leveloffset=+1]
38-
endif::[]
39-
endif::[]
4032
include::modules/ipi-install-configuring-nodes.adoc[leveloffset=+1]
4133
include::modules/ipi-install-out-of-band-management.adoc[leveloffset=+1]
4234
include::modules/ipi-install-required-data-for-installation.adoc[leveloffset=+1]

modules/ipi-install-creating-an-rhcos-images-cache.adoc

Lines changed: 86 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,24 @@
33
// *installing/installing_bare_metal_ipi/ipi-install-installation-workflow.adoc
44

55
[id="ipi-install-creating-an-rhcos-images-cache_{context}"]
6-
76
= Creating an {op-system} images cache (optional)
87

98
To employ image caching, you must download two images: the {op-system-first} image used by the bootstrap VM and the {op-system} image used by the installer to provision the different nodes. Image caching is optional, but especially useful when running the installer on a network with limited bandwidth.
109

1110
If you are running the installer on a network with limited bandwidth and the {op-system} images download takes more than 15 to 20 minutes, the installer will timeout. Caching images on a web server will help in such scenarios.
1211

13-
Use the following steps to install a container that contains the images.
12+
Install a container that contains the images.
13+
14+
.Procedure
1415

15-
. Install `podman`.
16+
. Install `podman`:
1617
+
1718
[source,terminal]
1819
----
1920
$ sudo dnf install -y podman
2021
----
2122

22-
. Open firewall port `8080` to be used for {op-system} image caching.
23+
. Open firewall port `8080` to be used for {op-system} image caching:
2324
+
2425
[source,terminal]
2526
----
@@ -31,79 +32,91 @@ $ sudo firewall-cmd --add-port=8080/tcp --zone=public --permanent
3132
$ sudo firewall-cmd --reload
3233
----
3334

34-
. Create a directory to store the `bootstraposimage` and `clusterosimage`.
35+
36+
. Create a directory to store the `bootstraposimage` and `clusterosimage`:
3537
+
3638
[source,terminal]
3739
----
3840
$ mkdir /home/kni/rhcos_image_cache
3941
----
4042

41-
. Set the appropriate SELinux context for the newly created directory.
43+
. Set the appropriate SELinux context for the newly created directory:
4244
+
4345
[source,terminal]
4446
----
4547
$ sudo semanage fcontext -a -t httpd_sys_content_t "/home/kni/rhcos_image_cache(/.*)?"
48+
----
49+
+
50+
[source,terminal]
51+
----
4652
$ sudo restorecon -Rv rhcos_image_cache/
4753
----
4854

49-
. Get the commit ID from the installer. The ID determines which images the installer needs to download.
55+
56+
. Get the commit ID from the installer:
5057
+
5158
[source,terminal]
5259
----
5360
$ export COMMIT_ID=$(/usr/local/bin/openshift-baremetal-install version | grep '^built from commit' | awk '{print $4}')
5461
----
62+
+
63+
The ID determines which images the installer needs to download.
5564

56-
. Get the URI for the {op-system} image that the installer will deploy on the nodes.
65+
. Get the URI for the {op-system} image that the installer will deploy on the nodes:
5766
+
5867
[source,terminal]
5968
----
6069
$ export RHCOS_OPENSTACK_URI=$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/rhcos.json | jq .images.openstack.path | sed 's/"//g')
6170
----
6271

63-
. Get the URI for the {op-system} image that the installer will deploy on the bootstrap VM.
72+
. Get the URI for the {op-system} image that the installer will deploy on the bootstrap VM:
6473
+
6574
[source,terminal]
6675
----
6776
$ export RHCOS_QEMU_URI=$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/rhcos.json | jq .images.qemu.path | sed 's/"//g')
6877
----
6978

70-
. Get the path where the images are published.
79+
. Get the path where the images are published:
7180
+
7281
[source,terminal]
7382
----
7483
$ export RHCOS_PATH=$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/rhcos.json | jq .baseURI | sed 's/"//g')
7584
----
7685

77-
. Get the SHA hash for the {op-system} image that will be deployed on the bootstrap VM.
86+
. Get the SHA hash for the {op-system} image that will be deployed on the bootstrap VM:
7887
+
7988
[source,terminal]
8089
----
8190
$ export RHCOS_QEMU_SHA_UNCOMPRESSED=$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/rhcos.json | jq -r '.images.qemu["uncompressed-sha256"]')
8291
----
8392

84-
. Get the SHA hash for the {op-system} image that will be deployed on the nodes.
93+
. Get the SHA hash for the {op-system} image that will be deployed on the nodes:
8594
+
8695
[source,terminal]
8796
----
8897
$ export RHCOS_OPENSTACK_SHA_COMPRESSED=$(curl -s -S https://raw.githubusercontent.com/openshift/installer/$COMMIT_ID/data/data/rhcos.json | jq -r '.images.openstack.sha256')
8998
----
9099

91-
. Download the images and place them in the `/home/kni/rhcos_image_cache` directory.
100+
. Download the images and place them in the `/home/kni/rhcos_image_cache` directory:
92101
+
93102
[source,terminal]
94103
----
95104
$ curl -L ${RHCOS_PATH}${RHCOS_QEMU_URI} -o /home/kni/rhcos_image_cache/${RHCOS_QEMU_URI}
105+
----
106+
+
107+
[source,terminal]
108+
----
96109
$ curl -L ${RHCOS_PATH}${RHCOS_OPENSTACK_URI} -o /home/kni/rhcos_image_cache/${RHCOS_OPENSTACK_URI}
97110
----
98111

99-
. Confirm SELinux type is of `httpd_sys_content_t` for the newly created files.
112+
. Confirm SELinux type is of `httpd_sys_content_t` for the newly created files:
100113
+
101114
[source,terminal]
102115
----
103116
$ ls -Z /home/kni/rhcos_image_cache
104117
----
105118

106-
. Create the pod.
119+
. Create the pod:
107120
+
108121
[source,terminal]
109122
----
@@ -112,3 +125,61 @@ $ podman run -d --name rhcos_image_cache \
112125
-p 8080:8080/tcp \
113126
registry.centos.org/centos/httpd-24-centos7:latest
114127
----
128+
ifndef::upstream[]
129+
+
130+
The above command creates a caching webserver with the name `rhcos_image_cache`, which serves the images for deployment. The first image `${RHCOS_PATH}${RHCOS_QEMU_URI}?sha256=${RHCOS_QEMU_SHA_UNCOMPRESSED}` is the `bootstrapOSImage` and the second image `${RHCOS_PATH}${RHCOS_OPENSTACK_URI}?sha256=${RHCOS_OPENSTACK_SHA_COMPRESSED}` is the `clusterOSImage` in the `install-config.yaml` file.
131+
endif::[]
132+
133+
. Generate the `bootstrapOSImage` and `clusterOSImage` configuration:
134+
+
135+
[source,terminal]
136+
----
137+
$ export BAREMETAL_IP=$(ip addr show dev baremetal | awk '/inet /{print $2}' | cut -d"/" -f1)
138+
----
139+
+
140+
[source,terminal]
141+
----
142+
$ export RHCOS_OPENSTACK_SHA256=$(zcat /home/kni/rhcos_image_cache/${RHCOS_OPENSTACK_URI} | sha256sum | awk '{print $1}')
143+
----
144+
+
145+
[source,terminal]
146+
----
147+
$ export RHCOS_QEMU_SHA256=$(zcat /home/kni/rhcos_image_cache/${RHCOS_QEMU_URI} | sha256sum | awk '{print $1}')
148+
----
149+
+
150+
[source,terminal]
151+
----
152+
$ export CLUSTER_OS_IMAGE="http://${BAREMETAL_IP}:8080/${RHCOS_OPENSTACK_URI}?sha256=${RHCOS_OPENSTACK_SHA256}"
153+
----
154+
+
155+
[source,terminal]
156+
----
157+
$ export BOOTSTRAP_OS_IMAGE="http://${BAREMETAL_IP}:8080/${RHCOS_QEMU_URI}?sha256=${RHCOS_QEMU_SHA256}"
158+
----
159+
+
160+
[source,terminal]
161+
----
162+
$ echo "${RHCOS_OPENSTACK_SHA256} ${RHCOS_OPENSTACK_URI}" > /home/kni/rhcos_image_cache/rhcos-ootpa-latest.qcow2.md5sum
163+
----
164+
+
165+
[source,terminal]
166+
----
167+
$ echo " bootstrapOSImage=${BOOTSTRAP_OS_IMAGE}"
168+
----
169+
+
170+
[source,terminal]
171+
----
172+
$ echo " clusterOSImage=${CLUSTER_OS_IMAGE}"
173+
----
174+
175+
. Add the required configuration to the `install-config.yaml` file under `platform.baremetal`:
176+
+
177+
[source,terminal]
178+
----
179+
platform:
180+
baremetal:
181+
bootstrapOSImage: http://<BAREMETAL_IP>:8080/<RHCOS_QEMU_URI>?sha256=<RHCOS_QEMU_SHA256>
182+
clusterOSImage: http://<BAREMETAL_IP>:8080/<RHCOS_OPENSTACK_URI>?sha256=<RHCOS_OPENSTACK_SHA256>
183+
----
184+
+
185+
See the "Configuration files" section for additional details.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// This is included in the following assemblies:
2+
//
3+
// installing/installing_bare_metal_ipi/ipi-install-installation-workflow.adoc
4+
5+
[id="verifying-static-ip-address-configuration_{context}"]
6+
= Verifying static IP address configuration
7+
8+
If the DHCP reservation for a cluster node specifies an infinite lease, after the installer successfully provisions the node, the dispatcher script checks the node's network configuration. If the script determines that the network configuration contains an infinite DHCP lease, it creates a new connection using the IP address of the DHCP lease as a static IP address.
9+
10+
[NOTE]
11+
====
12+
The dispatcher script might run on successfully provisioned nodes while the provisioning of other nodes in the cluster is ongoing.
13+
====
14+
15+
Verify the network configuration is working properly.
16+
17+
.Procedure
18+
19+
. Check the network interface configuration on the node.
20+
21+
. Turn off the DHCP server and reboot the {product-title} node and ensure that the network configuration works properly.

0 commit comments

Comments
 (0)