Skip to content

Commit 88d92c3

Browse files
authored
Merge pull request #50954 from MirzWeiss/BZ-2099233
BZ:2099233 - Updating docs. Expanding clusters no longer requires DHCP
2 parents 1de719a + 1ee7bea commit 88d92c3

File tree

1 file changed

+100
-34
lines changed

1 file changed

+100
-34
lines changed

modules/ipi-install-preparing-the-bare-metal-node.adoc

Lines changed: 100 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
[id='preparing-the-bare-metal-node_{context}']
77
= Preparing the bare metal node
88

9-
Expanding the cluster requires a DHCP server. Each node must have a DHCP reservation.
9+
To expand your cluster, you must provide the node with the relevant IP address. This can be done with a static configuration, or with a DHCP (Dynamic Host Configuration protocol) server. When expanding the cluster using a DHCP server, each node must have a DHCP reservation.
10+
1011

1112
[IMPORTANT]
1213
.Reserving IP addresses so they become static IP addresses
@@ -44,12 +45,13 @@ $ echo -ne "root" | base64
4445
$ echo -ne "password" | base64
4546
----
4647

47-
. Create a configuration file for the bare metal node using the following example `bmh.yaml` file, replacing values in the YAML to match your environment:
48+
. Create a configuration file for the bare metal node. Depending on whether you are using a static configuration or a DHCP server, use one of the following example `bmh.yaml` files, replacing values in the YAML to match your environment:
4849
+
4950
[source,terminal]
5051
----
5152
$ vim bmh.yaml
5253
----
54+
* *Static configuration* `bmh.yaml`:
5355
+
5456
[source,yaml]
5557
----
@@ -61,24 +63,37 @@ metadata:
6163
type: Opaque
6264
stringData:
6365
nmstate: |
64-
routes:
65-
config:
66-
- destination: 0.0.0.0/0
67-
next-hop-address: <next_hop_address>
68-
next-hop-interface: <next_hop_interface>
69-
dns-resolver:
70-
config:
71-
server:
72-
- <dns_server_ip_address>
73-
interfaces:
74-
- name: <nic_interface>
75-
state: up
76-
ipv4:
77-
address:
78-
- ip: <ip_address>
79-
prefix-length: <cidr>
80-
enabled: true
81-
dhcp: false
66+
hosts:
67+
- name: openshift-master-0
68+
role: master
69+
bmc:
70+
address: redfish+http://<out_of_band_ip>/redfish/v1/Systems/
71+
username: <user>
72+
password: <password>
73+
disableCertificateVerification: null
74+
bootMACAddress: <NIC1_mac_address>
75+
bootMode: UEFI
76+
rootDeviceHints:
77+
deviceName: "/dev/sda"
78+
networkConfig: <3>
79+
interfaces:
80+
- name: <nic1_name> <4>
81+
type: ethernet
82+
state: up
83+
ipv4:
84+
address:
85+
- ip: <ip_address> <4>
86+
prefix-length: 24
87+
enabled: true
88+
dns-resolver:
89+
config:
90+
server:
91+
- <dns_ip_address> <4>
92+
routes:
93+
config:
94+
- destination: 0.0.0.0/0
95+
next-hop-address: <next_hop_ip_address> <4>
96+
next-hop-interface: <next_hop_nic1_name> <4>
8297
---
8398
apiVersion: v1
8499
kind: Secret
@@ -87,8 +102,8 @@ metadata:
87102
namespace: openshift-machine-api
88103
type: Opaque
89104
data:
90-
username: <base64_of_uid> <3>
91-
password: <base64_of_pwd> <4>
105+
username: <base64_of_uid> <5>
106+
password: <base64_of_pwd> <5>
92107
---
93108
apiVersion: metal3.io/v1alpha1
94109
kind: BareMetalHost
@@ -97,39 +112,90 @@ metadata:
97112
namespace: openshift-machine-api
98113
spec:
99114
online: True
100-
bootMACAddress: <nic1_mac_address> <5>
115+
bootMACAddress: <nic1_mac_address> <6>
101116
bmc:
102-
address: <protocol>://<bmc_url> <6>
117+
address: <protocol>://<bmc_url> <7>
103118
credentialsName: openshift-worker-<num>-bmc-secret <2>
104-
disableCertificateVerification: True <7>
105-
username: <bmc_username> <8>
119+
disableCertificateVerification: True <8>
120+
username: <bmc_username> <9>
106121
password: <bmc_password> <9>
107122
rootDeviceHints:
108123
deviceName: <root_device_hint> <10>
109124
preprovisioningNetworkDataName: openshift-worker-<num>-network-config-secret <11>
110125
----
111126
+
112-
<1> Optional: To configure the network interface for a newly created node, specify the name of the secret that contains the network configuration. Follow the `nmstate` syntax to define the network configuration for your node. See "Optional: Configuring host network interfaces in the install-config.yaml file" for details on configuring NMState syntax.
127+
<1> To configure the network interface for a newly created node, specify the name of the secret that contains the network configuration. Follow the `nmstate` syntax to define the network configuration for your node. See "Optional: Configuring host network interfaces in the install-config.yaml file" for details on configuring NMState syntax.
113128
+
114129
<2> Replace `<num>` for the worker number of the bare metal node in the `name` fields, the `credentialsName` field, and the `preprovisioningNetworkDataName` field.
115130
+
116-
<3> Replace `<base64_of_uid>` with the base64 string of the user name.
131+
<3> Add the NMState YAML syntax to configure the host interfaces.
117132
+
118-
<4> Replace `<base64_of_pwd>` with the base64 string of the password.
133+
<4> Replace `<nic1_name>`, `<ip_address>`, `<dns_ip_address>`, `<next_hop_ip_address>` and `<next_hop_nic1_name>` with appropriate values.
119134
+
120-
<5> Replace `<nic1_mac_address>` with the MAC address of the bare metal node's first NIC. See the "BMC addressing" section for additional BMC configuration options.
135+
<5> Replace `<base64_of_uid>` and `<base64_of_pwd>` with the base64 string of the user name and password.
121136
+
122-
<6> Replace `<protocol>` with the BMC protocol, such as IPMI, RedFish, or others. Replace `<bmc_url>` with the URL of the bare metal node's baseboard management controller.
137+
<6> Replace `<nic1_mac_address>` with the MAC address of the bare metal node's first NIC. See the "BMC addressing" section for additional BMC configuration options.
123138
+
124-
<7> To skip certificate validation, set `disableCertificateVerification` to true.
139+
<7> Replace `<protocol>` with the BMC protocol, such as IPMI, RedFish, or others. Replace `<bmc_url>` with the URL of the bare metal node's baseboard management controller.
125140
+
126-
<8> Replace `<bmc_username>` with the string of the BMC user name.
141+
<8> To skip certificate validation, set `disableCertificateVerification` to true.
127142
+
128-
<9> Replace `<bmc_password>` with the string of the BMC password.
143+
<9> Replace `<bmc_username>` and `<bmc_password>` with the string of the BMC user name and password.
129144
+
130145
<10> Optional: Replace `<root_device_hint>` with a device path if you specify a root device hint.
131146
+
132147
<11> Optional: If you have configured the network interface for the newly created node, provide the network configuration secret name in the `preprovisioningNetworkDataName` of the BareMetalHost CR.
148+
149+
* *DHCP configuration* `bmh.yaml`:
150+
+
151+
[source,yaml]
152+
----
153+
---
154+
apiVersion: v1
155+
kind: Secret
156+
metadata:
157+
name: openshift-worker-<num>-bmc-secret <1>
158+
namespace: openshift-machine-api
159+
type: Opaque
160+
data:
161+
username: <base64_of_uid> <2>
162+
password: <base64_of_pwd> <2>
163+
---
164+
apiVersion: metal3.io/v1alpha1
165+
kind: BareMetalHost
166+
metadata:
167+
name: openshift-worker-<num> <1>
168+
namespace: openshift-machine-api
169+
spec:
170+
online: True
171+
bootMACAddress: <nic1_mac_address> <3>
172+
bmc:
173+
address: <protocol>://<bmc_url> <4>
174+
credentialsName: openshift-worker-<num>-bmc-secret <1>
175+
disableCertificateVerification: True <5>
176+
username: <bmc_username> <6>
177+
password: <bmc_password> <6>
178+
rootDeviceHints:
179+
deviceName: <root_device_hint> <7>
180+
preprovisioningNetworkDataName: openshift-worker-<num>-network-config-secret <8>
181+
----
182+
+
183+
<1> Replace `<num>` for the worker number of the bare metal node in the `name` fields, the `credentialsName` field, and the `preprovisioningNetworkDataName` field.
184+
+
185+
<2> Replace `<base64_of_uid>` and `<base64_of_pwd>` with the base64 string of the user name and password.
186+
+
187+
<3> Replace `<nic1_mac_address>` with the MAC address of the bare metal node's first NIC. See the "BMC addressing" section for additional BMC configuration options.
188+
+
189+
<4> Replace `<protocol>` with the BMC protocol, such as IPMI, RedFish, or others. Replace `<bmc_url>` with the URL of the bare metal node's baseboard management controller.
190+
+
191+
<5> To skip certificate validation, set `disableCertificateVerification` to true.
192+
+
193+
<6> Replace `<bmc_username>` and `<bmc_password>` with the string of the BMC user name and password.
194+
+
195+
<7> Optional: Replace `<root_device_hint>` with a device path if you specify a root device hint.
196+
+
197+
<8> Optional: If you have configured the network interface for the newly created node, provide the network configuration secret name in the `preprovisioningNetworkDataName` of the BareMetalHost CR.
198+
133199
+
134200
[NOTE]
135201
====

0 commit comments

Comments
 (0)