|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * installing/installing-with-agent-based-installer/preparing-to-install-with-agent-based-installer.adoc |
| 4 | + |
| 5 | +:_content-type: CONCEPT |
| 6 | +[id="agent-install-networking_{context}"] |
| 7 | += About networking |
| 8 | + |
| 9 | +During the initial boot, the machines require an IP address configuration that is set either through a Dynamic Host Configuration Protocol(DHCP) server or statically by |
| 10 | +selecting the below options. If you provide the IP address for the `rendezvousIP` field through the DHCP option, then ensure that it is for the machine's IP address that is going to be used for deployment. |
| 11 | +This IP address is required for a node to be identified as ** node 0 **. A ** node 0 ** runs the required services for the Agent-based Installer. |
| 12 | +
|
| 13 | +== DHCP |
| 14 | +
|
| 15 | +.Preferred method: `install-config.yaml` and `agent.config.yaml` |
| 16 | +
|
| 17 | +You must specify only the value for the `rendezvousIP` field and `networkConfig` field must be left blank: |
| 18 | +
|
| 19 | +.Sample agent-config.yaml.file |
| 20 | +
|
| 21 | +[source,yaml] |
| 22 | +---- |
| 23 | + cat > agent-config.yaml << EOF |
| 24 | + apiVersion: v1alpha1 |
| 25 | + kind: AgentConfig |
| 26 | + metadata: |
| 27 | + name: sno-cluster |
| 28 | + rendezvousIP: 192.168.111.80 <1> |
| 29 | +---- |
| 30 | +<1> The IP address for ** node 0**. |
| 31 | + |
| 32 | +== Static networking |
| 33 | + |
| 34 | +.. Preferred method: `install-config.yaml` and `agent.config.yaml` |
| 35 | ++ |
| 36 | +.Scenario-1 |
| 37 | + |
| 38 | +When you specify the value for the `rendezvousIP` and `networkConfig` fields, the `rendezvousIP` field is utilized. |
| 39 | + |
| 40 | ++ |
| 41 | +.Sample agent-config.yaml.file |
| 42 | ++ |
| 43 | +[source,yaml] |
| 44 | +---- |
| 45 | + cat > agent-config.yaml << EOF |
| 46 | + apiVersion: v1alpha1 |
| 47 | + kind: AgentConfig |
| 48 | + metadata: |
| 49 | + name: sno-cluster |
| 50 | + rendezvousIP: 192.168.111.80 |
| 51 | + hosts: |
| 52 | + - hostname: master-0 |
| 53 | + interfaces: |
| 54 | + - name: eno1 |
| 55 | + macAddress: 00:ef:44:21:e6:a5 |
| 56 | + networkConfig: |
| 57 | + interfaces: |
| 58 | + - name: eno1 |
| 59 | + type: ethernet |
| 60 | + state: up |
| 61 | + mac-address: 00:ef:44:21:e6:a5 |
| 62 | + ipv4: |
| 63 | + enabled: true |
| 64 | + address: |
| 65 | + - ip: 192.168.111.80 |
| 66 | + prefix-length: 23 |
| 67 | +---- |
| 68 | + |
| 69 | ++ |
| 70 | +.Scenario-2 |
| 71 | +When you specify the values for the `networkConfig` field, the value from the `interfaces` field is utilized. This is when there is no `rendezvousIP` field. |
| 72 | ++ |
| 73 | +[source,yaml] |
| 74 | +---- |
| 75 | + cat > agent-config.yaml << EOF |
| 76 | + apiVersion: v1alpha1 |
| 77 | + kind: AgentConfig |
| 78 | + hosts: |
| 79 | + - hostname: master-0 |
| 80 | + interfaces: |
| 81 | + - name: eno1 |
| 82 | + macAddress: 00:ef:44:21:e6:a5 |
| 83 | + networkConfig: |
| 84 | + interfaces: |
| 85 | + - name: eno1 |
| 86 | + type: ethernet |
| 87 | + state: up |
| 88 | + mac-address: 00:ef:44:21:e6:a5 |
| 89 | + ipv4: |
| 90 | + enabled: true |
| 91 | + address: |
| 92 | + - ip: 192.168.111.80 <1> |
| 93 | + prefix-length: 23 <2> |
| 94 | +---- |
| 95 | +<1> The static IP address of the target bare-metal host. |
| 96 | +<2> The static IP address’s subnet prefix for the target bare-metal host. |
| 97 | ++ |
| 98 | +Note that the lowest value IP is utilized for the IP address of ** node 0**. |
| 99 | + |
| 100 | ++ |
| 101 | +.. Optional method: ZTP manifests |
| 102 | + |
| 103 | ++ |
| 104 | +The optional method of the ZTP custom resources comprises 6 custom resources; you can configure static IPs in the `NMStateConfig.yaml.file`. |
| 105 | + |
| 106 | ++ |
| 107 | +[source,yaml] |
| 108 | +---- |
| 109 | +apiVersion: agent-install.openshift.io/v1beta1 |
| 110 | +kind: NMStateConfig |
| 111 | +metadata: |
| 112 | + name: master-0 |
| 113 | + namespace: openshift-machine-api |
| 114 | + labels: |
| 115 | + cluster0-nmstate-label-name: cluster0-nmstate-label-value |
| 116 | +spec: |
| 117 | + config: |
| 118 | + interfaces: |
| 119 | + - name: eth0 |
| 120 | + type: ethernet |
| 121 | + state: up |
| 122 | + mac-address: 52:54:01:aa:aa:a1 |
| 123 | + ipv4: |
| 124 | + enabled: true |
| 125 | + address: |
| 126 | + - ip: 192.168.122.2 <1> |
| 127 | + prefix-length: 23 <2> |
| 128 | + dhcp: false |
| 129 | + dns-resolver: |
| 130 | + config: |
| 131 | + server: |
| 132 | + - 192.168.122.1 <3> |
| 133 | + routes: |
| 134 | + config: |
| 135 | + - destination: 0.0.0.0/0 |
| 136 | + next-hop-address: 192.168.122.1 <4> |
| 137 | + next-hop-interface: eth0 |
| 138 | + table-id: 254 |
| 139 | + interfaces: |
| 140 | + - name: "eth0" <5> |
| 141 | + macAddress: 52:54:01:aa:aa:a1 <6> |
| 142 | +---- |
| 143 | +<1> The static IP address of the target bare-metal host. |
| 144 | +<2> The static IP address’s subnet prefix for the target bare-metal host. |
| 145 | +<3> The DNS server for the target bare-metal host. |
| 146 | +<4> Next hop address for the node traffic. This must be in the same subnet as the IP address set for the specified interface. |
| 147 | +<5> The `interfaces` field must have the same name. |
| 148 | +<6> The mac address of the interface. |
| 149 | ++ |
| 150 | +Note that the lowest value IP is utilized for the IP address of ** node 0**. |
0 commit comments