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.
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:
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.
NoteSkip this step for Red Hat Enterprise Linux CoreOS (RHCOS).
- Install the Red Hat OpenShift Container Storage Operator.
- 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.
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.
- Log in to the Red Hat Enterprise Linux based node and open a terminal.
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
andrhel-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
Install the required packages.
# yum install -y policycoreutils container-selinux
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.
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
-
Click Operators
OperatorHub in the left pane of the OpenShift Web Console. - Use Filter by keyword text box or the filter list to search for OpenShift Container Storage from the list of operators.
- Click OpenShift Container Storage.
- On the OpenShift Container Storage operator page, click Install.
On the Install Operator page, ensure the following options are selected by default::
- Update Channel as stable-4.6
- Installation Mode as A specific namespace on the cluster
-
Installed Namespace as Operator recommended namespace openshift-storage. If Namespace
openshift-storage
does not exist, it will be created during the operator installation. - Select Enable operator recommended cluster monitoring on this namespace checkbox as this is required for cluster monitoring.
Select Approval Strategy as Automatic or Manual. Approval Strategy is set to Automatic by default.
Approval Strategy as Automatic.
NoteWhen 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.
- Click Install
- Wait for the install to initiate. This may take up to 20 minutes.
-
Click Operators
Installed Operators -
Ensure the Project is
openshift-storage
. By default, the Project isopenshift-storage
. - Wait for the Status of OpenShift Container Storage to change to Succeeded.
Approval Strategy as Manual.
NoteWhen you select the Approval Strategy as Manual, approval is required during fresh installation or when updating to the latest version of OpenShift Container Storage.
- Click Install
On the Manual approval required page, you can either click Approve or View Installed Operators in namespace openshift-storage to install the operator.
ImportantBefore 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.
ImportantIf 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 isopenshift-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 isopenshift-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
- 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.
-
For VMs on VMware, ensure the
disk.EnableUUID
option is set toTRUE
. You need to have vCenter account privileges to configure the VMs. For more information, see Required vCenter account privileges. To set thedisk.EnableUUID
option, use the Advanced option of the VM Options in the Customize hardware tab. For more information, see Creating Red Hat Enterprise Linux CoreOS (RHCOS) machines in vSphere.
Procedure
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
Click OpenShift Container Storage.
Figure 1.2. Details tab of OpenShift Container Storage
Click Create Instance link of Storage Cluster.
Figure 1.3. Create Storage Cluster page
On the Create Storage Cluster page, ensure that the following options are selected:
-
In the Select Mode section,
Internal
mode is selected by default. -
Storage Class is set by default to
thin
for VMware. Select OpenShift Container Storage Service Capacity from drop down list.
NoteOnce you select the initial storage capacity, cluster expansion will only be performed using the selected usable capacity (times 3 of raw storage).
-
(Optional) In the Encryption section, set the toggle to
Enabled
to enable data encryption on the cluster. 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.
NoteTo 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.
-
In the Select Mode section,
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
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.
-
Click Operators
- To verify that all components for OpenShift Container Storage are successfully installed, see Verifying your OpenShift Container Storage installation.