1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00

Include section on the OpenStack Manila CSI Driver

This commit is contained in:
Bob Furu
2020-05-12 16:41:16 -04:00
committed by openshift-cherrypick-robot
parent f0d519cc6c
commit 28da24a79a
11 changed files with 298 additions and 32 deletions

View File

@@ -605,8 +605,6 @@ Topics:
File: persistent-storage-nfs
- Name: Persistent storage using Red Hat OpenShift Container Storage
File: persistent-storage-ocs
# - Name: Persistent storage using OpenStack Manila
# File: persistent-storage-manila
- Name: Persistent storage using VMware vSphere
File: persistent-storage-vsphere
- Name: Using Container Storage Interface (CSI)
@@ -621,6 +619,8 @@ Topics:
File: persistent-storage-csi-snapshots
- Name: Using CSI volume cloning
File: persistent-storage-csi-cloning
- Name: OpenStack Manila CSI Driver Operator
File: persistent-storage-csi-manila
- Name: Expanding persistent volumes
File: expanding-persistent-volumes
Distros: openshift-enterprise,openshift-webscale,openshift-origin,openshift-dedicated

View File

@@ -21,6 +21,10 @@ configured provider's API to create new storage resources:
|`kubernetes.io/cinder`
|
|{rh-openstack} Manila Container Storage Interface (CSI)
|`manila.csi.openstack.org`
|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.
|AWS Elastic Block Store (EBS)
|`kubernetes.io/aws-ebs`
|For dynamic provisioning when using multiple clusters in different zones,
@@ -29,7 +33,7 @@ where `<cluster_name>` and `<cluster_id>` are unique per cluster.
|AWS Elastic File System (EFS)
|
|Dynamic provisioning is accomplished through the EFS provisioner pod and
|Dynamic provisioning is accomplished through the EFS provisioner Pod and
not through a provisioner plug-in.
|Azure Disk

View File

@@ -0,0 +1,8 @@
// Module included in the following assemblies:
//
// * storage/dynamic-provisioning.adoc
[id="openstack-manila-csi-definition_{context}"]
= {rh-openstack} Manila Container Storage Interface (CSI) object definition
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.

View File

@@ -0,0 +1,87 @@
// Module included in the following assemblies:
//
// * storage/container_storage_interface/persistent-storage-csi-manila.adoc
[id="persistent-storage-csi-manila-dynamic-provisioning_{context}"]
= Dynamically provisioning Manila CSI volumes
{product-title} installs a StorageClass for each available Manila share type.
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).
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.
.Prerequisites
* {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}.
.Procedure (UI)
To dynamically create a Manila CSI volume using the web console:
. In the {product-title} console, click *Storage* → *Persistent Volume Claims*.
. In the persistent volume claims overview, click *Create Persistent Volume Claim*.
. Define the required options on the resulting page.
.. Select the appropriate StorageClass.
.. Enter a unique name for the storage claim.
.. Select the access mode to specify read and write access for the PVC you are creating.
+
[IMPORTANT]
====
* 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 RWO mode if you want to prevent additional Pods from being dynamically provisioned.
====
. Define the size of the storage claim.
. Click *Create* to create the PersistentVolumeClaim and generate a PersistentVolume.
.Procedure (CLI)
To dynamically create a Manila CSI volume using the command-line interface (CLI):
. Create and save a file with the PersistentVolumeClaim object described by the following YAML:
+
.pvc-manila.yaml
[source,yaml]
----
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pvc-manila
spec:
accessModes: <1>
- ReadWriteMany
resources:
requests:
storage: 10Gi
storageClassName: csi-manila-gold <2>
----
+
<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.
<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.
+
. Create the object you saved in the previous step by running the following command:
+
----
$ oc create -f pvc-manila.yaml
----
+
A new PVC is created.
. To verify that the volume was created and is ready, run the following command:
+
----
$ oc get pvc pvc-manila
----
+
The `pvc-manila` shows that it is `Bound`.
You can now use the new PVC to configure a Pod.

View File

@@ -0,0 +1,105 @@
// Module included in the following assemblies:
//
// * storage/container_storage_interface/persistent-storage-csi-manila.adoc
[id="persistent-storage-csi-manila-install-driver_{context}"]
= Installing the OpenStack Manila CSI driver
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.
The driver is not installed in {product-title} by default, and must be installed after the Manila CSI Driver Operator has been installed.
.Prerequisites
* The Manila CSI Driver Operator has been installed.
* Access to the {product-title} web console or command-line interface (CLI).
.UI procedure
To install the Manila CSI driver from the web console, complete the following steps:
. Log in to the {product-title} web console.
. Navigate to *Operators* -> *Installed Operators*.
. Locate the *Manila CSI Driver Operator* from the list and click on the Operator link.
. Create the driver:
.. From the *Details* tab, click *Create Instance*.
.. Optional: Select *YAML view* to make modifications, such as adding notations, to the ManilaDriver object template.
.. Click *Create* to finalize.
+
[IMPORTANT]
====
Renaming the cluster and specifying a certain namespace are not supported functions.
====
.CLI procedure
To install the Manila CSI driver from the CLI, complete the following steps:
. Create an object YAML file, such as `maniladriver.yaml`, to define the ManilaDriver:
+
.Example maniladriver
[source,yaml]
----
apiVersion: csi.openshift.io/v1alpha1
kind: ManilaDriver
metadata:
name: cluster <1>
----
<1> Renaming the cluster and specifying a certain namespace are not supported functions.
. Create the ManilaDriver CR object in your {product-title} cluster by specifying the file you created in the previous step:
+
----
$ oc create -f maniladriver.yaml
----
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}.
.Verification steps
. Verify that the ManilaDriver CR was created successfully by entering the following command:
+
----
$ oc get all -n openshift-manila-csi-driver
----
+
Example output:
+
----
NAME READY STATUS RESTARTS AGE
pod/csi-nodeplugin-nfsplugin-lzvpm 1/1 Running 0 18h
pod/csi-nodeplugin-nfsplugin-slvg2 1/1 Running 0 18h
pod/csi-nodeplugin-nfsplugin-xmps9 1/1 Running 0 18h
pod/openstack-manila-csi-controllerplugin-7d4f5d985b-mw4x5 3/3 Running 0 17h
pod/openstack-manila-csi-nodeplugin-6xchs 2/2 Running 0 18h
pod/openstack-manila-csi-nodeplugin-bkcmz 2/2 Running 0 18h
pod/openstack-manila-csi-nodeplugin-rlpps 2/2 Running 0 18h
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
daemonset.apps/csi-nodeplugin-nfsplugin 3 3 3 3 3 18h
daemonset.apps/openstack-manila-csi-nodeplugin 3 3 3 3 3 18h
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/openstack-manila-csi-controllerplugin 1/1 1 1 18h
NAME DESIRED CURRENT READY AGE
replicaset.apps/openstack-manila-csi-controllerplugin-7d4f5d985b 1 1 1 17h
----
. Verify that the storage class was created successfully by entering the following command:
+
----
$ oc get storageclasses | grep -E "NAME|csi-manila-"
----
+
Example output:
+
----
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
csi-manila-gold manila.csi.openstack.org Delete Immediate false 18h
----

View File

@@ -0,0 +1,32 @@
// Module included in the following assemblies:
//
// * storage/container_storage_interface/persistent-storage-csi-manila.adoc
[id="persistent-storage-csi-manila-install-operator_{context}"]
= Installing the Manila CSI Driver Operator
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.
.Prerequisites
* You have access to the {product-title} web console.
* The underlying {rh-openstack-first} infrastructure cloud deploys Manila serving NFS shares.
.Procedure
To install the Manila CSI Driver Operator from the web console, follow these steps:
. Log in to the {product-title} web console.
. Navigate to *Operators* -> *OperatorHub*.
. Type *Manila CSI Driver Operator* into the filter box to locate the Operator.
. Click *Install*.
. On the *Install Operator* page, select *openshift-manila-csi-driver-operator* from the *Installed Namespace* drop-down menu.
. 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*.
. Click *Install*.
Once finished, the Manila CSI Driver Operator is listed in the *Installed Operators* section of the web console.

View File

@@ -0,0 +1,28 @@
// Module included in the following assemblies:
//
// * storage/container_storage_interface/persistent-storage-csi-manila.adoc
[id="persistent-storage-csi-manila-uninstall-operator_{context}"]
= Uninstalling the Manila CSI Driver Operator
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.
.Prerequisites
* Access to the {product-title} web console.
.Procedure
To uninstall the Manila CSI Driver Operator from the web console:
. Log in to the web console.
. Navigate to *Storage* -> *Persistent Volume Claims*.
. Select any PVCs that are in use by the Manila CSI Driver Operator and click *Delete*.
. 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.
. On the right-hand side of the *Installed Operators* details page, select *Uninstall Operator* from the *Actions* drop-down menu.
. 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.
Once finished, the Manila CSI Driver Operator is no longer listed in the *Installed Operators* section of the web console.

View File

@@ -0,0 +1,28 @@
[id="persistent-storage-csi-manila"]
= OpenStack Manila CSI Driver Operator
include::modules/common-attributes.adoc[]
:context: persistent-storage-csi-manila
toc::[]
== Overview
{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.
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
provisioning], and link:https://kubernetes.io/docs/admin/authorization/rbac/[RBAC authorization] is recommended.
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.
After the Operator is installed, you must also create the ManilaDriver Custom Resource (CR) that is required in the {product-title} cluster.
include::modules/persistent-storage-csi-manila-install-operator.adoc[leveloffset=+1]
include::modules/persistent-storage-csi-manila-install-driver.adoc[leveloffset=+1]
include::modules/persistent-storage-csi-manila-dynamic-provisioning.adoc[leveloffset=+1]
include::modules/persistent-storage-csi-manila-uninstall-operator.adoc[leveloffset=+1]
.Additional resources
* xref:../../storage/container_storage_interface/persistent-storage-csi.adoc#persistent-storage-csi[Configuring CSI volumes]

View File

@@ -1,4 +1,4 @@
[id="persistent-storage-using-csi"]
[id="persistent-storage-csi"]
= Configuring CSI volumes
include::modules/common-attributes.adoc[]
:context: persistent-storage-csi

View File

@@ -16,6 +16,8 @@ include::modules/dynamic-provisioning-annotations.adoc[leveloffset=+2]
include::modules/dynamic-provisioning-cinder-definition.adoc[leveloffset=+2]
include::modules/dynamic-provisioning-manila-csi-definition.adoc[leveloffset=+2]
include::modules/dynamic-provisioning-aws-definition.adoc[leveloffset=+2]
include::modules/dynamic-provisioning-azure-disk-definition.adoc[leveloffset=+2]

View File

@@ -1,28 +0,0 @@
[id="persistent-storage-using-manila"]
= Persistent storage using OpenStack Manila
include::modules/common-attributes.adoc[]
:context: persistent-storage-manila
toc::[]
{product-title} is capable of provisioning PVs using the
link:https://wiki.openstack.org/wiki/Manila[OpenStack Manila] shared
file system service.
It is assumed the OpenStack Manila service has been correctly set up and is
accessible from the {product-title} cluster. Only the NFS share type can be
provisioned.
:FeatureName: OpenStack Manila persistent storage
include::modules/technology-preview.adoc[leveloffset=+0]
.Additional resources
* link:https://kubernetes.io/docs/concepts/storage/persistent-volumes/[Persistent volumes (PV)]
* link:https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims[Persistent volume claims (PVCs)]
* link:https://kubernetes.io/docs/concepts/storage/dynamic-provisioning/[Dynamic provisioning]
* link:https://kubernetes.io/docs/admin/authorization/rbac/[RBAC authorization]
include::modules/persistent-storage-manila-install.adoc[leveloffset=+1]
include::modules/persistent-storage-manila-usage.adoc[leveloffset=+1]