|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * rosa_backing_up_and_restoring_applications/backing-up-applications.adoc |
| 4 | + |
| 5 | +:_content-type: PROCEDURE |
| 6 | +[id="oadp-installing-oadp-rosa-sts_{context}"] |
| 7 | += Installing OADP on {product-title} with AWS STS |
| 8 | + |
| 9 | +AWS Security Token Service (AWS STS) is a global web service that provides short-term credentials for IAM or federated users. {product-title} (ROSA) with STS is the recommended credential mode for ROSA clusters. This document describes how to install OpenShift API for Data Protection (OADP) on (ROSA) with AWS STS. |
| 10 | + |
| 11 | +[IMPORTANT] |
| 12 | +==== |
| 13 | +Restic is not supported in the OADP on ROSA with AWS STS environment. Ensure the Restic service is disabled. Use native snapshots to backup volumes. See _Known Issues_ for more information. |
| 14 | +==== |
| 15 | + |
| 16 | +.Prerequisites |
| 17 | + |
| 18 | +* A ROSA OpenShift Cluster with the required access and tokens. |
| 19 | +* link:https://docs.openshift.com/container-platform/4.12/backup_and_restore/application_backup_and_restore/installing/installing-oadp-aws.html#oadp-creating-default-secret_installing-oadp-aws[A default Secret], if your backup and snapshot locations use the same credentials, or if you do not require a snapshot location. |
| 20 | +
|
| 21 | +.Procedure |
| 22 | + |
| 23 | +. Create an Openshift secret from your AWS token file by entering the following commands: |
| 24 | + |
| 25 | +.. Create the credentials file: |
| 26 | ++ |
| 27 | +[source, terminal] |
| 28 | +---- |
| 29 | +$ cat <<EOF > ${SCRATCH}/credentials |
| 30 | +[default] |
| 31 | +role_arn = ${ROLE_ARN} |
| 32 | +web_identity_token_file = /var/run/secrets/openshift/serviceaccount/token |
| 33 | +EOF |
| 34 | +---- |
| 35 | + |
| 36 | +.. Create the OpenShift secret: |
| 37 | ++ |
| 38 | +[source, terminal] |
| 39 | +---- |
| 40 | +$ oc -n openshift-adp create secret generic cloud-credentials \ |
| 41 | + --from-file=${SCRATCH}/credentials |
| 42 | +---- |
| 43 | + |
| 44 | +. Install the OADP Operator. |
| 45 | +.. In the {product-title} web console, navigate to Operators *->* OperatorHub. |
| 46 | +.. Search for the OADP Operator, then click *Install*. |
| 47 | + |
| 48 | +. Create AWS cloud storage using your AWS credentials: |
| 49 | ++ |
| 50 | +[source,terminal] |
| 51 | +---- |
| 52 | +$ cat << EOF | oc create -f - |
| 53 | +apiVersion: oadp.openshift.io/v1alpha1 |
| 54 | +kind: CloudStorage |
| 55 | +metadata: |
| 56 | + name: ${CLUSTER_NAME}-oadp |
| 57 | + namespace: openshift-adp |
| 58 | +spec: |
| 59 | + creationSecret: |
| 60 | + key: credentials |
| 61 | + name: cloud-credentials |
| 62 | + enableSharedConfig: true |
| 63 | + name: ${CLUSTER_NAME}-oadp |
| 64 | + provider: aws |
| 65 | + region: $REGION |
| 66 | +EOF |
| 67 | +---- |
| 68 | + |
| 69 | +. Create the `DataProtectionApplication resource`, which is used to configure the connection to the storage where the backups and volume snapshots will be stored: |
| 70 | ++ |
| 71 | +[source,terminal] |
| 72 | +---- |
| 73 | +$ cat << EOF | oc create -f - |
| 74 | +apiVersion: oadp.openshift.io/v1alpha1 |
| 75 | +kind: DataProtectionApplication |
| 76 | +metadata: |
| 77 | + name: ${CLUSTER_NAME}-dpa |
| 78 | + namespace: openshift-adp |
| 79 | +spec: |
| 80 | + backupLocations: |
| 81 | + - bucket: |
| 82 | + cloudStorageRef: |
| 83 | + name: ${CLUSTER_NAME}-oadp |
| 84 | + credential: |
| 85 | + key: credentials |
| 86 | + name: cloud-credentials |
| 87 | + default: true |
| 88 | + configuration: |
| 89 | + velero: |
| 90 | + defaultPlugins: |
| 91 | + - openshift |
| 92 | + - aws |
| 93 | + restic: |
| 94 | + enable: false |
| 95 | + volumeSnapshots: |
| 96 | + - velero: |
| 97 | + config: |
| 98 | + credentialsFile: /tmp/credentials/openshift-adp/cloud-credentials-credentials |
| 99 | + enableSharedConfig: "true" |
| 100 | + region: ${REGION} |
| 101 | + provider: aws |
| 102 | +EOF |
| 103 | +---- |
| 104 | ++ |
| 105 | +[NOTE] |
| 106 | +==== |
| 107 | +The `enable` parameter of `restic` is set to `false` in this configuration because OADP does not support Restic in ROSA environments. |
| 108 | +==== |
| 109 | ++ |
| 110 | +You are now ready to backup and restore OpenShift applications, as described in the link:https://docs.openshift.com/container-platform/4.11/backup_and_restore/application_backup_and_restore/backing_up_and_restoring/backing-up-applications.html[OADP documentation]. |
| 111 | + |
| 112 | +== Known Issues |
| 113 | +.Restic is not supported or recommended |
| 114 | + |
| 115 | +* link:https://issues.redhat.com/browse/OADP-1054[CloudStorage: openshift-adp-controller-manager crashloop seg fault with Restic enabled] |
| 116 | +* link:https://issues.redhat.com/browse/OADP-1057[Cloudstorage API: CSI Backup of an app with internal images partially fails with plugin panicked error] |
| 117 | +* (Affects OADP 1.1.x_ only): link:https://issues.redhat.com/browse/OADP-1055[CloudStorage: bucket is removed on CS CR delete, although it doesn't have "oadp.openshift.io/cloudstorage-delete": "true"] |
| 118 | + |
| 119 | +[role="_additional-resources"] |
| 120 | +.Additional resources |
| 121 | + |
| 122 | +* link:https://docs.openshift.com/rosa/rosa_architecture/rosa-understanding.html[Understanding ROSA with STS] |
| 123 | +* link:https://docs.openshift.com/rosa/rosa_getting_started/rosa-sts-getting-started-workflow.html[Getting started with ROSA STS] |
| 124 | +* link:https://docs.openshift.com/rosa/rosa_install_access_delete_clusters/rosa-sts-creating-a-cluster-quickly.html[Creating a ROSA cluster with STS] |
| 125 | +* link:https://docs.openshift.com/container-platform/4.12/backup_and_restore/application_backup_and_restore/installing/about-installing-oadp.html[About installing OADP] |
| 126 | +* link:https://docs.openshift.com/container-platform/4.12/storage/container_storage_interface/persistent-storage-csi.html[Configuring CSI volumes] |
| 127 | +* link:https://docs.openshift.com/rosa/rosa_architecture/rosa_policy_service_definition/rosa-service-definition.html#rosa-sdpolicy-storage_rosa-service-definition[ROSA storage options] |
0 commit comments