OpenShift Container Storage is now OpenShift Data Foundation starting with version 4.9.
Chapter 6. Mirroring data for hybrid and Multicloud buckets
The Multicloud Object Gateway (MCG) simplifies the process of spanning data across cloud provider and clusters.
Prerequisites
- You must first add a backing storage that can be used by the MCG, see Chapter 4, Adding storage resources for hybrid or Multicloud.
Then you create a bucket class that reflects the data management policy, mirroring.
Procedure
You can set up mirroring data in three ways:
6.1. Creating bucket classes to mirror data using the MCG command-line-interface
From the Multicloud Object Gateway (MCG) command-line interface, run the following command to create a bucket class with a mirroring policy:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow noobaa bucketclass create placement-bucketclass mirror-to-aws --backingstores=azure-resource,aws-resource --placement Mirror
$ noobaa bucketclass create placement-bucketclass mirror-to-aws --backingstores=azure-resource,aws-resource --placement Mirror
Set the newly created bucket class to a new bucket claim, generating a new bucket that will be mirrored between two locations:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow noobaa obc create mirrored-bucket --bucketclass=mirror-to-aws
$ noobaa obc create mirrored-bucket --bucketclass=mirror-to-aws
6.2. Creating bucket classes to mirror data using a YAML
Apply the following YAML. This YAML is a hybrid example that mirrors data between local Ceph storage and AWS:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow apiVersion: noobaa.io/v1alpha1 kind: BucketClass metadata: labels: app: noobaa name: <bucket-class-name> namespace: openshift-storage spec: placementPolicy: tiers: - backingStores: - <backing-store-1> - <backing-store-2> placement: Mirror
apiVersion: noobaa.io/v1alpha1 kind: BucketClass metadata: labels: app: noobaa name: <bucket-class-name> namespace: openshift-storage spec: placementPolicy: tiers: - backingStores: - <backing-store-1> - <backing-store-2> placement: Mirror
Add the following lines to your standard Object Bucket Claim (OBC):
Copy to Clipboard Copied! Toggle word wrap Toggle overflow additionalConfig: bucketclass: mirror-to-aws
additionalConfig: bucketclass: mirror-to-aws
For more information about OBCs, see Chapter 9, Object Bucket Claim.
6.3. Configuring buckets to mirror data using the user interface
-
In the OpenShift Web Console, click Storage
OpenShift Data Foundation. - In the Status card, click Storage System and click the storage system link from the pop up that appears.
- In the Object tab, click the Multicloud Object Gateway link.
On the NooBaa page, click the buckets icon on the left side. You can see a list of your buckets:
- Click the bucket you want to update.
Click Edit Tier 1 Resources:
Select Mirror and check the relevant resources you want to use for this bucket. In the following example, the data between
noobaa-default-backing-store
which is on RGW andAWS-backingstore
which is on AWS is mirrored:- Click Save.
Resources created in NooBaa UI cannot be used by OpenShift UI or Multicloud Object Gateway (MCG) CLI.