Worker configuration
- Workers are used to distribute the load of multiple pipelines you run.
- The server where Buddy On-Premises is first installed is the default worker (host) of the instance.
- You can install more workers on other nodes for extra performance.
Requirements
Resource | Requirement |
---|---|
CPU | 2.6 GHz |
Memory | 4 GB |
Root disk | 30 GB |
Workers require a Linux-type server (we recommend Ubuntu 20.04) with Docker and docker-compose installed to run.
The workers and the main Buddy instance must be able to connect to each other. You can configure the IP address and ports of the worker during the installation.
Installation
You cannot install a new worker on the server that runs the main Buddy On-Premises instance – this instance is a fully operational worker. Install new workers on different, compatible servers.
- Sign in to your Buddy On-Premises instance as admin.
- Go to the On-Premises Admin panel and switch to the Workers tab.
- Click Add new worker and copy the generated installation command.
- Launch a terminal on the server where you want to install the worker and run the command you copied. The command installs and runs the worker, and registers it in the main instance.
You can also generate the installation command using the CLI on the server with the main instance by running sudo buddy install-worker
. This option allows for additional configuration.
Non-interactive Installation
You can automate creating and launching workers. Create an executable script that runs the installation in the non-interactive mode.
Installation commands created using buddy install-worker
are valid for 30 minutes. When this time passes, you must generate a new command to install a worker.
Follow these steps:
- On the server with the main instance, generate the installation command and token and save it to an executable file:
buddy --yes install-worker > install_worker.sh
$
- Upload
install_worker.sh
to the worker server. - Set up permissions and run the installation script:
chmod +x run.sh ./install_worker.sh
$$
Updating workers
Updating workers follows the same process as updating the main Buddy On-Premises instance. Sign in to the server that hosts the worker and start by running this command:
sudo buddy update
$
The version of the worker and the main instance must be the same. If the versions are different, you can't assign new pipelines to the worker, and all pipelines assigned previously will fail with the "Wrong version" status.
Backup
Backing up workers follows the same process as backing up the main Buddy On-Premises instance.
Management
You can view the list of connected workers and their startus in the Workers tab of the On-Premises Admin panel:
Workers tab
Locking
You can lock a worker and change its name in the worker settings.
Locked workers cannot be assigned to new pipelines
Resources
The settings are also the place to adjust the resources consumed by the actions in the pipeline (vCPUs, RAM, and shared memory) and assign workers tags. If any pipeline is currently assigned to the worker, you will find it at the bottom of the page:
Worker settings
Offline workers
If a worker is offline or in a different version than the main instance, all pipeline executions end with an error. It is also impossible to browse the filesystems and view execution logs of the pipelines assigned to that worker.
You can remove an inactive worker from the worker list. When you remove a worker, pipelines assigned to that worker will be automatically assigned to a different worker on the next execution.
Solving connection problems
To work properly, the worker and the main instance must establish a two-way connection. This requires the IP addresses and ports used for connecting to be configured properly.
By default, the worker connects to the public IP address of the standalone (the address that you use to open Buddy in your browser). The default ports are 1090
and 1091
.
If the connection between a worker and the main instance doesn't work, adjust the settings of the worker by running sudo buddy configure
on the worker server and adjust the relevant options.
You can also remove the worker and create an installation command with updated settings using the wizard, and install it again. To do that, run this command on the server with the main instance:
sudo buddy install-worker
$