WCS on Google Cloud Platform¶
Since build 5.2.679, WCS can be deployed on Google Cloud Platform as standalone media server, CDN with low latency and CDN with load balancing between nodes.
Anyway, before deploying, the following should be prepared:
- an active GCP account and a project in the account
- a WCS license to activate on server/servers
- optionally, domain names to bind to bind to servers static IPs and corresponding SSL certificates
Server deployment¶
Create and launch VM instance¶
-
In Google Cloud console go to
Compute Engine-VM instancessection and clickCreate VM instanceto start VM creation. Choose the server name, datacenter region and zone, VM configuration

-
In
Boot disksection clickChange. Choose CentOS 7.6 base image


-
On
Securitytab add the public SSH key if you do not have project SSH keys

-
On
Networktab choose external and internal IP addresses: - if the server supposed to be Origin in CDN, it is recommended to reserve a static internal IP address;
-
if there should be external entry points to the server (for example, to use for publishing/playing streams), it is recommended to reserve a static external IP address to bind domain name to

-
Click
Create

The server instance wuill be created and launched

Firewall rules setup¶
Firewall rules affect all the instances in the project, so they should be set up once
-
Go to
VPC network-Firewallsection and createwcs-portsrule

-
Allow incoming (ingress in terms of GCP) traffic from any node

-
Specify WCS ports and click
Create

WCS installation and configuration¶
-
Install JDK. It is recommended to use at least JDK 12 or 14 if high load is planning
#!/bin/bash sudo rm -rf jdk* curl -s https://download.java.net/java/GA/jdk12.0.2/e482c34c86bd4bf8b56c0b35558996b9/10/GPL/openjdk-12.0.2_linux-x64_bin.tar.gz | tar -zx [ ! -d jdk-12.0.2/bin ] && exit 1 sudo mkdir -p /usr/java [ -d /usr/java/jdk-12.0.2 ] && sudo rm -rf /usr/java/jdk-12.0.2 sudo mv -f jdk-12.0.2 /usr/java [ ! -d /usr/java/jdk-12.0.2/bin ] && exit 1 sudo rm -f /usr/java/default sudo ln -sf /usr/java/jdk-12.0.2 /usr/java/default sudo update-alternatives --install "/usr/bin/java" "java" "/usr/java/jdk-12.0.2/bin/java" 1 sudo update-alternatives --install "/usr/bin/jstack" "jstack" "/usr/java/jdk-12.0.2/bin/jstack" 1 sudo update-alternatives --install "/usr/bin/jcmd" "jcmd" "/usr/java/jdk-12.0.2/bin/jcmd" 1 sudo update-alternatives --install "/usr/bin/jmap" "jmap" "/usr/java/jdk-12.0.2/bin/jmap" 1 sudo update-alternatives --set "java" "/usr/java/jdk-12.0.2/bin/java" sudo update-alternatives --set "jstack" "/usr/java/jdk-12.0.2/bin/jstack" sudo update-alternatives --set "jcmd" "/usr/java/jdk-12.0.2/bin/jcmd" sudo update-alternatives --set "jmap" "/usr/java/jdk-12.0.2/bin/jmap" -
Install accessory tools and libraries
-
Stop firewalld (it ti not necessary to block any ports on VM level because firewall rules were set up on project level)
-
Disable SELinux
-
Install WCS
Wherecurl -OL https://flashphoner.com/downloads/builds/WCS/5.2/FlashphonerWebCallServer-5.2.xxx.tar.gz tar -xzf FlashphonerWebCallServer-5.2.xxx.tar.gz cd FlashphonerWebCallServer-5.2.xxx sudo ./install.shxxxis WCS actual build number -
Activate your license
-
Configure WCS (below the example of Origin server settings to publish WebRTC and RTMP streams)

Do not change IP addresses inip,ip_localиcdn_ipsettings, they will be configured automatically on WCS startup.
WCS starting and testing¶
-
Start WCS
-
Enter to WCS web interface, open Two Way Streaming example, publish and play
teststream

CDN deployment¶
-
Create and configure Edge server (below the example of Edge server settingt to play WebRTC streams)

Do not change IP addresses inip,ip_localиcdn_ipsettings, they will be configured automatically on WCS startup. Set thecdn_point_of_entryparameter to Origin server static internal IP address
CDN testing¶
-
Start WCS on Origin and Edge VM instances.
-
Go to Origin web interface and publish
teststream in Two Way Streaming example -
Go to Edge web interface and play
teststream in Player example
