Installing the HPE Ezmeral CSI Operator

Describes how to download and install the HPE Ezmeral CSI Operator for Kubernetes for deployment in Kubernetes and OpenShift environments.

Overview

The HPE Ezmeral CSI Operator for Kubernetes packages, deploys, and manages HPE Ezmeral CSI Drivers on Kubernetes and OpenShift. After installing the operator and creating a CSI Driver object, you can enable static and dynamic provisioning of persistent volumes on the HPE Ezmeral Data Fabric platform.

Installing the Operator in Kubernetes

To install the operator in a Kubernetes environment:

  1. Install the Operator Lifecycle Manager (OLM) tool. The OLM allows you to manage the operators running on your cluster:
    $ curl -sL https://github.com/operator-framework/operator-lifecycle-manager/releases/download/v0.17.0/install.sh | bash -s v0.17.0
  2. Install the HPE Ezmeral CSI Operator by running the following command:
    $ kubectl create -f https://operatorhub.io/install/hpe-ezmeral-csi-operator.yaml

    The operator is installed in the my-hpe-ezmeral-csi-operator namespace and is usable only from this namespace.

  3. After installation, use the following command to watch the operator come up:
    $ kubectl get csv -n my-hpe-ezmeral-csi-operator
  4. To instantiate the driver object, create a file named hpe-csi-operator.yaml, and populate it according to the CSI Driver that is being deployed.
  5. Create a CSI Driver object. The operator supports FUSE and Loopback NFS drivers. In the following examples, <tag> is the image tag:
    • HPE Ezmeral CSI Driver (FUSE)
      apiVersion: ezmeral.hpe.com/v1
      kind: HPEEzmeralCSIDriver
      metadata:
        name: hpeezmeralcsidriver 
        namespace: my-hpe-ezmeral-csi-operator
      spec:
        controllerImage: maprtech/csi-kdfprovisioner:<tag>
        nodeImage: maprtech/csi-kdfplugin:<tag>
        pullPolicy: IfNotPresent
    • HPE Ezmeral CSI Driver (Loopback NFS)
      apiVersion: ezmeral.hpe.com/v1
      kind: HPEEzmeralNFSCSIDriver
      metadata:
        name: hpeezmeralnfscsidriver
        namespace: my-hpe-ezmeral-csi-operator
      spec:
        controllerImage: maprtech/csi-kdfprovisioner:<tag>
        nodeImage: maprtech/csi-nfsplugin:<tag>
        pullPolicy: IfNotPresent
  6. Verify that the HPE Ezmeral CSI Operator and CSI Driver pods are running in the namespace:
    $ kubectl get pods -n my-hpe-ezmeral-csi-operator

The CSI Driver is now ready to use. To use the CSI Driver to statically and dynamically provision and mount a data-fabric volume, see Using the Container Storage Interface (CSI) Storage Plugin.

Installing the Operator in OpenShift

You can install the HPE Ezmeral CSI Operator in the OpenShift environment by using the OpenShift CLI or the web console.

Prerequisites for OpenShift Installation

The HPE Ezmeral CSI Driver needs to run in privileged mode and needs access to host ports in the host network and must be able to mount hostPath volumes. Hence, before deploying the HPE Ezmeral CSI Operator on OpenShift, you must create a set of security context constraints (SCCs) to allow the CSI Driver to run with these privileges:
curl -sL https://raw.githubusercontent.com/mapr/mapr-csi/master/deploy/openshift/operator-scc.yaml > hpe-ezmeral-csi-scc.yaml
  1. Change my-hpe-ezmeral-csi-driver to the name of the project (for example, hpe-ezmeral-csi below) where the CSI Operator is being deployed:
    oc new-project hpe-ezmeral-csi --display-name="HPE Ezmeral CSI Drivers for Kubernetes"
    sed -i  's/my-hpe-ezmeral-csi-driver/hpe-ezmeral-csi/g' hpe-ezmeral-csi-scc.yaml
  2. Deploy the SCC:
    oc create -f hpe-ezmeral-csi-scc.yaml
    securitycontextconstraints.security.openshift.io/hpe-ezmeral-csi-scc created

Installing the Operator Using the OpenShift CLI

The following steps show an example of operator deployment using oc. This example assumes that the SCC has been applied to the project and has kube:admin privileges. The example deploys to the hpe-ezmeral-csi project, as described in the previous steps.

  1. Create an operator group:
    apiVersion: operators.coreos.com/v1
    kind: OperatorGroup
    metadata:
      name: hpe-ezmeral-csi-operator
      namespace: hpe-ezmeral-csi
    spec:
      targetNamespaces:
      - hpe-ezmeral-csi
  2. Create a subscription to the operator:
    apiVersion: operators.coreos.com/v1alpha1
    kind: Subscription
    metadata:
      name: hpe-ezmeral-csi-operator
      namespace: hpe-ezmeral-csi
    spec:
      channel: stable
      installPlanApproval: Automatic
      name: hpe-ezmeral-csi-operator
      source: certified-operators
      sourceNamespace: openshift-marketplace
    The operator is now installed on the OpenShift cluster. Creation of the subscription triggers the creation of the InstallPlan and CSV:
  3. Display information about the InstallPlan and CSV:
    oc get installplan -n hpe-ezmeral-csi
    NAME            CSV                               APPROVAL    APPROVED
    install-5lmzg   hpe-ezmeral-csi-operator.v<ver>   Automatic   true
    
    oc get csv -n hpe-ezmeral-csi
    NAME                              DISPLAY                                               VERSION   REPLACES   PHASE
    hpe-ezmeral-csi-operator.v<ver>   HPE Ezmeral Data Fabric CSI Operator for Kubernetes   <ver>                Succeeded
  4. Create a CSI Driver object. The operator supports FUSE and Loopback NFS drivers:
    • HPE Ezmeral CSI Driver (FUSE)
      apiVersion: ezmeral.hpe.com/v1
      kind: HPEEzmeralCSIDriver
      metadata:
        name: hpeezmeralcsidriver
        namespace: hpe-ezmeral-csi
      spec:
        controllerImage: registry.connect.redhat.com/maprtech/csi-kdfprovisioner:latest
        nodeImage: registry.connect.redhat.com/maprtech/csi-kdfplugin:latest
        pullPolicy: IfNotPresent
    • HPE Ezmeral CSI Driver (LoopbackNFS)
      apiVersion: ezmeral.hpe.com/v1
      kind: HPEEzmeralNFSCSIDriver
      metadata:
        name: hpeezmeralnfscsidriver
        namespace: hpe-ezmeral-csi
      spec:
        controllerImage: registry.connect.redhat.com/maprtech/csi-kdfprovisioner:latest
        nodeImage: registry.connect.redhat.com/maprtech/csi-nfsplugin:latest
        pullPolicy: IfNotPresent
  5. Verify that HPE Ezmeral CSI Operator and CSI Driver pods are running in the namespace:
    # oc get pods -n hpe-ezmeral-csi
    NAME                                              READY   STATUS    RESTARTS   AGE
    hpe-ezmeral-csi-controller-0                      7/7     Running   0          62s
    hpe-ezmeral-csi-driver-operator-9dd887bf7-hdxc9   1/1     Running   0          4m6s
    hpe-ezmeral-csi-node-79xw5                        3/3     Running   0          61s
    hpe-ezmeral-csi-node-m2gpv                        3/3     Running   0          61s
    hpe-ezmeral-csi-node-x25dr                        3/3     Running   0          61s
    hpe-ezmeral-nfscsi-controller-0                   7/7     Running   0          29s
    hpe-ezmeral-nfscsi-node-hhrhv                     3/3     Running   0          28s
    hpe-ezmeral-nfscsi-node-jz5cx                     3/3     Running   0          28s
    hpe-ezmeral-nfscsi-node-tvtgm                     3/3     Running   0          28s

Installing the Operator Using the OpenShift Web Console

Use the following steps to install the operator using the web console:

  1. Once the SCC has been applied to the project, log in to the OpenShift web console as kube:admin, and navigate to Operators > OperatorHub.
  2. In the search field, type HPE Ezmeral, and press enter:

  3. Select the HPE Ezmeral Data Fabric CSI Operator for Kubernetes and click Install:

  4. In the next pane, click Install:

  5. The HPE Ezmeral CSI Operator is now installed:

  6. Click the HPE Ezmeral Data Fabric CSI Operator for Kubernetes to view the Operator Details:

  7. To create the HPE Ezmeral CSI Driver (FUSE), click Create Instance under HPEEzmeralCSIDriver.
  8. In the Create HPEEzmeralCSIDriver pane, click Create:

  9. To create the HPE Ezmeral CSI Driver (NFS), click Create Instance under HPEEzmeralNFSCSIDriver.
  10. In the Create HPEEzmeralNFSCSIDriver pane, click Create:

  11. By navigating to the Developer view, you can inspect the CSI Driver and operator topology:

The CSI Driver is now ready for use. To use the CSI Driver to statically and dynamically provision and mount a data-fabric volume, see Using the Container Storage Interface (CSI) Storage Plugin.