Atlas Knowledge Base
Dashboard
Deploying SBN Media

Deploying SBN Media


An SBN Media deployment is one or more hosts connected to the same NATS cluster. Every host runs the SBN Media platform, sbn-media, and the products that host needs, such as SBN Video for cameras or SBN Receiver for alarms. To choose the products, see Start Here.

What you need

  • A host for SBN Media: Windows, Linux or macOS.
  • A NATS cluster that the host can reach. See Step 2.
  • Network access from the host to the SBN API Engine, and to the release FTP site, or a local copy of the release tree.
  • The GStreamer runtime, on any host that runs SBN Video, SBN SIP Server, SBN Receiver, SBN Analytics or SBN Xlate. Download it from gstreamer.freedesktop.org.

Step 1 - Download and install into a folder

Copy the SBN Media release for your platform into an empty folder, for example C:\Innovative\SBN-Media on Windows. Run every command on this page from that folder.

./sbn-media version # Confirm the release runs on this host

Step 2 - Configure NATS

SBN Media does not start NATS. It connects to an existing NATS cluster, installed with innovative-nats. Set up the cluster and choose the NATS token that SBN Media uses to connect; see NATS Configuration.

Step 3 - Eject the configuration for your products

Write the starter configuration for the product this host runs:

./sbn-media config eject --product sbn-video

The starter is written to config.yaml. It holds only the settings that product needs, marks the ones you must set with REQUIRED, and lists the product's services in the watchdog host map. Eject never overwrites an existing file.

For a host that runs more than one product, write each further starter to its own file and copy its sections into config.yaml. Sections that every starter shares, such as broker, apiproxy and releases, appear only once.

./sbn-media config eject --product sbn-browser -o sbn-browser.yaml

The products and the services each one provides are listed on the SBN Media Overview.

Step 4 - Edit the configuration

Open config.yaml and set every value marked REQUIRED. Every starter asks for:

  • broker.connectionString and broker.authorization.password: the NATS node on this host (normally nats://localhost:4222), and the NATS token from Step 2.
  • apiproxy.adminToken: a long random secret for the administrative endpoints.
  • apiproxy.allowOrigins: the web origin allowed to call SBN Media, such as your API Engine.
  • releases.ftp.password: the release FTP password, used to download the products. To install from a local copy of the release tree, set releases.source to that folder.

Each product then asks for its own settings, for example the recordings folder for SBN Video or the SIP lines for SBN SIP Server. The settings of each service are on its own page; see the SBN Media Overview. For how lines are handled, see Line Configuration and Alarm Protocols.

Every other setting keeps its built-in default. To list the settings of one area, or to write every default into a ./config folder for reference:

./sbn-media config view -a devicestream # The settings of one area, with their defaults
./sbn-media config eject # Every default setting, written to ./config

Step 5 - Add the products

Download each product the host runs into the folder:

./sbn-media product add sbn-video # Download a product and map its services
./sbn-media product list # Show the products, which are installed, and their versions

A product that is not added here is downloaded the first time the services start.

Step 6 - Start and verify

Start the services in the foreground:

./sbn-media service start

The watchdog starts and supervises every service in the host map. From a second window, check the services and the configuration:

./sbn-media service health # Show the health of the services on this host
./sbn-media service list # List the services
./sbn-media validate # Common configuration errors and security warnings
./sbn-media diagnostics # Diagnostic information, useful for support tickets

The SBN Media dashboard, at the API Proxy address (for example https://your-host:8081), shows the running services and a snapshot of the logs.

When everything is healthy, stop the services with Ctrl+C in the first window.

Step 7 - Set up the daemon

Register SBN Media as a background service, a Windows Service or a Linux or macOS daemon, so it starts with the host:

./sbn-media daemon install # Register SBN Media as a service on this host
./sbn-media daemon start # Start the service
./sbn-media daemon status # Check that the service is running

./sbn-media daemon stop stops the service, and ./sbn-media daemon remove unregisters it.

Network ports

Open the ports for the services the host runs. The defaults are shown; all are configurable.

PortUsed byOpen to
4282NATS cluster (server to server)The other NATS nodes of the deployment
4222NATS clientLocal services only; not opened to other hosts
8081API Proxy (web entry point)API Engine and SBN Video clients
5060 / 5061SIP / SIP over TLSYour telephony provider
5080 / 5081SIP over WebSocket / WebSocket TLSYour telephony provider
3478TURN (firewall traversal for video)SBN Video clients
1024 - 65535TURN media relaySBN Video clients
10000 - 65000SIP call media (RTP)Your telephony provider

Video needs only the API Proxy port (8081) to be reachable. The SIP and TURN ports are needed only on hosts that run SBN SIP Server or SBN Browser. For clients outside the network, the TURN control port (3478) and the media relay range must be reachable, and the host must advertise an address the client can reach. See TURN Server and Firewall.

Keeping SBN Media up to date

SBN Media updates itself and rolls the new version out across the hosts in the deployment:

./sbn-media version # Show the running version
./sbn-media release download # Download the latest release
./sbn-media release push # Apply the release to the configured hosts and restart the services
./sbn-media release rollback # Restore the previous version

An update keeps your settings and logs, and installs any product a host needs for the services in its host map. To bring the products on a host to the platform's version after an update that did not refresh them, run ./sbn-media product update all.

Troubleshooting

SymptomWhat to check
Services do not startNATS is not reachable. Confirm the cluster is running and that broker.connectionString and the NATS token are correct.
A service is missing from service healthThe service is not in the watchdog.host map, or its product is not installed. Check config.yaml and product list.
A product does not downloadCheck releases.ftp.password, or releases.source when installing from a local release tree.
SBN Video clients cannot connectThe API Proxy is not reachable. Confirm port 8081 is open and that apiproxy.allowOrigins names the client's origin.
Video works on the local network but not remotelyThe TURN control port (3478) and the media relay range must be open to clients, and the host must advertise a reachable address.
Alarms or signals do not reach SBNCheck the API Engine connection and credentials in the SBN Frontend Proxy settings, and that the API Engine is reachable from this host.


Was this helpful?