-
Notifications
You must be signed in to change notification settings - Fork 542
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
doc: update doc for disaster recovery #4905
base: devel
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,91 +17,48 @@ This documentation assumes that `rbd mirroring` is set up between | |
For more information on how to set up rbd mirroring, refer to | ||
[ceph documentation](https://docs.ceph.com/en/latest/rbd/rbd-mirroring/). | ||
|
||
## Deploy the Volume Replication CRD | ||
## Enable CSI-ADDONS Sidecar | ||
|
||
Volume Replication Operator is a kubernetes operator that provides common | ||
and reusable APIs for storage disaster recovery. | ||
It is based on [csi-addons/spec](https://github.com/csi-addons/spec) | ||
specification and can be used by any storage provider. | ||
|
||
Volume Replication Operator follows controller pattern and provides | ||
extended APIs for storage disaster recovery. | ||
The extended APIs are provided via Custom Resource Definition (CRD). | ||
CSI-Addons supports the Volume Replication feature that provides common | ||
and reusable APIs for storage disaster recovery. | ||
It is based on [csi-addons/spec](https://github.com/csi-addons/spec) specification | ||
and can be used by any storage provider. | ||
|
||
>:bulb: For more information, please refer to the | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. point to the csi-addons operator replication doc There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
> [volume-replication-operator](https://github.com/csi-addons/volume-replication-operator). | ||
|
||
* Deploy the `VolumeReplicationClass` CRD | ||
Deploy the CSI-Addons controller | ||
|
||
```bash | ||
kubectl create -f https://raw.githubusercontent.com/csi-addons/volume-replication-operator/release-v0.1/config/crd/bases/replication.storage.openshift.io_volumereplicationclasses.yaml | ||
kubectl create -f https://raw.githubusercontent.com/csi-addons/kubernetes-csi-addons/v0.10.0/deploy/controller/setup-controller.yaml | ||
``` | ||
|
||
customresourcedefinition.apiextensions.k8s.io/volumereplicationclasses.replication.storage.openshift.io created | ||
Deploy the CSI-Addons CRD to create all related crds for volumereplication | ||
|
||
```bash | ||
kubectl create -f https://raw.githubusercontent.com/csi-addons/kubernetes-csi-addons/v0.10.0/deploy/controller/crds.yaml | ||
``` | ||
|
||
* Deploy the `VolumeReplication` CRD | ||
The following crds gets created | ||
|
||
```bash | ||
kubectl create -f https://raw.githubusercontent.com/csi-addons/volume-replication-operator/release-v0.1/config/crd/bases/replication.storage.openshift.io_volumereplications.yaml | ||
|
||
customresourcedefinition.apiextensions.k8s.io/volumereplications.replication.storage.openshift.io created created | ||
``` | ||
volumereplicationclasses.replication.storage.openshift.io | ||
volumereplications.replication.storage.openshift.io | ||
``` | ||
|
||
The VolumeReplicationClass and VolumeReplication CRDs are now created. | ||
|
||
>:bulb: **Note:** Use the latest available release for Volume Replication Operator. | ||
> See [releases](https://github.com/csi-addons/volume-replication-operator/branches) | ||
>:bulb: **Note:** Use the latest available release for CSI Addons Operator. | ||
> See [releases](https://github.com/csi-addons/kubernetes-csi-addons/branches) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. maybe point to the releases instead of branches? https://github.com/csi-addons/kubernetes-csi-addons/releases |
||
> for more information. | ||
|
||
### Add RBAC rules for Volume Replication Operator | ||
|
||
Add the below mentioned rules to `rbd-external-provisioner-runner` | ||
ClusterRole in [csi-provisioner-rbac.yaml](https://github.com/ceph/ceph-csi/blob/release-v3.3/deploy/rbd/kubernetes/csi-provisioner-rbac.yaml) | ||
|
||
```yaml | ||
- apiGroups: ["replication.storage.openshift.io"] | ||
resources: ["volumereplications", "volumereplicationclasses"] | ||
verbs: ["create", "delete", "get", "list", "patch", "update", "watch"] | ||
- apiGroups: ["replication.storage.openshift.io"] | ||
resources: ["volumereplications/finalizers"] | ||
verbs: ["update"] | ||
- apiGroups: ["replication.storage.openshift.io"] | ||
resources: ["volumereplications/status"] | ||
verbs: ["get", "patch", "update"] | ||
- apiGroups: ["replication.storage.openshift.io"] | ||
resources: ["volumereplicationclasses/status"] | ||
verbs: ["get"] | ||
``` | ||
### Add RBAC rules for CSI-Addons Operator | ||
|
||
### Deploy the Volume Replication Sidecar | ||
Add RBAC rules to enable the csi-addons operator which contains | ||
all related rbac rules to anable the volume replication feature | ||
|
||
To deploy `volume-replication` sidecar container in `csi-rbdplugin-provisioner` | ||
pod, add the following yaml to | ||
[csi-rbdplugin-provisioner deployment](https://github.com/ceph/ceph-csi/blob/release-v3.3/deploy/rbd/kubernetes/csi-rbdplugin-provisioner.yaml). | ||
|
||
```yaml | ||
- name: volume-replication | ||
image: quay.io/csiaddons/volumereplication-operator:v0.1.0 | ||
args : | ||
- "--metrics-bind-address=0" | ||
- "--leader-election-namespace=$(NAMESPACE)" | ||
- "--driver-name=rbd.csi.ceph.com" | ||
- "--csi-address=$(ADDRESS)" | ||
- "--rpc-timeout=150s" | ||
- "--health-probe-bind-address=:9998" | ||
- "--leader-elect=true" | ||
env: | ||
- name: ADDRESS | ||
value: unix:///csi/csi-provisioner.sock | ||
- name: NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
imagePullPolicy: "IfNotPresent" | ||
volumeMounts: | ||
- name: socket-dir | ||
mountPath: /csi | ||
yati1998 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
```bash | ||
kubectl create -f https://raw.githubusercontent.com/csi-addons/kubernetes-csi-addons/v0.10.0/deploy/controller/rbac.yaml | ||
``` | ||
|
||
## VolumeReplicationClass and VolumeReplication | ||
|
@@ -118,9 +75,6 @@ To deploy `volume-replication` sidecar container in `csi-rbdplugin-provisioner` | |
to storage object to be replicated and VolumeReplicationClass | ||
corresponding to the driver providing replication. | ||
|
||
>:bulb: For more information, please refer to the | ||
> [volume-replication-operator](https://github.com/csi-addons/volume-replication-operator). | ||
|
||
Let's say we have a *PVC* (rbd-pvc) in BOUND state; created using | ||
*StorageClass* with `Retain` reclaimPolicy. | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The name of the project is CSI-Addons, please use the correct capitalization.