From fe7c0cc931dd5c2bdcc76933548688e022545a66 Mon Sep 17 00:00:00 2001 From: Avani Bhatt Date: Wed, 23 Nov 2022 01:10:41 +0000 Subject: [PATCH] Add instructions for nmstate network settings --- ...install-preparing-the-bare-metal-node.adoc | 70 ++++++++++--------- 1 file changed, 38 insertions(+), 32 deletions(-) diff --git a/modules/ipi-install-preparing-the-bare-metal-node.adoc b/modules/ipi-install-preparing-the-bare-metal-node.adoc index ae71942dd1f5..b1cce783a15a 100644 --- a/modules/ipi-install-preparing-the-bare-metal-node.adoc +++ b/modules/ipi-install-preparing-the-bare-metal-node.adoc @@ -76,24 +76,24 @@ stringData: rootDeviceHints: deviceName: "/dev/sda" networkConfig: <3> - interfaces: - - name: <4> + interfaces: <4> + - name: <5> type: ethernet state: up ipv4: address: - - ip: <4> + - ip: <5> prefix-length: 24 enabled: true dns-resolver: config: server: - - <4> + - <5> routes: config: - destination: 0.0.0.0/0 - next-hop-address: <4> - next-hop-interface: <4> + next-hop-address: <5> + next-hop-interface: <5> --- apiVersion: v1 kind: Secret @@ -102,8 +102,8 @@ metadata: namespace: openshift-machine-api type: Opaque data: - username: <5> - password: <5> + username: <6> + password: <6> --- apiVersion: metal3.io/v1alpha1 kind: BareMetalHost @@ -112,39 +112,45 @@ metadata: namespace: openshift-machine-api spec: online: True - bootMACAddress: <6> + bootMACAddress: <7> bmc: - address: :// <7> + address: :// <8> credentialsName: openshift-worker--bmc-secret <2> - disableCertificateVerification: True <8> - username: <9> - password: <9> + disableCertificateVerification: True <9> + username: <10> + password: <10> rootDeviceHints: - deviceName: <10> - preprovisioningNetworkDataName: openshift-worker--network-config-secret <11> + deviceName: <11> + preprovisioningNetworkDataName: openshift-worker--network-config-secret <12> ---- + +-- <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. -+ <2> Replace `` for the worker number of the bare metal node in the `name` fields, the `credentialsName` field, and the `preprovisioningNetworkDataName` field. -+ <3> Add the NMState YAML syntax to configure the host interfaces. +<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: + -<4> Replace ``, ``, ``, `` and `` with appropriate values. -+ -<5> Replace `` and `` with the base64 string of the user name and password. -+ -<6> Replace `` with the MAC address of the bare metal node's first NIC. See the "BMC addressing" section for additional BMC configuration options. -+ -<7> Replace `` with the BMC protocol, such as IPMI, RedFish, or others. Replace `` with the URL of the bare metal node's baseboard management controller. -+ -<8> To skip certificate validation, set `disableCertificateVerification` to true. -+ -<9> Replace `` and `` with the string of the BMC user name and password. -+ -<10> Optional: Replace `` with a device path if you specify a root device hint. -+ -<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. +[source,yaml,] +---- +--- + interfaces: + - name: + type: ethernet + state: up + ipv4: + enabled: false + ipv6: + enabled: false +---- +<5> Replace ``, ``, ``, `` and `` with appropriate values. +<6> Replace `` and `` with the base64 string of the user name and password. +<7> Replace `` with the MAC address of the bare metal node's first NIC. See the "BMC addressing" section for additional BMC configuration options. +<8> Replace `` with the BMC protocol, such as IPMI, RedFish, or others. Replace `` with the URL of the bare metal node's baseboard management controller. +<9> To skip certificate validation, set `disableCertificateVerification` to true. +<10> Replace `` and `` with the string of the BMC user name and password. +<11> Optional: Replace `` with a device path if you specify a root device hint. +<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. +-- * *DHCP configuration* `bmh.yaml`: +