Chapter 1. Deploy using dynamic storage devices

Deploying OpenShift Container Storage on OpenShift Container Platform using dynamic storage devices provided by VMware vSphere (disk format: thin) provides you with the option to create internal cluster resources. This will result in the internal provisioning of the base services, which helps to make additional storage classes available to applications.

Note

Both internal and external Openshift Container Storage clusters are supported on VMware vSphere. See Planning your deployment for more information about deployment requirements.

Follow the below steps for deployment:

  1. For Red Hat Enterprise Linux based hosts for worker nodes in a user provisioned infrastructure (UPI), enable the container access to the underlying file system. Follow the instructions on enable file system access for containers on Red Hat Enterprise Linux based nodes.

    Note

    Skip this step for Red Hat Enterprise Linux CoreOS (RHCOS).

  2. Install the Red Hat OpenShift Container Storage Operator.
  3. Create the OpenShift Container Storage Cluster Service.

1.1. Enabling file system access for containers on Red Hat Enterprise Linux based nodes

Deploying OpenShift Container Storage on an OpenShift Container Platform with worker nodes on a Red Hat Enterprise Linux base in a user provisioned infrastructure (UPI) does not automatically provide container access to the underlying Ceph file system.

Note

This process is not necessary for hosts based on Red Hat Enterprise Linux CoreOS.

Procedure

Perform the following steps on each node in your cluster.

  1. Log in to the Red Hat Enterprise Linux based node and open a terminal.
  2. Verify that the node has access to the rhel-7-server-extras-rpms repository.

    # subscription-manager repos --list-enabled | grep rhel-7-server

    If you do not see both rhel-7-server-rpms and rhel-7-server-extras-rpms in the output, or if there is no output, run the following commands to enable each repository.

    # subscription-manager repos --enable=rhel-7-server-rpms
    # subscription-manager repos --enable=rhel-7-server-extras-rpms
  3. Install the required packages.

    # yum install -y policycoreutils container-selinux
  4. Persistently enable container use of the Ceph file system in SELinux.

    # setsebool -P container_use_cephfs on

1.2. 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.3. 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

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 thin for VMware.
    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.

      It is recommended that the worker nodes are spread across three different physical nodes, racks or failure domains for high availability.

      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
      • Use vCenter anti-affinity to align OpenShift Container Storage rack labels with physical nodes and racks in the data center to avoid scheduling two worker nodes on the same physical chassis.

      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.