1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/oadp-installing-dpa.adoc
2023-10-30 10:13:25 -04:00

367 lines
17 KiB
Plaintext

// Module included in the following assemblies:
//
// * backup_and_restore/application_backup_and_restore/installing/installing-oadp-aws.adoc
// * backup_and_restore/application_backup_and_restore/installing/installing-oadp-azure.adoc
// * backup_and_restore/application_backup_and_restore/installing/installing-oadp-gcp.adoc
// * backup_and_restore/application_backup_and_restore/installing/installing-oadp-mcg.adoc
// * backup_and_restore/application_backup_and_restore/installing/installing-oadp-ocs.adoc
:_mod-docs-content-type: PROCEDURE
[id="oadp-installing-dpa_{context}"]
= Installing the Data Protection Application
You install the Data Protection Application (DPA) by creating an instance of the `DataProtectionApplication` API.
.Prerequisites
* You must install the OADP Operator.
* You must configure object storage as a backup location.
* If you use snapshots to back up PVs, your cloud provider must support either a native snapshot API or Container Storage Interface (CSI) snapshots.
* If the backup and snapshot locations use the same credentials, you must create a `Secret` with the default name, `{credentials}`.
ifdef::installing-oadp-azure,installing-oadp-gcp,installing-oadp-mcg,installing-oadp-ocs,virt-installing-configuring-oadp[]
* If the backup and snapshot locations use different credentials, you must create two `Secrets`:
** `Secret` with a custom name for the backup location. You add this `Secret` to the `DataProtectionApplication` CR.
** `Secret` with the default name, `{credentials}`, for the snapshot location. This `Secret` is not referenced in the `DataProtectionApplication` CR.
endif::[]
ifdef::installing-oadp-aws[]
* If the backup and snapshot locations use different credentials, you must create a `Secret` with the default name, `{credentials}`, which contains separate profiles for the backup and snapshot location credentials.
endif::[]
+
[NOTE]
====
If you do not want to specify backup or snapshot locations during the installation, you can create a default `Secret` with an empty `credentials-velero` file. If there is no default `Secret`, the installation will fail.
====
.Procedure
. Click *Operators* -> *Installed Operators* and select the OADP Operator.
. Under *Provided APIs*, click *Create instance* in the *DataProtectionApplication* box.
. Click *YAML View* and update the parameters of the `DataProtectionApplication` manifest:
ifdef::installing-oadp-aws[]
+
[source,yaml,subs="attributes+"]
----
apiVersion: oadp.openshift.io/v1alpha1
kind: DataProtectionApplication
metadata:
name: <dpa_sample>
namespace: openshift-adp
spec:
configuration:
velero:
defaultPlugins:
- openshift <1>
- aws
resourceTimeout: 10m <2>
restic:
enable: true <3>
podConfig:
nodeSelector: <node_selector> <4>
backupLocations:
- name: default
velero:
provider: {provider}
default: true
objectStorage:
bucket: <bucket_name> <5>
prefix: <prefix> <6>
config:
region: <region>
profile: "default"
credential:
key: cloud
name: {credentials} <7>
snapshotLocations: <8>
- name: default
velero:
provider: {provider}
config:
region: <region> <9>
profile: "default"
----
<1> The `openshift` plugin is mandatory.
<2> Specify how many minutes to wait for several Velero resources before timeout occurs, such as Velero CRD availability, volumeSnapshot deletion, and backup repository availability. The default is 10m.
<3> Set this value to `false` if you want to disable the Restic installation. Restic deploys a daemon set, which means that Restic pods run on each working node. In OADP version 1.2 and later, you can configure Restic for backups by adding `spec.defaultVolumesToFsBackup: true` to the `Backup` CR. In OADP version 1.1, add `spec.defaultVolumesToRestic: true` to the `Backup` CR.
<4> Specify on which nodes Restic is available. By default, Restic runs on all nodes.
<5> Specify a bucket as the backup storage location. If the bucket is not a dedicated bucket for Velero backups, you must specify a prefix.
<6> Specify a prefix for Velero backups, for example, `velero`, if the bucket is used for multiple purposes.
<7> Specify the name of the `Secret` object that you created. If you do not specify this value, the default name, `{credentials}`, is used. If you specify a custom name, the custom name is used for the backup location.
<8> Specify a snapshot location, unless you use CSI snapshots or Restic to back up PVs.
<9> The snapshot location must be in the same region as the PVs.
endif::[]
ifdef::installing-oadp-azure[]
+
[source,yaml,subs="attributes+"]
----
apiVersion: oadp.openshift.io/v1alpha1
kind: DataProtectionApplication
metadata:
name: <dpa_sample>
namespace: openshift-adp
spec:
configuration:
velero:
defaultPlugins:
- azure
- openshift <1>
resourceTimeout: 10m <2>
restic:
enable: true <3>
podConfig:
nodeSelector: <node_selector> <4>
backupLocations:
- velero:
config:
resourceGroup: <azure_resource_group> <5>
storageAccount: <azure_storage_account_id> <6>
subscriptionId: <azure_subscription_id> <7>
storageAccountKeyEnvVar: AZURE_STORAGE_ACCOUNT_ACCESS_KEY
credential:
key: cloud
name: {credentials} <8>
provider: {provider}
default: true
objectStorage:
bucket: <bucket_name> <9>
prefix: <prefix> <10>
snapshotLocations: <11>
- velero:
config:
resourceGroup: <azure_resource_group>
subscriptionId: <azure_subscription_id>
incremental: "true"
name: default
provider: {provider}
----
<1> The `openshift` plugin is mandatory.
<2> Specify how many minutes to wait for several Velero resources before timeout occurs, such as Velero CRD availability, volumeSnapshot deletion, and backup repository availability. The default is 10m.
<3> Set this value to `false` if you want to disable the Restic installation. Restic deploys a daemon set, which means that Restic pods run on each working node. In OADP version 1.2 and later, you can configure Restic for backups by adding `spec.defaultVolumesToFsBackup: true` to the `Backup` CR. In OADP version 1.1, add `spec.defaultVolumesToRestic: true` to the `Backup` CR.
<4> Specify on which nodes Restic is available. By default, Restic runs on all nodes.
<5> Specify the Azure resource group.
<6> Specify the Azure storage account ID.
<7> Specify the Azure subscription ID.
<8> If you do not specify this value, the default name, `{credentials}`, is used. If you specify a custom name, the custom name is used for the backup location.
<9> Specify a bucket as the backup storage location. If the bucket is not a dedicated bucket for Velero backups, you must specify a prefix.
<10> Specify a prefix for Velero backups, for example, `velero`, if the bucket is used for multiple purposes.
<11> You do not need to specify a snapshot location if you use CSI snapshots or Restic to back up PVs.
endif::[]
ifdef::installing-oadp-gcp[]
+
[source,yaml,subs="attributes+"]
----
apiVersion: oadp.openshift.io/v1alpha1
kind: DataProtectionApplication
metadata:
name: <dpa_sample>
namespace: openshift-adp
spec:
configuration:
velero:
defaultPlugins:
- gcp
- openshift <1>
resourceTimeout: 10m <2>
restic:
enable: true <3>
podConfig:
nodeSelector: <node_selector> <4>
backupLocations:
- velero:
provider: {provider}
default: true
credential:
key: cloud
name: {credentials} <5>
objectStorage:
bucket: <bucket_name> <6>
prefix: <prefix> <7>
snapshotLocations: <8>
- velero:
provider: {provider}
default: true
config:
project: <project>
snapshotLocation: us-west1 <9>
----
<1> The `openshift` plugin is mandatory.
<2> Specify how many minutes to wait for several Velero resources before timeout occurs, such as Velero CRD availability, volumeSnapshot deletion, and backup repository availability. The default is 10m.
<3> Set this value to `false` if you want to disable the Restic installation. Restic deploys a daemon set, which means that Restic pods run on each working node. In OADP version 1.2 and later, you can configure Restic for backups by adding `spec.defaultVolumesToFsBackup: true` to the `Backup` CR. In OADP version 1.1, add `spec.defaultVolumesToRestic: true` to the `Backup` CR.
<4> Specify on which nodes Restic is available. By default, Restic runs on all nodes.
<5> If you do not specify this value, the default name, `{credentials}`, is used. If you specify a custom name, the custom name is used for the backup location.
<6> Specify a bucket as the backup storage location. If the bucket is not a dedicated bucket for Velero backups, you must specify a prefix.
<7> Specify a prefix for Velero backups, for example, `velero`, if the bucket is used for multiple purposes.
<8> Specify a snapshot location, unless you use CSI snapshots or Restic to back up PVs.
<9> The snapshot location must be in the same region as the PVs.
endif::[]
ifdef::installing-oadp-mcg[]
+
[source,yaml,subs="attributes+"]
----
apiVersion: oadp.openshift.io/v1alpha1
kind: DataProtectionApplication
metadata:
name: <dpa_sample>
namespace: openshift-adp
spec:
configuration:
velero:
defaultPlugins:
- aws
- openshift <1>
resourceTimeout: 10m <2>
restic:
enable: true <3>
podConfig:
nodeSelector: <node_selector> <4>
backupLocations:
- velero:
config:
profile: "default"
region: minio
s3Url: <url> <5>
insecureSkipTLSVerify: "true"
s3ForcePathStyle: "true"
provider: {provider}
default: true
credential:
key: cloud
name: {credentials} <6>
objectStorage:
bucket: <bucket_name> <7>
prefix: <prefix> <8>
----
<1> The `openshift` plugin is mandatory.
<2> Specify how many minutes to wait for several Velero resources before timeout occurs, such as Velero CRD availability, volumeSnapshot deletion, and backup repository availability. The default is 10m.
<3> Set this value to `false` if you want to disable the Restic installation. Restic deploys a daemon set, which means that Restic pods run on each working node. In OADP version 1.2 and later, you can configure Restic for backups by adding `spec.defaultVolumesToFsBackup: true` to the `Backup` CR. In OADP version 1.1, add `spec.defaultVolumesToRestic: true` to the `Backup` CR.
<4> Specify on which nodes Restic is available. By default, Restic runs on all nodes.
<5> Specify the URL of the S3 endpoint.
<6> If you do not specify this value, the default name, `{credentials}`, is used. If you specify a custom name, the custom name is used for the backup location.
<7> Specify a bucket as the backup storage location. If the bucket is not a dedicated bucket for Velero backups, you must specify a prefix.
<8> Specify a prefix for Velero backups, for example, `velero`, if the bucket is used for multiple purposes.
endif::[]
ifdef::installing-oadp-ocs[]
+
[source,yaml,subs="attributes+"]
----
apiVersion: oadp.openshift.io/v1alpha1
kind: DataProtectionApplication
metadata:
name: <dpa_sample>
namespace: openshift-adp
spec:
configuration:
velero:
defaultPlugins:
- kubevirt <1>
- gcp <2>
- csi <3>
- openshift <4>
resourceTimeout: 10m <5>
restic:
enable: true <6>
podConfig:
nodeSelector: <node_selector> <7>
backupLocations:
- velero:
provider: {provider} <8>
default: true
credential:
key: cloud
name: <default_secret> <9>
objectStorage:
bucket: <bucket_name> <10>
prefix: <prefix> <11>
----
<1> Optional: The `kubevirt` plugin is used with {VirtProductName}.
<2> Specify the default plugin for the backup provider, for example, `gcp`, if appropriate.
<3> Specify the `csi` default plugin if you use CSI snapshots to back up PVs. The `csi` plugin uses the link:https://{velero-domain}/docs/main/csi/[Velero CSI beta snapshot APIs]. You do not need to configure a snapshot location.
<4> The `openshift` plugin is mandatory.
<5> Specify how many minutes to wait for several Velero resources before timeout occurs, such as Velero CRD availability, volumeSnapshot deletion, and backup repository availability. The default is 10m.
<6> Set this value to `false` if you want to disable the Restic installation. Restic deploys a daemon set, which means that Restic pods run on each working node. In OADP version 1.2 and later, you can configure Restic for backups by adding `spec.defaultVolumesToFsBackup: true` to the `Backup` CR. In OADP version 1.1, add `spec.defaultVolumesToRestic: true` to the `Backup` CR.
<7> Specify on which nodes Restic is available. By default, Restic runs on all nodes.
<8> Specify the backup provider.
<9> Specify the correct default name for the `Secret`, for example, `cloud-credentials-gcp`, if you use a default plugin for the backup provider. If specifying a custom name, then the custom name is used for the backup location. If you do not specify a `Secret` name, the default name is used.
<10> Specify a bucket as the backup storage location. If the bucket is not a dedicated bucket for Velero backups, you must specify a prefix.
<11> Specify a prefix for Velero backups, for example, `velero`, if the bucket is used for multiple purposes.
endif::[]
ifdef::virt-installing-configuring-oadp[]
+
[source,yaml,subs="attributes+"]
----
apiVersion: oadp.openshift.io/v1alpha1
kind: DataProtectionApplication
metadata:
name: <dpa_sample>
namespace: openshift-adp
spec:
configuration:
velero:
defaultPlugins:
- kubevirt <1>
- gcp <2>
- csi <3>
- openshift <4>
resourceTimeout: 10m <5>
restic:
enable: true <6>
podConfig:
nodeSelector: <node_selector> <7>
backupLocations:
- velero:
provider: {provider} <8>
default: true
credential:
key: cloud
name: <default_secret> <9>
objectStorage:
bucket: <bucket_name> <10>
prefix: <prefix> <11>
----
<1> The `kubevirt` plugin is mandatory for {VirtProductName}.
<2> Specify the plugin for the backup provider, for example, `gcp`, if it exists.
<3> The `csi` plugin is mandatory for backing up PVs with CSI snapshots. The `csi` plugin uses the link:https://{velero-domain}/docs/main/csi/[Velero CSI beta snapshot APIs]. You do not need to configure a snapshot location.
<4> The `openshift` plugin is mandatory.
<5> Specify how many minutes to wait for several Velero resources before timeout occurs, such as Velero CRD availability, volumeSnapshot deletion, and backup repository availability. The default is 10m.
<6> Set this value to `false` if you want to disable the Restic installation. Restic deploys a daemon set, which means that Restic pods run on each working node. In OADP version 1.2 and later, you can configure Restic for backups by adding `spec.defaultVolumesToFsBackup: true` to the `Backup` CR. In OADP version 1.1, add `spec.defaultVolumesToRestic: true` to the `Backup` CR.
<7> Specify on which nodes Restic is available. By default, Restic runs on all nodes.
<8> Specify the backup provider.
<9> Specify the correct default name for the `Secret`, for example, `cloud-credentials-gcp`, if you use a default plugin for the backup provider. If specifying a custom name, then the custom name is used for the backup location. If you do not specify a `Secret` name, the default name is used.
<10> Specify a bucket as the backup storage location. If the bucket is not a dedicated bucket for Velero backups, you must specify a prefix.
<11> Specify a prefix for Velero backups, for example, `velero`, if the bucket is used for multiple purposes.
endif::[]
. Click *Create*.
. Verify the installation by viewing the OADP resources:
+
[source,terminal]
----
$ oc get all -n openshift-adp
----
+
.Example output
+
----
NAME READY STATUS RESTARTS AGE
pod/oadp-operator-controller-manager-67d9494d47-6l8z8 2/2 Running 0 2m8s
pod/restic-9cq4q 1/1 Running 0 94s
pod/restic-m4lts 1/1 Running 0 94s
pod/restic-pv4kr 1/1 Running 0 95s
pod/velero-588db7f655-n842v 1/1 Running 0 95s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/oadp-operator-controller-manager-metrics-service ClusterIP 172.30.70.140 <none> 8443/TCP 2m8s
NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE
daemonset.apps/restic 3 3 3 3 3 <none> 96s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/oadp-operator-controller-manager 1/1 1 1 2m9s
deployment.apps/velero 1/1 1 1 96s
NAME DESIRED CURRENT READY AGE
replicaset.apps/oadp-operator-controller-manager-67d9494d47 1 1 1 2m9s
replicaset.apps/velero-588db7f655 1 1 1 96s
----