Skip to content

Commit 19739fa

Browse files
authored
Merge pull request #53122 from abhatt-rh/td-1037
TELCODOCS-1037: Add instructions for nmstate network settings
2 parents 769de5c + c67b78e commit 19739fa

File tree

1 file changed

+38
-32
lines changed

1 file changed

+38
-32
lines changed

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

Lines changed: 38 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -76,24 +76,24 @@ stringData:
7676
rootDeviceHints:
7777
deviceName: "/dev/sda"
7878
networkConfig: <3>
79-
interfaces:
80-
- name: <nic1_name> <4>
79+
interfaces: <4>
80+
- name: <nic1_name> <5>
8181
type: ethernet
8282
state: up
8383
ipv4:
8484
address:
85-
- ip: <ip_address> <4>
85+
- ip: <ip_address> <5>
8686
prefix-length: 24
8787
enabled: true
8888
dns-resolver:
8989
config:
9090
server:
91-
- <dns_ip_address> <4>
91+
- <dns_ip_address> <5>
9292
routes:
9393
config:
9494
- destination: 0.0.0.0/0
95-
next-hop-address: <next_hop_ip_address> <4>
96-
next-hop-interface: <next_hop_nic1_name> <4>
95+
next-hop-address: <next_hop_ip_address> <5>
96+
next-hop-interface: <next_hop_nic1_name> <5>
9797
---
9898
apiVersion: v1
9999
kind: Secret
@@ -102,8 +102,8 @@ metadata:
102102
namespace: openshift-machine-api
103103
type: Opaque
104104
data:
105-
username: <base64_of_uid> <5>
106-
password: <base64_of_pwd> <5>
105+
username: <base64_of_uid> <6>
106+
password: <base64_of_pwd> <6>
107107
---
108108
apiVersion: metal3.io/v1alpha1
109109
kind: BareMetalHost
@@ -112,39 +112,45 @@ metadata:
112112
namespace: openshift-machine-api
113113
spec:
114114
online: True
115-
bootMACAddress: <nic1_mac_address> <6>
115+
bootMACAddress: <nic1_mac_address> <7>
116116
bmc:
117-
address: <protocol>://<bmc_url> <7>
117+
address: <protocol>://<bmc_url> <8>
118118
credentialsName: openshift-worker-<num>-bmc-secret <2>
119-
disableCertificateVerification: True <8>
120-
username: <bmc_username> <9>
121-
password: <bmc_password> <9>
119+
disableCertificateVerification: True <9>
120+
username: <bmc_username> <10>
121+
password: <bmc_password> <10>
122122
rootDeviceHints:
123-
deviceName: <root_device_hint> <10>
124-
preprovisioningNetworkDataName: openshift-worker-<num>-network-config-secret <11>
123+
deviceName: <root_device_hint> <11>
124+
preprovisioningNetworkDataName: openshift-worker-<num>-network-config-secret <12>
125125
----
126126
+
127+
--
127128
<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.
128-
+
129129
<2> Replace `<num>` for the worker number of the bare metal node in the `name` fields, the `credentialsName` field, and the `preprovisioningNetworkDataName` field.
130-
+
131130
<3> Add the NMState YAML syntax to configure the host interfaces.
131+
<4> 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` as shown:
132132
+
133-
<4> Replace `<nic1_name>`, `<ip_address>`, `<dns_ip_address>`, `<next_hop_ip_address>` and `<next_hop_nic1_name>` with appropriate values.
134-
+
135-
<5> Replace `<base64_of_uid>` and `<base64_of_pwd>` with the base64 string of the user name and password.
136-
+
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.
138-
+
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.
140-
+
141-
<8> To skip certificate validation, set `disableCertificateVerification` to true.
142-
+
143-
<9> Replace `<bmc_username>` and `<bmc_password>` with the string of the BMC user name and password.
144-
+
145-
<10> Optional: Replace `<root_device_hint>` with a device path if you specify a root device hint.
146-
+
147-
<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.
133+
[source,yaml,]
134+
----
135+
---
136+
interfaces:
137+
- name: <nic_name>
138+
type: ethernet
139+
state: up
140+
ipv4:
141+
enabled: false
142+
ipv6:
143+
enabled: false
144+
----
145+
<5> Replace `<nic1_name>`, `<ip_address>`, `<dns_ip_address>`, `<next_hop_ip_address>` and `<next_hop_nic1_name>` with appropriate values.
146+
<6> Replace `<base64_of_uid>` and `<base64_of_pwd>` with the base64 string of the user name and password.
147+
<7> 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.
148+
<8> 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.
149+
<9> To skip certificate validation, set `disableCertificateVerification` to true.
150+
<10> Replace `<bmc_username>` and `<bmc_password>` with the string of the BMC user name and password.
151+
<11> Optional: Replace `<root_device_hint>` with a device path if you specify a root device hint.
152+
<12> 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.
153+
--
148154
149155
* *DHCP configuration* `bmh.yaml`:
150156
+

0 commit comments

Comments
 (0)