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.
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.
- 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
-
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-2Customizer (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/dbOrient Me
Solr
/pv-connections/solr-data-solr-0
/pv-connections/solr-data-solr-1
/pv-connections/solr-data-solr-2Orient Me
Zookeeper
/pv-connections/zookeeper-data-zookeeper-0
/pv-connections/zookeeper-data-zookeeper-1
/pv-connections/zookeeper-data-zookeeper-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
-
Configure NFS by completing the following steps:
-
Use Helm to install the persistent volumes (PVs) and persistent volume claims (PVCs):
Example
The following examples use the fictional address "10.3.4.2" as the IPv4 address of the NFS server.
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
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
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
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.