Amazon Web Services Red5 Pro Auto Scaling Checklist

Red5 Pro LICENSE.KEY:  _ _ _ _ - _ _ _ _ -_ _ _ _ -_ _ _ _ 

IAM Access Key ID (aws.accessKey): 	 IAM Secret Access Key (aws.accessSecret): 	
Public Key Name (aws.ec2KeyPairName): 	 Key pair passphrase: 	
Regions containing the public key:	

for single stream manager:
Stream Manager DNS Name:
Stream Manager Elastic IP Address:

for AWS autoscaled stream managers
Load Balancer URL:	
stream manager ami:	
EC2 launch configuration: 
AWS Autoscaling Group name: 
Load Balancer Scaling Configuration: 

Stream Manager Zone (aws.defaultzone):

VPC name (if not default):	
aws.defaultVPC  - true if default, false if not 	 Node Security Group Name (aws.ec2SecurityGroup):	
Regions containing the autoscaling security group:	

Database Master Username (config.dbUser):	 Database Master Password (config.dbPass):	 DB endpoint (config.dbHost):		

For Node image
Red5 Pro cluster password:	
Red5 Pro Server API password (if configured): 
Red5 Pro AMI Name:	
Regions containing the autoscaling AMI:	 

Stream Manager’s red5-web-properties file values:
instancecontroller.replaceDeadClusters= (true or false): 
instancecontroller.deleteDeadGroupNodesOnCleanUp= (true or false): 
rest.administratorToken: 

*	*	*	*	*
API BASICS TO GET YOU STARTED:

1. Verify Stream Manager is Using the Correct Controller

GET call:  

https://<streammanagerurl>/streammanager/api/4.0/admin/debug/cloudcontroller?accessToken=<rest.administratorToken>
should return: Amazon Web Services

2. Create a New Scale Policy
POST  call:

https://<streammanagerurl>/streammanager/api/4.0/admin/configurations/scalepolicy?accessToken=<rest.administratorToken>

json data (example):

{
      "policy": {
          "name": "allnodetypes-v3",
          "description": "This is a sample 3rd generation scale policy file with all four node types",
          "type": "com.red5pro.services.autoscaling.model.ScalePolicyMaster",
          "version": "0.0.3",
          "targets": {
              "region": [
                  {
                      "name": "default",
                      "target": [
                          {
                              "role": "edge",
                              "estimatedWarmUpTime": 150000,
                              "maxLimit": 20,
                              "scaleAdjustment": 1,
                              "coolDownPeriod": 180000,
                              "minLimit": 1
                          },
                          {
                              "role": "origin",
                              "estimatedWarmUpTime": 150000,
                              "maxLimit": 10,
                              "scaleAdjustment": 1,
                              "coolDownPeriod": 180000,
                              "minLimit": 1
                          },
                                                    {
                              "role": "relay",
                              "estimatedWarmUpTime": 150000,
                              "maxLimit": 10,
                              "scaleAdjustment": 1,
                              "coolDownPeriod": 180000,
                              "minLimit": 1
                          },
                                                    {
                              "role": "transcoder",
                              "estimatedWarmUpTime": 150000,
                              "maxLimit": 10,
                              "scaleAdjustment": 1,
                              "coolDownPeriod": 180000,
                              "minLimit": 1
                          }
                      ]
                  }
                  
                      ]
                  }
      }
  }

3. Create a New Launch Policy - note: node connection capacity should be based on server performance metrics
POST  call:

https://<streammanagerurl>/streammanager/api/4.0/admin/configurations/launchconfig?accessToken=<rest.administratorToken>

json data (example):

    {
    "launchconfig": {
      "name": "allnodetypes",
      "description": "This is a sample aws launch configuration with all four node types",
      "image": "<ami name>",
      "version": “0.0.2”,

      "targets": {
          "target": [
        {
          "role": "origin",
          "instanceType": "c5.large",
          "connectionCapacity": "30"
        },
        {
          "role": "edge",
          "instanceType": "c5.large",
          "connectionCapacity": "300"
        },
        {
          "role": "relay",
          "instanceType": "c5.large",
          "connectionCapacity": "300"
        },
        {
          "role": "transcoder",
          "instanceType": "c5.large",
          "connectionCapacity": "20"
        }
         ]
        },

        "properties": {
          "property": [
            {
              "name": "property-name",
              "value": "property-value"
            }
          ]
        },
        "metadata": {
          "meta": [
            {
              "key": "meta-name",
              "value": "meta-value"
            }
          ]
        }
      }}

4. Create a New Node Group POST call:
https://<streammanagerurl>/streammanager/api/4.0/admin/nodegroup?accessToken=<rest.administratorToken>
json data (example):

{
"regions": [
 "us-west-2"
 ],
 "launchConfig": "<launch-policy>",
 "scalePolicy": "<scale-policy>"
}

Note the cluster “name” that is returned by the above call. It will be used to create a new Origin server.

5. Launch New Origin
POST call:

https://<streammanagerurl>/streammanager/api/4.0/admin/nodegroup/<cluster-name>/node/origin?accessToken=<rest.administratorToken>

6. List nodes in your new nodegroup
GET call:

https://<streammanagerurl>/streammanager/api/4.0/admin/nodegroup/<cluster-name>/node?accessToken=<rest.administratorToken>