Configuration¶
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
CONTAINER_PREFIX
- container name prefixIMAGE_PREFIX
- docker image prefixDOCKER_NETWORK
- docker networkCDN_NODES
- test WCS CDN node namesCDN_ENTRY_POINT
- CDN entry point nodeFFMPEG_NODE
- node name to publish RTMP streams to CDN using ffmpegWCS_PATH
- WCS installation path
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
DOCKER_NETWORK
- docker networkDOCKER_SUBNET
- docker network IP subnetDOCKER_GATEWAY
- docker network gatewayDOCKER_HOST_IFACE
- external docker host interface
The network should be created using stand-network
script
Docker network 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
NODE_IP
- node IP addressNODE_PORTS
- node ports available from docker host and external networks
Additional parameter can be set
CHECK_PORT
- TCP port to check node availability
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
JAVA_VERSION
- JVM version (8 or 12)JAVA_GC
- GC to use (CMS or ZGC)JAVA_HEAP
- Java heap size in GbWCS_LICENSE
- WCS license numberCDN_ROLE
- CDN node rolePRODUCT_LINK
- WCS build download linkPRODUCT_ACCESS_LOGIN
- login to access WCS download link (for enterprise customers only)PRODUCT_ACCESS_PASSWORD
- password to access WCS download link (for enterprise customers only)
Also, the following files can be placed to node configuration folder:
flashphoner.properties
wcs-core.properties
*.sdp
cdn_profiles.yml
wss.jks
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:
o-*
- Origint-*
- Transcodere-*
- Edge
Also, node CDN role can be set explicitly in flashphoner.properties
file to be copied to the container
RTMP streams publisher node configuration¶
RTMP stream publisher node configuration fileĀ node.conf
Where
- MEDIA_MOUNT - docker host folder to mount to the container
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:
*.mp4
files to copy toMEDIA_MOUNT
folder*.sh
files to copy toMEDIA_MOUNT
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.