Adding and removing NFS persistent volumes

At any time, you can add persistent volumes to support additional offerings of the Component Pack for HCL Connections, or remove persistent volumes when an offering is no longer needed.

Note: The following instructions only apply if you initially set up the persistent volumes with NFS using the connections-persistent-storage-nfs-0.1.0.tgz Helm chart.

Using the Helm chart, you can add volumes for components that were not deployed during the initial installation. You can also remove volumes for components you no longer need.

By default, a helm upgrade operation enables persistent volumes for all components (mongo.enabled, solr.enabled, zk.enabled, es.enabled and customizer.enabled are all set to true). When adding and removing persistent volumes, only specify the volumes that you do not want in your deployment.

You can check which persistent volumes and claims are currently deployed by running the following command:
kubectl get pv,pvc -n connections

Take note of the RECLAIM POLICY for the persistent volumes. By default, the persistentVolumeReclaimPolicy is set to Retain, so when you follow the steps below to remove persistent volumes, the command will only delete the persistent volume claim. The corresponding persistent volume is not deleted, but instead is moved to the Released phase, where all of its data can be recovered. If the RECLAIM POLICY is set to Recycle then you will lose your data when you remove the persistent volume.

Removing persistent volumes

By default, the connections-persistent-storage-nfs helm chart will create persistent volumes for all of the stacks (Orient Me, Customizer and Elasticsearch), so if you want to remove the persistent volume(s) for one or more of the stacks then you will need to run a helm upgrade command and specify the persistent volume that you wish to remove.

For example, suppose that your deployment has persistent volumes for Orient Me, Customizer, and Elasticsearch. You can remove the persistent volumes for Elasticsearch and Customizer by completing the following steps.

  1. Run the following command on the Kubernetes master to remove the persistent volume claims:
    helm upgrade \
    connections-volumes extractedFolder/microservices_connections/hybridcloud/helmbuilds/connections-persistent-storage-nfs-0.1.0.tgz \
    --set \
    es.enabled=false,\
    customizer.enabled=false,
    nfs.server=10.3.4.2 

    If required, you can remove all of the persistent volumes at once with the following command:

    helm delete connections-volumes --purge
    Important: Use this command with caution.
  2. Update the /etc/exports file and remove the NFS entries for the persistent volume claims you just deleted.

Adding persistent volumes

By default, the connections-persistent-storage-nfs helm chart creates persistent volumes for all of the stacks (Orient Me, Customizer and Elasticsearch), so if you only want to create persistent volumes for specific stacks, you must run a helm upgrade command and specify the persistent volume that you do not want to add.

For example, suppose that your deployment has persistent volumes for Orient Me. The original helm command would have looked like the following example:

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,/
es.enabled=false,/
customizer.enabled=false

You can add the persistent volumes for Elasticsearch by completing the following steps.

  1. Locate the original version of the volumes.txt file.

    You should have backed this file up when following the steps in .Setting up persistent volumes with NFS but if you cannot locate the file, you can copy it from the original package in the microservices_connections/hybridcloud/support directory.

  2. On the NFS storage server, edit the volumes.txt file and add the directories for esdata and esbackup

    Tip: Check the original version of the volumes.txt file that is located in the zip.

    During the initial configuration, your volumes.txt file would have looked like the following example, which includes OrientMe volumes only:

    
    /pv-connections/mongo-node-0/data/db
    /pv-connections/mongo-node-1/data/db
    /pv-connections/mongo-node-2/data/db
    /pv-connections/solr-data-solr-0
    /pv-connections/solr-data-solr-1
    /pv-connections/solr-data-solr-2
    /pv-connections/zookeeper-data-zookeeper-0
    /pv-connections/zookeeper-data-zookeeper-1
    /pv-connections/zookeeper-data-zookeeper-2
    

    After adding the directories for esdata and esbackup, your volumes.txt will look like the following example:

    
    /pv-connections/mongo-node-0/data/db
    /pv-connections/mongo-node-1/data/db
    /pv-connections/mongo-node-2/data/db
    /pv-connections/solr-data-solr-0
    /pv-connections/solr-data-solr-1
    /pv-connections/solr-data-solr-2
    /pv-connections/zookeeper-data-zookeeper-0
    /pv-connections/zookeeper-data-zookeeper-1
    /pv-connections/zookeeper-data-zookeeper-2
    /pv-connections/esbackup
    /pv-connections/esdata-0
    /pv-connections/esdata-1
    /pv-connections/esdata-2
  3. Make sure that the updated volumes.txt file is stored in the same directory as the nfsSetup.sh script (located in the zip at microservices_connections/hybridcloud/support).
  4. On the NFS storage server, run the following command to configure NFS for the Elasticsearch volumes:
    sudo bash nfsSetup.sh
  5. Run the following helm upgrade command on the Kubernetes master to add the Elasticsearch volumes:
    helm upgrade \
    connections-volumes extractedFolder/microservices_connections/hybridcloud/helmbuilds/connections-persistent-storage-nfs-0.1.0.tgz \
    --set \
    customizer.enabled=false,
    nfs.server=10.3.4.2

    This example sets customizer.enabled=false to avoid adding persistent volumes for Customizer. By omitting es.enabled=false, you are now creating Elasticsearch volumes.