Creating a stand-alone MCG

Steps to create a stand-alone MCG.

Before you begin

  • Ensure that the Red Hat® OpenShift® Data Foundation operator is installed.
  • Ensure that you have a storage class and is set as the default.

About this task

Do the following steps to create a stand-alone MCG.

Procedure

  1. The two ways to create a stand-alone MCG as follows:
    • Create a stand-alone MCG through YAML.
    • Create a stand-alone MCG through Red Hat OpenShift Data Foundation console.
    Creating a stand-alone MCG through YAML
    1. Create NooBaa object storage. Save the following YAML to a file called noobaa.yaml.
      
      apiVersion: noobaa.io/v1alpha1
      kind: NooBaa
      metadata:
        name: noobaa
        namespace: openshift-storage
      spec:
        dbResources:
          requests:
            cpu: '0.1'
            memory: 1Gi
        dbType: postgres
        coreResources:
          requests:
            cpu: '0.1'
            memory: 1Gi
        

      It creates a single instance deployment of the Multi-cloud Object Gateway.

    2. Run the following oc command to apply the configuration.
      oc create -n openshift-storage -f noobaa.yaml
    3. After a couple of minutes, you can see that the MCG instance finished provisioning (PHASE column is set to Ready).
      oc get -n openshift-storage noobaas noobaa -w
      NAME     MGMT-ENDPOINTS              S3-ENDPOINTS                IMAGE                                                                                                            PHASE   AGE
      noobaa   [https://10.0.32.3:30318]   [https://10.0.32.3:31958]   registry.redhat.io/ocs4/mcg-core-rhel8@sha256:56624aa7dd4ca178c1887343c7445a9425a841600b1309f6deace37ce6b8678d   Ready   3d18h
    4. Configure a backing store for the gateway. Save the following YAML to a file called noobaa-pv-backing-store.yaml.
      
      apiVersion: noobaa.io/v1alpha1
      kind: BackingStore
      metadata:
        finalizers:
        - noobaa.io/finalizer
        labels:
          app: noobaa
        name: noobaa-pv-backing-store
        namespace: openshift-storage
      spec:
        pvPool:
          numVolumes: 1
          resources:
            requests:
              storage: 50Gi 1*
          storageClass: ibm-spectrum-fusion 2*
        type: pv-pool

      1* The overall capacity of the object storage service, adjust as needed.

      2* The StorageClass to use for the PersistentVolumes requested, delete this property to use the cluster default.

    5. Run the following oc command to apply the configuration.
      oc create -f noobaa-pv-backing-store.yaml

      It creates the backing store configuration for the gateway. All images in Quay get stored as objects through the gateway in a PersistentVolume that gets created by the configuration.

    6. Finally, run the following command to make the PersistentVolume backup store the default for all ObjectBucketClaims issued by the operator.
      oc patch bucketclass noobaa-default-bucket-class --patch '{"spec":{"placementPolicy":{"tiers":[{"backingStores":["noobaa-pv-backing-store"]}]}}}' --type merge -n openshift-storage
      It concludes the setup of the Multi-Cloud Object Gateway instance for Red Hat Quay.
      Note: This configuration cannot be run in parallel on a cluster with Red Hat OpenShift Data Foundation installed.
    Create a stand-alone MCG from Red Hat OpenShift Data Foundation console:
    1. In the Red Hat OpenShift Container Platform web management console, go to Operators > Installed Operators to view the all installed operators.
    2. Click OpenShift Data Foundation operator and then click Create Storage System.
    3. In the Backing storage page, select the following values and click Next:
      1. Select Multicloud Object Gateway for Deployment type.
      2. Select the Use an existing Storage Class option, and choose ibm-spectrum-fusion.
    4. Click Next to skip the Security page.
    5. In the Review and create page, review the configuration details. Click Back to modify any configuration settings.
    6. Click Create Storage System.
  2. Verify the stand-alone MCG:
    1. Verify whether the Red Hat OpenShift Data Foundation cluster is healthy:
      1. In the Red Hat OpenShift Container Platform web management console, go to Storage > Data Foundation.
      2. In the Status card of the Overview tab, click Storage System and then click the storage system link from the message that appears.
        1. In the Status card of the Object tab, verify whether both Object Service and Data Resiliency have a green checkmark .
        2. In the Details card, verify whether the MCG information is displayed.
    2. Verify the state of the pods as follows:
      1. In the Red Hat OpenShift Container Platform web management console, go to Workloads > Pods.
      2. Select openshift-storage from the Project drop down list and verify that the following pods are in running state.
        OpenShift Data Foundation Operator
        • ocs-operator-* (one pod on any worker node)
        • ocs-metrics-exporter-* (one pod on any worker node)
        • odf-operator-controller-manager-* (one pod on any worker node)
        • odf-console-* (one pod on any worker node)
        • csi-addons-controller-manager-* (one pod on any worker node)
        Rook-ceph Operator
        • rook-ceph-operator-* (one pod on any worker node)
        Multicloud Object Gateway
        • noobaa-operator-* (one pod on any worker node)
        • noobaa-core-* (one pod on any worker node)
        • noobaa-db-pg-* (one pod on any worker node)
        • noobaa-endpoint-* (one pod on any worker node)