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
- Create the following environment variables, substituting appropriate values for your environment:
Prepare Azure Account
- Create an Azure Storage Account as a backup target:
- Create an Azure Blob storage container:
- Create a role definition that will allow the operator minimal permissions to access the storage account where the backups are stored:
- Create a service principal for interacting with the Azure API, being sure to
take note of the
appIDandpasswordfrom the output. In this command, we will store these asAZR_CLIENT_IDandAZR_CLIENT_SECRETand 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:
- 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:
- Assign permissions on the storage account for the service principal using the permissions from the previously created role:
Deploy OADP on ARO Cluster
- Create a namespace for OADP:
- Deploy OADP Operator:
- Wait for the operator to be ready:
- Create a file containing all of the environment variables needed. These are stored in
the
cloudkey of the secret created in the next step and is required by the operator to locate configuration information:
- 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-veleroonce 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.
- Deploy a Data Protection Application:
Perform a Backup
- Create a workload to backup:
- Expose the route:
- Make a request to see if the application is working:
If the application is working, you should see a response such as:
- Backup workload:
- Wait until backup is done:
NOTE backup is done when
phaseisCompletedlike below:
- Delete the demo workload:
- Restore from the backup:
- Wait for the restore to finish:
NOTE restore is done when
phaseisCompletedlike below:
- Ensure that workload is restored:
You should see:
If the application is working, you should see a response such as:
For troubleshooting tips please refer to the OADP team’s troubleshooting documentation
Additional sample applications can be found in the OADP team’s sample applications directory
Cleanup
IMPORTANT this is only necessary if you do not need to keep any of your work
Cleanup Cluster Resources
- Delete the workload:
- Delete the Data Protection Application:
- Remove the operator if it is no longer required:
- Remove the namespace for the operator:
- 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:
- Remove the Custom Resource Definitions from the cluster if you no longer wish to have them:
Cleanup Azure Resources
- Delete the Azure Storage Account:
- Delete the IAM Role:
- Delete the Service Principal: