Skip to main content

Frends Agent Volume Mounts

Configuring Frends Agent Volume Mounts for Kubernetes

T
Written by Tikriti Shabudin
Updated over 3 years ago

Below are a few example uses for Volumes with Frends Agents in Kubernetes.

These example changes can be used by modifying the Agent configuration before deployment.

For more platform specific examples see the Kubernetes Volume Documentation


Persisted System (Dev/Test)

By default the Frends Agent Database and Processes are stored locally on each Agent Pod. This means when a Pod is destroyed so is any transient data.

A persisted-system volume mount can be used to store the Frends Agents Database and Processes outside the pod ensuring it is persisted in the event of a restart/termination.

Persisted System - HostPath Volume

The simplest way to mount a file system as persisted-system is to use a HostPath Volume mount which mounts a file or directory from the host node's filesystem into your Frends Agent Pod.

For example a developer running Docker Desktop with Kubernetes who wants to mount a local directory C:\FRENDS\Persisted-system\ with a Frends Agent running in their local Kubernetes cluster.

To mount a hostPath volume as persistent-system first specify a persisted-system volumeMount in FRENDS-Agent-Deploy.yaml

volumeMounts:
- name: persisted-system
mountPath: /persisted-system


next add a persisted-system volume in FRENDS-Agent-Deploy.yaml

volumes:
- name: persisted-system
hostPath:
path: /host_mnt/c/FRENDS/persisted-system/AgentGroupName


For more information see the Kubernetes documentation on HostPath volumes

WARNING : This option is only intended to be used for standalone Agents(non HA) in Development and Testing. For Production Environments we recommend using a Shared State Store instead


Persisted Data (Dev/Test/Prod)

The persisted-data volume is used to mount an external file system which can be used by the Agent to store and retrieve Frends Process data outside the pod.


Persisted Data - HostPath Volume

The simplest way to mount a file system as persisted-data is to use a HostPath Volume mount which mounts a file or directory from the host node's filesystem into your Frends Agent Pod.

For example a developer running Docker Desktop with Kubernetes who wants to mount a local directory C:\FRENDS\persisted-data\ with a Frends Agent running in their local Kubernetes cluster.

To mount a hostPath volume as persistent-data first specify a persisted-data volumeMount in FRENDS-Agent-Deploy.yaml

volumeMounts:
- name: persisted-data
mountPath: /persisted-data


next add a persisted-data volume in FRENDS-Agent-Deploy.yaml


volumes:
- name: persisted-data
hostPath:
path: /host_mnt/c/FRENDS/persisted-data/AgentGroupName


For more information see the Kubernetes documentation HostPath volumes


Persisted Data - AzureFile Volume

This example shows how to mount a Persisted-Data volume from a Microsoft Azure File Share into a Pod running in Azure Kubernetes Service (AKS)

Create a Frends Agent Storage Secret by running the kubectl command below.

Replacing the following parameters

[NameSpace] = Kubernetes NameSpace that your Frends Agent is deployed to.

[AzureStorageAccountName] = The name of your Azure Storage Account.

[AzureStorageAccountKey] = The primary or secondary Access Key for your storage account (get this from the Azure Portal)

Kubectl command

kubectl -n [NameSpace] create secret generic azure-storage-secret --from-literal=azurestorageaccountname="[AzureStorageAccountName]" --from-literal=azurestorageaccountkey="[AzureStorageAccountKey]"


Edit the FRENDS-Agent-Deploy.yaml file

Add a persisted-data volumeMount to volumeMounts


volumeMounts:
- name: persisted-data
mountPath: /persisted-data


Next add a persisted-data volume under volumes

volumes:
- name: persisted-data
azureFile:
secretName: azure-storage-secret
shareName: share/AgentGroupName
readOnly: false


More detailed information can be found here Microsoft documentation

Did this answer your question?