Install Portworx on OpenShift on vSphere with PX-StoreV2
PX-StoreV2 is a Portworx datastore optimized for supporting IO intensive workloads for configurations utilizing high performance NVMe class devices. It efficiently manages and balances workload across nodes by dynamically assigning tasks to the most suitable nodes based on their available resources. Hence, improving performance and scalability of your cluster.
Follow the instructions on this page to install Portworx on vSphere with PX-StoreV2.
- Upgrading from a previous Portworx version to deploy PX-StoreV2 datastore with cloud drives is not supported.
- Once Portworx is deployed with the PX-StoreV2 datastore, you can use all of Portworx's features except for the following:
- XFS volumes
- Aggregated volumes
- PX-Cache
Prerequisites
-
Your cluster must be running OpenShift 4.13 or higher.
-
You must have an OpenShift cluster deployed on infrastructure that meets the minimum requirements for Portworx.
-
Ensure that any underlying nodes used for Portworx in OCP have Secure Boot disabled.
-
You must have supported disk types.
-
Linux kernel version: 4.20 or newer (minimum), 5.0 or newer (recommended), with the Rhel: packages:
- device-mapper mdadm lvm2 device-mapper-persistent-data augeas
noteDuring installation, Portworx will automatically try to pull the required packages from distribution specific repositories. This is a mandatory requirement and installation will fail if this prerequisite is not met.
-
A minimum of 64 GB system metadata device on each node where you want to deploy Portworx. If you do not provide a metadata device, one will be automatically added to the spec.
-
An SD/NVME drive type with a memory of more than 8 GB per node.
-
A minimum of 8 cores CPU per node.
Create a monitoring ConfigMap
Newer OpenShift versions do not support the Portworx Prometheus deployment. As a result, you must enable monitoring for user-defined projects before installing the Portworx Operator. Use the instructions in this section to configure the OpenShift Prometheus deployment to monitor Portworx metrics.
To integrate OpenShift’s monitoring and alerting system with Portworx, create a cluster-monitoring-config
ConfigMap in the openshift-monitoring
namespace:
apiVersion: v1
kind: ConfigMap
metadata:
name: cluster-monitoring-config
namespace: openshift-monitoring
data:
config.yaml: |
enableUserWorkload: true
The enableUserWorkload
parameter enables monitoring for user-defined projects in the OpenShift cluster. This creates a prometheus-operated
service in the openshift-user-workload-monitoring
namespace.
Install the Portworx Operator
Before you can install Portworx on your OpenShift cluster, you must first install the Portworx Operator. Perform the following steps to prepare your OpenShift cluster by installing the Operator.
-
From your OpenShift UI, select OperatorHub in the left pane.
-
On the OperatorHub page, search for Portworx and select the Portworx Enterprise card:
-
Click Install to install Portworx Operator:
-
Portworx Operator begins to install and takes you to the Install Operator page. On this page:
- Select the A specific namespace on the cluster option for Installation mode.
- Choose the Create Project option from the Installed Namespace dropdown.
-
In the Create Project window, provide the name
portworx
and click Create to create a namespace called portworx. -
To manage your Porworx cluster using the Portworx dashboard within the OpenShift UI, select Enable for the Console plugin option.
-
Click Install to deploy Portworx Operator in the
portworx
namespace.
Deploy Portworx
The Portworx Enterprise Operator takes a custom Kubernetes resource called StorageCluster
as input. The StorageCluster
is a representation of your Portworx cluster configuration. Once the StorageCluster
object is created, the Operator will deploy a Portworx cluster corresponding to the specification in the StorageCluster
object. The Operator will watch for changes on the StorageCluster
and update your cluster according to the latest specifications.
For more information about the StorageCluster
object and how the Operator manages changes, refer to the StorageCluster article.
Configure Storage DRS settings
Portworx does not support the movement of VMDK files from the datastores on which they were created. Do not move them manually or have any settings that would result in a movement of these files. To prevent Storage DRS from moving VMDK files, configure the Storage DRS settings as follows using your vSphere console.
From the Edit Storage DRS Settings window of your selected datastore cluster, edit the following settings:
-
For Storage DRS automation, choose the No Automation (Manual Mode) option, and set the same for other settings, as shown in the following screencapture:
-
For Runtime Settings, clear the Enable I/O metric for SDRS recommendations option.
-
For Advanced options, clear the Keep VMDKs together by default options.
Grant the required cloud permissions
Grant permissions Portworx requires by creating a secret with user credentials:
Provide Portworx with a vCenter server user that has the following minimum vSphere privileges using your vSphere console:
-
Datastore
- Allocate space
- Browse datastore
- Low level file operations
- Remove file
-
Host
- Local operations
- Reconfigure virtual machine
-
Virtual machine
- Change Configuration
- Add existing disk
- Add new disk
- Add or remove device
- Advanced configuration
- Change Settings
- Extend virtual disk
- Modify device settings
- Remove disk
If you create a custom role as above, make sure to select Propagate to children when assigning the user to the role.
Why selectPropagate to Children
?In vSphere, resources are organized hierarchically. By selecting "Propagate to Children," you ensure that the permissions granted to the custom role are automatically applied not just to the targeted object, but also to all objects within its sub-tree. This includes VMs, datastores, networks, and other resources nested under the selected resource.
-
Create a secret using the following template. Retrieve the credentials from your own environment and specify them under the
data
section:apiVersion: v1
kind: Secret
metadata:
name: px-vsphere-secret
namespace: portworx
type: Opaque
data:
VSPHERE_USER: <your-vcenter-server-user>
VSPHERE_PASSWORD: <your-vcenter-server-password>-
VSPHERE_USER: to find your base64-encoded vSphere user, enter the following command:
echo '<vcenter-server-user>' | base64
-
VSPHERE_PASSWORD: to find your base64-encoded vSphere password, enter the following command:
echo '<vcenter-server-password>' | base64
Once you've updated the template with your user and password, apply the spec:
oc apply -f <your-spec-name>
-
-
Ensure ports 17001-17020 on worker nodes are reachable from the control plane node and other worker nodes.
Generate the StorageCluster spec
To install Portworx with OpenShift, you must generate a StorageCluster
spec that you will deploy in your cluster.
-
Navigate to Portworx Central and log in, or create an account.
-
Select Portworx Enterprise from the Product Catalog page.
-
On the Product Line page, choose any option depending on which license you intend to use, then click Continue to start the spec generator.
-
Choose Portworx Version and select vSphere from the Platform dropdown.
-
Specify your hostname or the IP address of the vSphere server in the vCenter endpoint field.
-
Specify the datastore name(s) or datastore cluster name(s) available for Portworx in the vCenter datastore prefix field. To specify multiple datastore names or datastore cluster names, enter a generic prefix common to all the datastores or datastore clusters. For example, if you want Portworx to use three datastores named
px-datastore-01
,px-datastore-02
, andpx-datastore-03
, specifypx
orpx-datastore
. -
Click Customize at the bottom of the Summary section.
-
Navigate to the Storage window by clicking Next.
-
Select PX-StoreV2 check box in the Configure storage devices section.
noteDuring installation, selecting the PX-StoreV2 option creates four 50GB volumes and, by default, an additional 64GB volume for metadata and KVDB data. If needed, you can separate metadata and KVDB data by creating a dedicated volume for KVDB with a specified size. To do this, add the following line to the install spec:
kvdbDevicespeceagerzeroedthick, size=32
-
Enter the vCenter Endpoint details and click Next.
-
Navigate to the Network and then Customize window and click Finish to generate the specs.