Skip to main content

Install Frends Agent on Linux (Experimental setup for Frends 5.4)

frends Agent Linux Ubuntu Cross-Platform installation (Frends 5.4)

T
Written by Tikriti Shabudin
Updated over a year ago


The following steps will install a basic standalone frends Agent on Linux (tested on Ubuntu 18.04)


1. Create Environment/Agent Group

In the Frends UI Create a new Agent Group (and Environment if needed)
Under Advanced Settings enable the following options

  • Cross-Platform

  • Allow new Agents to connect to Agent group

Click - Download Kubernetes configuration


​


2. Modify Agent Config

Unzip the config downloaded above.

Open the file \deploy\secrets\appsettings.secrets.json in an editor and make the following changes


Change the value in DataDirectory to be

  "DataDirectory": "/var/lib/frends-system-data",


Add the following items (set an appropriate agentName)

"agentName": "[YOUR_AGENT_NAME]",    
"Log4NetCore":
{
"Log4NetConfigFileName": "log4net.config.xml"
}


This config will be added to the Agent Server later in Step 4


3. Prepare the Agent Host

The following commands should be run on the Agent server


​

Create Frends Agent Group/User

sudo addgroup --system frendsagent --quiet   
sudo adduser --system --home /opt/frends-agent-linux --no-create-home --ingroup frendsagent --disabled-password --shell /bin/false frendsagent

Prepare Agent Directories

sudo mkdir /var/log/FRENDS /var/lib/frends-system-data    
sudo chown frendsagent:frendsagent /var/log/FRENDS /var/lib/frends-system-data

Install Dependencies

Frends Cross-Platform Agent requires ASP.NET Core Runtime 3.1

sudo apt install apt-transport-https unzip    
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt update -y
sudo apt install aspnetcore-runtime-3.1 -y


4. Install the Agent

Download/Unzip Agent Files

Until a more formal method is introduced support@frends.com will provide an Azure Storage SAS URI to download the version specific Agent Deployment files. It doesn't matter where you download the files (home/temp)

wget "[SAS URI in quotes]" -k -O "Frends-Agent.zip"   
unzip Frends-Agent.zip
cd agent-publish

Edit App Settings

Using your preferred editor (vi/nano) create the file appsettings.json
Replace the content with the config prepared earlier in step 2
​

Install the Agent/Service

Back at the command prompt make Deploy-frends-Agent.sh executable and run

sudo chmod 700 ./Deploy-FRENDS-Agent.sh
sudo ./Deploy-FRENDS-Agent.sh install


​Deploy-frends-Agent.sh will do the following

  • Copy the Agent files to /opt/frends-agent-linux/

  • Create a Daemon service for the Agent called frendsagent

Controlling the frends Agent Service (Start/Restart/Stop/Status)

sudo systemctl start frendsagent
sudo systemctl restart frendsagent
sudo systemctl stop frendsagent
sudo systemctl status frendsagent

Checking frends Agent Logs

Frends Agent log location /var/log/frends/

tail -f /var/log/FRENDS/FRENDSAgentService.log
Did this answer your question?