Chapter 1. Deploying OpenShift Container Storage on Google Cloud

Deploying OpenShift Container Storage on OpenShift Container Platform using dynamic storage devices provided by Google Cloud installer-provisioned infrastructure (IPI) enables you to create internal cluster resources. This results in internal provisioning of the base services, which helps to make additional storage classes available to applications.

Note

Only internal Openshift Container Storage clusters are supported on Google Cloud. See Planning your deployment for more information about deployment requirements.

1.1. Installing Red Hat OpenShift Container Storage Operator

You can install Red Hat OpenShift Container Storage Operator using the Red Hat OpenShift Container Platform Operator Hub. For information about the hardware and software requirements, see Planning your deployment.

Prerequisites

  • You must be logged into the OpenShift Container Platform (RHOCP) cluster.
  • You must have at least three worker nodes in the RHOCP cluster.
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=
  • Taint a node as infra to ensure only Red Hat OpenShift Container Storage resources are scheduled on that node. This helps you save on subscription costs. For more information, see How to use dedicated worker nodes for Red Hat OpenShift Container Storage chapter in Managing and Allocating Storage Resources guide.

Procedure

  1. Click Operators → OperatorHub in the left pane of the OpenShift Web Console.
  2. Use Filter by keyword text box or the filter list to search for OpenShift Container Storage from the list of operators.
  3. Click OpenShift Container Storage.
  4. On the OpenShift Container Storage operator page, click Install.
  5. On the Install Operator page, ensure the following options are selected by default::

    1. Update Channel as stable-4.6
    2. Installation Mode as A specific namespace on the cluster
    3. Installed Namespace as Operator recommended namespace openshift-storage. If Namespace openshift-storage does not exist, it will be created during the operator installation.
    4. Select Enable operator recommended cluster monitoring on this namespace checkbox as this is required for cluster monitoring.
    5. 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 Manual approval required page, you can either click Approve or View Installed Operators in namespace openshift-storage to install the operator.

          Important

          Before you click either of the options, wait for a few minutes on the Manual approval required page until the install plan gets loaded in the window.

          Important

          If you choose to click Approve, you must review the install plan before you proceed.

          • If you click Approve.

            • Wait for a few minutes while the OpenShift Container Storage Operator is getting installed.
            • On the Installed operator - ready for use page, click View Operator.
            • Ensure the Project is openshift-storage. By default, the Project is openshift-storage.
            • Click Operators → Installed Operators
            • Wait for the Status of OpenShift Container Storage to change to Succeeded.
          • If you click View Installed Operators in namespace openshift-storage .

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

Verification steps

  • Verify that OpenShift Container Storage Operator shows a green tick indicating successful installation.
  • Click View Installed Operators in namespace openshift-storage link to verify that OpenShift Container Storage Operator shows the Status as Succeeded on the Installed Operators dashboard.

1.2. Creating an OpenShift Container Storage Cluster Service in internal mode

Use this procedure to create an OpenShift Container Storage Cluster Service after you install the OpenShift Container Storage operator.

Prerequisites

  • The OpenShift Container Storage operator must be installed from the Operator Hub. For more information, see Installing OpenShift Container Storage Operator using the Operator Hub.
  • Be aware that the default storage class of Google Cloud uses hard disk drive (HDD). To use solid state drive (SSD) based disks for better performance, you need to create a storage class, using pd-ssd as shown in the following ssd-storeageclass.yaml example:

    apiVersion: storage.k8s.io/v1
    kind: StorageClass
    metadata:
     name: faster
    provisioner: kubernetes.io/gce-pd
    parameters:
     type: pd-ssd
    volumeBindingMode: WaitForFirstConsumer
    reclaimPolicy: Delete

Procedure

  1. Click Operators → Installed Operators to view all the installed operators.

    Ensure that the Project selected is openshift-storage.

    Figure 1.1. OpenShift Container Storage Operator page

    Screenshot of OpenShift Container Storage operator dashboard.
  2. Click OpenShift Container Storage.

    Figure 1.2. Details tab of OpenShift Container Storage

    Screenshot of selected operator details tab.
  3. Click Create Instance link of Storage Cluster.

    Figure 1.3. Create Storage Cluster page

    Screenshot of Create Cluster Service page where you can select mode of deployment.
  4. On the Create Storage Cluster page, ensure that the following options are selected:

    1. In the Select Mode section, Internal mode is selected by default.
    2. Storage Class is set by default to standard for Google Cloud. However, if you created a storage class to use SSD based disks for better performance, you need to select that storage class.
    3. Select OpenShift Container Storage Service Capacity from drop down list.

      Note

      Once you select the initial storage capacity, cluster expansion will only be performed using the selected usable capacity (times 3 of raw storage).

    4. (Optional) In the Encryption section, set the toggle to Enabled to enable data encryption on the cluster.
    5. In the Nodes section, select at least three worker nodes from the available list for the use of OpenShift Container Storage service.

      For cloud platforms with multiple availability zones, ensure that the Nodes are spread across different Locations/availability zones.

      Note

      To find specific worker nodes in the cluster, you can filter nodes on the basis of Name or Label.

      • Name allows you to search by name of the node
      • Label allows you to search by selecting the predefined label

      If the nodes selected do not match the OpenShift Container Storage cluster requirement of an aggregated 30 CPUs and 72 GiB of RAM, a minimal cluster will be deployed. For minimum starting node requirements, see Resource requirements section in Planning guide.

  5. Click Create.

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

Verification steps

  1. Verify that the final Status of the installed storage cluster shows as Phase: Ready with a green tick mark.

    • Click Operators → Installed Operators → Storage Cluster link to view the storage cluster installation status.
    • Alternatively, when you are on the Operator Details tab, you can click on the Storage Cluster tab to view the status.
  2. To verify that all components for OpenShift Container Storage are successfully installed, see Verifying your OpenShift Container Storage installation.