-
Notifications
You must be signed in to change notification settings - Fork 1.9k
OSDOCS-5234:vSphere topology in installer #56145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
modules/persistent-storage-csi-vsphere-top-aware-during-install.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| // Module included in the following assemblies: | ||
| // | ||
| // storage/container_storage_interface/persistent-storage-csi-vsphere.adoc | ||
| // | ||
|
|
||
| :content-type: PROCEDURE | ||
| [id="persistent-storage-csi-vsphere-top-aware-during-install_{context}"] | ||
| = Creating vSphere storage topology during installation | ||
|
|
||
| == Procedure | ||
|
|
||
| * Specify the topology during installation. See the _Configuring regions and zones for a VMware vCenter_ section. | ||
|
|
||
| No additional action is necessary and the default storage class that is created by {product-title} | ||
| is topology aware and should allow provisioning of volumes in different failure domains. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
modules/persistent-storage-csi-vsphere-top-aware-overview.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| // Module included in the following assemblies: | ||
| // | ||
| // storage/container_storage_interface/persistent-storage-csi-vsphere.adoc | ||
| // | ||
|
|
||
| :content-type: CONCEPT | ||
| [id="persistent-storage-csi-vsphere-top-aware-overview_{context}"] | ||
| = vSphere CSI topology overview | ||
|
|
||
| {product-title} provides the ability to deploy {product-title} for vSphere on different zones and regions, which allows you to deploy over multiple compute clusters and datacenters, thus helping to avoid a single point of failure. | ||
|
|
||
| This is accomplished by defining zone and region categories in vCenter, and then assigning these categories to different failure domains, such as a compute cluster, by creating tags for these zone and region categories. After you have created the appropriate categories, and assigned tags to vCenter objects, you can create additional machinesets that create virtual machines (VMs) that are responsible for scheduling pods in those failure domains. | ||
|
|
||
| The following example defines two failure domains with one region and two zones: | ||
|
|
||
| .vSphere storage topology with one region and two zones | ||
| |=== | ||
| |Compute cluster | Failure domain |Description | ||
|
|
||
| |Compute cluster: ocp1, | ||
| Datacenter: Atlanta | ||
| |openshift-region: us-east-1 (tag), openshift-zone: us-east-1a (tag) | ||
| |This defines a failure domain in region us-east-1 with zone us-east-1a. | ||
|
|
||
| |Computer cluster: ocp2, | ||
| Datacenter: Atlanta | ||
| |openshift-region: us-east-1 (tag), openshift-zone: us-east-1b (tag) | ||
| |This defines a different failure domain within the same region called us-east-1b. | ||
| |=== |
70 changes: 70 additions & 0 deletions
70
modules/persistent-storage-csi-vsphere-top-aware-post-install.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| // Module included in the following assemblies: | ||
| // | ||
| // storage/container_storage_interface/persistent-storage-csi-vsphere.adoc | ||
| // | ||
|
|
||
| :content-type: PROCEDURE | ||
| [id="persistent-storage-csi-vsphere-top-aware-post-install_{context}"] | ||
| = Creating vSphere storage topology post-installation | ||
|
|
||
| == Procedure | ||
| . In the VMware vCenter vSphere client GUI, define appropriate zone and region catagories and tags. | ||
| + | ||
| While vSphere allows you to create categories with any arbitrary name, {product-title} strongly recommends use of `openshift-region` and `openshift-zone` names for defining topology categories. | ||
| + | ||
| For more information about vSphere categories and tags, see the VMware vSphere documentation. | ||
|
|
||
| . In {product-title}, create failure domains. See the _Specifying multiple regions and zones for your cluster on vSphere_ section. | ||
|
|
||
| . Create a tag to assign to datastores across failure domains: | ||
| + | ||
| When an {product-title} spans more than one failure domain, the datastore might not be shared across those failure domains, which is where topology-aware provisioning of persistent volumes (PVs) is useful. | ||
| + | ||
| .. In vCenter, create a category for tagging the datastores. For example, `openshift-zonal-datastore-cat`. You can use any other category name, provided the category uniquely is used for tagging datastores participating in {product-title} cluster. Also, ensure that `StoragePod`, `Datastore`, and `Folder` are selected as Associable Entities for the created category. | ||
| .. In vCenter, create a tag that uses the previously created category. This example uses the tag name `openshift-zonal-datastore`. | ||
| .. Assign the previously created tag (in this example `openshift-zonal-datastore`) to each datastore in a failure domain that would be considered for dynamic provisioning. | ||
| + | ||
| [NOTE] | ||
| ==== | ||
| You can use any names you like for datastore categories and tags. The names used in this example are provided as recommendations. Ensure that the tags and categories that you define uniquely identify only datastores that are shared with all hosts in the {product-title} cluster. | ||
| ==== | ||
|
|
||
| . As needed, create a storage policy that targets the tag-based datastores in each failure domain: | ||
| .. In vCenter, from the main menu, click *Policies and Profiles*. | ||
| .. On the *Policies and Profiles* page, in the navigation pane, click *VM Storage Policies*. | ||
| .. Click *CREATE*. | ||
| .. Type a name for the storage policy. | ||
| .. For the rules, choose Tag Placement rules and select the tag and category that targets the desired datastores (in this example, the `openshift-zonal-datastore` tag). | ||
| + | ||
| The datastores are listed in the storage compatibility table. | ||
|
|
||
| . Create a new storage class that uses the new zoned storage policy: | ||
| .. Click *Storage* > *StorageClasses*. | ||
| .. On the *StorageClasses* page, click *Create StorageClass*. | ||
| .. Type a name for the new storage class in *Name*. | ||
| .. Under *Provisioner*, select *csi.vsphere.vmware.com*. | ||
| .. Under *Additional parameters*, for the StoragePolicyName parameter, set *Value* to the name of the new zoned storage policy that you created earlier. | ||
| .. Click *Create*. | ||
| + | ||
| .Example output | ||
| + | ||
| [source, yaml] | ||
| ---- | ||
| kind: StorageClass | ||
| apiVersion: storage.k8s.io/v1 | ||
| metadata: | ||
| name: zoned-sc <1> | ||
| provisioner: csi.vsphere.vmware.com | ||
| parameters: | ||
| StoragePolicyName: zoned-storage-policy <2> | ||
| reclaimPolicy: Delete | ||
| allowVolumeExpansion: true | ||
| volumeBindingMode: WaitForFirstConsumer | ||
| ---- | ||
| <1> New topology aware storage class name. | ||
| <2> Specify zoned storage policy. | ||
| + | ||
| [NOTE] | ||
| ==== | ||
| You can also create the storage class by editing the preceding YAML file and running the command `oc create -f $FILE`. | ||
| ==== |
41 changes: 41 additions & 0 deletions
41
modules/persistent-storage-csi-vsphere-top-aware-results.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| // Module included in the following assemblies: | ||
| // | ||
| // storage/container_storage_interface/persistent-storage-csi-vsphere.adoc | ||
| // | ||
|
|
||
| :content-type: PROCEDURE | ||
| [id="persistent-storage-csi-vsphere-top-aware-results_{context}"] | ||
| = Results | ||
|
|
||
| Creating persistent volume claims (PVCs) and PVs from the topology aware storage class are truly zonal, and should use the datastore in their respective zone depending on how pods are scheduled: | ||
|
|
||
| [source, terminal] | ||
| ---- | ||
| ~ $ oc get pv <pv-name> -o yaml | ||
| ---- | ||
|
|
||
| .Example output | ||
|
|
||
| [source, terminal] | ||
| ---- | ||
| ... | ||
| nodeAffinity: | ||
| required: | ||
| nodeSelectorTerms: | ||
| - matchExpressions: | ||
| - key: topology.csi.vmware.com/openshift-zone <1> | ||
| operator: In | ||
| values: | ||
| - <openshift-zone> | ||
| -key: topology.csi.vmware.com/openshift-region <1> | ||
| operator: In | ||
| values: | ||
| - <openshift-region> | ||
| ... | ||
| peristentVolumeclaimPolicy: Delete | ||
| storageClassName: <zoned-storage-class-name> <2> | ||
| volumeMode: Filesystem | ||
| ... | ||
| ---- | ||
| <1> PV has zoned keys. | ||
| <2> PV is using the zoned storage class. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.