Skip to content

Commit

Permalink
Application Mobility Documentation (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
tdawe authored Aug 19, 2022
1 parent d02b473 commit a432f13
Show file tree
Hide file tree
Showing 6 changed files with 241 additions and 1 deletion.
3 changes: 2 additions & 1 deletion content/docs/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,5 @@ CSM is made up of multiple components including modules (enterprise capabilities
| Observability v1.2| ✔️ || ✔️ |||
| Replication v1.3|| ✔️ | ✔️ | ✔️ ||
| Resiliency v1.2| ✔️ | ✔️ ||| ✔️ |
| Encryption v0.1.0|| ✔️ ||||
| Encryption v0.1.0|| ✔️ ||||
| Application Mobility v0.1.0| ✔️ | ✔️ | ✔️ | ✔️ | ✔️ |
40 changes: 40 additions & 0 deletions content/docs/application-mobility/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: "Application Mobility"
linkTitle: "Application Mobility"
weight: 9
Description: >
Application Mobility
---

>> NOTE: This tech-preview release is not intended for use in production environment.
>> NOTE: Application Mobility requires a time-based license. See [Deployment](./deployment) for instructions.
Container Storage Modules for Application Mobility provide Kubernetes administrators the ability to clone their stateful application workloads and application data to other clusters, either on-premise or in the cloud.

Application Mobility uses [Velero](https://velero.io) and its integration of [Restic](https://restic.net) to copy both application metadata and data to object storage. When a backup is requested, Application Mobility uses these options to determine how the application data is backed up:
- If [Volume Group Snapshots](../snapshots/volume-group-snapshots/) are enabled on the CSI driver backing the application's Persistent Volumes, crash consistent snapshots of all volumes are used for the backup.
- If [Volume Snapshots](../snapshots/) are enabled on the Kubernetes cluster and supported by the CSI driver, individual snapshots are used for each Persistent Volume used by the application.
- If no snapshot options are enabled, default to using full copies of each Persistent Volume used by the application.

After a backup has been created, it can be restored on the same Kubernetes cluster or any other cluster(s) if this criteria is met:
- Application Mobility is installed on the target cluster(s).
- The target cluster(s) has access to the object store bucket. For example, if backing up and restoring an application from an on-premise Kubernetes cluster to AWS EKS, an S3 bucket can be used if both the on-premise and EKS cluster have access to it.
- Storage Class is defined on the target cluster(s) to support creating the required Persistent Volumes used by the application.

## Supported Data Movers
{{<table "table table-striped table-bordered table-sm">}}
| Data Mover | Description |
|-|-|
| Restic | Persistent Volume data will be stored in the provided object store bucket |
{{</table>}}

## Supported Operating Systems/Container Orchestrator Platforms
{{<table "table table-striped table-bordered table-sm">}}
| COP/OS | Supported Versions |
|-|-|
| Kubernetes | 1.23, 1.24 |
| Red Hat OpenShift | 4.10 |
| RHEL | 7.x, 8.x |
| CentOS | 7.8, 7.9 |
{{</table>}}
62 changes: 62 additions & 0 deletions content/docs/application-mobility/deployment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
---
title: "Deployment"
linkTitle: "Deployment"
weight: 1
Description: >
Deployment
---

## Pre-requisites
- [Request a License for Application Mobility](../../license/)
- Object store bucket accessible by both the source and target clusters

## Installation
1. Create a namespace where Application Mobility will be installed.
```
kubectl create ns application-mobility
```
1. Edit the license Secret file (see Pre-requisites above) and set the correct namespace (ex: `namespace: application-mobility`)
1. Create the Secret containing a license file
```
kubectl apply -f license.yml
```
1. Add the Dell Helm Charts repository
```
helm repo add dell https://dell.github.io/helm-charts
```
1. Either create a values.yml file or provide the `--set` options to the `helm install` to override default values from the [Configuration](#configuration) section.
1. Install the helm chart
```
helm install application-mobility -n application-mobility dell/csm-application-mobility
```
### Configuration
This table lists the configurable parameters of the Application Mobility Helm chart and their default values.
| Parameter | Description | Required | Default |
| - | - | - | - |
| `replicaCount` | Number of replicas for the Application Mobility controllers | Yes | `1` |
| `image.pullPolicy` | Image pull policy for the Application Mobility controller images | Yes | `IfNotPresent` |
| `controller.image` | Location of the Application Mobility Docker image | Yes | `dell/csm-application-mobility-controller:v0.1.0` |
| `cert-manager.enabled` | If set to true, cert-manager will be installed during Application Mobility installation | Yes | `false` |
| `veleroNamespace` | If Velero is already installed, set to the namespace where Velero is installed | No | `velero` |
| `licenseName` | Name of the Secret that contains the License for Application Mobility | Yes | `license` |
| `objectstore.secretName` | If velero is already installed on the cluster, specify the name of the secret in velero namespace that has credentials to access object store | No | ` ` |
| `velero.enabled` | If set to true, Velero will be installed during Application Mobility installation | Yes | `true` |
| `velero.use-volume-snapshots` | If set to true, Velero will use volume snapshots | Yes | `false` |
| `velero.deployRestic` | If set to true, Velero will also deploy Restic | Yes | `true` |
| `velero.cleanUpCRDs` | If set to true, Velero CRDs will be cleaned up | Yes | `true` |
| `velero.credentials.existingSecret` | Optionally, specify the name of the pre-created secret in the release namespace that holds the object store credentials. Either this or secretContents should be specified | No | ` ` |
| `velero.credentials.name` | Optionally, specify the name to be used for secret that will be created to hold object store credentials. Used in conjunction with secretContents. | No | ` ` |
| `velero.credentials.secretContents` | Optionally, specify the object store access credentials to be stored in a secret with key "cloud". Either this or existingSecret should be provided. | No | ` ` |
| `velero.configuration.provider` | Provider to use for Velero. | Yes | `aws` |
| `velero.configuration.backupStorageLocation.name` | Name of the backup storage location for Velero. | Yes | `default` |
| `velero.configuration.backupStorageLocation.bucket` | Name of the object store bucket to use for backups. | Yes | `velero-bucket` |
| `velero.configuration.backupStorageLocation.config` | Additional provider-specific configuration. See https://velero.io/docs/v1.9/api-types/backupstoragelocation/ for specific details. | Yes | ` ` |
| `velero.initContainers` | List of plugins used by Velero. Dell Velero plugin is required and plugins for other providers can be added. | Yes | ` ` |
| `velero.initContainers[0].name` | Name of the Dell Velero plugin. | Yes | `dell-custom-velero-plugin` |
| `velero.initContainers[0].image` | Location of the Dell Velero plugin image. | Yes | `dellemc/csm-application-mobility-velero-plugin:v0.1.0` |
| `velero.initContainers[0].volumeMounts[0].mountPath` | Mount path of the volume mount. | Yes | `/target` |
| `velero.initContainers[0].volumeMounts[0].name` | Name of the volume mount. | Yes | `plugins` |
48 changes: 48 additions & 0 deletions content/docs/application-mobility/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: "Troubleshooting"
linkTitle: "Troubleshooting"
weight: 4
Description: >
Troubleshooting
---

## Frequently Asked Questions
1. [How can I diagnose an issue with Application Mobility?](#how-can-i-diagnose-an-issue-with-application-mobility)
2. [How can I view logs?](#how-can-i-view-logs)
3. [How can I debug and troubleshoot issues with Kubernetes?](#how-can-i-debug-and-troubleshoot-issues-with-kubernetes)
4. [Why are there error logs about a license?](#why-are-there-error-logs-about-a-license)

### How can I diagnose an issue with Application Mobility?

Once you have attempted to install Application Mobility to your Kubernetes or OpenShift cluster, the first step in troubleshooting is locating the problem.

Get information on the state of your Pods.
```console
kubectl get pods -n $namespace
```
Get verbose output of the current state of a Pod.
```console
kubectl describe pod -n $namespace $pod
```
### How can I view logs?

View pod container logs. Output logs to a file for further debugging.
```console
kubectl logs -n $namespace $pod $container
kubectl logs -n $namespace $pod $container > $logFileName
```

### How can I debug and troubleshoot issues with Kubernetes?

* To debug your application that may not be behaving correctly, please reference Kubernetes [troubleshooting applications guide](https://kubernetes.io/docs/tasks/debug-application-cluster/debug-application/).

* For tips on debugging your cluster, please see this [troubleshooting guide](https://kubernetes.io/docs/tasks/debug-application-cluster/debug-cluster/).

### Why are there error logs about a license?

Application Mobility requires a license in order to function. See the [Deployment](../deployment) instructions for steps to request a license.

There will be errors in the logs about the license for these cases:
- License does not exist
- License is not valid for the current Kubernetes cluster
- License has expired
17 changes: 17 additions & 0 deletions content/docs/application-mobility/uninstallation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Uninstallation
linktitle: Uninstallation
weight: 2
description: >
Uninstallation
---

This section outlines the uninstallation steps for Application Mobility.

## Uninstall the Application Mobility Helm Chart

This command removes all the Kubernetes components associated with the chart.

```
$ helm delete [APPLICATION_MOBILITY_NAME] --namespace [APPLICATION_MOBILITY_NAMESPACE]
```
72 changes: 72 additions & 0 deletions content/docs/application-mobility/use_cases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
title: "Use Cases"
linkTitle: "Use Cases"
weight: 3
Description: >
Use Cases
---

After Application Mobility is installed, the [dellctl CLI](../../cli/) can be used to register clusters and manage backups and restores of applications.

## Backup and Restore an Application
This example details the steps when an application in namespace `demo1` is being backed up and then later restored to either the same cluster or another cluster. In this sample, both Application Mobility and Velero are installed in the `application-mobility` namespace.

1. If Velero is not installed in the default `velero` namespace, set this environment variable to the namespace where it is installed:
```
export VELERO_NAMESPACE=application-mobility
```
1. On the source cluster, create a Backup by providing a name and the included namespace where the application is installed. The application and its data will be available in the object store bucket and can be restored at a later time.
```
dellctl backup create backup1 --include-namespaces demo1 --namespace application-mobility
```
1. Monitor the backup status until it is marked as Completed.
```
dellctl backup get --namespace application-mobility
```
1. If the Storage Class name on the target cluster is different than the Storage Class name on the source cluster where the backup was created, a mapping between source and target Storage Class names must be defined. See [Changing PV/PVC Storage Classes](#changing-pvpvc-storage-classes).
1. The application and its data can be restored on either the same cluster or another cluster by referring to the backup name and providing an optional mapping of the original namespace to the target namespace.
```
dellctl restore create restore1 --from-backup backup1 \
--namespace-mappings "demo1:restorens1" --namespace application-mobility
```
1. Monitor the restore status until it is marked as Completed.
```
dellctl restore get --namespace application-mobility
```
## Clone an Application
This example details the steps when an application in namespace `demo1` is cloned from a source cluster to a target cluster in a single operation. In this sample, both Application Mobility and Velero are installed in the `application-mobility` namespace.
1. If Velero is not installed in the default `velero` namespace, set this environment variable to the namespace where it is installed:
```
export VELERO_NAMESPACE=application-mobility
```
1. Register the target cluster
```
dellctl cluster add -n targetcluster -f ~/kubeconfigs/target-cluster-kubeconfig
```
1. If the Storage Class name on the target cluster is different than the Storage Class name on the source cluster where the backup was created, a mapping between source and target Storage Class names must be defined. See [Changing PV/PVC Storage Classes](#changing-pvpvc-storage-classes).
1. Create a Backup by providing a name, the included namespace where the application is installed, and the target cluster and namespace mapping where the application will be restored.
```
dellctl backup create backup1 --include-namespaces demo1 --clones "targetcluster/demo1:restore-ns2" \
--namespace application-mobility
```
1. Monitor the restore status on the target cluster until it is marked as Completed.
```
dellctl restore get --cluster-id targetcluster --namespace application-mobility
```
## Changing PV/PVC Storage Classes
Create a ConfigMap on the target cluster in the same namespace where Application Mobility is installed. The data field must contain a mapping of source Storage Class name to target Storage Class name. See Velero's documentation for [Changing PV/PVC Storage Classes](https://velero.io/docs/v1.9/restore-reference/#changing-pvpvc-storage-classes) for additional details.
```
apiVersion: v1
kind: ConfigMap
metadata:
name: change-storage-class-config
namespace: <application-mobility-namespace>
labels:
velero.io/plugin-config: ""
velero.io/change-storage-class: RestoreItemAction
data:
<source-storage-class-name>: <target-storage-class-name>
```

0 comments on commit a432f13

Please sign in to comment.