所需文件
所有文件,如,即用型Ubuntu映像和测试视频都可以在这里建
安装Easy-NMOS
-
安装 VMware Workstation
-
在虚拟机上安装 Ubuntu 22.04
ubuntu-22.04.3-desktop-amd64.iso
或
从 https://ubuntu.com/download/desktop 下载 ISO
-
安装 Docker (https://github.com/rhastie/easy-nmos/blob/master/install_docker.md)
使用包管理器安装所需的脚本依赖项:
sudo apt-get install curl
安装 git:
sudo apt-get install git
将存储库克隆到虚拟机(国内可能不行):
git clone <https://github.com/rhastie/easy-nmos>
或手动复制文件:
\ST2110\easy-nmos-master.zip
更改目录:
cd /home/$USER/easy-nmos/
安装最新的 Docker 和 Docker-compose:
sudo ./install.sh
-
运行以下命令以检查已安装的 docker:
sudo docker run hello-world
如果一切安装正确,您会收到以下消息:
-
现在您需要三个与主机同网段未占用的 IP 地址。我使用了 192.168.10.90、192.168.10.91、192.168.10.92。将这些地址添加到(从存储库克隆的地址)。并在文件末尾更改子网掩码。
docker-compose.yml
下面是一个文件示例:
version: '3.6' services: # Create NMOS Registry/Controller container instance nmos-registry: image: rhastie/nmos-cpp:latest container_name: nmos-registry hostname: nmos-registry domainname: local ports: - "80-81:80-81" - "1883:1883" volumes: - "./registry.json:/home/registry.json" environment: - RUN_NODE=FALSE networks: external: ipv4_address: '192.168.10.90' # Create NMOS Virtual Node container instance nmos-virtnode: image: rhastie/nmos-cpp:latest container_name: nmos-virtnode hostname: nmos-virtnode domainname: local ports: - "80-81:80-81" volumes: - "./node.json:/home/node.json" environment: - RUN_NODE=TRUE networks: external: ipv4_address: '192.168.10.91' depends_on: - nmos-registry # Create AMWA NMOS Testing container instance nmos-testing: image: amwa/nmos-testing:latest container_name: nmos-testing hostname: nmos-testing domainname: local entrypoint: | /bin/bash -c "/etc/init.d/dbus start; /etc/init.d/avahi-daemon start; python3 nmos-test.py" ports: - "5000:5000" volumes: - "./UserConfig.py:/config/UserConfig.py" networks: external: ipv4_address: '192.168.10.92' depends_on: - nmos-virtnode networks: external: # Create external macvlan subnet using host physical interface allowing containers to have their own IP addresses driver: macvlan driver_opts: parent: ens33 ipam: config: - subnet: 192.168.10.0/24
- zhuyi根据设备的NMOS的具体API端口号,添加端口:
-
启动Easy-NMOS:
sudo docker compose up
测试
- 打开Ubuntu系统mDNS服务,参考https://zhuanlan.zhihu.com/p/483615909
-
Default Ports and mDNS hostnames
Services mDNS name Opened ports NMOS Registry/Controller/MQTT Broker nmos-registry.local 80 (HTTP), 81 (WebSocket), 1883 (MQTT) NMOS Virtual Node nmos-virtnode.local 80 (HTTP), 81 (WebSocket) AMWA NMOS Testing Tool nmos-testing.local 5000 (HTTP) These values appear in "docker-compose.yml", "registry.json" and "node.json".
-
浏览器打开相应的NMOS服务和工具
无法在此Ubuntu系统下的网页浏览器,在网络其他系统的网页浏览器下测试,假设您的客户端设备正确支持mDNS,并且与运行容器的主机位于同一LAN上,则您应该能够使用mDNS主机名。如果这不起作用,请尝试相应的IP地址等。
Browse to the NMOS Controller
http://nmos-registry.local/admin
Browse to the AMWA NMOS Testing Tool
http://nmos-testing.local:5000/
Browse to the APIs of the NMOS Registry
http://nmos-registry.local/x-nmos
Browse to the APIs of the NMOS Node
http://nmos-virtnode.local/x-nmos