In this section, we describe how to configure OpenEBS as a persistent storage option and deploying a stateful workload (MongoDB) using OpenEBS storage classes in IBM Cloud Private (ICP).
- Minimum three x64 servers
Install IBM Cloud Private
Follow instructions from Introduction to IBM Cloud Private to deploy a multi-node ICP cluster.
Install OpenEBS on ICP
Log in to the ICP console and go to the Admin/Repositories menu.
Click Add repository.
Add a chart repository with the following parameters:
— Name: openebs-charts — URL: https://openebs.github.io/charts/
After you click Add, confirm that openebs-charts is listed under Repositories.
Go to the Catalog menu, select openebs from the list.
On OpenEBS chart instructions page, click Configure.
Configure OpenEBS deployment with the following parameters:
— Release name: openebs-<your-release-name> (you need to pick a unique name) — Target Namespace: default (namespace should be the same as your workload) — rbacEnable: true — image pullPolicy: IfNotPresent — apiserver image: openebs/m-apiserver — apiserver tag: 0.4.0 — provisione image: openebs/openebs-k8s-provisioner — provisioner tag: 0.4.0 — jiva image: openebs/jiva:0.4.0 — replicas: 2 (Number of Jiva Volume replicas)
Click Install. When finished click View Helm Release.
On the Helm Release page, you can see the status of OpenEBS, deployment, and available Storage Classes.
Now, OpenEBS is installed on IBM Cloud Private. You are ready to run any stateful application on OpenEBS. Let’s try to deploy a stateful app on OpenEBS. Next section will help you with it.
Install MongoDB on OpenEBS
Under Catalog, select ibm-mongodb-dev and click Configure.
Configure MongoDB deployment with the following parameters: — Release name: mongodb-<your-release-name> (you need to pick a unique name here) — Target Namespace: default (same as OpenEBS) — persistence enabled: true — persistence useDynamicProvisioning: true — dataVolume storageClassName: openebs-mongodb — dataVolume size: 2G (default is 20Gi, remove “i” — in current version it is not supported) — database password: mongo Accept the license agreements, keep all the other values as default and click Install.
Go to Workloads/Helm Releases and select your MongoDB release. Under the PersistentVolumeClaim table you are going to see the volume claim and OpenEBS storage class.
If you go to the Workloads/Deployments page, you can find the storage controller and two volume replicas (as configured) running.
Confirm that replicas are running on separate nodes. Click on the PVC name ending with rep (Example: pvc-23025190-c516–11e7-b45e-e8fd90000064-rep). Scroll down, and you will see that pods are running on separate hosts.
You have now successfully deployed a stateful application on a persistent block storage presented by OpenEBS.