Creating a GCP-backed backingstore
Create a GCP-backed backing store using the MCG command-line interface or a YAML file to add storage resources.
Before you begin, ensure the following:
- Fusion Data Foundation Platform is running.
- Download the MCG command-line interface for easier
management.
subscription-manager repos --enable=rh-odf-4-for-rhel-8-x86_64-rpms
yum install mcg
Note: Specify the appropriate architecture for enabling the repositories using the subscription manager. In case of IBM Z infrastructure, use the following command:subscription-manager repos --enable=rh-odf-4-for-rhel-8-s390x-rpms
-
Alternatively, you can install the MCG package from the RPMs found at Download Red Hat OpenShift Data Foundation page.
Note: Choose the correct Product Variant according to your architecture.
Create a GCP-backed backingstore using MCG command-line interface
From the MCG command-line interface, run the following command:
noobaa backingstore create google-cloud-storage <backingstore_name> --private-key-json-file=<PATH TO GCP PRIVATE KEY JSON FILE> --target-bucket <GCP bucket name>
- backingstore_name
-
Name of the backingstore.
- GCP bucket name
- An existing GCP object storage bucket name. This argument tells the MCG which bucket to use as a
target bucket for its backing store, and subsequently, data storage and administration.The output will be similar to the following:
INFO[0001] ✅ Exists: NooBaa "noobaa" INFO[0002] ✅ Created: BackingStore "google-gcp" INFO[0002] ✅ Created: Secret "backing-store-google-cloud-storage-gcp"
Create a GCP-backed backingstore using a YAML file
- Create a secret with the credentials:
apiVersion: v1 kind: Secret metadata: name: <backingstore-secret-name> type: Opaque data: GoogleServiceAccountPrivateKeyJson: <GCP PRIVATE KEY ENCODED IN BASE64>
- GCP PRIVATE KEY ENCODED IN BASE64
- Provide and encode your own GCP service account private key using Base64, and use the results for this attribute.
- backingstore-secret-name
- A unique name of the backingstore secret.
- Apply the following YAML for a specific backing store:
apiVersion: noobaa.io/v1alpha1 kind: BackingStore metadata: finalizers: - noobaa.io/finalizer labels: app: noobaa name: bs namespace: openshift-storage spec: googleCloudStorage: secret: name: <backingstore-secret-name> namespace: openshift-storage targetBucket: <target bucket> type: google-cloud-storage
- target bucket
-
An existing Google storage bucket. This argument indicates to the MCG about the bucket to use as a target bucket for its backing store, and subsequently, data storage and administration.
- backingstore-secret-name
- The name of the backingstore secret created in Creating a new backing store.