Skip to content

Commit 425618c

Browse files
committed
Removing networkConfig spec from BareMetalHost definition
1 parent fe97f32 commit 425618c

File tree

2 files changed

+58
-34
lines changed

2 files changed

+58
-34
lines changed

installing/installing_bare_metal_ipi/ipi-install-expanding-the-cluster.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ Expanding the cluster using RedFish Virtual Media involves meeting minimum firmw
1616
include::modules/ipi-install-preparing-the-bare-metal-node.adoc[leveloffset=+1]
1717

1818
[role="_additional-resources"]
19+
[id="additional-resources_ipi-install-expanding"]
1920
.Additional resources
2021

2122
* xref:../../installing/installing_bare_metal_ipi/ipi-install-installation-workflow.adoc#configuring-host-network-interfaces-in-the-install-config-yaml-file_ipi-install-installation-workflow[(Optional) Configuring host network interfaces in the install-config.yaml file]
23+
* xref:../../scalability_and_performance/managing-bare-metal-hosts.adoc#automatically-scaling-machines-to-available-bare-metal-hosts_managing-bare-metal-hosts[Automatically scaling machines to the number of available bare metal hosts]
2224
2325
include::modules/ipi-install-replacing-a-bare-metal-control-plane-node.adoc[leveloffset=+1]
2426

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

Lines changed: 56 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ $ curl -s https://mirror.openshift.com/pub/openshift-v4/clients/ocp/$VERSION/ope
3030
$ sudo cp oc /usr/local/bin
3131
----
3232

33-
. Power off the bare metal node by using the baseboard management controller, and ensure it is off.
33+
. Power off the bare metal node by using the baseboard management controller (BMC), and ensure it is off.
3434

3535
. Retrieve the user name and password of the bare metal node's baseboard management controller. Then, create `base64` strings from the user name and password:
3636
+
@@ -53,52 +53,68 @@ $ vim bmh.yaml
5353
+
5454
[source,yaml]
5555
----
56+
apiVersion: v1
57+
kind: Secret
58+
metadata:
59+
name: openshift-worker-<num>-network-config-secret <1> <2>
60+
type: Opaque
61+
stringData:
62+
nmstate: |
63+
routes:
64+
config:
65+
- destination: 0.0.0.0/0
66+
next-hop-address: 192.168.123.1
67+
next-hop-interface: enp0s4
68+
dns-resolver:
69+
config:
70+
server:
71+
- 192.168.123.1
72+
interfaces:
73+
- name: enp0s4
74+
state: up
75+
ipv4:
76+
address:
77+
- ip: 192.168.123.16
78+
prefix-length: 24
79+
enabled: true
80+
dhcp: false
5681
---
5782
apiVersion: v1
5883
kind: Secret
5984
metadata:
60-
name: openshift-worker-<num>-bmc-secret <1>
85+
name: openshift-worker-<num>-bmc-secret <2>
86+
namespace: openshift-machine-api
6187
type: Opaque
6288
data:
63-
username: <base64-of-uid> <2>
64-
password: <base64-of-pwd> <3>
89+
username: <base64-of-uid> <3>
90+
password: <base64-of-pwd> <4>
6591
---
6692
apiVersion: metal3.io/v1alpha1
6793
kind: BareMetalHost
6894
metadata:
69-
name: openshift-worker-<num> <1>
95+
name: openshift-worker-<num> <2>
96+
namespace: openshift-machine-api
7097
spec:
7198
online: true
72-
bootMACAddress: <NIC1-mac-address> <4>
99+
bootMACAddress: <NIC1-mac-address> <5>
73100
bmc:
74-
address: <protocol>://<bmc-ip> <5>
75-
credentialsName: openshift-worker-<num>-bmc-secret <1>
76-
networkConfig: <6>
77-
interfaces:
78-
- name: <NIC1_name>
79-
type: ethernet
80-
state: up
81-
ipv4:
82-
address:
83-
- ip: "<IP_address>"
84-
prefix-length: 24
85-
enabled: true
86-
dns-resolver:
87-
config:
88-
server:
89-
- <DNS_IP_address>
90-
routes:
91-
config:
92-
- destination: 0.0.0.0/0
93-
next-hop-address: <IP_address>
94-
next-hop-interface: <NIC1_name>
95-
----
96-
<1> Replace `<num>` for the worker number of the bare metal node in the two `name` fields and the `credentialsName` field.
97-
<2> Replace `<base64-of-uid>` with the `base64` string of the user name.
98-
<3> Replace `<base64-of-pwd>` with the `base64` string of the password.
99-
<4> 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. Replace `<protocol>` with the BMC protocol, such as IPMI, RedFish, or others.
100-
<5> Replace `<bmc-ip>` with the IP address of the bare metal node's baseboard management controller.
101-
<6> Optional. You can set the `networkConfig` configuration option to configure host network interfaces. See "(Optional) Configuring host network interfaces in the `install-config.yaml` file" in the "Setting up the environment for an OpenShift installation" section for configuration details.
101+
address: <protocol>://<bmc-ip> <6>
102+
credentialsName: openshift-worker-<num>-bmc-secret <2>
103+
disableCertificateVerification: true <7>
104+
username: <bmc-username> <8>
105+
password: <bmc-password> <9>
106+
preprovisioningNetworkDataName: openshift-worker-<num>-network-config-secret <10> <2>
107+
----
108+
<1> Optional: To configure network 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.
109+
<2> Replace `<num>` for the worker number of the bare metal node in the `name` fields, the `credentialsName` field, and the `preprovisioningNetworkDataName` field.
110+
<3> Replace `<base64-of-uid>` with the `base64` string of the user name.
111+
<4> Replace `<base64-of-pwd>` with the `base64` string of the password.
112+
<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.
113+
<6> Replace `<protocol>` with the BMC protocol, such as IPMI, RedFish, or others. Replace `<bmc-ip>` with the IP address of the bare metal node's baseboard management controller.
114+
<7> To skip certificate validation, set `disableCertificateVerification` to `true`.
115+
<8> Replace `<bmc-username>` with the `bmc` string of the user name.
116+
<9> Replace `<bmc-password>` with the `bmc` string of the password.
117+
<10> Optional: Provide the network configuration secret name in the `preprovisioningNetworkDataName` of the `BareMetalHost` CR if you have configured network for the newly created node.
102118
+
103119
[NOTE]
104120
====
@@ -115,6 +131,7 @@ $ oc -n openshift-machine-api create -f bmh.yaml
115131
.Example output
116132
[source,terminal]
117133
----
134+
secret/openshift-worker-<num>-network-config-secret created
118135
secret/openshift-worker-<num>-bmc-secret created
119136
baremetalhost.metal3.io/openshift-worker-<num> created
120137
----
@@ -136,3 +153,8 @@ Where `<num>` is the worker node number.
136153
NAME STATE CONSUMER ONLINE ERROR
137154
openshift-worker-<num> available true
138155
----
156+
+
157+
[NOTE]
158+
====
159+
To allow the worker node to join the cluster, scale the `machineset` object to the number of the `BareMetalHost` objects. You can scale nodes either manually or automatically. To scale nodes automatically, use the `metal3.io/autoscale-to-hosts` annotation for `machineset`.
160+
====

0 commit comments

Comments
 (0)