Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions _topic_map.yml
Original file line number Diff line number Diff line change
Expand Up @@ -604,8 +604,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)
Expand All @@ -620,6 +618,8 @@ Topics:
File: persistent-storage-csi-snapshots
- Name: 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
Expand Down
6 changes: 5 additions & 1 deletion modules/dynamic-provisioning-available-plugins.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down
8 changes: 8 additions & 0 deletions modules/dynamic-provisioning-manila-csi-definition.adoc
Original file line number Diff line number Diff line change
@@ -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.
87 changes: 87 additions & 0 deletions modules/persistent-storage-csi-manila-dynamic-provisioning.adoc
Original file line number Diff line number Diff line change
@@ -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.
105 changes: 105 additions & 0 deletions modules/persistent-storage-csi-manila-install-driver.adoc
Original file line number Diff line number Diff line change
@@ -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
----
32 changes: 32 additions & 0 deletions modules/persistent-storage-csi-manila-install-operator.adoc
Original file line number Diff line number Diff line change
@@ -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.
28 changes: 28 additions & 0 deletions modules/persistent-storage-csi-manila-uninstall-operator.adoc
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
@@ -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]
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions storage/dynamic-provisioning.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
28 changes: 0 additions & 28 deletions storage/persistent_storage/persistent-storage-manila.adoc

This file was deleted.