Main stand configuration

Main stand configuration parameters are set in stand.conf/wcs-stand.conf file as environment variables:

CONTAINER_PREFIX=wcs-oam-test
IMAGE_PREFIX=wcs_oam_test
DOCKER_NETWORK=bridge

CDN_NODES=o-test1,o-test2,e-test1,e-test2,e-test3,e-test4,t-test1,t-test2
CDN_ENTRY_POINT=o-test1
FFMPEG_NODE=ffmpeg

WCS_PATH=/usr/local/FlashphonerWebCallServer

Where

Docker network configuration

To set IP addresses explicitly to test nodes, a separate docker network should be set in main stand configuration file

DOCKER_NETWORK=stand
DOCKER_SUBNET=172.16.11.1/24
DOCKER_GATEWAY=172.16.11.1
DOCKER_HOST_IFACE=iface

Where

The network should be created using stand-network script

sudo ./stand-network start

Docker netwrok interface will be set as br-$DOCKER_NETWORK, br-stand for example. Packet forwarding rules will be added to iptables:

iptables -A FORWARD -i br-$DOCKER_NETWORK -o $DOCKER_HOST_IFACE -j ACCEPT
iptables -A FORWARD -i $DOCKER_HOST_IFACE -o br-$DOCKER_NETWORK -j ACCEPT

Node configuration

Node configuration file `node.conf` should be placed to `stand.conf` folder, to subfolder named as node. The node settings are environment variables depending on node type. Also, there can be addition configuration files placed to node subfolder, those files will be copied to node container

The following parameters are mandatory for all the nodes

Additional parameter can be set

WCS node configuration

WCS node configuration file node.conf

NODE_IP=""
NODE_PORTS=22,554,1935,8080-8084,8443-8445,8888,9091,30000-33000/tcp,30000-33000/udp
JAVA_VERSION=8
JAVA_GC=CMS
JAVA_HEAP=2g
WCS_LICENSE="Put-your-license-key-here"
CDN_ROLE=origin
PRODUCT_LINK="https://flashphoner.com/downloads/builds/WCS/5.2/FlashphonerWebCallServer-5.2.XXX.tar.gz"
PRODUCT_ACCESS_LOGIN=staff
PRODUCT_ACCESS_PASSWORD=X5RLgmrTiK25

Where

Also, the following files can be placed to node configuration folder:

Those files are copied to container "as is", without any changes.

The node CDN role can be set as parameter or can be detected by node name:

Also, node CDN role can be set explicitly in flashphoner.properties cile to be copied to the container

RTMP streams publisher node configuration

RTMP stream publisher node configuration file node.conf

NODE_IP=""
NODE_PORTS=22
MEDIA_MOUNT=/home/media

Where

A docker host folder should be set to mount to the container, the *.mp4 files to publish should be placed to this folder

Also, the following files can be placed to node configuration folder:

RTMP streams publishing to Origin servers

If there are publishing scripts in MEDIA_MOUNT folder, the scripts will be executed for every node with Origin role set by node configuration or node name. In this case, node IP address is passed to the script as parameter.

If node roles are set in flashphoner.properties files only, the publishing scripts are executed without passing node IP address. In this case, node IP addressee to publish shold be set in the script.

If there are *.mp4 files in MEDIA_MOUNT folder, and there are no any publishing script, every media file will be published to every node with Origin role set by node configuration or node name.