Installing Pliant Remote Worker Binary for Windows

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

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

1. A user account on the Windows host capable of running commands with Administrator privileges

2. PowerShell 6.0 or newer

3. Network connectivity from the Windows server to the Pliant instance on the following TCP ports:

  • 443 / HTTPS: Pliant proxy

  • 5671 / AMPQS: Pliant message queue (No longer required after Pliant version 2021.9)

Remote Worker Installation Process

  1. Open a PowerShell session as Administrator

2. Create a directory for the Pliant Remote Worker

mkdir 'C:\Program Files\Pliant'

3. Change directory to C:\Program Files\Pliant 

cd 'C:\Program Files\Pliant\'

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

$PliantHost = "Pliant_FQDN_Or_Hostname"
$PliantAdminPassword = "pl1anT"

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 = $(Invoke-RestMethod -Method Post -Uri https://$PliantHost/api/oauth/token -Headers @{ "Authorization" = "Basic cGxpYW50LmlvLXNwYTpWN1VPR3pBbHZ4V0xVWDhGYzVhVA==" } -Body @{ grant_type = "password"; username = "admin"; password = $PliantAdminPassword } -SkipCertificateCheck).access_token
$outtputfile = "pliant-worker-windows.tar.gz"
Invoke-RestMethod -Method Get -Headers @{ "accept" = "*/*"; "authorization" = "Bearer $token" } -Uri "https://$PliantHost/api/v1/workers/download/latest/WINDOWS" -OutFile $outputfile -SkipCertificateCheck
tar -xf $outputfile

6. Check to verify the file download and location (file size will differ with each instance)

Get-ChildItem

7. Test run the Remote Worker

The remote worker does not need to run as Administrator, it can run as an unprivileged user. Credentials used for Workflow executions will be a part of the individual Workflows.

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