Welcome to this demo where I will show you how to install the HPE CSI
Operator for Kubernetes on Red Hat OpenShift.
My name is Chris Snell and I am a Technical Marketing Engineer
for Hewlett Packard Enterprise Storage Division.
Today I will be talking about how to deploy the HPE CSI operator in a Red
Hat 4.x cluster and configure it to talk to an HPE Primera array.
HPE and Red Hat have a long standing partnership to provide jointly supported software,
platform and services with the absolute best customer experience in the industry.
The HPE CSI Operator for Kubernetes is one of
several ways to deploy the HPE CSI Driver within Kubernetes.
Software deployed on Red Hat OpenShift follows the Operator pattern.
The goal of the operator pattern is to manage services in a similar way as a human operator.
The operators manage the deployment,
how the service behaves and how to react in case there is an issue,
It also handles upgrades and decommissioning of the service or services.
Managing CSI Drivers with an operator is no different.
You can learn more about the operator pattern at kubernetes.io.
Let's get started on deploying the HPE CSI Operator.
As with all of our deployments,
the best place to find the most up to date documentation on how to deploy
and manage the HPE CSI Driver for Kubernetes
as well as the HPE CSI Operator is out on scod.hpedev.io
For Red Hat OpenShift deployments, scroll down
on the left hand menu under Partner Ecosystems.
It is important to note before I get started, I will need to deploy the HPE CSI Operator through
the Red Hat OperatorHub found within the OpenShift
cluster console and not through Operatorhub.io.
There's a few maintenance tasks that I need to take care of first before we go much further.
The HPE CSI Operater needs to run in privileged mode within
the OpenShift cluster in order to access the necessary host
ports, networks and be able to mount volumes.
I will need to create the SecurityContextConstraints (SCC) to
grant the CSI operator the necessary privileges to run.
This must be done first and don't forget this step otherwise the driver will not run properly.
I will first start in the terminal, to configure the SCC.
Copy and paste the curl command from SCOD to download the scc yaml file.
Next I will create an OpenShift project where I will deploy the operator.
I will create for this example an the hpe-csi-driver project.
Once i have it created, I will update the the scc.yaml file with the project name.
Once done I create the scc within the openshift cluster.
At this point that is all I have to do within the terminal,
everything here on out will be done from the OpenShift cluster UI.
Once logged into the OpenShift console, go to Operators and then OperatorHub.
Here you will find a list of the operators available for install within your cluster.
I will start by searching the list for HPE,
I should see the HPE CSI Operator show up in my list.
Click on the Operator and then click install.
Next I will need to create an Operator subscription,
here I will choose the hpe csi driver project that I created and click subscribe.
While the operator is installing, I will go ahead and configure it.
I will click on the HPE CSI Operator for Kubernetes and click Create Instance.
The next screen will bring up a bunch of YAML where I will customize the deployment.
I am going to keep it simple and only modify the necessary parameters.
First I will need to specify the backend type, here you have two options, nimble or primera3par.
Since I will be connecting my Primera up to this cluster so i will specify the primera3par
Next under the secret section, I will set the backend to the mgmt IP of my Primera
array as well as the username and password.
The operator will use this section to create a default Kubernetes secret that will be used
for communicating to my Primera and provisioning persistent volumes to my applications.
The last thing that I will do here is set the create storageclass to false.
The default storageclass that is created by the operator is very basic.
I want to create a custom storageclass which is the reason I set this to false.
Now that I have set all of the necessary parameters, I will click create
at which point the operator will finish deploying.
I can switch over to the Developer view in order to watch what is going on and
see the various components that are getting deployed.
Here I can see the CSI Operator and the CSI node drivers being deployed.
Also I can see the Primera CSP has been deployed as well.
The deployment will take a few minutes to finish up depending on the size of the cluster.
And once complete I should see Succeeded under the status section.
Now that it is installed, I can inspect the secret that was created by the operator.
If I click on the secret I can see additional details as well as see the YAML.
I will make note of the name of the secret as I will need it when I create the storageclass.
With the operator deployed and the secret available,
I can go ahead and create the Storageclass.
I can find Storageclasses under the Storage section
on the left hand side. I will click create storage class.
Since I have a lot of parameters to enter for my storageclass,
I don't want to go through the hassle of using this interface
so I will switch to the YAML editor.
This gives me the option to copy and paste my storageclass spec directly into the UI.
I want to use my SSD tier as well as create a data
reduction volumes with this storageclass on my Primera.
I can find all of the supported parameters for Primera out on scod.hpedev.io.
As I am looking at the Storageclass here, there are a few things to note.
I need to make sure to set the secret and the namespace (the project name)
on the various CSI sidecards to match what I have available in my cluster.
Which in my case being the primera3par-secret and the namespace being hpe-csi-driver.
Once I have that done I click create.
With the storageclass now available I will create a simple PVC.
Click on Persistent Volume claims on the left
and since I set the storageclass that I created to default, it should already be chosen.
Next I will give it a name.
Since the Primera is block storage, I will set this PVC to ReadWriteOnce.
I recently created another video demonstrating how to create a ReadWriteMany volume with Primera,
I recommend you go check that out as well as go to scod.hpedev.io for more information.
I will request a 50 gigabyte volume and click create.
I should see the PVC switch from Pending to Bound.
At this point I will see the Persistent Volume that was created.
I can click on that for more information on the volume.
Finally I log into my Primera UI and I should see the volume created.
I can inspect the volume to see that it using the SSD tier and has data reduction enabled.
Now the PVC is ready to be attached to your applications.
This concludes this demo on deploying the HPE CSI Operator for Kubernetes in Red Hat OpenShift.
If you would like to learn more go to HPE.com/storage/containers.
Until next time.