Chapter 3. Deploying OpenShift Container Storage on Azure Red Hat OpenShift

The Azure Red Hat OpenShift service enables you to deploy fully managed OpenShift clusters. Red Hat OpenShift Container Storage can be deployed on Azure Red Hat OpenShift service.

Important

OpenShift Container storage on Azure Red Hat OpenShift is not a managed service offering. Red Hat OpenShift Container Storage subscriptions are required to have the installation supported by the Red Hat support team. Open support cases by choosing the product as Red Hat OpenShift Container Storage with the Red Hat support team (and not Microsoft) if you need any assistance for OpenShift Container Storage on Azure Red Hat OpenShift.

To install OpenShift Container Storage on Azure Red Hat OpenShift, follow sections:

3.1. Getting a Red Hat pull secret for new deployment of Azure Red Hat OpenShift

A Red Hat pull secret enables the cluster to access Red Hat container registries along with additional content.

Prerequisites

  • A Red Hat portal account.
  • OpenShift Container Storage subscription.

Procedure

To get a Red Hat pull secret for a new deployment of Azure Red Hat OpenShift, follow the steps in the section Get a Red Hat pull secret in the official Microsoft Azure documentation.

Note that while creating the Azure Red Hat OpenShift cluster, you may need larger worker nodes, controlled by --worker-vm-size or more worker nodes, controlled by --worker-count. The recommended worker-vm-size is Standard_D16s_v3. You can also use dedicated worker nodes, for more information, see How to use dedicated worker nodes for Red Hat OpenShift Container Storage in the Managing and allocating storage resources guide.

3.2. Preparing a Red Hat pull secret for existing Azure Red Hat OpenShift clusters

When you create an Azure Red Hat OpenShift cluster without adding a Red Hat pull secret, a pull secret is still created on the cluster automatically. However, this pull secret is not fully populated.

Use this section to update the automatically created pull secret with the additional values from the Red Hat pull secret.

Prerequisites

  • Existing Azure Red Hat OpenShift cluster without a Red Hat pull secret.

Procedure

To prepare a Red Hat pull secret for existing an existing Azure Red Hat OpenShift clusters, follow the steps in the section Prepare your pull secret in the official Mircosoft Azure documentation.

3.3. Adding the pull secret to the cluster

Prerequisites

  • A Red Hat pull secret.

Procedure

  • Run the following command to update your pull secret.

    Note

    Running this command causes the cluster nodes to restart one by one as they are updated.

    oc set data secret/pull-secret -n openshift-config --from-file=.dockerconfigjson=./pull-secret.json

After the secret is set, you can enable the Red Hat Certified Operators.

3.3.1. Modifying the configuration files to enable Red Hat operators

To modify the configuration files to enable Red Hat operators, follow the steps in the section Modify the configuration files in the official Microsoft Azure documentation.

3.4. Validating your Red Hat pull secret is working

After you add the pull secret and modify the configuration files, the cluster can take several minutes to get updated.

To check if the cluster has been updated, run the following command to show the Certified Operators and Red Hat Operators sources available:

$ oc get catalogsource -A
NAMESPACE               NAME                  DISPLAY
openshift-marketplace   redhat-operators      Red Hat Operators

 TYPE   PUBLISHER   AGE
  grpc   Red Hat     11s

If you do not see the Red Hat Operators, wait a few minutes and try again.

To ensure that your pull secret has been updated and is working correctly, open Operator Hub and check for any Red Hat verified Operator. For example, check if the OpenShift Container Storage Operator is available, and see if you have permissions to install it.

3.5. 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.

Prerequisites

  • Access to an OpenShift Container Platform cluster using an account with cluster-admin and Operator installation permissions.
  • You have at least three worker nodes in the RHOCP cluster.
  • For additional resource requirements, see Planning your deployment.
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 (create openshift-storage namespace in this case):

    $ 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. Navigate in the web console to the click Operators → OperatorHub.
  2. Scroll or type a keyword into the Filter by keyword box to search for OpenShift Container Storage Operator.
  3. Click Install on the OpenShift Container Storage operator page.
  4. On the Install Operator page, the following required options are selected by default:

    1. Update Channel as stable-4.7.
    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 Approval Strategy as Automatic or Manual.
    5. Click Install.

      If you selected Automatic updates, then the Operator Lifecycle Manager (OLM) automatically upgrades the running instance of your Operator without any intervention.

      If you selected Manual updates, then the OLM creates an update request. As a cluster administrator, you must then manually approve that update request to have the Operator updated to the new version.

Verification steps

Verify that the OpenShift Container Storage Operator shows a green tick indicating successful installation.

Next steps

3.6. 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. Log into the OpenShift Web Console.
  2. Click Operators → Installed Operators to view all the installed operators.

    Ensure that the Project selected is openshift-storage.

  3. Click OpenShift Container Storage > Create Instance link of Storage Cluster.
  4. Select Mode is set to Internal by default.
  5. In Select capacity and nodes,

    1. Select Storage Class. By default, it is set to managed-premium.
    2. Select Requested Capacity from the drop down list. It is set to 2 TiB by default. You can use the drop down to modify the capacity value.

      Note

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

    3. In the Select Nodes section, select at least three available nodes.

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

      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.

    4. Click Next.
  6. (Optional) Security configuration

    1. Select the Enable encryption checkbox to encrypt block and file storage.
    2. Choose any one or both Encryption level:

      • Cluster-wide encryption to encrypt the entire cluster (block and file).
      • Storage class encryption to create encrypted persistent volume (block only) using encryption enabled storage class.

        Important

        Storage class encryption is a Technology Preview feature available only for RBD PVs. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.

        For more information, see Technology Preview Features Support Scope.

    3. Select the Connect to an external key management service checkbox. This is optional for cluster-wide encryption.

      1. Key Management Service Provider is set to Vault by default.
      2. Enter Vault Service Name, host Address of Vault server ('https://<hostname or ip>'), Port number and Token.
      3. Expand Advanced Settings to enter additional settings and certificate details based on your Vault configuration:

        1. Enter the Key Value secret path in Backend Path that is dedicated and unique to OpenShift Container Storage.
        2. Enter TLS Server Name and Vault Enterprise Namespace.
        3. Provide CA Certificate, Client Certificate and Client Private Key by uploading the respective PEM encoded certificate file.
        4. Click Save.
    4. Click Next.
  7. Review the configuration details. To modify any configuration settings, click Back to go back to the previous configuration page.
  8. Click Create.
  9. Edit the configmap if Vault Key/Value (KV) secret engine API, version 2 is used for cluster-wide encryption with Key Management System (KMS).

    1. On the OpenShift Web Console, navigate to Workloads → ConfigMaps.
    2. To view the KMS connection details, click ocs-kms-connection-details.
    3. Edit the configmap.

      1. Click Action menu (⋮) → Edit ConfigMap.
      2. Set the VAULT_BACKEND parameter to v2.

        kind: ConfigMap
        apiVersion: v1
        metadata:
          name: ocs-kms-connection-details
        [...]
        data:
          KMS_PROVIDER: vault
          KMS_SERVICE_NAME: vault
        [...]
          VAULT_BACKEND: v2
        [...]
      3. Click Save.

Verification steps

  1. On the storage cluster details page, the storage cluster name displays a green tick next to it to indicate that the cluster was created successfully.
  2. 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.
  3. To verify that all components for OpenShift Container Storage are successfully installed, see Verifying your OpenShift Container Storage installation.