Skip to content

Running the Manager

Pre-Reqs

The Flamenco Setup Assistant is a setup wizard that configures the Manager on its initial setup. In development mode, it performs 1. Define and test access to the shared storage (NFS) location This may raise an error on MacOS until you permit Docker to access the host NFS mount location. (more details). 2. Define and test that there is an Blender executable present.

For the example Flamenco Dev Container includes these dependencies.

Note

The path /media/shared/flamenco/development/ is created inside the Container because this is the NFS share on the host and in this example we want the development instance of Flamenco Manager running in the Container to use that location.

Warning

Do not use an actual Flamenco NFS share location unless you want to overwrite an existing deployment! In this example, a ‘development’ folder is used for the manager files and database.

Launching the Flamenco Manager

You can launch the Flamenco Manager from within the Development Container and reach it at http://localhost:8080 using the following Docker command.

docker run -p 8080:8080 --name flamenco_dev_manager -v /media/shared/flamenco/development:/media/shared/flamenco/development -it flamenco_dev /code/flamenco-manager

You may have a different NFS path and need to adjust accordingly.

Once the container is running, you should see it start up as shown below and if the NFS Mount Path is valid you should be able to sail through the Flamenco Setup Assistant.

Example Flamenco Manager logs from the example Flamenco Development Container

2023-04-24T12:10:29Z INF starting Flamenco arch=amd64 git=v3.2-39-g23e6e875 os=linux releaseCycle=alpha version=3.3-alpha0
2023-04-24T12:10:29Z INF This seems to be your first run of Flamenco! A webbrowser will open to help you set things up.
2023-04-24T12:10:29Z INF listening port=8080
2023-04-24T12:10:29Z INF opening database dsn=flamenco-manager.sqlite
2023-04-24T12:10:29Z INF Not starting Shaman storage service, as this is the first run of Flamenco. Configure the shared storage location first.
2023-04-24T12:10:29Z INF serving job-specific files directly from disk onDisk=/code/flamenco-manager-storage url=/job-files
2023-04-24T12:10:29Z INF sleep scheduler starting checkInterval=1m0s
2023-04-24T12:10:29Z INF TimeoutChecker: starting up checkInterval=1m0s initialSleep=5m0s taskTimeout=10m0s workerTimeout=1m0s
2023-04-24T12:10:29Z INF UPnP/SSDP advertisement starting
2023-04-24T12:10:29Z INF possble URL at which to reach Flamenco Manager count=2
2023-04-24T12:10:29Z INF - http://172.17.0.2:8080/
2023-04-24T12:10:29Z INF - http://127.0.0.1:8080/
2023-04-24T12:10:30Z ERR unable to open a browser to http://172.17.0.2:8080/, please open it yourself or try any of the other URLs above error="exec: \"xdg-open,x-www-browser,www-browser\": executable file not found in $PATH"

If you have a configuration file or have walked through the Setup Assistant you may see more logging as the Flamenco Manager is exercised…

2023-04-24T12:10:58Z INF checking whether this path is suitable as shared storage path=/media/shared/flamenco/development/
2023-04-24T12:11:15Z INF configuration file written filename=flamenco-manager.yaml
2023-04-24T12:11:15Z INF setup assistant: updating configuration config={"blenderExecutable":{"cause":"Blender 3.5.0","input":"blender","is_usable":true,"path":"/usr/local/blender/blender","source":"path_envvar"},"storageLocation":"/media/shared/flamenco/development/"}

When the Setup Assistance has finished, it will restart the Flamenco Manager with the new configuration…

2023-04-24T12:11:15Z INF going to shut down the service willRestart=true
2023-04-24T12:11:15Z INF sleep scheduler shutting down
2023-04-24T12:11:15Z INF TimeoutChecker: shutting down
2023-04-24T12:11:15Z INF HTTP server stopping because application is shutting down
2023-04-24T12:11:15Z INF UPnP/SSDP advertisement stopped
2023-04-24T12:11:15Z INF HTTP server shut down
2023-04-24T12:11:15Z INF Flamenco Manager service shut down willRestart=true
2023-04-24T12:11:15Z INF restarting Flamenco arch=amd64 os=linux version=3.3-alpha0
2023-04-24T12:11:15Z INF listening port=8080
2023-04-24T12:11:15Z INF opening database dsn=flamenco-manager.sqlite
2023-04-24T12:11:15Z INF shaman: opening file store storageDir=/media/shared/flamenco/development/file-store
2023-04-24T12:11:15Z INF opening checkout directory checkoutDir=/media/shared/flamenco/development/jobs
2023-04-24T12:11:15Z INF serving job-specific files directly from disk onDisk=/code/flamenco-manager-storage url=/job-files
2023-04-24T12:11:15Z INF sleep scheduler starting checkInterval=1m0s
2023-04-24T12:11:15Z INF TimeoutChecker: starting up checkInterval=1m0s initialSleep=5m0s taskTimeout=10m0s workerTimeout=1m0s
2023-04-24T12:11:15Z INF UPnP/SSDP advertisement starting
2023-04-24T12:11:15Z INF possble URL at which to reach Flamenco Manager count=2
2023-04-24T12:11:15Z INF - http://172.17.0.2:8080/
2023-04-24T12:11:15Z INF - http://127.0.0.1:8080/

If you open http://localhost:8080 on your host workstation you should be greeted with the Flamenco Manager Setup page as shown below.

Example setup welcome page of the Flamenco Setup Assistant

Note

You can determine exactly which build this is by looking at the top-right corner. If your working copy is from the latest default branch of the Flamenco gitea repo it will have something like version: 3.3-alpha0-v3.2-39-g23e6e875.

Flamenco Setup Assistant Walk Thru

Alternatively, you can walk through the Flamenco Setup Assistant wizard. Here are a brief set of screenshots of the steps…

Finishing with a final review page…

Manager Configuration File

If this is the first time the manager has been launched (from the Container) you will need to complete the setup process in order for the Flamenco Manager API to be launched. However, you can also include a flamenco-manager configuration file along side the flamenco-manager executable in the root folder of the repo in the Container. This is easiest by including it in the Dockerfile.

An example configuration file can be found here Documentation / Technical / Installation / Flamenco / Manager.

Troubleshooting

Missing System Libraries

When you change the version of Blender, it may require additional libraries. Because it is being built in a Docker Container and the Flamenco Manager Setup Assistant actually tries to launch it during the setup process, you may have to tweak the libraries that are co-packaged with it.

While trying the Flamenco Setup Assistant you may come across something like this…

Error 127 (-1) means unexpected/errored exit code from blender executable. Usually, if you can view the logs, you’ll see more details.

Here is an example extract of the Blender log that generated the 127 error message.

...
...
2023-03-02T22:12:07Z INF checking whether this command leads to Blender command=/usr/local/blender
2023-03-02T22:12:08Z INF error running command error="exit status 127" commandline=/usr/local/blender output="/usr/local/blender: error while loading shared libraries: libtbb.so: cannot open shared object file: No such file or directory\n"
2023-03-02T22:12:08Z INF result of command check command=/usr/local/blender foundLocation= input=/usr/local/blender isUsable=false result="There was an error running the command: exit status 127"

In this example the libtbb.so is missing from Blender 3.5.1 and was not required in earlier Blender versions. There maybe others, but this is the first one to be loaded that could not be found in the system. Remember the system is the Docker Container environment.

It is never particularly obvious how to find the library and specifically what to install using apt.

In this case, libtbb.so is Threading Building Blocks library. This happens to have its own Debian package libtbb-dev

Tip

Threading Building Blocks (TBB) is a C++ template library that helps us leverage multi-core processor performance without having to be a threading expert.