Contents

Network File System Overview

Network File System (NFS) is a distributed file system protocol that can allow a system to share directories and files with others over a network. NFS operates in a client-server environment where the server is responsible for managing the authentication, authorization, and administration of clients, as well as for all data shared within a particular file system.

NFS Server Setup

To set up the host server on Ubuntu, refer to NFS Install. Control or Workstation node will be the NFS server and worker nodes are the clients

Prerequisites

Follow the Helm README.md to install the K8s prerequisites on the host machines.

Updates in the Helm Charts Directory

  1. Edit the “EII_HOME_DIR” in .env([WORK_DIR]/IEdgeInsights/build/.env) with /home/username/<dir&gt;/IEdgeInsights/ and “PROVISION_MODE” with k8s.

  2. Ensure to update the EII Service Secrets Username and password in .env([WORK_DIR]/IEdgeInsights/build/.env) file.

  3. Run builder to copy templates file to eii-deploy/templates directory and generate consolidated values.yaml file for eii-services:

    Note: Execute builder.py with the preferred usecase for generating the consolidated helm charts for the provisioning and deployment.

    cd [WORKDIR]/IEdgeInsights/build
    python3 builder.py -f usecases/<usecase>.yml
    

Changes in the Helm Files for NFS

  1. Update the “storageClassName” with nfs in eii-deploy/values.yaml([WORK_DIR]/IEdgeInsights/build/helm-eii/eii-deploy/values.yaml)

  2. Update the volumes section with following configurations in eii-deploy/values.yaml([WORK_DIR]/IEdgeInsights/build/helm-eii/eii-deploy/values.yaml)

    volumes:
    influxdata:
     name: vol-influxdata
     size: 1Gi
     location: "/opt/intel/eii/data/influxdata"
     path: "/opt/intel/eii/data"
     server: <server-host-ip>
    
    miniodata:
       name: vol-miniodata
       size: 1Gi
       location: "/opt/intel/eii/data/minio-bucket"
       path: "/opt/intel/eii/data"
       server: <server-host-ip>
    
  3. Replace the infludata and miniodata volume details in eii-deploy/templates/eii-pv.yaml([WORK_DIR]/IEdgeInsights/eii-pv.yaml) with below changes:

    apiVersion: v1
    kind: PersistentVolume
    metadata:
     namespace: {{ .Values.namespace }}
     name: {{ .Values.volumes.influxdata.name }}
     labels:
       type: local
    spec:
     capacity:
       storage: {{ .Values.volumes.influxdata.size }}
     volumeMode: Filesystem
     accessModes:
       - ReadWriteMany
     persistentVolumeReclaimPolicy: Retain
     storageClassName: {{ .Values.storageClassName }}
     mountOptions:
       - hard
     nfs:
       path: {{ .Values.volumes.influxdata.path }}
       server: {{ .Values.volumes.influxdata.server }}
    ---
    apiVersion: v1
    kind: PersistentVolume
    metadata:
     namespace: {{ .Values.namespace }}
     name: {{ .Values.volumes.miniodata.name }}
     labels:
       type: local
    spec:
     capacity:
       storage: {{ .Values.volumes.miniodata.size }}
     volumeMode: Filesystem
     accessModes:
       - ReadWriteMany
     persistentVolumeReclaimPolicy: Retain
     storageClassName: {{ .Values.storageClassName }}
     mountOptions:
       - hard
     nfs:
       path: {{ .Values.volumes.miniodata.path }}
       server: {{ .Values.volumes.miniodata.server }}
    

    Based on the number of influxdata and miniodata volumes, update the persistent volume details.

    1. Replace the infludata and miniodata volume details in eii-deploy/templates/eii-pvc.yaml([WORK_DIR]/IEdgeInsights/eii-pvc.yaml) with below changes:

    apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
     namespace: {{ .Values.namespace }}
     name: {{ .Values.volumes.influxdata.name }}
    spec:
     storageClassName: {{ .Values.storageClassName }}
     accessModes:
       - ReadWriteMany
     resources:
       requests:
         storage: {{ .Values.volumes.influxdata.size }}
    ---
    apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
     namespace: {{ .Values.namespace }}
     name: {{ .Values.volumes.miniodata.name }}
    spec:
     storageClassName: {{ .Values.storageClassName }}
     accessModes:
       - ReadWriteMany
     resources:
       requests:
         storage: {{ .Values.volumes.miniodata.size }}
    

    Based on the number of influxdata and miniodata volumes, update the persistent volume details.