Skip to content

Commit e99b1ba

Browse files
authored
Merge pull request #93585 from jeana-redhat/OSDOCS-5784-vsphere-multi-disk
OSDOCS-5784: Support multiple disks in vSphere
2 parents ab2badd + a1fbd11 commit e99b1ba

File tree

6 files changed

+163
-52
lines changed

6 files changed

+163
-52
lines changed

machine_management/control_plane_machine_management/cpmso_provider_configurations/cpmso-config-options-vsphere.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,7 @@ include::modules/machine-api-vmw-add-tags.adoc[leveloffset=+2,tag=!compute]
3434

3535
//Configuring multiple NICs by using machine sets
3636
//pulled from 4.18 GA
37-
//include::modules/machineset-vsphere-multiple-nics.adoc[leveloffset=+1,tag=!compute]
37+
//include::modules/machineset-vsphere-multiple-nics.adoc[leveloffset=+2,tag=!compute]
38+
39+
//Configuring data disks by using machine sets
40+
include::modules/machineset-vsphere-data-disks.adoc[leveloffset=+2,tag=!compute]

machine_management/creating_machinesets/creating-machineset-vsphere.adoc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,7 @@ include::modules/machineset-label-gpu-autoscaler.adoc[leveloffset=+1]
4949
include::modules/machine-api-vmw-add-tags.adoc[leveloffset=+1,tag=!controlplane]
5050
5151
//Configuring multiple NICs by using machine sets
52-
include::modules/machineset-vsphere-multiple-nics.adoc[leveloffset=+1,tag=!controlplane]
52+
include::modules/machineset-vsphere-multiple-nics.adoc[leveloffset=+1,tag=!controlplane]
53+
54+
//Configuring data disks by using machine sets
55+
include::modules/machineset-vsphere-data-disks.adoc[leveloffset=+1,tag=!controlplane]

modules/cpmso-yaml-provider-spec-vsphere.adoc

Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -26,57 +26,63 @@ spec:
2626
apiVersion: machine.openshift.io/v1beta1
2727
credentialsSecret:
2828
name: vsphere-cloud-credentials <1>
29-
diskGiB: 120 <2>
30-
kind: VSphereMachineProviderSpec <3>
31-
memoryMiB: 16384 <4>
29+
dataDisks: <2>
30+
- name: "<disk_name>"
31+
provisioningMode: "<mode>"
32+
sizeGiB: 20
33+
diskGiB: 120 <3>
34+
kind: VSphereMachineProviderSpec <4>
35+
memoryMiB: 16384 <5>
3236
metadata:
3337
creationTimestamp: null
34-
network: <5>
38+
network: <6>
3539
devices:
3640
- networkName: <vm_network_name>
37-
numCPUs: 4 <6>
38-
numCoresPerSocket: 4 <7>
41+
numCPUs: 4 <7>
42+
numCoresPerSocket: 4 <8>
3943
snapshot: ""
40-
template: <vm_template_name> <8>
44+
template: <vm_template_name> <9>
4145
userDataSecret:
42-
name: master-user-data <9>
43-
workspace: <10>
44-
datacenter: <vcenter_data_center_name> <11>
45-
datastore: <vcenter_datastore_name> <12>
46-
folder: <path_to_vcenter_vm_folder> <13>
47-
resourcePool: <vsphere_resource_pool> <14>
48-
server: <vcenter_server_ip> <15>
46+
name: master-user-data <10>
47+
workspace: <11>
48+
datacenter: <vcenter_data_center_name> <12>
49+
datastore: <vcenter_datastore_name> <13>
50+
folder: <path_to_vcenter_vm_folder> <14>
51+
resourcePool: <vsphere_resource_pool> <15>
52+
server: <vcenter_server_ip> <16>
4953
----
5054
<1> Specifies the secret name for the cluster. Do not change this value.
51-
<2> Specifies the VM disk size for the control plane machines.
52-
<3> Specifies the cloud provider platform type. Do not change this value.
53-
<4> Specifies the memory allocated for the control plane machines.
54-
<5> Specifies the network on which the control plane is deployed.
55+
<2> Specifies one or more data disk definitions.
56+
For more information, see "Configuring data disks by using machine sets".
57+
<3> Specifies the VM disk size for the control plane machines.
58+
<4> Specifies the cloud provider platform type. Do not change this value.
59+
<5> Specifies the memory allocated for the control plane machines.
60+
<6> Specifies the network on which the control plane is deployed.
5561
+
5662
[NOTE]
5763
====
5864
If the cluster is configured to use a failure domain, this parameter is configured in the failure domain.
5965
If you specify this value in the provider specification when using failure domains, the Control Plane Machine Set Operator ignores it.
6066
====
61-
<6> Specifies the number of CPUs allocated for the control plane machines.
62-
<7> Specifies the number of cores for each control plane CPU.
63-
<8> Specifies the vSphere VM template to use, such as `user-5ddjd-rhcos`.
67+
<7> Specifies the number of CPUs allocated for the control plane machines.
68+
<8> Specifies the number of cores for each control plane CPU.
69+
<9> Specifies the vSphere VM template to use, such as `user-5ddjd-rhcos`.
6470
+
6571
[NOTE]
6672
====
6773
If the cluster is configured to use a failure domain, this parameter is configured in the failure domain.
6874
If you specify this value in the provider specification when using failure domains, the Control Plane Machine Set Operator ignores it.
6975
====
70-
<9> Specifies the control plane user data secret. Do not change this value.
71-
<10> Specifies the workspace details for the control plane.
76+
<10> Specifies the control plane user data secret. Do not change this value.
77+
<11> Specifies the workspace details for the control plane.
7278
+
7379
[NOTE]
7480
====
7581
If the cluster is configured to use a failure domain, these parameters are configured in the failure domain.
7682
If you specify these values in the provider specification when using failure domains, the Control Plane Machine Set Operator ignores them.
7783
====
78-
<11> Specifies the vCenter data center for the control plane.
79-
<12> Specifies the vCenter datastore for the control plane.
80-
<13> Specifies the path to the vSphere VM folder in vCenter, such as `/dc1/vm/user-inst-5ddjd`.
81-
<14> Specifies the vSphere resource pool for your VMs.
82-
<15> Specifies the vCenter server IP or fully qualified domain name.
84+
<12> Specifies the vCenter datacenter for the control plane.
85+
<13> Specifies the vCenter datastore for the control plane.
86+
<14> Specifies the path to the vSphere VM folder in vCenter, such as `/dc1/vm/user-inst-5ddjd`.
87+
<15> Specifies the vSphere resource pool for your VMs.
88+
<16> Specifies the vCenter server IP or fully qualified domain name.

modules/machineset-creating.adoc

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,10 @@ template:
158158
apiVersion: machine.openshift.io/v1beta1
159159
credentialsSecret:
160160
name: vsphere-cloud-credentials <1>
161+
dataDisks: <2>
162+
- name: <disk_name>
163+
provisioningMode: <mode>
164+
sizeGiB: 10
161165
diskGiB: 120
162166
kind: VSphereMachineProviderSpec
163167
memoryMiB: 16384
@@ -167,20 +171,22 @@ template:
167171
numCPUs: 4
168172
numCoresPerSocket: 4
169173
snapshot: ""
170-
template: <vm_template_name> <2>
174+
template: <vm_template_name> <3>
171175
userDataSecret:
172-
name: worker-user-data <3>
176+
name: worker-user-data <4>
173177
workspace:
174178
datacenter: <vcenter_data_center_name>
175179
datastore: <vcenter_datastore_name>
176180
folder: <vcenter_vm_folder_path>
177181
resourcepool: <vsphere_resource_pool>
178-
server: <vcenter_server_address> <4>
182+
server: <vcenter_server_address> <5>
179183
----
180184
<1> The name of the secret in the `openshift-machine-api` namespace that contains the required vCenter credentials.
181-
<2> The name of the {op-system} VM template for your cluster that was created during installation.
182-
<3> The name of the secret in the `openshift-machine-api` namespace that contains the required Ignition configuration credentials.
183-
<4> The IP address or fully qualified domain name (FQDN) of the vCenter server.
185+
<2> The collection of data disk definitions.
186+
For more information, see "Configuring data disks by using machine sets".
187+
<3> The name of the {op-system} VM template for your cluster that was created during installation.
188+
<4> The name of the secret in the `openshift-machine-api` namespace that contains the required Ignition configuration credentials.
189+
<5> The IP address or fully qualified domain name (FQDN) of the vCenter server.
184190
endif::vsphere[]
185191

186192
. Create a `MachineSet` CR by running the following command:
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * machine_management/creating_machinesets/creating-machineset-vsphere.adoc
4+
// * machine_management/control_plane_machine_management/cpmso_provider_configurations/cpmso-config-options-vsphere.adoc
5+
6+
:_mod-docs-content-type: PROCEDURE
7+
[id="machineset-vsphere-data-disks_{context}"]
8+
= Configuring data disks by using machine sets
9+
10+
{product-title} clusters on {vmw-first} support adding up to 29 disks to the virtual machine (VM) controller.
11+
12+
:FeatureName: Configuring {vmw-short} data disks
13+
include::snippets/technology-preview.adoc[]
14+
15+
By configuring data disks, you can attach disks to VMs and use them to store data for etcd, container images, and other uses.
16+
Separating data can help avoid filling the primary disk so that important activities such as upgrades have the resources that they require.
17+
18+
[NOTE]
19+
====
20+
Adding data disks attaches them to the VM and mounts them to the location that {op-system} designates.
21+
// To mount the data disks to a specific location, you must configure each machine to use the data disks according to your needs.
22+
====
23+
24+
.Prerequisites
25+
26+
* You have administrator access to {oc-first} for an {product-title} cluster on {vmw-short}.
27+
28+
.Procedure
29+
30+
. In a text editor, open the YAML file for an existing machine set or create a new one.
31+
32+
. Edit the following lines under the `providerSpec` field:
33+
+
34+
--
35+
[source,yaml]
36+
----
37+
tag::compute[]
38+
apiVersion: machine.openshift.io/v1beta1
39+
kind: MachineSet
40+
end::compute[]
41+
tag::controlplane[]
42+
apiVersion: machine.openshift.io/v1
43+
kind: ControlPlaneMachineSet
44+
end::controlplane[]
45+
# ...
46+
spec:
47+
template:
48+
tag::compute[]
49+
spec:
50+
providerSpec:
51+
value:
52+
dataDisks: <1>
53+
- name: "<disk_name>" <2>
54+
provisioningMode: "<mode>" <3>
55+
sizeGiB: 20 <4>
56+
- name: "<disk_name>"
57+
provisioningMode: "<mode>"
58+
sizeGiB: 20
59+
end::compute[]
60+
tag::controlplane[]
61+
machines_v1beta1_machine_openshift_io:
62+
spec:
63+
providerSpec:
64+
value:
65+
dataDisks: <1>
66+
- name: "<disk_name>" <2>
67+
provisioningMode: "<mode>" <3>
68+
sizeGiB: 20 <4>
69+
- name: "<disk_name>"
70+
provisioningMode: "<mode>"
71+
sizeGiB: 20
72+
end::controlplane[]
73+
# ...
74+
----
75+
<1> Specify a collection of 1-29 data disk definitions.
76+
This sample configuration shows the formatting to include two data disk definitions.
77+
<2> Specify the name of the data disk.
78+
The name must meet the following requirements:
79+
* Start and end with an alphanumeric character
80+
* Consist only of alphanumeric characters, hyphens (`-`), and underscores (`_`)
81+
* Have a maximum length of 80 characters
82+
<3> Specify the data disk provisioning method.
83+
This value defaults to the vSphere default storage policy if not set.
84+
Valid values are `Thin`, `Thick`, and `EagerlyZeroed`.
85+
<4> Specify the size of the data disk in GiB.
86+
The maximum size is 16384 GiB.
87+
--

modules/machineset-yaml-vsphere.adoc

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -76,28 +76,32 @@ endif::infra[]
7676
apiVersion: machine.openshift.io/v1beta1
7777
credentialsSecret:
7878
name: vsphere-cloud-credentials
79+
dataDisks: <4>
80+
- name: "<disk_name>"
81+
provisioningMode: "<mode>"
82+
sizeGiB: 20
7983
diskGiB: 120
8084
kind: VSphereMachineProviderSpec
8185
memoryMiB: 8192
8286
metadata:
8387
creationTimestamp: null
8488
network:
8589
devices:
86-
- networkName: "<vm_network_name>" <4>
90+
- networkName: "<vm_network_name>" <5>
8791
numCPUs: 4
8892
numCoresPerSocket: 1
8993
snapshot: ""
90-
template: <vm_template_name> <5>
94+
template: <vm_template_name> <6>
9195
userDataSecret:
9296
name: worker-user-data
9397
workspace:
94-
datacenter: <vcenter_data_center_name> <6>
95-
datastore: <vcenter_datastore_name> <7>
96-
folder: <vcenter_vm_folder_path> <8>
97-
resourcepool: <vsphere_resource_pool> <9>
98-
server: <vcenter_server_ip> <10>
98+
datacenter: <vcenter_data_center_name> <7>
99+
datastore: <vcenter_datastore_name> <8>
100+
folder: <vcenter_vm_folder_path> <9>
101+
resourcepool: <vsphere_resource_pool> <10>
102+
server: <vcenter_server_ip> <11>
99103
ifdef::infra[]
100-
taints: <11>
104+
taints: <12>
101105
- key: node-role.kubernetes.io/infra
102106
effect: NoSchedule
103107
endif::infra[]
@@ -116,15 +120,17 @@ ifdef::infra[]
116120
<2> Specify the infrastructure ID and `infra` node label.
117121
<3> Specify the `infra` node label.
118122
endif::infra[]
119-
<4> Specify the vSphere VM network to deploy the compute machine set to. This VM network must be where other compute machines reside in the cluster.
120-
<5> Specify the vSphere VM template to use, such as `user-5ddjd-rhcos`.
121-
<6> Specify the vCenter data center to deploy the compute machine set on.
122-
<7> Specify the vCenter datastore to deploy the compute machine set on.
123-
<8> Specify the path to the vSphere VM folder in vCenter, such as `/dc1/vm/user-inst-5ddjd`.
124-
<9> Specify the vSphere resource pool for your VMs.
125-
<10> Specify the vCenter server IP or fully qualified domain name.
123+
<4> Specify one or more data disk definitions.
124+
For more information, see "Configuring data disks by using machine sets".
125+
<5> Specify the vSphere VM network to deploy the compute machine set to. This VM network must be where other compute machines reside in the cluster.
126+
<6> Specify the vSphere VM template to use, such as `user-5ddjd-rhcos`.
127+
<7> Specify the vCenter datacenter to deploy the compute machine set on.
128+
<8> Specify the vCenter datastore to deploy the compute machine set on.
129+
<9> Specify the path to the vSphere VM folder in vCenter, such as `/dc1/vm/user-inst-5ddjd`.
130+
<10> Specify the vSphere resource pool for your VMs.
131+
<11> Specify the vCenter server IP or fully qualified domain name.
126132
ifdef::infra[]
127-
<11> Specify a taint to prevent user workloads from being scheduled on infra nodes.
133+
<12> Specify a taint to prevent user workloads from being scheduled on infra nodes.
128134
+
129135
[NOTE]
130136
====

0 commit comments

Comments
 (0)