Setting up persistent volumes with NFS

Use the Helm chart to install or update persistent volumes that store Component Pack data for HCL Connections.

About this task

Persistent volumes provide pod-independent storage for a Kubernetes deployment. The instructions in this section explain how to configure the persistent volumes on an NFS share. In production, it is best practice to have the NFS share on a storage server that is not part of the Kubernetes cluster, but for a proof of concept, non-HA deployment, it is acceptable to host the NFS share on your Kubernetes master.

Attention: NFSv4 must be used when setting up Persistent Volumes with NFS.

You can create the persistent volumes using the helm chart connections-persistent-storage-nfs-0.1.0.tgz, located in the helmbuilds directory within the installation package.

The following installation instructions are based on the following assumptions:
  • You are deploying in an IPv4 environment
  • All persistent volumes will be created on the NFS server
  • The NFS server and all Kubernetes nodes that the Component Pack pods will run are the same network (such as 10.3.x.x)
  • NFS resources are available (nfs-utils, rpcbind, nfs-server, nfs-lock and nfs-idmap)
  • The directory hosting the volumes is named pv-connections. This name is shown in examples but you can use a different directory name.

Procedure

  1. Determine which storage components your deployment needs.

    You only need to create persistent volumes for the services you intend to deploy. If you deploy an additional Component Pack service later, you can update the deployment to add one or more persistent volumes. Table 1 lists the storage component required for each of the Component Pack services.

    Table 1. Storage components needed for Component Pack services
    Component Pack service Required storage component Directories

    Elasticsearch

    Elasticsearch

    /pv-connections/esbackup

    /pv-connections/esdata-0
    /pv-connections/esdata-1

    /pv-connections/esdata-2

    Customizer (mw-proxy)

    Customizer

    /pv-connections/customizations

    Infrastructure

    Mongo

    /pv-connections/mongo-node-0/data/db

    /pv-connections/mongo-node-1/data/db

    /pv-connections/mongo-node-2/data/db

    Orient Me

    Solr

    /pv-connections/solr-data-solr-0
    /pv-connections/solr-data-solr-1
    /pv-connections/solr-data-solr-2

    Orient Me

    Zookeeper

    /pv-connections/zookeeper-data-zookeeper-0
    /pv-connections/zookeeper-data-zookeeper-1
    /pv-connections/zookeeper-data-zookeeper-2

    Activity Plus minio (object storage server, compatible with Amazon S3 cloud storage service) /pv-connections/kudos-boards-minio
  2. Create directories and assign permissions.

    On the NFS storage server, run the following commands to create the necessary directories and set permissions required for the persistent volumes that you want to create. You only need to run the commands that create directories for the storage components that are needed for your deployment.

    
    sudo mkdir -p /pv-connections/esdata-{0,1,2}
    sudo mkdir -p /pv-connections/esbackup
    sudo mkdir -p /pv-connections/customizations
    sudo mkdir -p /pv-connections/mongo-node-{0,1,2}/data/db
    sudo mkdir -p /pv-connections/solr-data-solr-{0,1,2}
    sudo mkdir -p /pv-connections/zookeeper-data-zookeeper-{0,1,2}
    sudo chmod -R 700 /pv-connections
    sudo chmod -R 005 /pv-connections/customizations
  3. Configure NFS by completing the following steps:
    1. Download the Component Pack installation zip on the NFS storage server and extract some of the files from it to a folder of your choice by running the following commands:
      unzip -p IC-ComponentPack-6.0.0.x.zip microservices_connections/hybridcloud/support/nfsSetup.sh > nfsSetup.sh
      unzip -p IC-ComponentPack-6.0.0.x.zip microservices_connections/hybridcloud/support/volumes.txt > volumes.txt
      
    2. Make a back-up copy of the volumes.txt file.
    3. Modify the volumes.txt file to specify only the paths for the storage components needed by your deployment.

      By default, storage is created for all of the Component Pack stacks (Orient Me, Elasticsearch and Customizer). If you do not plan to deploy all of the components, or if you plan to use different paths remove or update the paths as needed. Table 2 lists the default paths and the components that use them.

      Table 2. Default paths for persistent volumes
      Default path Component
      /pv-connections/mongo-node-0/data/db

      Orient Me
      Customizer

      /pv-connections/mongo-node-1/data/db

      Orient Me
      Customizer

      /pv-connections/mongo-node-2/data/db

      Orient Me
      Customizer

      /pv-connections/solr-data-solr-0 Orient Me
      /pv-connections/solr-data-solr-1 Orient Me
      /pv-connections/solr-data-solr-2 Orient Me
      /pv-connections/zookeeper-data-zookeeper-0 Orient Me
      /pv-connections/zookeeper-data-zookeeper-1 Orient Me
      /pv-connections/zookeeper-data-zookeeper-2 Orient Me
      /pv-connections/esbackup Elasticsearch
      /pv-connections/esdata-0 Elasticsearch
      /pv-connections/esdata-1 Elasticsearch
      /pv-connections/esdata-2 Elasticsearch
      /pv-connections/customizations Customizer
      /pv-connections/kudos-boards-minio Activities Plus
    4. Run the following script to install NFS and configure it with the volumes specified in volumes.txt, and verify that the NFS successfully configured! message was returned:
      sudo bash nfsSetup.sh
    5. Run the following command to view the /etc/exports file which lists the directories created with NFS:
      sudo cat /etc/exports
  4. Use Helm to install the persistent volumes (PVs) and persistent volume claims (PVCs):
    1. Download the Component Pack installation packager zip and extract it to a folder of your choosing on the Kubernetes master server.
    2. Run the following command on the Kubernetes master node:
      helm install \ 
      --name=connections-volumes extractedFolder/microservices_connections/hybridcloud/helmbuilds/connections-persistent-storage-nfs-0.1.0.tgz \
      --set parameters

      where:

      • extractedFolder is the location where your extracted the Component Pack installation package.
      • parameters is the list of parameters, which are described in Table 2.
      Table 3. Parameters for installing persistent volumes using Helm
      Values Description Default value Options
      namespace Name of the namespace to create the Persistent Volume Claims in. connections Specified by the administrator.
      nfs.server Required. IPv4 address of the NFS server.

      This value will always need to be set during a helm installation or upgrade. Contact your system administrator for the value.

      1.2.3.4 IP address of the NFS server in IPv4 format.
      persistentVolumeReclaimPolicy Reclaim policy of the Persistent Volume. With the Retain policy, if a user deletes a PersistentVolumeClaim, the corresponding PersistentVolume is not deleted. Instead, it is moved to the Released phase, where all of its data can be manually recovered. Retain Recycle, Retain
      persistentVolumePath The name of the persistent storage volume directory for NFS, starting from the root. There is no need to include the leading / in the path. pv-connections anything
      storageClassName A PV of a particular storage class can only be bound to PVCs requesting that class. anything Specified by the administrator.
      mongo.enabled If set to true, creates the PVs and PVCs associated with Mongo. true true, false
      mongo.capacity.storage If mongo.enabled is true, then this value specifies the storage capacity that is assigned to the PV for Mongo. 8 GB Specified by the administrator.
      mongo.resources.requests.storage If mongo.enabled is true, then this value represents the maximum amount of storage that can be claimed by the PVC for Mongo. 8 GB Specified by the administrator.
      solr.enabled If set to true, creates the PVs and PVCs associated with Solr. true true, false
      solr.capacity.storage If solr.enabled is true, then this value specifies the storage capacity that is assigned to the PV for Solr. 10 GB Specified by the administrator.
      solr.resources.requests.storage If solr.enabled is true, then this value represents the maximum amount of storage that can be claimed by the PVC for Solr. 10 GB Specified by the administrator.
      zk.enabled If set to true, creates the PVs and PVCs associated with Zookeeper. true true, false
      zk.capacity.storage If zk.enabled is true, then this value specifies the storage capacity that is assigned to the PV for Zookeeper. 2 GB Specified by the administrator.
      zk.resources.requests.storage If zk.enabled is true, then this value represents the maximum amount of storage that can be claimed by the PVC for Zookeeper. 2 GB Specified by the administrator.
      es.enabled If set to true, creates the PVs and PVCs associated with Elasticsearch. true true, false
      es.capacity.storage If es.enabled is true, then this value specifies the storage capacity that is assigned to the PV for Elasticsearch. 10 GB 20 GB if Orient Me uses Elasticsearch. Specified by the administrator.
      es.resources.requests.storage If es.enabled is true, then this value represents the maximum amount of storage that can be claimed by the PVC for Elasticsearch. 10 GB 20 GB if Orient Me uses Elasticsearch. Specified by the administrator.
      customizer.enabled If set to true, creates the PVs and PVCs associated with Customizer. true true, false
      customizer.capacity.storage If customizer.enabled is true, then this value specifies the storage capacity that is assigned to the PV for Customizer. 2 GB Specified by the administrator.
      customizer.resources.requests.storage If customizer.enabled is true, then this value represents the maximum amount of storage that can be claimed by the PVC for Customizer. 2 GB Specified by the administrator.

Example

The following examples use the fictional address "10.3.4.2" as the IPv4 address of the NFS server.

Deploy PVs and PVCs for Mongo, Solr, Zookeeper, Elasticsearch, and Customizer (default):
helm install --name=connections-volumes extractedFolder/microservices_connections/hybridcloud/helmbuilds/connections-persistent-storage-nfs-0.1.0.tgz --set nfs.server=10.3.4.2

Deploy PVs and PVCs for Elasticsearch only:
helm install --name=connections-volumes extractedFolder/microservices_connections/hybridcloud/helmbuilds/connections-persistent-storage-nfs-0.1.0.tgz --set solr.enabled=false,zk.enabled=false,mongo.enabled=false,customizer.enabled=false,nfs.server=10.3.4.2

Deploy PVs and PVCs for Mongo only:
helm install --name=connections-volumes extractedFolder/microservices_connections/hybridcloud/helmbuilds/connections-persistent-storage-nfs-0.1.0.tgz --set solr.enabled=false,zk.enabled=false,es.enabled=false,customizer.enabled=false,nfs.server=10.3.4.2

Deploy PVs and PVCs for all of Mongo, Solr, Zookeeper, Elasticsearch, and Customizer but change the Mongo PV storage capacity from 8 GB (default) to 12 GB
helm install --name=connections-volumes extractedFolder/microservices_connections/hybridcloud/helmbuilds/connections-persistent-storage-nfs-0.1.0.tgz --set mongo.capacity.storage=12Gi,nfs.server=10.3.4.2

What to do next

For steps on how to add, remove, or resize the persistent volumes, see Managing persistent volumes for Component Pack.