Tagged version 2.0.8
Details
- Tag
- v2.0.8
Tagged version 2.0.8
This is the Flamenco Worker implemented in Python 3.
Author: Sybren A. Stüvel <sybren@blender.studio>
Before you begin, make sure you have Flamenco Manager up and running.
There are two ways to install Flamenco Worker:
Upgrading from a previous version of Flamenco Worker is simple:
Configuration is read from three locations:
The configuration files should be in INI format, as specified by the configparser documentation
All configuration keys should be placed in the [flamenco-worker] section of the config files. At least take a look at:
These configuration keys are also required, but are created automatically in $HOME/.flamenco-worker.cfg when they don't exist yet:
Install using pip3 install -e . for development, or python3 setup.py install for production. This creates a command flamenco-worker, which can be run with --help to obtain a list of possible CLI arguments.
If the configuration file does not contain both a worker_id and worker_secret, at startup the worker will attempt to register itself at the Master. Once registered via a POST to the manager's /register-worker endpoint, the worker_id and worker_secret will be written to $HOME/.flamenco-worker.cfg
Pressing [CTRL]+[C] will cause a clean shutdown of the worker. If there is a task currently running, it will be aborted without changing its status. Any pending task updates are sent to the Manager, and then the Manager's /sign-off URL is POSTed to, to indicate a clean shutdown of the worker. Any active task that is still assigned to the worker is given status "claimed-by-manager" so that it can be re-activated by another worker.
To run Flamenco Worker as a systemd-managed service, copy flamenco-worker.service to /etc/systemd/system/flamenco-worker.service, then run systemctl daemon-reload.
After installation of this service, systemctl {start,stop,status,restart} flamenco-worker commands can be used to manage it. To ensure that the Flamenco Worker starts at system boot, use systemctl enable flamenco-worker.
Flamenco Worker responds to the following POSIX signals:
First run pip install -r requirements-dev.txt to fetch developer dependencies. On Windows, download the Microsoft Visual C++ 2010 Redistributable Package.
Run mkdistfile.py to create a distributable archive (.zip on Windows, .tar.gz on Linux and macOS) containing a runnable Flamenco Worker. This build doesn't require installing Python or any dependencies, and can be directly run on a target machine of the same OS.