Installing Pliant Remote Worker Binary for Linux

The purpose of this document is to provide step by step instructions for installing a Pliant Remote Worker instance on a Linux host.

The Pliant Remote Worker Binaries will need to be re-downloaded and re-installed if a new integration package is added to your Pliant instance. The binary workers should be used only when use of the Pliant Remote Worker Appliance (which does not have this limitation) is not possible.

Preparation for Remote Worker Installation

You will need the following in place prior to setting up the remote worker:

1. A user account on the Linux host

2. A worker group configured on your Pliant instance (See: Remote Worker Groups )

3. Network connectivity from the Linux host to the Pliant instance on the following TCP ports:

  • 443 / HTTPS: Pliant proxy

  • 5671 / AMPQS: Pliant message queue

Remote Worker Installation Process

  1. Open a Shell session on the Linux host

2. Create a directory for the Pliant Remote Worker

mkdir pliant

3. Change directory to pliant 

cd pliant

4. Set the variables on lines 1 and 2 for your environment.

PliantHost="Pliant_FQDN_Or_Hostname"
PliantAdminPassword="adminpassword"

5. Download the Plaint Binary Remote Worker build from your Pliant instance. If you are NOT using a self signed certificate on your Pliant instance, you may remove the '-SkipCertificateCheck' flag from the command on lines 1 and 3. The following commands:
1. Get a bearer token for the Pliant API for your ‘admin’ user using the variables you set above.
2. Set the name of the file we’re about to download
3. Connect to the Pliant API and download the file

token=`curl -ks "https://$PliantHost/api/oauth/token" -H 'Authorization: Basic cGxpYW50LmlvLXNwYTpWN1VPR3pBbHZ4V0xVWDhGYzVhVA==' -d "grant_type=password&username=admin&password=$PliantAdminPassword" | grep -Po '(?<="access_token":").*?[^\\\\](?=")'`
outputfile="pliant-worker-linux.tar.gz"
curl -k -X GET -H "Authorization: Bearer $token" -H "Accept: */*" "https://$PliantHost/api/v1/workers/download/latest/LINUX" -o $outputfile
tar -xvf $outputfile
chmod u+x pliant-worker

7. Test run the Remote Worker

NODE_TLS_REJECT_UNAUTHORIZED=0
WorkerGroup="Your_Group_Name"
WorkerSecret="Your_Secret"
PliantHost="Pliant_FQDN_Or_Hostname"
./pliant-worker --api-host $PliantHost --group-name $WorkerGroup --secret-key $WorkerSecret

8. To run remote worker persistently, use screen:

sudo apt install screen

Create a new screen for the remote worker to run within

screen -S pli_rw

Specify parameters needed to run remote worker associated to host machine

NODE_TLS_REJECT_UNAUTHORIZED=0
WorkerGroup="Your_Group_Name"
WorkerSecret="Your_Secret"
PliantHost="Pliant_FQDN_Or_Hostname"

Run the worker within the screen

./pliant-worker \
--api-host $PliantHost \
--group-name $WorkerGroup \
--secret-key $WorkerSecret

Detach from the screen, leaving the remote worker running within, by typing:

Ctrl+a d