Creating an IBM COS-backed backingstore

Create an IBM COS-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.
    • For IBM Power, use the following command:
      subscription-manager repos --enable=rh-odf-4-for-rhel-8-ppc64le-rpms
    • For 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 an IBM COS-backed backingstore using MCG command-line interface

From the MCG command-line interface, run the following command:
noobaa backingstore create ibm-cos <backingstore_name> --access-key=<IBM ACCESS KEY> --secret-key=<IBM SECRET ACCESS KEY> --endpoint=<IBM COS ENDPOINT> --target-bucket <bucket-name> -n openshift-storage
backingstore_name
The name of the backingstore.
IBM ACCESS KEY and IBM SECRET ACCESS KEY
An IBM access key ID, secret access key and the appropriate regional endpoint that corresponds to the location of the existing IBM bucket.

To generate the above keys on IBM cloud, you must include HMAC credentials while creating the service credentials for your target bucket.

bucket-name
The existing IBM bucket name. This argument indicates to the MCG which bucket to use as a target bucket for its backing store, and subsequently, data storage and administration.
Example output:
INFO[0001] ✅ Exists: NooBaa "noobaa"
INFO[0002] ✅ Created: BackingStore "ibm-resource"
INFO[0002] ✅ Created: Secret "backing-store-secret-ibm-resource"

Create an IBM COS-backed backingstore using a YAML file

  1. Create a secret with the credentials:
    apiVersion: v1
    kind: Secret
    metadata:
      name: <backingstore-secret-name>
      namespace: openshift-storage
    type: Opaque
    data:
      IBM_COS_ACCESS_KEY_ID: <IBM COS ACCESS KEY ID ENCODED IN BASE64>
      IBM_COS_SECRET_ACCESS_KEY: <IBM COS SECRET ACCESS KEY ENCODED IN BASE64>
    IBM ACCESS KEY and IBM SECRET ACCESS KEY

    Provide and encode your own IBM COS access key ID and secret access key using Base64, and use the results in place of these attributes respectively.

    backingstore-secret-name

    The name of the backingstore secret created in Creating a new backing store.

  2. 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:
      ibmCos:
        endpoint: <endpoint>
        secret:
          name: <backingstore-secret-name>
          namespace: openshift-storage
        targetBucket: <bucket-name>
      type: ibm-cos
    bucket-name
    An existing IBM COS bucket name.
    endpoint
    A regional endpoint that corresponds to the location of the existing IBM bucket name. This argument indicates to MCG about the endpoint to use for its backingstore, and subsequently, data storage and administration.
    backingstore-secret-name
    The name of the backingstore secret created in the previous step.