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 discovered application samples #53

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
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
42 changes: 38 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,41 @@ Kubernetes and OpenShift.
- vm-dv - DataVolume based VM
- vm-dvt - DataVolumeTemplate based VM

## Deploying a sample application
## Managed and discovered applications

*Ramen* can protect *OCM managed applications* and *OCM discovered
applications*.

### OCM managed applications

Deployed and undeployed by *OCM*, using either *Subsription* or
*ApplciationSet* resources. *Ramen* take ownership of the application
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/take/takes

when enabling DR, and return ownership to OCM when disabling DR. When DR
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/return/returns

is enabled, *Ramen* control the placement of the application and backup
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/control/controls

and restore the application PVCs.

When failing over or relocating an *OCM managed application* to another
cluster, *OCM* delete the application from the cluster and deploy it on
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/delete/deletes and s/deploy/deploys

the other cluster.

### OCM discovered applications*
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing *


Deployed and undeployed by a user on a cluster using declarative or
imperative means. An example is deploying one of the workloads in this
repository using kubectl. Another example is creating a virtual machine
Comment on lines +85 to +86
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
imperative means. An example is deploying one of the workloads in this
repository using kubectl. Another example is creating a virtual machine
imperative means. An example is directly supplying one of the workload definitions in this
repository (Deployment, for example) to `kubectl apply`. Another example is creating a virtual machine

using KubeVirt console.

*Ramen* take ownership of the application when enabling DR and return
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plural changes in this and next paragraph too

ownership of the application when disabling DR. When DR is enabled,
*Ramen* control the application placement and backup and restore the
application resources based provided *DRPlacementControl* resoruce.

When failing over or relocating a discovered application to another
cluster, *Ramen* deploy the application on the other cluster. However to
complete the operation, the user must delete the application from the
cluster since *Ramen* does not support deleting applications.

## Deploying an OCM managed application

In the example we use the busybox deployment for Kubernetes regional DR
environment using RBD storage:
Expand Down Expand Up @@ -108,7 +142,7 @@ the examples.
kubectl get pod,pvc -n deployment-rbd --context dr1
```

## Undeploying a sample application
## Undeploying an OCM managed application

To undeploy an application delete the subscription overlay used to
deploy the application:
Expand All @@ -117,7 +151,7 @@ deploy the application:
kubectl delete -k subscription/deployment-k8s-regional-rbd
```

## Enable DR for a deployed application
## Enable DR for a deployed OCM managed application

1. Change the Placement to be reconciled by Ramen

Expand All @@ -142,7 +176,7 @@ kubectl delete -k subscription/deployment-k8s-regional-rbd

At this point the placement of the application is managed by *Ramen*.

## Disable DR for a DR enabled application
## Disable DR for a DR enabled OCM managed application

1. Ensure the placement is pointing to the cluster where the workload is
currently placed to avoid data loss if OCM moves the application to
Expand Down
10 changes: 5 additions & 5 deletions workloads/kubevirt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ the included SSH public key with your own public key.
1. If you are not using the `main` branch update
`subscription/base/subscription.yaml` to point to the right branch.

## Deploying the VM subscription
## Deploying an OCM managed VM

To start a PVC based VM `vm-pvc` use the
`subscription/kubevirt/vm-pvc-k8s-regional` overlay:
Expand Down Expand Up @@ -89,7 +89,7 @@ NAME PROVISIONED USED
csi-vol-a3fdb384-2e31-49f1-bd48-a97b2d79f981 128 MiB 80 MiB
```

## Enabling DR for the VM
## Enabling DR for an OCM managed VM

To allow *Ramen* to protect the VM, you need to disable *OCM*
scheduling by adding an annotation to the VM placement:
Expand Down Expand Up @@ -209,7 +209,7 @@ csi-vol-a3fdb384-2e31-49f1-bd48-a97b2d79f981 128 MiB 80 MiB
In case of a disaster in the primary cluster, we can start the VM using
the replica on the secondary cluster.

## Failing over to another cluster
## Failing over an OCM managed VM to another cluster

In case of disaster you can force the VM to run on the other cluster.
The VM will start on the other cluster using the data from the last
Expand Down Expand Up @@ -351,7 +351,7 @@ kubectl wait drpc drpc \
--context hub
```

## Disable DR for the VM
## Disable DR for an OCM managed VM

Delete the `dr` resources to disable DR:

Expand All @@ -372,7 +372,7 @@ kubectl annotate placement placement \
At this point *OCM* controls the VM and the storage used for replicating
the VM data on the DR clusters will be reclaimed.

## Undeploying the VM
## Undeploying an OCM managed VM

Delete the subscription to stop and delete the VM:

Expand Down