Skip to content

Commit 9472e85

Browse files
author
Amrita
committed
adds static networking and dhcp
1 parent 3d6e8c6 commit 9472e85

File tree

3 files changed

+225
-10
lines changed

3 files changed

+225
-10
lines changed

installing/installing_with_agent_based_installer/preparing-to-install-with-agent-based-installer.adoc

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,9 @@ The Agent-based Installer also utilizes Zero Touch Provisioning (ZTP) custom res
1616

1717
include::modules/understanding-agent-install.adoc[leveloffset=+1]
1818

19-
include::modules/agent-installer-fips-compliance.adoc[leveloffset=+1]
19+
include::modules/agent-install-networking.adoc[leveloffset=+1]
2020

21-
include::modules/agent-installer-configuring-fips-compliance.adoc[leveloffset=+1]
22-
23-
[discrete]
24-
[role="_additional-resources"]
25-
.Additional resources
26-
27-
* link:https://access.redhat.com/articles/5059881[OpenShift Security Guide Book].
28-
29-
* xref:../../installing/installing-fips.adoc#installing-fips[Support for FIPS cryptography]
21+
include::modules/agent-install-sample-config-bonds-vlans.adoc[leveloffset=+1]
3022

3123
include::modules/installation-bare-metal-agent-installer-config-yaml.adoc[leveloffset=+1]
3224

modules/agent-install-networking.adoc

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
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**.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
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: REFERENCE
6+
[id="agent-install-sample-config-bonds-vlans_{context}"]
7+
= Example: Bonds and VLAN interface node network configuration
8+
9+
The following `agent-config.yaml` file is an example of a manifest for bond and VLAN interfaces.
10+
11+
[source,yaml]
12+
----
13+
apiVersion: v1alpha1
14+
kind: AgentConfig
15+
rendezvousIP: 10.10.10.14
16+
hosts:
17+
- hostname: master0
18+
role: master
19+
interfaces:
20+
- name: enp0s4
21+
macAddress: 00:21:50:90:c0:10
22+
- name: enp0s5
23+
macAddress: 00:21:50:90:c0:20
24+
networkConfig:
25+
interfaces:
26+
- name: bond0.300 <1>
27+
type: vlan <2>
28+
state: up
29+
vlan:
30+
base-iface: bond0
31+
id: 300
32+
ipv4:
33+
enabled: true
34+
address:
35+
- ip: 10.10.10.14
36+
prefix-length: 24
37+
dhcp: false
38+
- name: bond0 <1>
39+
type: bond <3>
40+
state: up
41+
mac-address: 00:21:50:90:c0:10 <4>
42+
ipv4:
43+
enabled: false
44+
ipv6:
45+
enabled: false
46+
link-aggregation:
47+
mode: active-backup <5>
48+
options:
49+
miimon: "150" <6>
50+
port:
51+
- enp0s4
52+
- enp0s5
53+
dns-resolver: <7>
54+
config:
55+
server:
56+
- 10.10.10.11
57+
- 10.10.10.12
58+
routes:
59+
config:
60+
- destination: 0.0.0.0/0
61+
next-hop-address: 10.10.10.10 <8>
62+
next-hop-interface: bond0.300 <9>
63+
table-id: 254
64+
----
65+
<1> Name of the interface.
66+
<2> The type of interface. This example creates a VLAN.
67+
<3> The type of interface. This example creates a bond.
68+
<4> The mac address of the interface.
69+
<5> The `mode` attribute specifies the bonding mode.
70+
<6> Specifies the MII link monitoring frequency in milliseconds. This example inspects the bond link every 150 milliseconds.
71+
<7> Optional: Specifies the search and server settings for the DNS server.
72+
<8> Next hop address for the node traffic. This must be in the same subnet as the IP address set for the specified interface.
73+
<9> Next hop interface for the node traffic.

0 commit comments

Comments
 (0)