rhastie / build-nmos-cpp

Build environment for AMWA NMOS Containerised Registry, Browser Client/Controller and Node
Apache License 2.0
21 stars 6 forks source link
amwa docker jt-nm nmos

AMWA NMOS Containerised Registry, Browser Client/Controller and Node

Build status: ci-build-test-publish

Implementation Overview

This repository contains all the files needed to create a Dockerised container implementation of the AMWA Networked Media Open Specifications. For more information about AMWA, NMOS and the Networked Media Incubator, please refer to http://amwa.tv/.

This work is principally based on the open-sourced implementation from Sony. Please see: http://github.com/sony/nmos-cpp

The resulting Docker Container is specifically optimised to operate on a Mellanox switch, but can also function independently on many other platforms. Please see overview presentation from the IP Showcase @ IBC 2019:

Specifically the implementation supports the following specifications:

Additionally it supports the following additional components:

The nmos-cpp container includes implementations of the NMOS Node, Registration and Query APIs, and the NMOS Connection API. It also included a NMOS Browser Client/Controller in JavaScript, a MQTT Broker and a DNS-SD API which aren't part of the specifications.

Container Testing, supported architectures and Release Notes

JT-NM Tested

JT-NM Tested 03/20 NMOS & TR-1001-1 ControllerJT-NM Tested 03/20 NMOS & TR-1001-1

The NVIDIA NMOS docker container has now passed the stringent testing required by JT-NM for both Registries and Controllers. The container was tested whilst running on a Mellanox Spectrum/Spectrum-2 switch using the Onyx Docker subsystem. You can access the JT-NM testing matrix here.

In addition, the container has been successfully tested in AMWA Networked Media Incubator workshops.

Tested Platforms and supported CPU Architectures

The Dockerfile in this repository is designed so that if needed it can be run under the Docker Experimental BuildX CLI feature set. The container is published for the follow CPU Architectures:

The container has been tested on the following platforms for compatibility:

Continuous Integration (CI) Testing

The NVIDIA NMOS container, like the NMOS Specifications, is intended to be always ready, but continually developing. To ease development overheads and to continually validate the status of the container it now undergoes CI Testing via GitHub Actions. This CI testing is meant as a sanity check around the container functionality rather than extensive testing of nmos-cpp functionality itself. Please see wider Sony CI Testing for deeper testing on nmos-cpp.

The following configuration, defined by the ci-build-test-publish job, is built and unit tested automatically via continuous integration. If the tests complete successfully the container is published directly to Docker Hub and also saved as an artifact against the GitHub Action Job. Additional configurations may be added in the future.

Platform Version Configuration Options
Linux Ubuntu 18.04 (GCC 7.5.0) Avahi

The AMWA NMOS API Testing Tool is automatically run against the built NMOS container operating in both "nmos-node" and "nmos-registry" configurations.

Test Suite Result/Status:

IS-04-01 IS-04-02 IS-04-03 IS-05-01 IS-05-02 IS-07-01 IS-07-02 IS-08-01 IS-08-02 IS-09-01 IS-09-02 MQTT-Broker

Release Notes and Versioning

The NVIDIA NMOS docker container even though it is continuously being developed we endeavour to make packages available at various major points. Docker Hub always provides a list of various tags which relate as follows:

In addition to Docker Hub we also maintain an aligned set of release pacakges on GitHub - NVIDIA NMOS Docker container releases

For the formally released versions of the container you can follow the Release Notes documentation to see what has changed.

How to install and run the container NMOS Registry/Controller

On a Mellanox Switch running Onyx NOS

Prerequisites:

Execute the following switch commands to download and run the container on the switch:

Additional/optional steps:

On a Mellanox switch the DNS configuration used by the container is inherited from the switch configuration

On a Mellanox Bluefield Smart NIC

Prerequisites:

Execute the follow Linux commands to download and run the container on the host:

docker pull rhastie/nmos-cpp:latest
docker run -it --net=host --privileged --rm rhastie/nmos-cpp:latest

On a NVIDIA Jetson AGX Developer Kit

Prerequisites:

Execute the follow Linux commands to download and run the container on the host:

docker pull rhastie/nmos-cpp:latest
docker run -it --net=host --privileged --rm rhastie/nmos-cpp:latest

Raspberry Pi Models 3B, 3B+, 3A+, 4, 400, CM3, CM3+, CM4 and Zero 2 W

Prerequisites:

Execute the follow Linux commands to download and run the container on the host:

docker pull rhastie/nmos-cpp:latest
docker run -it --net=host --privileged --rm rhastie/nmos-cpp:latest

On a standard Linux host

Prerequisites:

Execute the follow Linux commands to download and run the container on the host:

docker pull rhastie/nmos-cpp:latest
docker run -it --net=host --privileged --rm rhastie/nmos-cpp:latest

Accessing the NMOS Web GUI Interface

The container publishes on all available IP addresses using port 8010

Running the NMOS Virtual Node implementation

The container also contains an implementation of NMOS Virtual Node. This can simulate a node attaching to the registry/controller. Importantly, a single instance of the container can run the registry/controller or the node, but not both at the same time. If you need both operating, you just start a second instance of the container.

By design the container is configured not to run the node implementation by default, however, you can override this default using two different approaches:

Using an environment variable

There is a docker environmental variable available that will override the default execution of the container and start the NMOS Virtual node. Use the following command to start the container using this variable:

docker run -it --net=host --name nmos-registry --rm -e "RUN_NODE=TRUE" rhastie/nmos-cpp:latest

Building the container and altering the default execution

You can use the process below to build the container so that the default execution is changed and the container executes the NMOS Virtual Node at runtime without needing an environmental variable being set

How to build the container

Below are some brief instructions on how to build the container. There are several additional commands available and its suggested you review the Makefile in the repository

Building the default container for NMOS Registry/Controller execution

make build

Building the container for NMOS Virtual Node execution

make buildnode

Please note the container will be built with a “-node” suffix applied to remove any confusion.