Cloud Experts Documentation

Deploying OpenShift API for Data Protection on an ARO cluster

This content is authored by Red Hat experts, but has not yet been tested on every supported configuration.

Prerequisites

Getting Started

  1. Create the following environment variables, substituting appropriate values for your environment:

Prepare Azure Account

  1. Create an Azure Storage Account as a backup target:
  1. Create an Azure Blob storage container:
  1. Create a role definition that will allow the operator minimal permissions to access the storage account where the backups are stored:
  1. Create a service principal for interacting with the Azure API, being sure to take note of the appID and password from the output. In this command, we will store these as AZR_CLIENT_ID and AZR_CLIENT_SECRET and use them in a subsequent command:

IMPORTANT be sure to store the client id and client secret for your service principal, as they will be needed later in this walkthrough. You will see the below output from the above command:

Set the following variables:

  1. Retrieve the object ID for the service principal you just created. This is used to assign permissions for this service principal using the previously created role:
  1. Assign permissions on the storage account for the service principal using the permissions from the previously created role:

Deploy OADP on ARO Cluster

  1. Create a namespace for OADP:
  1. Deploy OADP Operator:
  1. Wait for the operator to be ready:
  1. Create a file containing all of the environment variables needed. These are stored in the cloud key of the secret created in the next step and is required by the operator to locate configuration information:
  1. Create the secret that the operator will use to access the storage account. This is created from the secret file you created in the previous step:

WARNING be sure to delete the file at /tmp/credentials-velero once you are comfortable with the configuration and setup of the operator and have it working to avoid exposing sensitive credentials to anyone who may be sharing the system you are running these commands from.

  1. Deploy a Data Protection Application:

Perform a Backup

  1. Create a workload to backup:
  1. Expose the route:
  1. Make a request to see if the application is working:

If the application is working, you should see a response such as:

  1. Backup workload:
  1. Wait until backup is done:

NOTE backup is done when phase is Completed like below:

  1. Delete the demo workload:
  1. Restore from the backup:
  1. Wait for the restore to finish:

NOTE restore is done when phase is Completed like below:

  1. Ensure that workload is restored:

You should see:

If the application is working, you should see a response such as:

Cleanup

IMPORTANT this is only necessary if you do not need to keep any of your work

Cleanup Cluster Resources

  1. Delete the workload:
  1. Delete the Data Protection Application:
  1. Remove the operator if it is no longer required:
  1. Remove the namespace for the operator:
  1. Remove the backup and restore resources from the cluster if they are no longer required:

To delete the backup/restore and remote objects in Azure Blob storage:

  1. Remove the Custom Resource Definitions from the cluster if you no longer wish to have them:

Cleanup Azure Resources

  1. Delete the Azure Storage Account:
  1. Delete the IAM Role:
  1. Delete the Service Principal:

Interested in contributing to these docs?

Collaboration drives progress. Help improve our documentation The Red Hat Way.

Red Hat logo LinkedIn YouTube Facebook Twitter

Products

Tools

Try, buy & sell

Communicate

About Red Hat

We’re the world’s leading provider of enterprise open source solutions—including Linux, cloud, container, and Kubernetes. We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Subscribe to our newsletter, Red Hat Shares

Sign up now
© 2023 Red Hat, Inc.