Set up Remote Worker container with containerized add-ons
Prerequisites
A Linux host with docker and docker-compose installed
Download the container images package: https://distributor.pliant.io/pliant-worker-airgap.tar.gz
Expand the tarball and load the images into docker:
tar -xvf ./pliant-worker-airgap.tar.gz sudo docker load -i ./pliant-worker/pliant-worker-images.tar
If using podman instead of docker, issue the following command instead:
sudo podman load -i ./pliant-worker/pliant-worker-images.tar
Create a new file called ./worker-config.env and copy and paste this entire template text into it. Change the values where shown to match your environment. The “instance-address” can be either the IP Address or, preferably, the FQDN of the Pliant instance.
API_URI=https://{instance-address} COMPILER_URI=https://{instance-address} RABBITMQ_URI=https://{instance-address}/plugin/mqws/ WORKER_GROUP_NAME={worker-group-name} WORKER_GROUP_SECRET_KEY={worker-group-secret} # Uncomment the following two lines to ignore certificate validation errors # WGET_OPTS=--no-check-certificate # NODE_TLS_REJECT_UNAUTHORIZED=0
Note: In cases where the server certificate cannot be verified, we may have to uncomment the last two lines from the config. That will effectively disable TLS certificate validation. This should be done only if the networking infrastructure between the remote worker and the Pliant instance we’re connecting to is trusted.
Move the config file into place and bring up the remote worker
mv worker-config.env ./pliant-worker/ sudo docker-compose -f ./pliant-worker/docker-compose.yml -p pliant-worker up -d
The worker should now be running along with all currently available integration addons.
CentOS Stream 9
docker-compose is not installed by default on CentOS9 with podman. Follow these instructions to install docker-compose and start the pliant-worker:
sudo curl -L https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose sudo chmod 755 /usr/local/bin/docker-compose sudo systemctl enable podman.socket sudo systemctl start podman.socket sudo /usr/local/bin/docker-compose -f ./pliant-worker/docker-compose.yml -p pliant-worker up -d
Stopping
To stop the worker and all addon containers, we would issue:
sudo docker-compose -f ./pliant-worker/docker-compose.yml -p pliant-worker down
Note: Restarting the worker container will not make any configuration changes take effect. You must use the docker-compose commands to stop and start the containers if any changes are needed.
Troubleshooting Commands
See worker log output:
sudo docker container logs $(docker ps |grep pliant-worker_pliant-worker | awk '{print $1}')