You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After deploying a user-provisioned infrastructure cluster, you can use the Bare Metal Operator (BMO) and other metal3 components to scale bare-metal hosts in the cluster. This approach helps you to scale a user-provisioned cluster in a more automated way.
9
+
After deploying a user-provisioned infrastructure cluster, you can use the Bare Metal Operator (BMO) and other metal^3^ components to scale bare-metal hosts in the cluster. This approach helps you to scale a user-provisioned cluster in a more automated way.
* xref:../../../installing/installing_bare_metal/ipi/ipi-install-expanding-the-cluster.adoc#preparing-the-bare-metal-node_ipi-install-expanding[Preparing the bare-metal node]
* xref:../../../installing/installing_bare_metal/ipi/ipi-install-expanding-the-cluster.adoc#ipi-install-diagnosing-duplicate-mac-address_ipi-install-expanding[Diagnosing a duplicate MAC address when provisioning a new host in the cluster]
25
+
26
+
// Managing existing hosts in a user-provisioned cluster by using the BMO
= About scaling a user-provisioned cluster with the Bare Metal Operator
9
9
10
-
You can scale user-provisioned infrastructure clusters by using the Bare Metal Operator (BMO) and other metal3 components. User-provisioned infrastructure installations do not feature the Machine API Operator. The Machine API Operator typically manages the lifecycle of bare-metal hosts in a cluster. However, it is possible to use the BMO and other metal3 components to scale nodes in user-provisioned clusters without requiring the Machine API Operator.
10
+
You can scale user-provisioned infrastructure clusters by using the Bare Metal Operator (BMO) and other metal^3^ components. User-provisioned infrastructure installations do not feature the Machine API Operator. The Machine API Operator typically manages the lifecycle of bare-metal nodes in a cluster. However, it is possible to use the BMO and other metal^3^ components to scale nodes in user-provisioned clusters without requiring the Machine API Operator.
= Provisioning new hosts in a user-provisioned cluster by using the BMO
@@ -9,7 +9,7 @@ You can use the Bare Metal Operator (BMO) to provision bare-metal hosts in a use
9
9
10
10
[NOTE]
11
11
====
12
-
To provision bare-metal hosts to the cluster by using the BMO, you must set the `spec.externallyProvisioned` specification in the `BareMetalHost` custom resource to `false`.
12
+
Provisioning bare-metal hosts to the cluster by using the BMO sets the `spec.externallyProvisioned` specification in the `BareMetalHost` custom resource to `false` by default. Do not set the `spec.externallyProvisioned` specification to `true`, because this setting results in unexpected behavior.
13
13
====
14
14
15
15
.Prerequisites
@@ -20,45 +20,153 @@ To provision bare-metal hosts to the cluster by using the BMO, you must set the
20
20
21
21
.Procedure
22
22
23
-
. Create the `Secret` CR and the `BareMetalHost` CR.
23
+
. Create a configuration file for the bare-metal node. Depending if you use either a static configuration or a DHCP server, choose one of the following example `bmh.yaml` files and configure it to your needs by replacing values in the YAML to match your environment:
24
24
25
-
.. Save the following YAML in the `bmh.yaml` file:
25
+
* To deploy with a static configuration, create the following `bmh.yaml` file:
<1> Replace all instances of `<num>` with a unique compute node number for the bare-metal nodes in the `name`, `credentialsName`, and `preprovisioningNetworkDataName` fields.
89
+
<2> Add the NMState YAML syntax to configure the host interfaces. To configure the network interface for a newly created node, specify the name of the secret that has the network configuration. Follow the `nmstate` syntax to define the network configuration for your node. See "Preparing the bare-metal node" for details on configuring NMState syntax.
90
+
<3> Optional: If you have configured the network interface with `nmstate`, and you want to disable an interface, set `state: up` with the IP addresses set to `enabled: false`.
91
+
<4> Replace `<nic1_name>` with the name of the bare-metal node's first network interface controller (NIC).
92
+
<5> Replace `<ip_address>` with the IP address of the bare-metal node's NIC.
93
+
<6> Replace `<dns_ip_address>` with the IP address of the bare-metal node's DNS resolver.
94
+
<7> Replace `<next_hop_ip_address>` with the IP address of the bare-metal node's external gateway.
95
+
<8> Replace `<next_hop_nic1_name>` with the name of the bare-metal node's external gateway.
96
+
<9> Replace `<base64_of_uid>` and `<base64_of_pwd>` with the base64 string of the user name and password.
97
+
<10> 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.
98
+
<11> 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.
99
+
<12> Optional: Replace `<root_device_hint>` with a device path when specifying a root device hint. See "Root device hints" for additional details.
100
+
101
+
* When configuring the network interface with a static configuration by using `nmstate`, set `state: up` with the IP addresses set to `enabled: false`:
<1> You can only use bare-metal host drivers that support virtual media networking booting, for example `redfish-virtualmedia` and `idrac-virtualmedia`.
59
-
<2> You must set the `spec.externallyProvisioned` specification in the `BareMetalHost` custom resource to `false`. The default value is `false`.
60
122
61
-
. Create the bare-metal host object by running the following command:
123
+
* To deploy with a DHCP configuration, create the following `bmh.yaml` file:
124
+
+
125
+
[source,yaml]
126
+
----
127
+
---
128
+
apiVersion: v1
129
+
kind: Secret
130
+
metadata:
131
+
name: openshift-worker-<num>-bmc-secret <1>
132
+
namespace: openshift-machine-api
133
+
type: Opaque
134
+
data:
135
+
username: <base64_of_uid> <2>
136
+
password: <base64_of_pwd>
137
+
---
138
+
apiVersion: metal3.io/v1alpha1
139
+
kind: BareMetalHost
140
+
metadata:
141
+
name: openshift-worker-<num>
142
+
namespace: openshift-machine-api
143
+
spec:
144
+
online: true
145
+
bootMACAddress: <nic1_mac_address> <3>
146
+
bmc:
147
+
address: <protocol>://<bmc_url> <4>
148
+
credentialsName: openshift-worker-<num>-bmc
149
+
disableCertificateVerification: false
150
+
customDeploy:
151
+
method: install_coreos
152
+
userData:
153
+
name: worker-user-data-managed
154
+
namespace: openshift-machine-api
155
+
rootDeviceHints:
156
+
deviceName: <root_device_hint> <5>
157
+
----
158
+
<1> Replace `<num>` with a unique compute node number for the bare-metal nodes in the `name` and `credentialsName` fields.
159
+
<2> Replace `<base64_of_uid>` and `<base64_of_pwd>` with the base64 string of the user name and password.
160
+
<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.
161
+
<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.
162
+
<5> Optional: Replace `<root_device_hint>` with a device path when specifying a root device hint. See "Root device hints" for additional details.
163
+
+
164
+
[IMPORTANT]
165
+
====
166
+
If the MAC address of an existing bare-metal node matches the MAC address of the bare-metal host that you are attempting to provision, then the installation will fail. If the host enrollment, inspection, cleaning, or other steps fail, the Bare Metal Operator retries the installation continuously. See "Diagnosing a duplicate MAC address when provisioning a new host in the cluster" for additional details.
167
+
====
168
+
169
+
. Create the bare-metal node by running the following command:
62
170
+
63
171
[source,terminal]
64
172
----
@@ -68,27 +176,31 @@ $ oc create -f bmh.yaml
68
176
.Example output
69
177
[source,terminal]
70
178
----
71
-
secret/worker1-bmc created
72
-
baremetalhost.metal3.io/worker1 created
179
+
secret/openshift-worker-<num>-network-config-secret created
180
+
secret/openshift-worker-<num>-bmc-secret created
181
+
baremetalhost.metal3.io/openshift-worker-<num> created
73
182
----
74
183
75
-
. Approve all certificate signing requests (CSRs).
76
-
77
-
.. Verify that the provisioning state of the host is `provisioned` by running the following command:
184
+
. Inspect the bare-metal node by running the following command:
78
185
+
79
186
[source,terminal]
80
187
----
81
-
$ oc get bmh -A
188
+
$ oc -n openshift-machine-api get bmh openshift-worker-<num>
You can run this step without having to edit the `BareMetalHost` CR. It might take some time for the `BareMetalHost` state to change from `deprovisioning` to `available`.
87
+
====
88
+
77
89
. Delete the node by running the following command:
78
90
+
79
91
[source,terminal]
@@ -83,7 +95,7 @@ $ oc delete node <node_name>
83
95
84
96
.Verification
85
97
86
-
* Verify the node is deleted by running the following command:
98
+
* Verify that you deleted the node by running the following command:
0 commit comments