Chapter 2. Deploying OpenShift Container Storage on Microsoft Azure

You can deploy OpenShift Container Storage on Microsoft Azure installer-provisioned infrastructure (IPI). The deployment process consists of the following main parts:

  1. Install the OpenShift Container Storage Operator by following the instructions in Section 2.1, “Installing Red Hat OpenShift Container Storage Operator using the Operator Hub”.
  2. Create the OpenShift Container Storage service by following the instructions in Section 2.2, “Creating an OpenShift Container Storage service”.
  3. (Optional) Create a backing store over Azure Blob by following the instructions in Section 2.3, “Creating a new backing store”.

2.1. Installing Red Hat OpenShift Container Storage Operator using the Operator Hub

You can install Red Hat OpenShift Container Storage on Microsoft Azure platform using Red Hat OpenShift Container Platform Operator Hub. For information about hardware and software requirements, see Chapter 1, Planning OpenShift Container Storage deployment on Microsoft Azure.

Prerequisites

  • Log in to OpenShift Container Platform cluster.
  • You must have at least three worker nodes in the OpenShift Container Platform cluster.
  • You must create a namespace called openshift-storage as follows:

    1. Click Administration → Namespaces in the left pane of the OpenShift Web Console.
    2. Click Create Namespace.
    3. In the Create Namespace dialog box, enter openshift-storage for Name and openshift.io/cluster-monitoring=true for Labels. This label is required to get the dashboards.
    4. Select No restrictions option for Default Network Policy.
    5. Click Create.
Note

When you need to override the cluster-wide default node selector for OpenShift Container Storage, you can use the following command in command line interface to specify a blank node selector for the openshift-storage namespace:

$ oc annotate namespace openshift-storage openshift.io/node-selector=

Procedure

  1. Click Operators → OperatorHub in the left pane of the OpenShift Web Console.
  2. Click on OpenShift Container Storage.

    You can use the Filter by keyword text box or the filter list to search for OpenShift Container Storage from the list of operators.

  3. On the OpenShift Container Storage operator page, click Install.
  4. On the Install Operator page, ensure the following options are selected:

    1. Update Channel as stable-4.4
    2. Installation Mode as A specific namespace on the cluster.
    3. Installed Namespace as Operator recommended namespace PR openshift-storage. If Namespace openshift-storage does not exist, it will be created during the operator installation.
    4. Select Approval Strategy as Automatic or Manual. Approval Strategy is set to Automatic by default.

      • Approval Strategy as Automatic.

        Note

        When you select the Approval Strategy as Automatic, approval is not required either during fresh installation or when updating to the latest version of OpenShift Container Storage.

        1. Click Install
        2. Wait for the install to initiate. This may take up to 20 minutes.
        3. Click Operators → Installed Operators
        4. Ensure the Project is openshift-storage. By default, the Project is openshift-storage.
        5. Wait for the Status of OpenShift Container Storage to change to Succeeded.
      • Approval Strategy as Manual.

        Note

        When you select the Approval Strategy as Manual, approval is required during fresh installation or when updating to the latest version of OpenShift Container Storage.

        1. Click Install
        2. On the Installed Operators page, click ocs-operator.
        3. On the Subscription Details page, click the Install Plan link.
        4. On the InstallPlan Details page, click Preview Install Plan
        5. Review the install plan and click Approve.
        6. Wait for the Status of the Components to change from Unknown to either Created or Present.
        7. Click Operators → Installed Operators
        8. Ensure the Project is openshift-storage. By default, the Project is openshift-storage.
        9. Wait for the Status of OpenShift Container Storage to change to Succeeded.

Verification steps

  • Verify that OpenShift Container Storage Operator show the Status as Succeeded.

2.2. Creating an OpenShift Container Storage service

You need to create a new OpenShift Container Storage service after you install OpenShift Container Storage operator.

Prerequisites

Procedure

  1. Click OperatorsInstalled Operators from the left pane of the OpenShift Web Console to view the installed operators.
  2. On the Installed Operator page, select openshift-storage from the Project drop down list to switch to the openshift-storage project.
  3. Click OpenShift Container Storage operator.

    OpenShift Container Storage operator creates a OCSInitialization resource automatically.

  4. On the OpenShift Container Storage operator page, scroll right and click the Storage Cluster tab.

    Figure 2.1. OpenShift Container Storage Operator page

    Screenshot of OpenShift Container Storage operator page.
  5. On the OCS Cluster Services page, click Create OCS Cluster Service.

    Figure 2.2. Create New OCS Service page

    Screenshot of create new OCS service page.
  6. On the Create New OCS Service page, perform the following:

    1. Select at least three worker nodes from the available list of nodes for the use of OpenShift Container Storage service. Ensure that the nodes are in different Location.
    2. Storage Class is set by default depending on the platform.

      managed-premium is the default storage for Azure.

    3. Select OCS Service Capacity from the drop down list.

      Note

      Once you select the initial storage capacity here, you can add more capacity only in this increment.

  7. Click Create.

    The Create button is enabled only after you select three nodes. A new storage cluster of three volumes will be created with one volume per worker node. The default configuration uses a replication factor of 3.

Verification steps

2.3. Creating a new backing store

This procedure is not mandatory. However, it is recommended to perform this procedure.

When you install OpenShift Container Storage on Microsoft Azure platform, noobaa-default-bucket-class places data on noobaa-default-backing-store instead of Azure blob storage. Hence, to use OpenShift Container Storage Multicloud Object Gateway (MCG) managed object storage backed by Azure Blob storage, you need to perform the following procedure.

Before you begin

  1. Log in to Azure web console.
  2. Create Azure Blob storage account for MCG to store object data as described in Create a BlockBlobStorage account. Make sure to set Account kind as BlobStorage and connectivity method as public endpoint.
  3. Locate access keys of the Blob storage account and note down the value for key1 for later use.
  4. Create a new Container within the new Blob storage account with public access level set as private.

Prerequisites

  • Administrator access to OpenShift.

Procedure

To configure MCG to use Azure Blob storage account:

  1. Log in to OpenShift Container Platform web console.
  2. Click OperatorsInstalled Operators from the left pane of the OpenShift Web Console to view the installed operators.
  3. Click OpenShift Container Storage Operator.
  4. On the OpenShift Container Storage Operator page, scroll right and click the Backing Store tab.

    Figure 2.3. OpenShift Container Storage Operator page with backing store tab

    Screenshot of OpenShift Container Storage operator page with backing store tab.
  5. Click Create Backing Store.

    Figure 2.4. Create Backing Store page

    Screenshot of create new backing store page.
  6. On the Create New Backing Store page, perform the following:

    1. Enter a name for Backing Store Name.
    2. Select Azure Blob as the Provider.
    3. Click Switch to Credentials.
    4. Enter the Account Name of Azure Blob storage account you created earlier.
    5. Enter the value of key1 of the Azure storage account you noted down earlier.
    6. Enter the name of the container that you created inside the Azure storage account for Target Blob Container. This allows you to create a connection that tells MCG that it can use this container for the system.
  7. Click Create Backing Store.
  8. In the OpenShift Container Platform web console, click Installed OperatorsOpenShift Container StorageBucket Class.
  9. Edit noobaa-default-bucket-class YAML specification field spec: placementPolicy: tiers: -backingStores: to use the newly created backing store instead of noobaa-default-backing-store.

Verification steps

  1. Run the following command by using the MCG command line tool noobaa (from mcg rpm package) to verify that the Azure backing store that you created is in Ready state.

    $ noobaa status -n openshift-storage
  2. Verify that the output shows the default bucket class in Ready state and uses the expected backing store.

    .
    .
    .
    ------------------
    - Backing Stores -
    ------------------
    
    NAME                           TYPE            TARGET-BUCKET
    PHASE   AGE
    noobaa-azure-backing-store             azure-blob      noobaabucketcontainer Ready   10m27s
    noobaa-default-backing-store   s3-compatible nb.1595507787728.apps.mbukatov20200723a.azure.qe.rh-ocs.com   Ready 1h58m20s
    
    ------------------
    - Bucket Classes -
    ------------------
    
    NAME                          PLACEMENT
    PHASE   AGE
    noobaa-default-bucket-class   {Tiers:[{Placement: BackingStores:[noobaa-azure-backing-store]}]}   Ready   1h58m21s

2.4. Verifying OpenShift Container Storage deployment

Use this section to verify that OpenShift Container Storage is deployed correctly.

2.4.1. Verifying the state of the pods

To determine if OpenShift Container Storage is deployed successfully, you can verify that the pods are in running state.

Procedure

  1. Click Workloads → Pods from the left pane of the OpenShift Web Console.
  2. Select openshift-storage from the Project drop down list.

    For more information on the amount of pods to expect for each component and how the amount of pods varies depending on the number of nodes and OSDs, see Table 2.1, “Pods corresponding to storage components for a three worker node cluster”

  3. Verify that the following pods are in running and completed state by clicking on the Running and the Completed tabs:

    Table 2.1. Pods corresponding to storage components for a three worker node cluster

    ComponentNo. of podsName of the pod

    Number of pods that you must see for the following components:

    OpenShift Container Storage Operator

    1

    ocs-operator-*

    Rook-ceph Operator

    1

    rook-ceph-operator-*

    Multicloud Object Gateway

    4

    • noobaa-operator-*
    • noobaa-core-*
    • nooba-db-*
    • noobaa-endpoint-*

    Mon

    3

    • rook-ceph-mon-*
    • rook-ceph-mon-*
    • rook-ceph-mon-*

      (on different nodes)

    rook-ceph-mgr

    1

    rook-ceph-mgr-* (on storage node)

    MDS

    2

    rook-ceph-mds-ocs-storagecluster-cephfilesystem-* (2 pods on different storage nodes)

    lib-bucket-provisioner

    1

    lib-bucket-provisioner--* (on any node)

    Number of pods for CSI vary depending on the number of nodes selected as storage nodes (a minimum of 3 nodes)

    CSI

    10

    • cephfs (at least 5 pods)

      • csi-cephfsplugin-* (1 on each node where storage is consumed, that is, 3 pods on different nodes)
      • csi-cephfsplugin-provisioner-* (2 pods on different storage nodes if available)
    • rbd (at least 5 pods in total)

      • csi-rbdplugin-* (one on each node where storage is consumed, that is, 3 pods on different nodes)
      • csi-rbdplugin-provisioner-* (2 pods on different storage nodes if available)

    rook-ceph-drain-canary

    3

    rook-ceph-drain-canary-* (3 pods, that is, one on each storage node)

    rook-ceph-crashcollector

    3

    rook-ceph-crashcollector-* (3 pods)

    Number of OSDs vary depending on Count and Replica defined for each StorageDeviceSet in StorageCluster.

    OSD

    6

    • rook-ceph-osd-* (3 pods across different nodes)
    • rook-ceph-osd-prepare-ocs-deviceset-* (3 pods across different nodes)

2.4.2. Verifying the OpenShift Container Storage cluster is healthy

  • Click Home → Overview from the left pane of the OpenShift Web Console and click Persistent Storage tab.

    In the Status card, verify that OCS Cluster has a green tick mark as shown in the following image:

    Figure 2.5. Health status card in Persistent Storage Overview Dashboard

    Screenshot of Health card in persistent storage dashboard

    In the Details card, verify that the cluster information is displayed appropriately as follows:

    Figure 2.6. Details card in Persistent Storage Overview Dashboard

    Screenshot of Details card in persistent storage dashboard

For more information on verifying the health of OpenShift Container Storage cluster using the persistent storage dashboard, see Monitoring OpenShift Container Storage.

2.4.3. Verifying the Multicloud Object Gateway is healthy

  • Click Home → Overview from the left pane of the OpenShift Web Console and click the Object Service tab.

    In the Status card, verify that the Multicloud Object Gateway (MCG) storage displays a green tick icon as shown in following image:

    Figure 2.7. Health status card in Object Service Overview Dashboard

    Screenshot of Health card in object service dashboard

    In the Details card, verify that the MCG information is displayed appropriately as follows:

    Figure 2.8. Details card in Object Service Overview Dashboard

    Screenshot of Details card in object service dashboard

For more information on verifying the health of OpenShift Container Storage cluster using the object service dashboard, see Monitoring OpenShift Container Storage.

2.4.4. Verifying that the storage classes are created and listed

You can verify that the storage classes are created and listed as follows:

  • Click Storage → Storage Classes from the left pane of the OpenShift Web Console.

    Verify that the following three storage classes are created with the OpenShift Container Storage cluster creation:

    • ocs-storagecluster-ceph-rbd
    • ocs-storagecluster-cephfs
    • openshift-storage.noobaa.io
    ocs verifying create storage class