Red Hat OpenShift integration with Pure Service Orchestrator
By: Arcan Turkay
Tags: Yazılım, Red Hat Openshift, Storage, Pure Storage, Software Defined Storage

Nowadays, with the advance of the container technology, the integration of the physical hardware in your environment to such platforms has started to come up. If you have a Pure storage product and you use the container platform in your environment such as Red Hat OpenShift or Kubernetes, i will explain how you can integrate these products each other.

Let’s start from what is Pure service Orchestrator and for what purpose it is used for.

Pure Service Orchestrator (PSO) is an orchestration tool. It offers storage-as-a-service (SaaS) for containers, providing developers the experiences of public cloud.

Pure Storage has been offering integrations with container platforms and orchestration engines using the CSI(Container Storage Interface) driver plugin, allowing persistent storage to provide all the underlying storage requirements for Red Hat OpenShift and Kubernetes environments.

Container technology was arise in the cloud. One of the advantages about the cloud is that you have all kind of services available to you and also they provide you persistent file or block storage services as well. When you run OpenShift or Kubernetes on-premise you need to provide those services by yourself. Right here where Pure Service Orchestrator comes into play.

Also, with the rapid growth of DevOps methodologies, CI/CD pipelines and modern NoSQL databases in containerized solutions, there is now a need to accelerate the performance of the persistent storage required for these applications.

On the other hand, it is not only required for the applications running in the containers at OpenShift platform, but also for the underlying architecture of the OpenShift platform. It can be used like a local Docker storage on all the OpenShift cluster nodes for the Docker Internal Registry.

in case you use your OpenShift platform with a Software Defined Storage product (such as Ceph), you can at the same time integrate your PureArray to OpenShift with PSO and thereby provide a suitable environment in terms of sustainability, availability, security and provide service through both of these platforms.

Now let’s continue to installation of pure service orchestration on Red Hat OpenShift Container Platform

1. Before installation you need to ensure ISCSI connectivity, when using RHEL OS, for each worker node. If you are using Red Hat Core Operating System (RHCOS) continue to step 2

In this case i will continue to step 2 because of I’m using RHCOS in my environment.

However, the ISCSI configuration of each worker nodes must be completed and Pure Storage must be accessible to ISCSI ip address of worker nodes.

Now let’s check ISCSI configuration of each node.

1.1. Firstly you need to login to Red Hat OpenShift cluster on your workstation or bastion server.

oc login — token=sha256~YJ_lasddf234fdas2355_12345jhkjhjhd — server=https://api.ocp4.example.com:6443

1.2. Check your worker nodes

oc get nodes

1.3. Login your worker nodes

oc debug node/openshift-worker-0.osc.example.com

1.4. Compare IQN name in “initiatorname.iscsi” file with IQN name on storage device whether those are same. After that check network connection between ISCSI ip of worker node with ISCSI ip of storage by using ping command.

chroot /host cat /etc/iscsi/initiatorname.iscsi

Note: When you determine an initiator name for ISCSI, you should’t use more than one colon

2. Configure Linux Multipath Devices for OpenShift Container Platform Worker Nodes(RHEL and RHCOS)

2.1. Download the below yaml file name is “99-pure-storage-attach.yaml” to configure multipath devices for your worker nodes.

https://github.com/purestorage/pso-csi/blob/master/docs/99-pure-storage-attach.yaml

2.2. After downloading the file “99-pure-storage-attach.yaml” , run the below command on your workstation, note: don’t apply on your worker nodes.

oc apply -f 99-pure-storage-attach.yaml

3. Verify the configuration changes on your worker nodes

cat /etc/multipath.conf ls -lh /etc/udev/rules.d/

4. Check other software dependencies for all cluster nodes

4.1. Ensure that Ipv4 forwarding is enabled to allow inter-node communication on all cluster nodes

sysctl net.ipv4.ip_forward

4.2. An NTP implementation (such as ntpd or chronyd) is installed and running on all Kubernetes nodes.

systemctl status chronyd

5. FlashArray User Privileges

The PSO user requires a minimum role level of storage_admin

If you are using Pure Storage FlashArray device, you need to create a user with storage_admin role and create an API Token as well.

5.1. Login your Pure FlashArray

Please go to Settings — Access — Users to create user and Api Token

5.2. Define api token expire time for your user

6. Installation steps of Pure Service Orchestrator

6.1. Install the plugin in a separate namespace (i.e. project)

For security reasons, it is strongly recommended to install the plugin in a separate namespace/project. Make sure the namespace is existing, otherwise create it before installing the plugin.

I will create a new project with the below command called “pure-pso” on my workstation or bastion server and start installation steps on the project

oc new-project pure-pso

6.2. Installation and configuration of Helm Chart.

You can use your workstation or a linux client located in the same location as the OpenShift for the helm installation.

I will use a linux client for the helm installation.

Add the Pure storage PSO helm repository to your helm installation.

helm repo add pure https://purestorage.github.io/helm-charts helm repo update helm search repo pure-pso -l

Optional (offline installation): Download the helm chart

git clone https://github.com/purestorage/helm-charts.git

6.3. Create and customize your own values.yaml and install the helm chart using this, and keep the file for future use. The easiest way is to copy the default ./values.yaml

After downloading the values.yaml. you need to configure the file according to your environment settings.

Please change “clusterID:”, “name:”, “MgmtEndPoint:” and “APIToken:” lines on your values.yaml

Note: MgmtEndPoint is your FlashArray management IP and ApiToken is your FlashArray PSO user in the 5.2 step

Another example of values.yaml

6.4. Run the installation PSO by using Helm

Finally we came to the installation step and let’s check the all configuration what we do so far

For this , you need to use “–dry-run” command, it checks your all configurations whether correct or not

helm install pure-pso pure/pure-pso — namespace pure-pso -f /your_values_yaml_directory/osc_test_values.yaml — dry-run — debug

if you don’t receive an error from the above command output. You can apply the real installation command without using “–dry-run”

helm install pure-pso pure/pure-pso — namespace pure-pso -f /your_values_yaml_directory/osc_test_values.yaml

6.5. Post-Installation Checks

You can run the below command on your workstation. (need login to OpenShift)

oc get pods -n pure-pso

After installing, you should see pods like the following:

Check your pure-pso project on Red Hat OpenShift Container Platform GUI

Check your pure-pso pods, you will see the pods are created on Pure FlashArray automatically on next step

Check StorageClasses on Red Hat OpenShift Container Platform GUI

Check Pure FlashArray GUI for created volumes and connections

7. Summary

After completing all steps, OpenShift can handle all storage subprocess(create, delete, connect, disconnect, attach, snapshot) operations automatically through Pure Service Orchestrator

Thanks for your time.