Skip to content

Commit a95bd70

Browse files
author
Bob Furu
authored
Merge pull request #22199 from bobfuru/OSDOCS-930-manila
OSDOCS-930 - Include section on the OpenStack Manila CSI Driver
2 parents 50e3905 + 57961f1 commit a95bd70

11 files changed

+298
-32
lines changed

_topic_map.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,8 +604,6 @@ Topics:
604604
File: persistent-storage-nfs
605605
- Name: Persistent storage using Red Hat OpenShift Container Storage
606606
File: persistent-storage-ocs
607-
# - Name: Persistent storage using OpenStack Manila
608-
# File: persistent-storage-manila
609607
- Name: Persistent storage using VMware vSphere
610608
File: persistent-storage-vsphere
611609
- Name: Using Container Storage Interface (CSI)
@@ -620,6 +618,8 @@ Topics:
620618
File: persistent-storage-csi-snapshots
621619
- Name: CSI volume cloning
622620
File: persistent-storage-csi-cloning
621+
- Name: OpenStack Manila CSI Driver Operator
622+
File: persistent-storage-csi-manila
623623
- Name: Expanding persistent volumes
624624
File: expanding-persistent-volumes
625625
Distros: openshift-enterprise,openshift-webscale,openshift-origin,openshift-dedicated

modules/dynamic-provisioning-available-plugins.adoc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ configured provider's API to create new storage resources:
2121
|`kubernetes.io/cinder`
2222
|
2323

24+
|{rh-openstack} Manila Container Storage Interface (CSI)
25+
|`manila.csi.openstack.org`
26+
|Once installed, the xref:../storage/container_storage_interface/persistent-storage-csi-manila.adoc#persistent-storage-csi-manila[OpenStack Manila CSI Driver Operator] and ManilaDriver automatically create the required storage classes for all available Manila share types needed for dynamic provisioning.
27+
2428
|AWS Elastic Block Store (EBS)
2529
|`kubernetes.io/aws-ebs`
2630
|For dynamic provisioning when using multiple clusters in different zones,
@@ -29,7 +33,7 @@ where `<cluster_name>` and `<cluster_id>` are unique per cluster.
2933

3034
|AWS Elastic File System (EFS)
3135
|
32-
|Dynamic provisioning is accomplished through the EFS provisioner pod and
36+
|Dynamic provisioning is accomplished through the EFS provisioner Pod and
3337
not through a provisioner plug-in.
3438

3539
|Azure Disk
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * storage/dynamic-provisioning.adoc
4+
5+
[id="openstack-manila-csi-definition_{context}"]
6+
= {rh-openstack} Manila Container Storage Interface (CSI) object definition
7+
8+
Once installed, the xref:../storage/container_storage_interface/persistent-storage-csi-manila.adoc#persistent-storage-csi-manila[OpenStack Manila CSI Driver Operator] and ManilaDriver automatically create the required storage classes for all available Manila share types needed for dynamic provisioning.
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+
// * storage/container_storage_interface/persistent-storage-csi-manila.adoc
4+
5+
[id="persistent-storage-csi-manila-dynamic-provisioning_{context}"]
6+
= Dynamically provisioning Manila CSI volumes
7+
8+
{product-title} installs a StorageClass for each available Manila share type.
9+
10+
The YAML files that are created are completely decoupled from Manila and from its Container Storage Interface (CSI) plug-in. As an application developer, you can dynamically provision ReadWriteMany (RWX) storage and deploy Pods with applications that safely consume the storage using YAML manifests. You can also provision other access modes, such as ReadWriteOnce (RWO).
11+
12+
You can use the same Pod and persistent volume claim (PVC) definitions on-premise that you use with {product-title} on AWS, GCP, Azure, and other platforms, with the exception of the storage class reference in the PVC definition.
13+
14+
.Prerequisites
15+
16+
* {rh-openstack-first} is deployed with appropriate Manila share infrastructure so that it can be used to dynamically provision and mount volumes in {product-title}.
17+
18+
.Procedure (UI)
19+
20+
To dynamically create a Manila CSI volume using the web console:
21+
22+
. In the {product-title} console, click *Storage* → *Persistent Volume Claims*.
23+
24+
. In the persistent volume claims overview, click *Create Persistent Volume Claim*.
25+
26+
. Define the required options on the resulting page.
27+
28+
.. Select the appropriate StorageClass.
29+
30+
.. Enter a unique name for the storage claim.
31+
32+
.. Select the access mode to specify read and write access for the PVC you are creating.
33+
+
34+
[IMPORTANT]
35+
====
36+
* Use RWX if you want the persistent volume (PV) that fulfills this PVC to be mounted to multiple Pods on multiple nodes in the cluster.
37+
38+
* Use RWO mode if you want to prevent additional Pods from being dynamically provisioned.
39+
====
40+
41+
. Define the size of the storage claim.
42+
43+
. Click *Create* to create the PersistentVolumeClaim and generate a PersistentVolume.
44+
45+
.Procedure (CLI)
46+
47+
To dynamically create a Manila CSI volume using the command-line interface (CLI):
48+
49+
. Create and save a file with the PersistentVolumeClaim object described by the following YAML:
50+
51+
+
52+
.pvc-manila.yaml
53+
[source,yaml]
54+
----
55+
apiVersion: v1
56+
kind: PersistentVolumeClaim
57+
metadata:
58+
name: pvc-manila
59+
spec:
60+
accessModes: <1>
61+
- ReadWriteMany
62+
resources:
63+
requests:
64+
storage: 10Gi
65+
storageClassName: csi-manila-gold <2>
66+
----
67+
+
68+
<1> Use RWX if you want the persistent volume (PV) that fulfills this PVC to be mounted to multiple Pods on multiple nodes in the cluster. Use ReadWriteOnce (RWO) mode to prevent additional Pods from being dynamically provisioned.
69+
<2> The name of the storage class that provisions the storage back end. Manila StorageClasses are provisioned by the Operator and have the `csi-manila-` prefix.
70+
+
71+
. Create the object you saved in the previous step by running the following command:
72+
+
73+
----
74+
$ oc create -f pvc-manila.yaml
75+
----
76+
+
77+
A new PVC is created.
78+
79+
. To verify that the volume was created and is ready, run the following command:
80+
+
81+
----
82+
$ oc get pvc pvc-manila
83+
----
84+
+
85+
The `pvc-manila` shows that it is `Bound`.
86+
87+
You can now use the new PVC to configure a Pod.
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * storage/container_storage_interface/persistent-storage-csi-manila.adoc
4+
5+
[id="persistent-storage-csi-manila-install-driver_{context}"]
6+
= Installing the OpenStack Manila CSI driver
7+
8+
The OpenStack Manila Container Storage Interface (CSI) driver is a custom resource (CR) that enables you to create and mount OpenStack Manila shares. It also supports creating snapshots, and recovering shares from snapshots.
9+
10+
The driver is not installed in {product-title} by default, and must be installed after the Manila CSI Driver Operator has been installed.
11+
12+
.Prerequisites
13+
14+
* The Manila CSI Driver Operator has been installed.
15+
* Access to the {product-title} web console or command-line interface (CLI).
16+
17+
.UI procedure
18+
19+
To install the Manila CSI driver from the web console, complete the following steps:
20+
21+
. Log in to the {product-title} web console.
22+
23+
. Navigate to *Operators* -> *Installed Operators*.
24+
25+
. Locate the *Manila CSI Driver Operator* from the list and click on the Operator link.
26+
27+
. Create the driver:
28+
.. From the *Details* tab, click *Create Instance*.
29+
30+
.. Optional: Select *YAML view* to make modifications, such as adding notations, to the ManilaDriver object template.
31+
32+
.. Click *Create* to finalize.
33+
+
34+
[IMPORTANT]
35+
====
36+
Renaming the cluster and specifying a certain namespace are not supported functions.
37+
====
38+
39+
.CLI procedure
40+
41+
To install the Manila CSI driver from the CLI, complete the following steps:
42+
43+
. Create an object YAML file, such as `maniladriver.yaml`, to define the ManilaDriver:
44+
+
45+
.Example maniladriver
46+
[source,yaml]
47+
----
48+
apiVersion: csi.openshift.io/v1alpha1
49+
kind: ManilaDriver
50+
metadata:
51+
name: cluster <1>
52+
----
53+
<1> Renaming the cluster and specifying a certain namespace are not supported functions.
54+
55+
. Create the ManilaDriver CR object in your {product-title} cluster by specifying the file you created in the previous step:
56+
+
57+
----
58+
$ oc create -f maniladriver.yaml
59+
----
60+
61+
When the Operator installation is finished, the Manila CSI driver is deployed on {product-title} for dynamic provisioning of RWX persistent volumes on {rh-openstack-first}.
62+
63+
.Verification steps
64+
. Verify that the ManilaDriver CR was created successfully by entering the following command:
65+
+
66+
----
67+
$ oc get all -n openshift-manila-csi-driver
68+
----
69+
+
70+
Example output:
71+
+
72+
----
73+
NAME READY STATUS RESTARTS AGE
74+
pod/csi-nodeplugin-nfsplugin-lzvpm 1/1 Running 0 18h
75+
pod/csi-nodeplugin-nfsplugin-slvg2 1/1 Running 0 18h
76+
pod/csi-nodeplugin-nfsplugin-xmps9 1/1 Running 0 18h
77+
pod/openstack-manila-csi-controllerplugin-7d4f5d985b-mw4x5 3/3 Running 0 17h
78+
pod/openstack-manila-csi-nodeplugin-6xchs 2/2 Running 0 18h
79+
pod/openstack-manila-csi-nodeplugin-bkcmz 2/2 Running 0 18h
80+
pod/openstack-manila-csi-nodeplugin-rlpps 2/2 Running 0 18h
81+
82+
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
83+
daemonset.apps/csi-nodeplugin-nfsplugin 3 3 3 3 3 18h
84+
daemonset.apps/openstack-manila-csi-nodeplugin 3 3 3 3 3 18h
85+
86+
NAME READY UP-TO-DATE AVAILABLE AGE
87+
deployment.apps/openstack-manila-csi-controllerplugin 1/1 1 1 18h
88+
89+
NAME DESIRED CURRENT READY AGE
90+
replicaset.apps/openstack-manila-csi-controllerplugin-7d4f5d985b 1 1 1 17h
91+
92+
----
93+
94+
. Verify that the storage class was created successfully by entering the following command:
95+
+
96+
----
97+
$ oc get storageclasses | grep -E "NAME|csi-manila-"
98+
----
99+
+
100+
Example output:
101+
+
102+
----
103+
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
104+
csi-manila-gold manila.csi.openstack.org Delete Immediate false 18h
105+
----
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * storage/container_storage_interface/persistent-storage-csi-manila.adoc
4+
5+
[id="persistent-storage-csi-manila-install-operator_{context}"]
6+
= Installing the Manila CSI Driver Operator
7+
8+
The Manila Container Storage Interface (CSI) Driver Operator is not installed in {product-title} by default. Use the following procedure to install and configure this Operator to enable the OpenStack Manila CSI driver in your cluster.
9+
10+
.Prerequisites
11+
* You have access to the {product-title} web console.
12+
* The underlying {rh-openstack-first} infrastructure cloud deploys Manila serving NFS shares.
13+
14+
.Procedure
15+
16+
To install the Manila CSI Driver Operator from the web console, follow these steps:
17+
18+
. Log in to the {product-title} web console.
19+
20+
. Navigate to *Operators* -> *OperatorHub*.
21+
22+
. Type *Manila CSI Driver Operator* into the filter box to locate the Operator.
23+
24+
. Click *Install*.
25+
26+
. On the *Install Operator* page, select *openshift-manila-csi-driver-operator* from the *Installed Namespace* drop-down menu.
27+
28+
. Adjust the values for *Update Channel* and *Approval Strategy* to the values that you want. The only supported *Installation Mode* is *All namespaces on the cluster*.
29+
30+
. Click *Install*.
31+
32+
Once finished, the Manila CSI Driver Operator is listed in the *Installed Operators* section of the web console.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * storage/container_storage_interface/persistent-storage-csi-manila.adoc
4+
5+
[id="persistent-storage-csi-manila-uninstall-operator_{context}"]
6+
= Uninstalling the Manila CSI Driver Operator
7+
8+
Before you uninstall the Manila Container Storage Interface (CSI) Driver Operator, you must delete all persistent volume claims (PVCs) that are in use by the Operator.
9+
10+
.Prerequisites
11+
* Access to the {product-title} web console.
12+
13+
.Procedure
14+
To uninstall the Manila CSI Driver Operator from the web console:
15+
16+
. Log in to the web console.
17+
18+
. Navigate to *Storage* -> *Persistent Volume Claims*.
19+
20+
. Select any PVCs that are in use by the Manila CSI Driver Operator and click *Delete*.
21+
22+
. From the *Operators* -> *Installed Operators* page, scroll or type *Manila CSI* into the *Filter by name* field to find the Operator. Then, click on it.
23+
24+
. On the right-hand side of the *Installed Operators* details page, select *Uninstall Operator* from the *Actions* drop-down menu.
25+
26+
. When prompted by the *Uninstall Operator* window, click the *Uninstall* button to remove the Operator from the namespace. Any applications deployed by the Operator on the cluster will need to be cleaned up manually.
27+
28+
Once finished, the Manila CSI Driver Operator is no longer listed in the *Installed Operators* section of the web console.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[id="persistent-storage-csi-manila"]
2+
= OpenStack Manila CSI Driver Operator
3+
include::modules/common-attributes.adoc[]
4+
:context: persistent-storage-csi-manila
5+
6+
toc::[]
7+
8+
== Overview
9+
10+
{product-title} is capable of provisioning persistent volumes (PVs) using the Container Storage Interface (CSI) driver for the link:https://wiki.openstack.org/wiki/Manila[OpenStack Manila] shared file system service.
11+
12+
Familiarity with link:https://kubernetes.io/docs/concepts/storage/persistent-volumes/[PVs], link:https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims[persistent volume claims (PVCs)], link:http://blog.kubernetes.io/2016/10/dynamic-provisioning-and-storage-in-kubernetes.html[dynamic
13+
provisioning], and link:https://kubernetes.io/docs/admin/authorization/rbac/[RBAC authorization] is recommended.
14+
15+
Before PVCs can be created, you must install the Manila CSI Driver Operator. The Operator creates the required storage classes for all available Manila share types needed for dynamic provisioning.
16+
17+
After the Operator is installed, you must also create the ManilaDriver Custom Resource (CR) that is required in the {product-title} cluster.
18+
19+
include::modules/persistent-storage-csi-manila-install-operator.adoc[leveloffset=+1]
20+
21+
include::modules/persistent-storage-csi-manila-install-driver.adoc[leveloffset=+1]
22+
23+
include::modules/persistent-storage-csi-manila-dynamic-provisioning.adoc[leveloffset=+1]
24+
25+
include::modules/persistent-storage-csi-manila-uninstall-operator.adoc[leveloffset=+1]
26+
27+
.Additional resources
28+
* xref:../../storage/container_storage_interface/persistent-storage-csi.adoc#persistent-storage-csi[Configuring CSI volumes]

storage/container_storage_interface/persistent-storage-csi.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[id="persistent-storage-using-csi"]
1+
[id="persistent-storage-csi"]
22
= Configuring CSI volumes
33
include::modules/common-attributes.adoc[]
44
:context: persistent-storage-csi

storage/dynamic-provisioning.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ include::modules/dynamic-provisioning-annotations.adoc[leveloffset=+2]
1616

1717
include::modules/dynamic-provisioning-cinder-definition.adoc[leveloffset=+2]
1818

19+
include::modules/dynamic-provisioning-manila-csi-definition.adoc[leveloffset=+2]
20+
1921
include::modules/dynamic-provisioning-aws-definition.adoc[leveloffset=+2]
2022

2123
include::modules/dynamic-provisioning-azure-disk-definition.adoc[leveloffset=+2]

0 commit comments

Comments
 (0)