This is the Flamenco Manager implementation in Go.
Author: Sybren A. Stüvel sybren@blender.studio
To run Flamenco Manager for the first time, follow these steps:
convert
command can be found on $PATH
../flamenco-manager -setup
(Linux/macOS) or flamenco-manager.exe -setup
(Windows).blender
variable should point to the Blender executable
where it can be found on the workers, and similar for the ffmpeg
variable.
The path replacement variables allow you to set different paths for both Clients (like the
Blender Cloud Add-on) and Workers, given their respective platforms.Note that variables
and path_replacement
share a namespace -- variable names have to be unique,
and cannot be used in both variables
and path_replacement
sections. If this happens, Flamenco
Manager will log the offending name, and refuse to start.
Released versions of Flamenco Manager have a version number v{major}.{minor}
, like v2.4
,
or v{major}.{minor}.{fix}
, like v2.4.1
.
Development versions have v{release}-{number}-{hash}
, where number
indicates the
number of commits since the official version v{release}
. The hash
is the Git hash
of the last commit. If the version number ends with -dirty
it means that there were
uncommitted changes when Flamenco Manager was built.
Apart from the above web-based setup, you can configure advanced settings by editing
flamenco-manager.yaml
. For example, you can:
flamenco-manager-example.yaml
for a
description.Intervals (like download_task_sleep
) can be configured in seconds, minutes, or hours, by appending
a suffix s
, m
, or h
. Such a suffix must always be used.
To secure web traffic using HTTPS, we recommend using either Let's Encrypt or custom TLS certificates. Transport Layer Security (TLS) is the we-are-no-longer-living-in-the-90ies name for SSL.
Let's Encrypt can be used when the machine is publicly reachable and has a valid domain name. This is easy to set up, as it automatically requests & renews certificates:
acme_domain_name
to the domain name of the machine.listen
and listen_https
to the ports Flamenco Manager should be listening to. By
default these are :8080
and :8443
.If you want to manage your own TLS certificates, set the path in the tlskey
and tlscert
configuration options. Then set listen_https
to the appropriate port number.
Flamenco Manager accepts the following CLI arguments:
-setup
: Start in setup mode, which will enable the web-based setup on the /setup
URL.-debug
: Enable debug-level logging-quiet
: Disable info-level logging (no-op if -debug
is also given), so that only warnings
and errors are logged.-json
: Log in JSON format, instead of plain text-cleanslate
: Start with a clean slate; erases all cached tasks from the local MongoDB,
then exits Flamenco Manager. This can be run while another Flamenco Manager is
running, but this scenario has not been well-tested yet.-purgequeue
: Erases all queued task updates from the local MongoDB, then exits Flamenco Manager.
NOTE: this is a lossy operation, and it may erase important task updates. Only perform this when
you know what you're doing.flamenco-manager.service
to update it for the installation location, then place the file
in /etc/systemd/system
.systemctl daemon-reload
to pick up on the new/edited file.systemctl start flamenco-manager
to start Flamenco Manager.systemctl enable flamenco-manager
to ensure it starts at boot too.Logs can be viewed with journalctl -u flamenco-manager.service
.
$FM
denotes the directory containing a checkout of Flamenco Manager, that is, the absolute path
of this flamenco-manager
directory.
cd $FM
make
to download the dependencies and build Flamenco Manager. This will create an
executable flamenco-manager
in the current directory.make test
./flamenco-manager -setup
, see above)../flamenco-manager
.To run all unit tests, run make test
. To run a specific GoCheck test, run
go test ./flamenco -v --run TestWithGocheck -check.f SchedulerTestSuite.TestVariableReplacement
where the argument to --run
determines which suite to run, and -check.f
determines the
exact test function of that suite. Once all tests have been moved over to use GoCheck, the
--run
parameter will probably not be needed any more.
Flamenco Manager is responsible for initiating all communication between Server and Manager, since Manager should be able to run behind some firewall/router, without being reachable by Server.
In the text below, some_fields
can refer to configuration file settings.
queued
or claimed-by-manager
in
the local task queue (MongoDB collection "flamenco_tasks"). In this case, Manager performs a
conditional GET (based on etag) to Server at /api/flamenco/tasks/{task-id} to see if the task
has been updated since queued. If this is so, the task is updated in the queue and the queue
is re-examined.task_update_push_max_interval
, or
when task_update_push_max_count
updates are queued, whichever happens first.cancel_task_fetch_max_interval
, unless an
actual push (as described above) already happened within that time.When a worker starts working on a task, that task moves to status "active". The worker then
regularly calls /may-i-run/{task-id}
to verify that it is still allowed to run that task. If this
end-point is not called within active_task_timeout_interval_seconds
seconds, it will go to status
"failed". The default for this setting is 60 seconds, which is likely to be too short, so please
configure it for your environment.
This timeout check will start running 5 minutes after the Manager has started up. This allows workers to let it know they are still alive, in case the manager was unreachable for longer than the timeout period. For now this startup delay is hard-coded.
In no particular order:
The distributable Flamenco Manager packages are built using GNU Make.
msiextract
from the
msitools
package if you're extracting on Linux).dist/mongodb-{linux-x86_64,osx-x86_64,windows}-version
,
so the Linux bin
directory should be in dist/mongodb-{linux-x86_64,osx-x86_64,windows}-version/bin
.bin
directories except mongod
(or mongod.exe
for the Windows
version).make package
to create the distributable packages.Each worker has a sleep schedule, which can be configured from the dashboard and behaves in the following way:
"mo tu we"
.Version | Tag | Published |
---|---|---|
v2.4.2+incompatible | 1yr ago | |
v2.0.5+incompatible | 1yr ago | |
v2.0.2+incompatible | 1yr ago | |
v2.0.9+incompatible | 1yr ago |