-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update docs to always deploy RabbitMQ and add data persistence (#730)
* update rabbitmq values file * update rabbitmq docs * add backup/restore reference for openebs * Update offline/rabbitmq_setup.md * Update offline/rabbitmq_setup.md * Apply suggestions from code review Co-authored-by: Julia Longtin <[email protected]> --------- Co-authored-by: Julia Longtin <[email protected]>
- Loading branch information
1 parent
07123cf
commit 3f096d1
Showing
7 changed files
with
171 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,83 +1,23 @@ | ||
# To Create a storage class for local persistent storage in Kubernetes | ||
## Dynamic Persistent Volume Provisioning | ||
If you already have a dynamic persistent volume provisioning setup, you can skip this step. If not, we can use OpenEBS for dynamic persistent volume provisioning. | ||
|
||
#### Note: This is just an example to create a local-path storage class. For the actual usecase, you can create your own storageclass with provisioner of your choice and use in different places to deploy wire-server and other resources. | ||
Reference docs - https://openebs.io/docs/user-guides/local-storage-user-guide/local-pv-hostpath/hostpath-installation | ||
|
||
Create a storage class. | ||
|
||
You can find more information about the local persistent storage here: https://kubernetes.io/docs/concepts/storage/storage-classes/#local | ||
Copy the following content in a file and name it sc.yaml | ||
### Deploy OpenEBS | ||
|
||
``` | ||
apiVersion: storage.k8s.io/v1 | ||
kind: StorageClass | ||
metadata: | ||
name: local-path | ||
provisioner: kubernetes.io/no-provisioner | ||
volumeBindingMode: WaitForFirstConsumer | ||
d helm install openebs charts/openebs --namespace openebs --create-namespace | ||
``` | ||
The above helm chart is available in the offline artifact. | ||
|
||
Create a Persistent Volume. | ||
|
||
You can find more information about the Persistent Volume here: https://kubernetes.io/docs/concepts/storage/persistent-volumes/ | ||
|
||
Note: The below example will create a Persistent Volume on the node kubenode1. You can change the node name as per your requirement. And also make sure that the path /data/local-path exists on the node kubenode1. | ||
|
||
Copy the following content in a file and name it pv.yaml | ||
|
||
After successful deployment of OpenEBS, you will see these storage classes: | ||
``` | ||
apiVersion: v1 | ||
kind: PersistentVolume | ||
metadata: | ||
name: local-path-pv | ||
spec: | ||
capacity: | ||
storage: 10Gi | ||
accessModes: | ||
- ReadWriteOnce | ||
persistentVolumeReclaimPolicy: Retain | ||
storageClassName: local-path | ||
local: | ||
path: /data/local-path | ||
nodeAffinity: | ||
required: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: kubernetes.io/hostname | ||
operator: In | ||
values: | ||
- kubenode1 | ||
d kubectl get sc | ||
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE | ||
openebs-device openebs.io/local Delete WaitForFirstConsumer false 5d20h | ||
openebs-hostpath openebs.io/local Delete WaitForFirstConsumer false 5d20h | ||
``` | ||
|
||
Create a Persistent Volume Claim. | ||
|
||
You can find more information about the Persistent Volume Claim here: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims | ||
### Backup and Restore | ||
|
||
Copy the following content in a file and name it pvc.yaml | ||
|
||
``` | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: local-path-pvc | ||
spec: | ||
storageClassName: local-path | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 10Gi | ||
``` | ||
|
||
Now, create the above resources using the following commands: | ||
|
||
``` | ||
d kubectl apply -f sc.yaml | ||
d kubectl apply -f pv.yaml | ||
d kubectl apply -f pvc.yaml | ||
``` | ||
|
||
After successfull creation, you should be able to see the resources with - | ||
``` | ||
d kubectl get sc,pv,pvc | ||
``` | ||
For backup and restore of the OpenEBS Local Storage, refer to the official docs at - https://openebs.io/docs/user-guides/local-storage-user-guide/additional-information/backupandrestore |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.