|
| 1 | +# Environment |
| 2 | + |
| 3 | +- Ubuntu 22.04.4 LTS |
| 4 | +- kernel: 5.15.0-88-generic |
| 5 | +- minikube: v1.34.0 (1 node) |
| 6 | +- docker: 27.3.1 |
| 7 | +- kubectl: v1.31.2 |
| 8 | +- NMOS supports standards IS-04 and IS-05: <https://specs.amwa.tv/is-04/>, <https://specs.amwa.tv/is-05/> |
| 9 | + |
| 10 | +## Configuration note for NMOS simplified client in the contect of Intel Broadcast Suite |
| 11 | + |
| 12 | +`nmos-cpp` repository has been simplified to **IS-04** & **IS-05** implementation only. |
| 13 | +The key change is in configurationn of senders and receivers for BCS pipeline. |
| 14 | + |
| 15 | +BCS Pipeline is a NMOS client that is treated as one node that has 1 device and has x senders and y receivers that are provided from the level of json config `node.json`. |
| 16 | +Here is sample config `node.json`: |
| 17 | + |
| 18 | +```json |
| 19 | +{ |
| 20 | + "logging_level": 0, |
| 21 | + "http_port": 84, |
| 22 | + "label": "intel-broadcast-suite", |
| 23 | + "senders": ["v","d"], |
| 24 | + "senders_count": [2, 1], |
| 25 | + "receivers": ["v"], |
| 26 | + "receivers_count": [4], |
| 27 | + "device_tags": { |
| 28 | + "pipeline": ["multiviewer"] |
| 29 | + }, |
| 30 | + "frame_rate": { "numerator": 60, "denominator": 1 }, |
| 31 | + "frame_width": 1920, |
| 32 | + "frame_height": 1080, |
| 33 | + "video_type": "video/jxsv", |
| 34 | + "domain": "local" |
| 35 | +} |
| 36 | +``` |
| 37 | + |
| 38 | +The crucial params are: |
| 39 | + |
| 40 | +``` |
| 41 | +
|
| 42 | +"senders": ["v","d"], |
| 43 | +"senders_count": [2, 1], |
| 44 | +"receivers": ["v"], |
| 45 | +"receivers_count": [4], |
| 46 | +
|
| 47 | +``` |
| 48 | + |
| 49 | +> `senders` and `receivers` are arrays that specifies the kind of ports. The possible options are video "v", audio "a", data "d", and mux "m" |
| 50 | +
|
| 51 | +> `senders_count` and `receivers_count` are corresponding arrays to senders and receivers arrays that provide count by kind of port. For example, for `senders`: `["v", "a", "d"]`, the `senders_count`: `[3, 1, 1]` should be defined. It means that there are 3 senders of type video, 1 sender of type audio and 1 sender of type data. |
| 52 | +
|
| 53 | +From point of view POC, only `http_port` has the relevant role. It must be provided in further configurations for example for building process of nmos client node image. |
| 54 | + |
| 55 | +NMOS in BCS is provided in the form of NMOS client node single container that is about to 'stick' to the appropriate BCS pipeline container (within 1 pod). |
| 56 | +For testing purposes there is also NMOS registry pod and NMOS testing tool for validation of features. |
| 57 | + |
| 58 | +## Installation |
| 59 | + |
| 60 | +### Docker option |
| 61 | + |
| 62 | +- using docker compose and customized network (bridge) |
| 63 | + |
| 64 | +``` bash |
| 65 | +cd <repo>/nmos/docker |
| 66 | +./run.sh --source-dir <source_dir> --build-dir <build_dir> --patch-dir <patch_dir> --run-dir <RUN_DIR> --update-submodules --apply-patches --build-images --run-docker-compose |
| 67 | +``` |
| 68 | + |
| 69 | +- ...or using docker command and running using host network |
| 70 | + |
| 71 | +``` bash |
| 72 | +cd <repo>/nmos/docker |
| 73 | +./run.sh --source-dir <source_dir> --build-dir <build_dir> --patch-dir <patch_dir> --run-dir <RUN_DIR> --update-submodules --apply-patches --build-images |
| 74 | +``` |
| 75 | + |
| 76 | +#### Usage and description of options |
| 77 | + |
| 78 | +``` |
| 79 | +
|
| 80 | +Pattern: ./run.sh --source-dir <source_dir> --build-dir <build_dir> --patch-dir <patch_dir> --run-dir <RUN_DIR> [--prepare-only] [--apply-patches] [--build-images] [--run-docker-compose] [--update-submodules] |
| 81 | + --source-dir <source_dir> : Absolute path to directory with source code of repository nmos-cpp 3rd party submodule |
| 82 | + --build-dir <build_dir> : Absolute path to directory with dockerfile and other build files in build-nmos-cpp 3rd party submodule |
| 83 | + --patch-dir <patch_dir> : Absolute path to directory with patches for both 3rd party submodules |
| 84 | + --run-dir <run_dir> : Absolute path to directory with run.sh and docker-compose.yaml |
| 85 | + --prepare-only : Run steps in script that prepares images for nmos but option with runninng docker containers is not applicable |
| 86 | + --build-images : Build docker images for nmos-client and nmos-registry |
| 87 | + --update-submodules : Update git submodules |
| 88 | + --apply-patches : Apply patches for 3rd party submodules |
| 89 | + --run-docker-compose : Run Docker Compose (nmos-client + nmos-registry + nmos-testing) |
| 90 | + in customized network of bridge type. |
| 91 | + Else, by default the <docker run> command will run: |
| 92 | + (nmos-client + nmos-registry without nmos-testing tool container) |
| 93 | + in host network |
| 94 | +
|
| 95 | +``` |
| 96 | + |
| 97 | +### Kubernetes option |
| 98 | + |
| 99 | +Run script that prepares images dor NMOS client node and NMOS registry: |
| 100 | + |
| 101 | +``` bash |
| 102 | +cd <repo>/nmos/docker |
| 103 | +./run.sh --source-dir <source_dir> --build-dir <build_dir> --patch-dir <patch_dir> --run-dir <RUN_DIR> --update-submodules --apply-patches --build-images --prepare-only |
| 104 | +cd <repo>/nmos/k8s |
| 105 | +# Install minikube https://minikube.sigs.k8s.io/docs/start/?arch=%2Fwindows%2Fx86-64%2Fstable%2F.exe+download |
| 106 | +minikube start |
| 107 | +# Build iamges. Refer to 4. Build images |
| 108 | +# Adjust ConfigMaps in <repo>/nmos/k8s/nmos-client.yaml, <repo>/nmos/k8s/nmos-registry.yaml and <repo>/nmos/k8s/nmos-testing.yaml |
| 109 | +kubectl apply -f <repo>/nmos/k8s/nmos-client.yaml |
| 110 | +kubectl apply -f <repo>/nmos/k8s/nmos-registry.yaml |
| 111 | +kubectl apply -f <repo>/nmos/k8s/nmos-testing.yaml |
| 112 | +# Useful for accessing testing tool browser: https://minikube.sigs.k8s.io/docs/handbook/accessing/ |
| 113 | +``` |
| 114 | + |
| 115 | +### From terminal |
| 116 | + |
| 117 | +#### 1. Git |
| 118 | + |
| 119 | +``` bash |
| 120 | +git submodule update --init --recursive |
| 121 | +``` |
| 122 | + |
| 123 | +#### 2. Patch |
| 124 | + |
| 125 | +``` bash |
| 126 | +cd <repo>/nmos |
| 127 | +cd build-nmos-cpp |
| 128 | +git apply ../patches/build-nmos-cpp.patch |
| 129 | +cd ../nmos-cpp |
| 130 | +git apply ../patches/nmos-cpp.patch |
| 131 | +``` |
| 132 | + |
| 133 | +#### 3. Build NMOS binaries (client & registry/controller) (optional for user, useful for dev) |
| 134 | + |
| 135 | +``` bash |
| 136 | +cd <repo>/nmos/nmos-cpp |
| 137 | +# 1. Follow instructions <repo>/nmos/nmos-cpp/Documents/Installation-with-Conan.md |
| 138 | +# 2. Follow instructions <repo>/nmos/nmos-cpp/Documents/Getting-Started.md |
| 139 | +``` |
| 140 | + |
| 141 | +#### 4. Build images |
| 142 | + |
| 143 | +``` bash |
| 144 | +cd <repo>/ |
| 145 | +cp <repo>/nmos/nmos-cpp/Development/nmos-cpp-node/node_implementation.h <repo>/nmos/build-nmos-cpp/ |
| 146 | +cp <repo>/nmos/nmos-cpp/Development/nmos-cpp-node/node_implementation.cpp <repo>/nmos/build-nmos-cpp/ |
| 147 | +cp <repo>/nmos/nmos-cpp/Development/nmos-cpp-node/nmos-client-wrapper.h <repo>/nmos/build-nmos-cpp/ |
| 148 | +cp <repo>/nmos/nmos-cpp/Development/nmos-cpp-node/nmos-client-wrapper.cpp <repo>/nmos/build-nmos-cpp/ |
| 149 | +cp <repo>/nmos/nmos-cpp/Development/nmos-cpp-node/main.cpp <repo>/nmos/build-nmos-cpp/ |
| 150 | +cp <repo>/nmos/nmos-cpp/Development/cmake/NmosCppNode.cmake <repo>/nmos/build-nmos-cpp/ |
| 151 | + |
| 152 | +cd <repo>/nmos/build-nmos-cpp/ |
| 153 | +make build # build NMOS registry and controller |
| 154 | +make buildnode # build NMOS client node |
| 155 | + |
| 156 | +# NMOS testing: https://github.com/AMWA-TV/nmos-testing/blob/master/docs/1.2.%20Installation%20-%20Docker.md |
| 157 | + |
| 158 | +``` |
| 159 | + |
| 160 | +#### 5. Docker-compose for running NMOS registry and controller, client and testing tool [OPTION #1] |
| 161 | + |
| 162 | +``` bash |
| 163 | +cd <repo>/nmos/docker |
| 164 | +# Adjust configs: <repo>/nmos/docker/node.json and registry <repo>/nmos/docker/registry.json and <repo>/nmos/docker/docker-compose.yaml |
| 165 | +docker compose up |
| 166 | +``` |
| 167 | + |
| 168 | +#### 6. Kubernetes for running NMOS registry and controller, client and testing tool [OPTION #2] |
| 169 | + |
| 170 | +``` bash |
| 171 | +cd <repo>/nmos/k8s |
| 172 | +# Install minikube https://minikube.sigs.k8s.io/docs/start/?arch=%2Fwindows%2Fx86-64%2Fstable%2F.exe+download |
| 173 | +minikube start |
| 174 | +# Build iamges. Refer to 4. Build images |
| 175 | +# Adjust ConfigMaps in <repo>/nmos/k8s/nmos-client.yaml, <repo>/nmos/k8s/nmos-registry.yaml and <repo>/nmos/k8s/nmos-testing.yaml |
| 176 | +kubectl apply -f <repo>/nmos/k8s/nmos-client.yaml |
| 177 | +kubectl apply -f <repo>/nmos/k8s/nmos-registry.yaml |
| 178 | +kubectl apply -f <repo>/nmos/k8s/nmos-testing.yaml |
| 179 | +# Useful for accessing testing tool browser: https://minikube.sigs.k8s.io/docs/handbook/accessing/ |
| 180 | +``` |
| 181 | + |
| 182 | +### License |
| 183 | + |
| 184 | +```text |
| 185 | +SPDX-FileCopyrightText: Copyright (c) 2024 Intel Corporation |
| 186 | +
|
| 187 | +SPDX-License-Identifier: BSD-3-Clause |
| 188 | +``` |
0 commit comments