Skip to content

Commit f8613b7

Browse files
authored
Merge pull request #57600 from jeana-redhat/OSDOCS-5554-upi-vmw-machineset
[OSDOCS-5554]: UPI VMware MachineSet reqs/proc
2 parents 01ade4c + 0f0817e commit f8613b7

11 files changed

+290
-101
lines changed

_topic_maps/_topic_map.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2066,7 +2066,7 @@ Distros: openshift-origin,openshift-enterprise
20662066
Topics:
20672067
- Name: Overview of machine management
20682068
File: index
2069-
- Name: Creating compute machine sets
2069+
- Name: Managing compute machines with the Machine API
20702070
Dir: creating_machinesets
20712071
Distros: openshift-origin,openshift-enterprise
20722072
Topics:
@@ -2110,14 +2110,14 @@ Topics:
21102110
- Name: Adding more RHEL compute machines
21112111
File: more-rhel-compute
21122112
Distros: openshift-enterprise
2113-
- Name: User-provisioned infrastructure
2113+
- Name: Managing user-provisioned infrastructure manually
21142114
Dir: user_infra
21152115
Topics:
2116-
- Name: Adding compute machines to user-provisioned infrastructure clusters
2116+
- Name: Adding compute machines to clusters with user-provisioned infrastructure manually
21172117
File: adding-compute-user-infra-general
21182118
- Name: Adding compute machines to AWS using CloudFormation templates
21192119
File: adding-aws-compute-user-infra
2120-
- Name: Adding compute machines to vSphere
2120+
- Name: Adding compute machines to vSphere manually
21212121
File: adding-vsphere-compute-user-infra
21222122
- Name: Adding compute machines to a cluster on RHV
21232123
File: adding-rhv-compute-user-infra

machine_management/creating_machinesets/creating-machineset-vsphere.adoc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,30 @@ You can create a different compute machine set to serve a specific purpose in yo
1010

1111
include::modules/machine-user-provisioned-limitations.adoc[leveloffset=+1]
1212

13+
//Sample YAML for a compute machine set custom resource on vSphere
1314
include::modules/machineset-yaml-vsphere.adoc[leveloffset=+1]
1415

16+
//Minimum required vCenter privileges for compute machine set management
1517
include::modules/machineset-vsphere-required-permissions.adoc[leveloffset=+1]
1618

19+
//Requirements for clusters with user-provisioned infrastructure to use compute machine sets
20+
include::modules/compute-machineset-upi-reqs.adoc[leveloffset=+1]
21+
22+
//Obtaining the infrastructure ID
23+
[discrete]
24+
include::modules/machineset-upi-reqs-infra-id.adoc[leveloffset=+2]
25+
26+
//Satisfying vSphere credentials requirements
27+
[discrete]
28+
include::modules/machineset-upi-reqs-vsphere-creds.adoc[leveloffset=+2]
29+
30+
//Satisfying ignition configuration requirements
31+
[discrete]
32+
include::modules/machineset-upi-reqs-ignition-config.adoc[leveloffset=+2]
33+
[role="_additional-resources"]
34+
.Additional resources
35+
* xref:../../post_installation_configuration/machine-configuration-tasks.adoc#understanding-the-machine-config-operator[Understanding the Machine Config Operator]
36+
* xref:../../installing/installing_vsphere/installing-vsphere.adoc#installation-vsphere-machines_installing-vsphere[Installing {op-system} and starting the {product-title} bootstrap process]
37+
38+
//Creating a compute machine set
1739
include::modules/machineset-creating.adoc[leveloffset=+1]

machine_management/user_infra/adding-compute-user-infra-general.adoc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
:_content-type: ASSEMBLY
22
[id="adding-compute-user-infra-general"]
3-
= Adding compute machines to clusters with user-provisioned infrastructure
3+
= Adding compute machines to clusters with user-provisioned infrastructure manually
44
include::_attributes/common-attributes.adoc[]
55
:context: adding-compute-user-infra-general
66

@@ -31,7 +31,9 @@ To add more compute machines to your {product-title} cluster on Google Cloud Pla
3131
[id="upi-adding-compute-vsphere"]
3232
== Adding compute machines to vSphere
3333

34-
To add more compute machines to your {product-title} cluster on vSphere, see xref:../../machine_management/user_infra/adding-vsphere-compute-user-infra.adoc#adding-vsphere-compute-user-infra[Adding compute machines to vSphere].
34+
You can xref:../../machine_management/creating_machinesets/creating-machineset-vsphere.adoc#creating-machineset-vsphere[use compute machine sets] to automate the creation of additional compute machines for your {product-title} cluster on vSphere.
35+
36+
To manually add more compute machines to your cluster, see xref:../../machine_management/user_infra/adding-vsphere-compute-user-infra.adoc#adding-vsphere-compute-user-infra[Adding compute machines to vSphere manually].
3537

3638
[id="upi-adding-compute-rhv"]
3739
== Adding compute machines to {rh-virtualization}

machine_management/user_infra/adding-vsphere-compute-user-infra.adoc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
:_content-type: ASSEMBLY
22
[id="adding-vsphere-compute-user-infra"]
3-
= Adding compute machines to vSphere
3+
= Adding compute machines to vSphere manually
44
include::_attributes/common-attributes.adoc[]
55
:context: adding-vsphere-compute-user-infra
66

77
toc::[]
88

9-
You can add more compute machines to your {product-title} cluster on VMware vSphere.
9+
You can add more compute machines to your {product-title} cluster on VMware vSphere manually.
10+
11+
[NOTE]
12+
====
13+
You can also xref:../../machine_management/creating_machinesets/creating-machineset-vsphere.adoc#creating-machineset-vsphere[use compute machine sets] to automate the creation of additional VMware vSphere compute machines for your cluster.
14+
====
1015

1116
== Prerequisites
1217

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * machine_management/creating_machinesets/creating-machineset-vsphere.adoc
4+
//
5+
// Currently only in the vSphere compute machine set content, but we will want this for other platforms such as AWS and GCP.
6+
7+
ifeval::["{context}" == "creating-machineset-vsphere"]
8+
:vsphere:
9+
endif::[]
10+
11+
:_content-type: CONCEPT
12+
[id="compute-machineset-upi-reqs_{context}"]
13+
= Requirements for clusters with user-provisioned infrastructure to use compute machine sets
14+
15+
To use compute machine sets on clusters that have user-provisioned infrastructure, you must ensure that you cluster configuration supports using the Machine API.
16+
17+
ifeval::["{context}" == "creating-machineset-vsphere"]
18+
:!vsphere:
19+
endif::[]

modules/installation-bare-metal-config-yaml.adoc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,11 @@ ifndef::ibm-z,ibm-z-kvm,ibm-power,rhv[your platform.]
252252
ifdef::ibm-z,ibm-z-kvm[{ibmzProductName} infrastructure.]
253253
ifdef::ibm-power[{ibmpowerProductName} infrastructure.]
254254
ifdef::rhv[RHV infrastructure.]
255+
+
256+
[IMPORTANT]
257+
====
258+
Clusters that are installed with the platform type `none` are unable to use some features, such as managing compute machines with the Machine API. This limitation applies even if the compute machines that are attached to the cluster are installed on a platform that would normally support the feature. This parameter cannot be changed after installation.
259+
====
255260
ifndef::openshift-origin[]
256261
<12> Whether to enable or disable FIPS mode. By default, FIPS mode is not enabled. If FIPS mode is enabled, the {op-system-first} machines that {product-title} runs on bypass the default Kubernetes cryptography suite and use the cryptography modules that are provided with {op-system} instead.
257262
+

modules/machine-user-provisioned-limitations.adoc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,14 @@
1515

1616
[IMPORTANT]
1717
====
18-
This process is not applicable for clusters with manually provisioned machines. You can use the advanced machine management and scaling capabilities only in clusters where the Machine API is operational.
18+
You can use the advanced machine management and scaling capabilities only in clusters where the Machine API is operational. Clusters with user-provisioned infrastructure require additional validation and configuration to use the Machine API.
19+
20+
Clusters with the infrastructure platform type `none` cannot use the Machine API. This limitation applies even if the compute machines that are attached to the cluster are installed on a platform that supports the feature. This parameter cannot be changed after installation.
21+
22+
To view the platform type for your cluster, run the following command:
23+
24+
[source,terminal]
25+
----
26+
$ oc get infrastructure cluster -o jsonpath='{.status.platform}'
27+
----
1928
====

modules/machineset-creating.adoc

Lines changed: 96 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,23 @@ endif::[]
3333
[id="machineset-creating_{context}"]
3434
= Creating a compute machine set
3535

36-
In addition to the ones created by the installation program, you can create your own compute machine sets to dynamically manage the machine compute resources for specific workloads of your choice.
36+
In addition to the compute machine sets created by the installation program, you can create your own to dynamically manage the machine compute resources for specific workloads of your choice.
37+
38+
ifdef::vsphere[]
39+
[NOTE]
40+
====
41+
Clusters that are installed with user-provisioned infrastructure have a different networking stack than clusters with infrastructure that is provisioned by the installation program. As a result of this difference, automatic load balancer management is unsupported on clusters that have user-provisioned infrastructure. For these clusters, a compute machine set can only create `worker` and `infra` type machines.
42+
====
43+
endif::vsphere[]
3744

3845
.Prerequisites
3946

4047
* Deploy an {product-title} cluster.
4148
* Install the OpenShift CLI (`oc`).
4249
* Log in to `oc` as a user with `cluster-admin` permission.
4350
ifdef::vsphere[]
44-
* Create a tag inside your vCenter instance based on the cluster API name. This tag is utilized by the compute machine set to associate the {product-title} nodes to the provisioned virtual machines (VM). For directions on creating tags in vCenter, see the VMware documentation for link:https://docs.vmware.com/en/VMware-vSphere/6.7/com.vmware.vsphere.vcenterhost.doc/GUID-E8E854DD-AA97-4E0C-8419-CE84F93C4058.html[vSphere Tags and Attributes].
4551
* Have the necessary permissions to deploy VMs in your vCenter instance and have the required access to the datastore specified.
52+
* If your cluster uses user-provisioned infrastructure, you have satisfied the specific Machine API requirements for that configuration.
4653
endif::vsphere[]
4754
ifdef::ash[]
4855
* Create an availability set in which to deploy Azure Stack Hub compute machines.
@@ -59,7 +66,9 @@ ifdef::ash[]
5966
Ensure that you set the `<availabilitySet>`, `<clusterID>`, and `<role>` parameter values.
6067
endif::ash[]
6168

62-
.. If you are not sure which value to set for a specific field, you can check an existing compute machine set from your cluster:
69+
. Optional: If you are not sure which value to set for a specific field, you can check an existing compute machine set from your cluster.
70+
71+
.. To list the compute machine sets in your cluster, run the following command:
6372
+
6473
[source,terminal]
6574
----
@@ -78,37 +87,108 @@ agl030519-vplxk-worker-us-east-1e 0 0 55m
7887
agl030519-vplxk-worker-us-east-1f 0 0 55m
7988
----
8089

81-
.. Check values of a specific compute machine set:
90+
.. To view values of a specific compute machine set custom resource (CR), run the following command:
8291
+
8392
[source,terminal]
8493
----
85-
$ oc get machineset <machineset_name> -n \
86-
openshift-machine-api -o yaml
94+
$ oc get machineset <machineset_name> \
95+
-n openshift-machine-api -o yaml
8796
----
8897
+
98+
--
8999
.Example output
90100
[source,yaml]
91101
----
92-
...
93-
template:
102+
apiVersion: machine.openshift.io/v1beta1
103+
kind: MachineSet
104+
metadata:
105+
labels:
106+
machine.openshift.io/cluster-api-cluster: <infrastructure_id> <1>
107+
name: <infrastructure_id>-<role> <2>
108+
namespace: openshift-machine-api
109+
spec:
110+
replicas: 1
111+
selector:
112+
matchLabels:
113+
machine.openshift.io/cluster-api-cluster: <infrastructure_id>
114+
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-<role>
115+
template:
94116
metadata:
95117
labels:
96-
machine.openshift.io/cluster-api-cluster: agl030519-vplxk <1>
97-
machine.openshift.io/cluster-api-machine-role: worker <2>
98-
machine.openshift.io/cluster-api-machine-type: worker
99-
machine.openshift.io/cluster-api-machineset: agl030519-vplxk-worker-us-east-1a
100-
----
101-
<1> The cluster ID.
118+
machine.openshift.io/cluster-api-cluster: <infrastructure_id>
119+
machine.openshift.io/cluster-api-machine-role: <role>
120+
machine.openshift.io/cluster-api-machine-type: <role>
121+
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-<role>
122+
spec:
123+
providerSpec: <3>
124+
...
125+
----
126+
<1> The cluster infrastructure ID.
102127
<2> A default node label.
128+
+
129+
[NOTE]
130+
====
131+
For clusters that have user-provisioned infrastructure, a compute machine set can only create `worker` and `infra` type machines.
132+
====
133+
<3> The values in the `<providerSpec>` section of the compute machine set CR are platform-specific. For more information about `<providerSpec>` parameters in the CR, see the sample compute machine set CR configuration for your provider.
134+
--
103135

104-
. Create the new `MachineSet` CR:
136+
ifdef::vsphere[]
137+
.. If you are creating a compute machine set for a cluster that has user-provisioned infrastructure, note the following important values:
138+
+
139+
.Example vSphere `providerSpec` values
140+
[source,yaml]
141+
----
142+
apiVersion: machine.openshift.io/v1beta1
143+
kind: MachineSet
144+
...
145+
template:
146+
...
147+
spec:
148+
providerSpec:
149+
value:
150+
apiVersion: machine.openshift.io/v1beta1
151+
credentialsSecret:
152+
name: vsphere-cloud-credentials <1>
153+
diskGiB: 120
154+
kind: VSphereMachineProviderSpec
155+
memoryMiB: 16384
156+
network:
157+
devices:
158+
- networkName: "<vm_network_name>"
159+
numCPUs: 4
160+
numCoresPerSocket: 4
161+
snapshot: ""
162+
template: <vm_template_name> <2>
163+
userDataSecret:
164+
name: worker-user-data <3>
165+
workspace:
166+
datacenter: <vcenter_datacenter_name>
167+
datastore: <vcenter_datastore_name>
168+
folder: <vcenter_vm_folder_path>
169+
resourcepool: <vsphere_resource_pool>
170+
server: <vcenter_server_address> <4>
171+
----
172+
<1> The name of the secret in the `openshift-machine-api` namespace that contains the required vCenter credentials.
173+
<2> The name of the {op-system} VM template for your cluster that was created during installation.
174+
<3> The name of the secret in the `openshift-machine-api` namespace that contains the required Ignition configuration credentials.
175+
<4> The IP address or fully qualified domain name (FQDN) of the vCenter server.
176+
endif::vsphere[]
177+
178+
. Create a `MachineSet` CR by running the following command:
105179
+
106180
[source,terminal]
107181
----
108182
$ oc create -f <file_name>.yaml
109183
----
110184

111-
. View the list of compute machine sets:
185+
ifeval::["{context}" == "creating-machineset-aws"]
186+
. If you need compute machine sets in other availability zones, repeat this process to create more compute machine sets.
187+
endif::[]
188+
189+
.Verification
190+
191+
* View the list of compute machine sets by running the following command:
112192
+
113193
[source,terminal]
114194
----
@@ -142,82 +222,6 @@ endif::win[]
142222
+
143223
When the new compute machine set is available, the `DESIRED` and `CURRENT` values match. If the compute machine set is not available, wait a few minutes and run the command again.
144224
145-
////
146-
This step is not needed. No machines at this point.
147-
148-
. After the new compute machine set is available, check status of the machine and the node that it references:
149-
+
150-
[source,terminal]
151-
----
152-
$ oc describe machine <name> -n openshift-machine-api
153-
----
154-
+
155-
For example:
156-
+
157-
[source,terminal]
158-
----
159-
ifdef::win[]
160-
$ oc describe machine agl030519-vplxk-windows-worker-us-east-1a -n openshift-machine-api
161-
endif::win[]
162-
ifndef::win[]
163-
$ oc describe machine agl030519-vplxk-infra-us-east-1a -n openshift-machine-api
164-
endif::win[]
165-
----
166-
+
167-
.Example output
168-
[source,terminal]
169-
----
170-
status:
171-
addresses:
172-
- address: 10.0.133.18
173-
type: InternalIP
174-
- address: ""
175-
type: ExternalDNS
176-
- address: ip-10-0-133-18.ec2.internal
177-
type: InternalDNS
178-
lastUpdated: "2019-05-03T10:38:17Z"
179-
nodeRef:
180-
kind: Node
181-
name: ip-10-0-133-18.ec2.internal
182-
uid: 71fb8d75-6d8f-11e9-9ff3-0e3f103c7cd8
183-
providerStatus:
184-
apiVersion: awsproviderconfig.openshift.io/v1beta1
185-
conditions:
186-
- lastProbeTime: "2019-05-03T10:34:31Z"
187-
lastTransitionTime: "2019-05-03T10:34:31Z"
188-
message: machine successfully created
189-
reason: MachineCreationSucceeded
190-
status: "True"
191-
type: MachineCreation
192-
instanceId: i-09ca0701454124294
193-
instanceState: running
194-
kind: AWSMachineProviderStatus
195-
----
196-
////
197-
198-
////
199-
This step is not needed. I have not labeled a node yet.
200-
201-
. View the node you want to assign as the infra node to confirm that the node has the label that you specified:
202-
+
203-
[source,terminal]
204-
----
205-
$ oc get node <node_name> --show-labels
206-
----
207-
+
208-
Review the command output and confirm that `node-role.kubernetes.io/<your_label>` is in the `LABELS` list.
209-
210-
[NOTE]
211-
====
212-
Any change to a compute machine set is not applied to existing machines owned by the compute machine set. For example, labels edited or added to an existing compute machine set are not propagated to existing machines and nodes associated with the compute machine set.
213-
====
214-
////
215-
216-
ifeval::["{context}" == "creating-machineset-aws"]
217-
.Next steps
218-
If you need compute machine sets in other availability zones, repeat this process to create more compute machine sets.
219-
endif::[]
220-
221225
ifeval::["{context}" == "creating-machineset-vsphere"]
222226
:!vsphere:
223227
endif::[]

0 commit comments

Comments
 (0)