Sofie Core

Sofie Core (serviceId sofie-automation-sofie-core) is the server and web UI of the Sofie TV Studio Automation System, used for live TV news production by NRK since 2018. In Eyevinn Open Source Cloud (OSC) it is a long-running service instance with up to 10 GiB of storage per instance (a persistent volume at /data). License: MIT. Source: Sofie-Automation/sofie-core.

This OSC service is Sofie Core only: server, web UI and the in-process job worker. The gateways (playout, MOS and others) are not included; they run next to your studio hardware and connect to this instance. Sofie Core on OSC uses FerretDB instead of MongoDB.

What it can do

  • Provide the rundown/producer UI and the studio and show-style configuration.
  • Provide the DDP endpoint that Sofie gateways (playout, MOS, live status) connect to.
  • Store snapshots on the persistent volume in /data/sofie-store.

Creating an instance

Create a FerretDB instance (serviceId see that page) first and wait until it is running. Read its connection string with describe-service-instance; it has the form mongodb://<user>:<password>@<host>:27017. Store it as a service secret with create-service-secret (serviceId: "sofie-automation-sofie-core", name sofiedburl). Then call create-service-instance with serviceId: "sofie-automation-sofie-core". The instance name must be alphanumeric and at most 20 characters.

{ "name": "mystudio", "DatabaseUrl": "{{secrets.sofiedburl}}" }

Wait with wait-for-service-ready (or get-instance-status) and read the URL with describe-service-instance. The first start creates the database structure automatically.

Options

Option Required Type Meaning
name Yes string Name of the instance. Alphanumeric/underscore only, at most 20 characters.
DatabaseUrl Yes string, sensitive FerretDB connection string, for example mongodb://<user>:<password>@<host>:27017. A database name (sofie) is appended if the URL has none. Pass as {{secrets.NAME}}.
DatabaseName No string Database to use when the URL has none. Default sofie.
DbPollIntervalMs No string (number) How often the database is polled for changes, in milliseconds. Default 2000, minimum 100.
LogLevel No string Log verbosity, for example info.
EnableHeaderAuth No boolean Enables header-based authentication when running behind an auth proxy. Default false.
PermissionsHeader No string Used with EnableHeaderAuth: the header that carries the permissions.
Timezone No string Time zone setting for the instance.

DatabaseUrl should be a {{secrets.NAME}} reference; a reference must be the entire field value. Overwriting a secret does not restart a running instance.

Using the instance

Open the instance URL; the Sofie web UI loads. Follow the Sofie documentation to install blueprints and configure a studio.

To connect a Sofie gateway (for example the playout gateway), point it at the instance URL using the gateway --host and --port options with --port 443 and TLS as described in the gateway documentation.

Limitations

  • FerretDB has no change streams, so this service polls the database instead. Changes are picked up after at most one poll interval (2 seconds by default) rather than instantly, and each watched collection is re-read every interval. Raise DbPollIntervalMs for large databases.
  • Run only a single Sofie Core instance against a database.
  • Sofie Core is only useful with blueprints and gateways attached.

Resources