Upgrading Red5 Pro for Autoscaling Nodes

The easiest way to create a new disk image for autoscaling is per the following:

1. Create a new server instance using the image/AMI that you are currently using for autoscaling

Download the latest Red5 Pro Server distribution from https://account.red5pro.com/download to your local machine.

For Google

Copy the Red5 Pro Server zip file to this instance. SSH into your instance and stop the Red5 Pro service (/etc/init.d/red5pro stop). You may need to install new libraries since the last server release, so check the Linux Install instructions and run through software dependencies. Per "How to Upgrade Red5 Pro Server," Rename your existing red5pro folder to bak.red5pro (sudo mv red5pro bak.red5pro). Copy and unzip the new distribution into the same directory where the original red5pro folder was (e.g. /usr/local/). After it is unzipped, rename that directory to red5pro (sudo mv red5pro-server-* red5pro). Copy the following files from the old build to the new: conf/autoscale.xml, webapps/red5-default.xml, and LICENSE.KEY.

Start the server (/etc/init.d/red5pro start) and hit the IP address at port 5080 to make sure there are no missing dependencies and the server starts correctly.

For AWS

Copy the Red5 Pro Server zip file to this instance. SSH into your instance and stop the Red5 Pro service (/etc/init.d/red5pro stop). You may need to install new libraries since the last server release, so check the Linux Install instructions and run through software dependencies. Per "How to Upgrade Red5 Pro Server," Rename your existing red5pro folder to bak.red5pro (sudo mv red5pro bak.red5pro). Copy and unzip the new distribution into the same directory where the original red5pro folder was (e.g. /usr/local/). After it is unzipped, rename that directory to red5pro (sudo mv red5pro-server-* red5pro). Copy the following files from the old build to the new: conf/autoscale.xml, webapps/red5-default.xml, and LICENSE.KEY.

Start the server (/etc/init.d/red5pro start) and hit the IP address at port 5080 to make sure there are no missing dependencies and the server starts correctly.

Handy bash script for copying files between builds, and removing two unnecessary webapps (assumes that old build is now in bak.red5pro and new build is in the red5pro directory):

#!/bin/bash
sudo cp bak.red5pro/conf/autoscale.xml red5pro/conf/
sudo cp bak.red5pro/conf/logback.xml red5pro/conf/
sudo cp bak.red5pro/webapps/red5-default.xml red5pro/webapps/
sudo cp LICENSE.KEY red5pro/
sudo rm -rf red5pro/webapps/secondscreen
sudo rm -rf red5pro/webapps/streammanager

2. Create a new AMI/Image from the updated build

For Google

See Create Disk Image on Google Cloud platform.

For AWS

See the Create AMI Image from Instance section of Prepare Red5 Pro AMI for Nodes. Make sure to Copy Red5 Pro AMI to Other Regions if you have nodes/nodegroups in multiple regions.

3. Edit Existing or Create New Launchconfig file

If you have an existing live nodegroup, then you will want to create a new launchconfig file rather than edit the existing one. Otherwise, you run the risk of having a nodegroup with two imcompatible server builds.

Refer to the AWS example or Google Example. Make sure to update image to your new disk image name. By default, per launchconfig.filescandelay value in the Stream Manager red5-web.properties file, new launchconfig files will be processed after 60 minutes. Or you can restart Red5 Pro on the Stream Manager to update immediately.