Skip to content

Commit a2122c2

Browse files
authored
Merge pull request #62677 from dfitzmau/OSDOCS-5202re
/lgtm, merging. OSDOCS-5202re:Documented vSphere config provisioning of nodes with sta
2 parents 6622bda + 4929582 commit a2122c2

10 files changed

+378
-3
lines changed

installing/installing_vsphere/installing-restricted-networks-installer-provisioned-vsphere.adoc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,15 @@ include::modules/vmware-csi-driver-reqs.adoc[leveloffset=+1]
4949

5050
include::modules/installation-vsphere-installer-infra-requirements.adoc[leveloffset=+1]
5151

52+
include::modules/installation-vsphere-installer-infra-static-ip-nodes.adoc[leveloffset=+2]
53+
54+
[role="_additional-resources"]
55+
.Additional resources
56+
57+
* xref:../../post_installation_configuration/node-tasks.html#nodes-vsphere-scaling-machines-static-ip_post-install-node-tasks[Scaling machines to use static IP addresses]
58+
* xref:../../post_installation_configuration/node-tasks.html#nodes-vsphere-machine-set-scaling-static-ip_post-install-node-tasks[Using a machine set to scale machines with configured static IP addresses]
59+
60+
5261
include::modules/ssh-agent-using.adoc[leveloffset=+1]
5362

5463
include::modules/installation-adding-vcenter-root-certificates.adoc[leveloffset=+1]

installing/installing_vsphere/installing-vsphere-installer-provisioned-customizations.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ include::modules/vmware-csi-driver-reqs.adoc[leveloffset=+1]
4242

4343
include::modules/installation-vsphere-installer-infra-requirements.adoc[leveloffset=+1]
4444

45+
include::modules/installation-vsphere-installer-infra-static-ip-nodes.adoc[leveloffset=+2]
46+
47+
* xref:../../post_installation_configuration/node-tasks.html#nodes-vsphere-scaling-machines-static-ip_post-install-node-tasks[Scaling machines to use static IP addresses]
48+
* xref:../../post_installation_configuration/node-tasks.html#nodes-vsphere-machine-set-scaling-static-ip_post-install-node-tasks[Using a machine set to scale machines with configured static IP addresses]
49+
4550
include::modules/ssh-agent-using.adoc[leveloffset=+1]
4651

4752
include::modules/installation-obtaining-installer.adoc[leveloffset=+1]

installing/installing_vsphere/installing-vsphere-installer-provisioned-network-customizations.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ include::modules/vmware-csi-driver-reqs.adoc[leveloffset=+1]
4444

4545
include::modules/installation-vsphere-installer-infra-requirements.adoc[leveloffset=+1]
4646

47+
include::modules/installation-vsphere-installer-infra-static-ip-nodes.adoc[leveloffset=+2]
48+
49+
* xref:../../post_installation_configuration/node-tasks.html#nodes-vsphere-scaling-machines-static-ip_post-install-node-tasks[Scaling machines to use static IP addresses]
50+
* xref:../../post_installation_configuration/node-tasks.html#nodes-vsphere-machine-set-scaling-static-ip_post-install-node-tasks[Using a machine set to scale machines with configured static IP addresses]
51+
4752
include::modules/ssh-agent-using.adoc[leveloffset=+1]
4853

4954
include::modules/installation-obtaining-installer.adoc[leveloffset=+1]

installing/installing_vsphere/installing-vsphere-installer-provisioned.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ include::modules/vmware-csi-driver-reqs.adoc[leveloffset=+1]
4242

4343
include::modules/installation-vsphere-installer-infra-requirements.adoc[leveloffset=+1]
4444

45+
include::modules/installation-vsphere-installer-infra-static-ip-nodes.adoc[leveloffset=+2]
46+
47+
* xref:../../post_installation_configuration/node-tasks.html#nodes-vsphere-scaling-machines-static-ip_post-install-node-tasks[Scaling machines to use static IP addresses]
48+
* xref:../../post_installation_configuration/node-tasks.html#nodes-vsphere-machine-set-scaling-static-ip_post-install-node-tasks[Using a machine set to scale machines with configured static IP addresses]
49+
4550
include::modules/ssh-agent-using.adoc[leveloffset=+1]
4651

4752
include::modules/installation-obtaining-installer.adoc[leveloffset=+1]

modules/installation-vsphere-installer-infra-requirements.adoc

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
// * installing/installing_vsphere/installing-restricted-networks-installer-provisioned-vsphere.adoc
99
// * installing/installing_vsphere/installing-restricted-networks-vsphere.adoc
1010

11-
12-
1311
ifeval::["{context}" == "installing-restricted-networks-installer-provisioned-vsphere"]
1412
:restricted:
1513
endif::[]
@@ -437,8 +435,17 @@ Available resources vary between clusters. The number of possible clusters withi
437435
[discrete]
438436
[id="installation-vsphere-installer-infra-requirements-networking_{context}"]
439437
== Networking requirements
438+
Use Dynamic Host Configuration Protocol (DHCP) for the network and ensure that the DHCP server is configured to provide persistent IP addresses to the cluster machines.
439+
440+
[NOTE]
441+
====
442+
You do not need to use the DHCP for the network if you want to provision nodes with static IP addresses.
443+
====
444+
445+
Configure the default gateway to use the DHCP server. All nodes must be in the same VLAN. You cannot scale the cluster using a second VLAN as a Day 2 operation.
440446

441447
You must use the Dynamic Host Configuration Protocol (DHCP) for the network and ensure that the DHCP server is configured to provide persistent IP addresses to the cluster machines. In the DHCP lease, you must configure the DHCP to use the default gateway. All nodes must be in the same VLAN. You cannot scale the cluster using a second VLAN as a Day 2 operation.
448+
442449
ifdef::restricted[]
443450
The VM in your restricted network must have access to vCenter so that it can provision and manage nodes, persistent volume claims (PVCs), and other resources.
444451
endif::restricted[]
@@ -453,7 +460,7 @@ It is recommended that each {product-title} node in the cluster must have access
453460
[id="installation-vsphere-installer-infra-requirements-_{context}"]
454461
=== Required IP Addresses
455462
ifndef::vsphere[]
456-
An installer-provisioned vSphere installation requires two static IP addresses:
463+
For a network that uses DHCP, an installer-provisioned vSphere installation requires two static IP addresses:
457464

458465
* The **API** address is used to access the cluster API.
459466
* The **Ingress** address is used for cluster ingress traffic.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
:_content-type: CONCEPT
2+
[discrete]
3+
[id="installation-vsphere-installer-infra-static-ip-nodes_{context}"]
4+
== Static IP addresses for vSphere nodes
5+
6+
You can provision bootstrap, control plane, and compute nodes to be configured with static IP addresses in environments where Dynamic Host Configuration Protocol (DHCP) does not exist. To configure this environment, you must provide values to the `platform.vsphere.hosts.role` parameter in the `install-config.yaml` file.
7+
8+
:FeatureName: Static IP addresses for vSphere nodes
9+
include::snippets/technology-preview.adoc[leveloffset=+1]
10+
11+
By default, the installation program is configured to use the DHCP for the network, but this network has limited configurable capabilities.
12+
13+
After you define one or more machine pools in your `install-config.yaml` file, you can define network definitions for nodes on your network. Ensure that the number of network definitions matches the number of machine pools that you configured for your cluster.
14+
15+
The following example shows a network configuration for a node with the role `compute`:
16+
17+
[source,yaml]
18+
----
19+
---
20+
platform:
21+
vsphere:
22+
hosts:
23+
- role: compute <1>
24+
networkDevice:
25+
ipAddrs:
26+
- 192.168.204.10/24 <2>
27+
gateway: 192.168.204.1 <3>
28+
nameservers:
29+
- 192.168.204.1 <4>
30+
---
31+
----
32+
<1> Valid network definition values include `bootstrap`, `control-plane`, and `compute`. You must list at least one `bootstrap` network definition in your `install-config.yaml` configuration file.
33+
<2> Lists IPv4, IPv6, or both IP addresses that the installation program passes to the network interface. The machine API controller assigns all configured IP addresses to the default network interface.
34+
<3> The default gateway for the network interface.
35+
<4> Lists up to 3 DNS nameservers.
36+
+
37+
[IMPORTANT]
38+
====
39+
To enable the Technology Preview feature of static IP addresses for vSphere nodes for your cluster, you must include `featureSet:TechPreviewNoUpgrade` as the initial entry in the `install-config.yaml` file.
40+
====
41+
42+
After you deployed your cluster to run nodes with static IP addresses, you can scale a machine to use one of these static IP addresses. Additionally, you can use a machine set to configure a machine to use one of the configured static IP addresses.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * post_installation_configuration/node-tasks.adoc
4+
5+
:_content-type: CONCEPT
6+
[id="nodes-vsphere-machine-set-concept-static-ip_{context}"]
7+
= Machine set scaling of machines with configured static IP addresses
8+
9+
You can use a machine set to scale machines with configured static IP addresses.
10+
11+
:FeatureName: Static IP addresses for vSphere nodes
12+
include::snippets/technology-preview.adoc[leveloffset=+1]
13+
14+
After you configure a machine set to request a static IP address for a machine, the machine controller creates an `IPAddressClaim` resource in the `openshift-machine-api` namespace. The external controller then creates an `IPAddress` resource and binds any static IP addresses to the `IPAddressClaim` resource.
15+
16+
[IMPORTANT]
17+
====
18+
Your organization might use numerous types of IP address management (IPAM) services. If you want to enable a particular IPAM service on {product-title}, you might need to manually create the `IPAddressClaim` resource in a YAML definition and then bind a static IP address to this resource by entering the following command in your `oc` CLI:
19+
20+
[source, terminal]
21+
----
22+
$ oc create -f <ipaddressclaim_filename>
23+
----
24+
====
25+
26+
The following demonstrates an example of an `IPAddressClaim` resource:
27+
28+
[source, yaml]
29+
----
30+
kind: IPAddressClaim
31+
metadata:
32+
finalizers:
33+
- machine.openshift.io/ip-claim-protection
34+
name: cluster-dev-9n5wg-worker-0-m7529-claim-0-0
35+
namespace: openshift-machine-api
36+
spec:
37+
poolRef:
38+
apiGroup: ipamcontroller.example.io
39+
kind: IPPool
40+
name: static-ci-pool
41+
status: {}
42+
----
43+
44+
The machine controller updates the machine with a status of `IPAddressClaimed` to indicate that a static IP address has succesfully bound to the `IPAddressClaim` resource. The machine controller applies the same status to a machine with multiple `IPAddressClaim` resources that each contain a bound static IP address.The machine controller then creates a virtual machine and applies static IP addresses to any nodes listed in the `providerSpec` of a machine's configuration.
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * post_installation_configuration/node-tasks.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="nodes-vsphere-machine-set-scaling-static-ip_{context}"]
7+
= Using a machine set to scale machines with configured static IP addresses
8+
9+
You can use a machine set to scale machines with configured static IP addresses.
10+
11+
:FeatureName: Static IP addresses for vSphere nodes
12+
include::snippets/technology-preview.adoc[leveloffset=+1]
13+
14+
The example in the procedure demonstrates the use of controllers for scaling machines in a machine set.
15+
16+
.Prerequisites
17+
18+
* You included `featureSet:TechPreviewNoUpgrade` as the initial entry in the `install-config.yaml` file.
19+
* You deployed a cluster that runs at least one node with a configured static IP address.
20+
21+
.Procedure
22+
. Configure a machine set by specifying IP pool information in the `network.devices.addressesFromPools` schema of the machine set's YAML file:
23+
+
24+
[source,yaml]
25+
----
26+
apiVersion: machine.openshift.io/v1beta1
27+
kind: MachineSet
28+
metadata:
29+
annotations:
30+
machine.openshift.io/memoryMb: "8192"
31+
machine.openshift.io/vCPU: "4"
32+
labels:
33+
machine.openshift.io/cluster-api-cluster: <infrastructure_id>
34+
name: <infrastructure_id>-<role>
35+
namespace: openshift-machine-api
36+
spec:
37+
replicas: 0
38+
selector:
39+
matchLabels:
40+
machine.openshift.io/cluster-api-cluster: <infrastructure_id>
41+
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-<role>
42+
template:
43+
metadata:
44+
labels:
45+
ipam: "true"
46+
machine.openshift.io/cluster-api-cluster: <infrastructure_id>
47+
machine.openshift.io/cluster-api-machine-role: worker
48+
machine.openshift.io/cluster-api-machine-type: worker
49+
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-<role>
50+
spec:
51+
lifecycleHooks: {}
52+
metadata: {}
53+
providerSpec:
54+
value:
55+
apiVersion: machine.openshift.io/v1beta1
56+
credentialsSecret:
57+
name: vsphere-cloud-credentials
58+
diskGiB: 120
59+
kind: VSphereMachineProviderSpec
60+
memoryMiB: 8192
61+
metadata: {}
62+
network:
63+
devices:
64+
- addressesFromPools: <1>
65+
- group: ipamcontroller.example.io
66+
name: static-ci-pool
67+
resource: IPPool
68+
nameservers:
69+
- "192.168.204.1" <2>
70+
networkName: qe-segment-204
71+
numCPUs: 4
72+
numCoresPerSocket: 2
73+
snapshot: ""
74+
template: rvanderp4-dev-9n5wg-rhcos-generated-region-generated-zone
75+
userDataSecret:
76+
name: worker-user-data
77+
workspace:
78+
datacenter: IBMCdatacenter
79+
datastore: /IBMCdatacenter/datastore/vsanDatastore
80+
folder: /IBMCdatacenter/vm/rvanderp4-dev-9n5wg
81+
resourcePool: /IBMCdatacenter/host/IBMCcluster//Resources
82+
server: vcenter.ibmc.devcluster.openshift.com
83+
----
84+
<1> Specifies an IP pool, which lists a static IP address or a range of static IP addresses. The IP Pool can either be a reference to a custom resource definition (CRD) or a resource supported by the `IPAddressClaims` resource handler. The machine controller accesses static IP addresses listed in the machine set's configuration and then allocates each address to each machine.
85+
<2> Lists a nameserver. You must specify a nameserver for nodes that receive static IP address, because the Dynamic Host Configuration Protocol (DHCP) network configuration does not support static IP addresses.
86+
87+
. Scale the machine set by entering the following commands in your `oc` CLI:
88+
+
89+
[source, terminal]
90+
----
91+
$ oc scale --replicas=2 machineset <machineset> -n openshift-machine-api
92+
----
93+
+
94+
Or:
95+
+
96+
[source, terminal]
97+
----
98+
$ oc edit machineset <machineset> -n openshift-machine-api
99+
----
100+
+
101+
After each machine is scaled up, the machine controller creates an `IPAddresssClaim` resource.
102+
103+
. Optional: Check that the `IPAddressClaim` resource exists in the `openshift-machine-api` namespace by entering the following command:
104+
+
105+
[source, terminal]
106+
----
107+
$ oc get ipaddressclaims.ipam.cluster.x-k8s.io -n openshift-machine-api
108+
----
109+
+
110+
.Example `oc` CLI output that lists two IP pools listed in the `openshift-machine-api` namespace
111+
[source, terminal]
112+
----
113+
NAME POOL NAME POOL KIND
114+
cluster-dev-9n5wg-worker-0-m7529-claim-0-0 static-ci-pool IPPool
115+
cluster-dev-9n5wg-worker-0-wdqkt-claim-0-0 static-ci-pool IPPool
116+
----
117+
118+
. Create an `IPAddress` resource by entering the following command:
119+
+
120+
[source, terminal]
121+
----
122+
$ oc create -f ipaddress.yaml
123+
----
124+
+
125+
The following example shows an `IPAddress` resource with defined network configuration information and one defined static IP address:
126+
+
127+
[source,yaml]
128+
----
129+
apiVersion: ipam.cluster.x-k8s.io/v1alpha1
130+
kind: IPAddress
131+
metadata:
132+
name: cluster-dev-9n5wg-worker-0-m7529-ipaddress-0-0
133+
namespace: openshift-machine-api
134+
spec:
135+
address: 192.168.204.129
136+
claimRef: <1>
137+
name: cluster-dev-9n5wg-worker-0-m7529-claim-0-0
138+
gateway: 192.168.204.1
139+
poolRef: <2>
140+
apiGroup: ipamcontroller.example.io
141+
kind: IPPool
142+
name: static-ci-pool
143+
prefix: 23
144+
----
145+
<1> The name of the target `IPAddressClaim` resource.
146+
<2> Details information about the static IP address or addresses from your nodes.
147+
+
148+
[NOTE]
149+
====
150+
By default, the external controller automatically scans any resources in the machine set for recognizable address pool types. When the external controller finds `kind: IPPool` defined in the `IPAddress` resource, the controller binds any static IP addresses to the `IPAddressClaim` resource.
151+
====
152+
153+
. Update the `IPAddressClaim` status with a reference to the `IPAddress` resource:
154+
+
155+
[source, terminal]
156+
----
157+
$ oc --type=merge patch IPAddressClaim cluster-dev-9n5wg-worker-0-m7529-claim-0-0 -p='{"status":{"addressRef": {"name": "cluster-dev-9n5wg-worker-0-m7529-ipaddress-0-0"}}}' -n openshift-machine-api --subresource=status
158+
----

0 commit comments

Comments
 (0)