Go to file
2022-04-08 12:05:30 +02:00
.vscode Add VSCode launch configuration 2022-03-25 16:48:29 +01:00
addon OAPI: regenerate OpenAPI code 2022-04-08 12:04:34 +02:00
cmd Manager: connect SocketIO broadcaster with job creation 2022-04-05 16:19:33 +02:00
internal Cleanup: manager, fix copy-paste from original OpenAPI example code 2022-04-08 12:04:58 +02:00
pkg OAPI: regenerate OpenAPI code 2022-04-08 12:04:34 +02:00
web Web: import moment.js in a way Tabulator can find 2022-04-08 12:05:14 +02:00
.gitignore Remove SocketIO PoC 2022-04-04 16:27:15 +02:00
.gitlab-ci.yml Configure SAST in .gitlab-ci.yml, creating this file if it does not already exist 2022-01-03 18:50:58 +00:00
CONFIG_DESIGN.md Partial design doc for configuration handling 2022-02-21 19:47:52 +01:00
debug-job-echo.sh Debug echo job: sleep for a shorter time 2022-04-08 12:05:30 +02:00
debug-job-render.sh Implement frames-to-video command 2022-03-17 16:18:10 +01:00
FEATURES.md FEATURES: add 'clean requeue of task when shutting down' to worker list 2022-04-05 16:27:51 +02:00
go.mod Cleanup: run go mod tidy 2022-03-08 15:02:05 +01:00
go.sum Work in progress on using UPnP/SSDP to make the Worker find its Manager 2022-03-04 17:44:04 +01:00
LICENSE License: license all code under "GPL-3.0-or-later" 2022-03-07 15:26:46 +01:00
Makefile OAPI: tweak the JS generator to do more what we want 2022-04-04 19:33:46 +02:00
README.md Update README for clarity & to document more about the web frontend 2022-04-05 17:28:19 +02:00

Flamenco 3

This repository contains the sources for Flamenco 3. The Manager, Worker, and Blender add-on sources are all combined in this one repository.

Building

  1. Install Go 1.18 or newer, and Node 16 (see "Node / Web UI" below).
  2. Optional: set the environment variable GOPATH to where you want Go to put its packages.
  3. Ensure $GOPATH/bin is included in your $PATH environment variable. $GOPATH defaults to $HOME/go if not set. Run go env GOPATH if you're not sure.
  4. Set up the web frontend for development (see "Node / Web UI" below).
  5. Run make with-deps to install build-time dependencies and build the application. Subsequent builds can just run make without arguments.

You should now have two executables: flamenco-manager and flamenco-worker. Both can be run with the -help CLI argument to see the available options.

To rebuild only the Manager or Worker, run make flamenco-manager or make flamenco-worker.

Node / Web UI

The web UI is built with Vue, Bootstrap, and Socket.IO for communication with the backend. NodeJS/NPM is used to collect all of those and build the frontend files. It's recommended to install Node v16 via Snap:

sudo snap install node --classic --channel=16

This also gives you the Yarn package manager, which can be used to install web dependencies and build the frontend files.

To set up the development environment, follow these steps:

# Ensure /usr/local/lib/node_modules exists and is writable by you:
sudo mkdir /usr/local/lib/node_modules
sudo chown youruser /usr/local/lib/node_modules

# Set up the symlinks necessary for development:
cd web/manager-api
npm link
cd ../app
npm link flamenco-manager
npm install

# Run the web frontend:
yarn serve

Generating the OpenAPI/Swagger API

Some code is generated from the OpenAPI specs in pkg/api/flamenco-manager.yaml. The generated code is committed to Git, so that after a checkout you shouldn't need to re-run the generator to build Flamenco.

After changing pkg/api/flamenco-manager.yaml, run make generate to generate the code, then commit to Git.

The JavaScript and Python generator is made in Java, so it requires a JRE/JDK to be installed. On Ubuntu Linux, sudo apt install default-jre-headless should be enough.

Swagger UI

Flamenco Manager has a SwaggerUI interface at http://localhost:8080/api/swagger-ui/

Database

Flamenco Manager and Worker use SQLite as database, and Gorm as object-relational mapper.

Since SQLite has limited support for altering table schemas, migration requires copying old data to a temporary table with the new schema, then swap out the tables. Because of this, avoid NOT NULL columns, as they will be problematic in this process.

License

Flamenco is licensed under the GPLv3+ license.