Skip to content

Commit 5f1a813

Browse files
authored
Merge pull request #49724 from johnwilkins/TELCODOCS-321-interfaces-4.11+
2 parents 1464b88 + 5bc4179 commit 5f1a813

File tree

2 files changed

+87
-48
lines changed

2 files changed

+87
-48
lines changed

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ include::modules/ipi-install-modifying-install-config-for-dual-stack-network.ado
4444

4545
include::modules/ipi-install-configuring-host-network-interfaces-in-the-install-config.yaml-file.adoc[leveloffset=+2]
4646

47-
[role="_additional-resources"]
48-
[id="additional-resources_relnotes"]
49-
.Additional resources
50-
51-
* xref:../../release_notes/ocp-4-12-release-notes.adoc#ocp-4-12-known-issues[OpenShift Container Platform 4.12 release notes]
52-
5347
include::modules/ipi-install-configure-multiple-cluster-nodes.adoc[leveloffset=+2]
5448

5549
include::modules/ipi-install-configuring-managed-secure-boot-in-the-install-config-file.adoc[leveloffset=+2]

modules/ipi-install-configuring-host-network-interfaces-in-the-install-config.yaml-file.adoc

Lines changed: 87 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,55 +6,100 @@
66
[id="configuring-host-network-interfaces-in-the-install-config-yaml-file_{context}"]
77
= Optional: Configuring host network interfaces
88

9-
During installation, you can set the `networkConfig` configuration setting in the `install-config.yaml` file to configure host network interfaces using NMState. To use the `networkConfig` configuration setting, you must provide an NMState YAML configuration.
9+
Before installation, you can set the `networkConfig` configuration setting in the `install-config.yaml` file to configure host network interfaces using NMState.
1010

11-
See link:https://nmstate.io/examples.html#interfaces-ethernet[NMState] for additional examples of the NMState syntax.
11+
The most common use case for this functionality is to specify a static IP address on the `baremetal` network, but you can also configure other networks such as a storage network. This functionality supports other NMState features such as VLAN, VXLAN, bridges, bonds, routes, MTU, and DNS resolver settings.
1212

13-
.Example
14-
[source,yaml]
15-
----
16-
hosts:
17-
- name: openshift-master-0
18-
role: master
19-
bmc:
20-
address: redfish+http://<out-of-band-ip>/redfish/v1/Systems/
21-
username: <user>
22-
password: <password>
23-
disableCertificateVerification: null
24-
bootMACAddress: <NIC1_mac_address>
25-
bootMode: UEFI
26-
rootDeviceHints:
27-
deviceName: "/dev/sda"
28-
networkConfig: <1>
29-
interfaces:
30-
- name: <NIC1_name>
31-
type: ethernet
32-
state: up
33-
ipv4:
34-
address:
35-
- ip: "<IP_address>"
36-
prefix-length: 24
37-
enabled: true
38-
dns-resolver:
39-
config:
40-
server:
41-
- <DNS_IP_address>
42-
routes:
43-
config:
44-
- destination: 0.0.0.0/0
45-
next-hop-address: <IP_address>
46-
next-hop-interface: <NIC1_name>
47-
----
48-
<1> Add NMState YAML syntax to configure host interfaces.
13+
.Prequisites
14+
15+
* Configure a `PTR` DNS record with a valid hostname for each node with a static IP address.
16+
* Install the NMState CLI (`nmstate`).
4917
50-
[TIP]
18+
.Procedure
19+
20+
. Optional: Consider testing the NMState syntax with `nmstatectl gc` before including it in the `install-config.yaml` file, because the installer will not check the NMState YAML syntax.
21+
+
22+
[NOTE]
5123
====
52-
Consider saving the `networkConfig` YAML syntax to a file and testing it using the NMState command line interface before including it in the `install-config.yaml` file, because the installer will not check the NMState YAML syntax. Execute `nmstatectl gc <yaml-config>` to test the syntax. Errors in the YAML syntax might result in a failure to apply the network configuration. Additionally, maintaining the validated YAML syntax is useful when applying changes using Kubernetes NMState after deployment or when expanding the cluster.
24+
Errors in the YAML syntax might result in a failure to apply the network configuration. Additionally, maintaining the validated YAML syntax is useful when applying changes using Kubernetes NMState after deployment or when expanding the cluster.
5325
====
5426

55-
The most common use case for this functionality is to specify a static IP address on the `baremetal` network, but you can also configure other networks such as a storage network. This functionality will also support other NMState features such as VLAN, VXLAN, bridges, bonds, routes, MTU, and DNS resolver settings.
5627

28+
.. Create an NMState YAML file:
29+
+
30+
[source,yaml]
31+
----
32+
interfaces:
33+
- name: <nic1_name> <1>
34+
type: ethernet
35+
state: up
36+
ipv4:
37+
address:
38+
- ip: <ip_address> <1>
39+
prefix-length: 24
40+
enabled: true
41+
dns-resolver:
42+
config:
43+
server:
44+
- <dns_ip_address> <1>
45+
routes:
46+
config:
47+
- destination: 0.0.0.0/0
48+
next-hop-address: <next_hop_ip_address> <1>
49+
next-hop-interface: <next_hop_nic1_name> <1>
50+
----
51+
+
52+
<1> Replace `<nic1_name>`, `<ip_address>`, `<dns_ip_address>`, `<next_hop_ip_address>` and `<next_hop_nic1_name>` with appropriate values.
53+
54+
.. Test the configuration file by running the following command:
55+
+
56+
[source,terminal]
57+
----
58+
$ nmstatectl gc <nmstate_yaml_file>
59+
----
60+
+
61+
Replace `<nmstate_yaml_file>` with the configuration file name.
62+
63+
. Use the `networkConfig` configuration setting by adding the NMState configuration to hosts within the `install-config.yaml` file:
64+
+
65+
[source,yaml]
66+
----
67+
hosts:
68+
- name: openshift-master-0
69+
role: master
70+
bmc:
71+
address: redfish+http://<out_of_band_ip>/redfish/v1/Systems/
72+
username: <user>
73+
password: <password>
74+
disableCertificateVerification: null
75+
bootMACAddress: <NIC1_mac_address>
76+
bootMode: UEFI
77+
rootDeviceHints:
78+
deviceName: "/dev/sda"
79+
networkConfig: <1>
80+
interfaces:
81+
- name: <nic1_name> <2>
82+
type: ethernet
83+
state: up
84+
ipv4:
85+
address:
86+
- ip: <ip_address> <2>
87+
prefix-length: 24
88+
enabled: true
89+
dns-resolver:
90+
config:
91+
server:
92+
- <dns_ip_address> <2>
93+
routes:
94+
config:
95+
- destination: 0.0.0.0/0
96+
next-hop-address: <next_hop_ip_address> <2>
97+
next-hop-interface: <next_hop_nic1_name> <2>
98+
----
99+
<1> Add the NMState YAML syntax to configure the host interfaces.
100+
<2> Replace `<nic1_name>`, `<ip_address>`, `<dns_ip_address>`, `<next_hop_ip_address>` and `<next_hop_nic1_name>` with appropriate values.
101+
+
57102
[IMPORTANT]
58103
====
59-
Once deployed, you cannot modify the `networkConfig` configuration setting of `install-config.yaml` file to make changes to the host network interface. Use the Kubernetes NMState Operator to make changes to the host network interface after deployment.
104+
After deploying the cluster, you cannot modify the `networkConfig` configuration setting of `install-config.yaml` file to make changes to the host network interface. Use the Kubernetes NMState Operator to make changes to the host network interface after deployment.
60105
====

0 commit comments

Comments
 (0)