Skip to content
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

Add CSI PNP supported Driver list and Integration Guide #147

Merged
merged 2 commits into from
Mar 12, 2021
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
2 changes: 1 addition & 1 deletion content/guides/integration-guides/_index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Integration Guides
description: "All the integration guides and documentation"
weight: 15
weight: 30
disableToc: true
---

Expand Down
10 changes: 10 additions & 0 deletions content/guides/integration-guides/csi-integration/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: CSI Integration Guides
menuTitle: Kubernetes-CSI
description: "All the Container Storage Interface(CSI) Integration guides for different Soda CSI solutions"
weight: 1
disableToc: true
---

{{%children style="h3" description="true" %}}
asifdxtreme marked this conversation as resolved.
Show resolved Hide resolved

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: OpenSDS Integration with Kubernetes CSI
menuTitle: "With Kubernetes CSI"
description: "A guide for integrating OpenSDS with Kubernetes CSI."
weight: 1
title: SODA Integration with Kubernetes via SODA CSI Plugin
menuTitle: "SODA CSI plugin"
description: "A guide for integrating SODA with Kubernetes CSI."
weight: 10
disableToc: false
tags: ["integration guide", "kubernetes csi"]
---
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
title: SODA Integration with Vendor CSI Drivers via SODA CSI Plug-N-Play
menuTitle: "SODA CSI Plug-N-Play"
description: "A guide for integrating SODA with Vendor CSI Driver via unified Plugin."
weight: 10
disableToc: false
tags: ["integration guide", "kubernetes csi", "plug-n-play", "unified plugin"]
---

SODA CSI Plug-N-Play is a mechanism by which users can use the heterogeneous storage vendors in a unified way,
Users need to define the requirements while creating SODA Profile,
asifdxtreme marked this conversation as resolved.
Show resolved Hide resolved
Users need to use this profile ID while creating the PVC's in the Kubernetes,
the soda-csi-provisioner will automatically select the vendor csi-driver and help in
provisioning the Volumes for Pods.

## Prerequisite
- An installation of Kubernetes (V1.17+)
- SODA installation (you can refer to quick start guide over [here](https://docs.sodafoundation.io/soda-gettingstarted/installation-using-ansible/)), you need to change the ports of etcd in osdb.yaml while installing SODA on an existing K8s environment as the ports cause conflict with k8s etcd.

## Selecting the vendor CSI driver
You can select the CSI driver supported by SODA Plug-N-Play from [here](https://docs.sodafoundation.io/guides/user-guides/nbp/csi-pnp/) Once selected follow the instruction
given in the document to deploy the CSI driver in K8s.

##### For this example we are selecting the [OpenEBS LVM CSI Driver](https://github.com/openebs/lvm-localpv).

```go
kubectl create -f https://raw.githubusercontent.com/asifdxtreme/soda-ucp/main/examples/openebs/driver/lvm-operator.yaml
asifdxtreme marked this conversation as resolved.
Show resolved Hide resolved
```
We need to do the additional step to make the lvm group for this plugin
```go
truncate -s 1024G /tmp/disk.img
sudo losetup -f /tmp/disk.img --show
```
Create the Volume group on all the nodes, which will be used by the LVM Driver for provisioning the volumes

```go
sudo pvcreate /dev/loop0
sudo vgcreate lvmvg /dev/loop0
```


## Creating Profile in SODA
We need to create a Profile in SODA which will have the information of csi driver which needs to be used(eventually this step will be automatically done by SODA).

```go
osdsctl profile create '{"name": "openebs-profile-soda","storageType": "block","description": "string","provisioningProperties": {"dataStorage": {"recoveryTimeObjective": 10,"provisioningPolicy": "Thick","compression": false,"deduplication": false,"characterCodeSet": "ASCII","maxFileNameLengthBytes": 255,"storageAccessCapability": ["Read"] },"ioConnectivity": {"accessProtocol": "iscsi","maxIOPS": 150,"minIOPS": 50,"maxBWS": 5,"minBWS": 1,"latency": 1}},"replicationProperties": {},"snapshotProperties": {},"dataProtectionProperties": { },"customProperties": {"driver": "local.csi.openebs.io"}}'

```

## Attach information of ProfileID in Storage Class
Once the Profile ID is created then we need to create a Storage Class in K8s.
```go

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: openebs-lvmsc-soda
allowVolumeExpansion: true
parameters:
volgroup: "lvmvg"
profile: a82980d3-1030-41e5-95f0-b2db5a0c065d ## SODA PROFILE ID
provisioner: soda-csi
allowedTopologies:
- matchLabelExpressions:
- key: kubernetes.io/hostname
values:
- node-12340 ## NODE NAME ON WHICH PROVISIONING NEEDS TO BE DONE
asifdxtreme marked this conversation as resolved.
Show resolved Hide resolved
```

## Deploy an App with pvc

```go
kubectl create -f https://raw.githubusercontent.com/asifdxtreme/soda-ucp/main/examples/openebs/app/app.yaml
```

11 changes: 11 additions & 0 deletions content/support-matrix/nbp/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: NBP
menuTitle: NBP
description: "All user guides for the North Bound Plugin(NBP) project can be found here"
weight: 10
disableToc: false
tags: ["user guide", "delfin", "dashboard"]
---
This section provides Support Matrix for various features from the NBP project of SODA Foundation. If you are interested to develop/port, please refer the developer guides or contact us through any of the technical channels.

{{%children style="h3" description="true" %}}
89 changes: 89 additions & 0 deletions content/support-matrix/nbp/csi-pnp/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
title: Container Storage Interface(CSI) Plug-N-Play provided by SODA
menuTitle: CSI Plug-N-Play
description: "Support Matrix for SODA CSI Plug-N-Play feature"
weight: 10
disableToc: false
tags: ["user guide", "csi", "plug-n-play"]
---

SODA CSI Plug-N-Play allows users to provision the storage in K8s using SODA way and grab the Data Management capabilities offered by SODA.
SODA CSI PnP let's user to define the profile in SODA and use the profile in the StorageClass of K8s to provision the storage
dynamically. It allows user to switch between different heterogeneous CSI drivers via Profile.

Before we begin we need to create the Profile in SODA using the below command
```go
osdsctl profile create
{
"name": "openebs-profile-soda",
"storageType": "block",
"description": "string",
"provisioningProperties": {
"dataStorage": {
"recoveryTimeObjective": 10,
"provisioningPolicy": "Thick",
"compression": false,
"deduplication": false,
"characterCodeSet": "ASCII",
"maxFileNameLengthBytes": 255,
"storageAccessCapability": [
"Read"
]
},
"ioConnectivity": {
"accessProtocol": "iscsi",
"maxIOPS": 150,
"minIOPS": 50,
"maxBWS": 5,
"minBWS": 1,
"latency": 1
}
},
"replicationProperties": {},
"snapshotProperties": {},
"dataProtectionProperties": {},
"customProperties": {
"driver": "local.csi.openebs.io" ## YOU NEED TO UPDATE THE DRIVER WITH VENDOR DRIVER NAME
}
}
```

Currently SODA CSI PnP has been tested for the below CSI drivers, this is not the exhaustive list but it will keep growing as other vendors verifies the soda-csi-provisioner.


<table>
<thead>
<tr>
<th>Storage Vendor CSI Plugin</th>
<th>Deployment File</th>
<th>Sample App File</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="https://github.com/openebs/lvm-localpv">OpenEBS LVM Plugin</a></td>
<td><a href="https://github.com/asifdxtreme/soda-ucp/blob/main/examples/openebs/driver/lvm-operator.yaml">Operator</a> </td>
<td><a href="https://github.com/asifdxtreme/soda-ucp/blob/main/examples/openebs/app/app.yaml">Sample Application</a></td>
</tr>
<tr>
<td><a href="https://github.com/openebs/zfs-localpv"> OpenEBS ZFS Plugin</a></td>
<td><a href="https://github.com/asifdxtreme/soda-ucp/blob/main/examples/openebs/driver/zfs-operator.yaml">Operator</a></td>
<td><a href="https://github.com/asifdxtreme/soda-ucp/blob/main/examples/openebs/app/app.yaml">Sample Application</a></td>
</tr>
<tr>
<td><a href="https://github.com/IBM/ibm-block-csi-driver"> IBM Block CSI Driver</a></td>
<td><a href="https://github.com/sodafoundation/examples/tree/master/soda-csi-plug-n-play-poc/deploy/kubernetes/ibm">Operator</a></td>
<td><a href="https://github.com/sodafoundation/examples/tree/master/soda-csi-plug-n-play-poc/deploy/kubernetes/demo">Demo</a></td>
</tr>
<tr>
<td><a href="https://github.com/ceph/ceph-csi"> Ceph CSI Driver</a></td>
<td><a href="https://github.com/sodafoundation/examples/tree/master/soda-csi-plug-n-play-poc/deploy/kubernetes/cephcsi/rbd">Operator</a></td>
<td><a href="https://github.com/sodafoundation/examples/tree/master/soda-csi-plug-n-play-poc/deploy/kubernetes/demo">Demo</a></td>
</tr>
<tr>
<td><a href="https://github.com/wavezhang/k8s-csi-lvm">K8s-csi-lvm</a></td>
<td><a href="https://github.com/sodafoundation/examples/tree/master/soda-csi-plug-n-play-poc/deploy/kubernetes/lvm">Operator</a></td>
<td><a href="https://github.com/sodafoundation/examples/tree/master/soda-csi-plug-n-play-poc/deploy/kubernetes/demo">Demo</a></td>
</tr>
</tbody>
</table>