Red5 Pro Auto Scaling Checklist

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

Stream Manager IP Address:	

MySQL root password:	
Database IP address (config.dbHost={host}):	
Cluster database user account (config.dbUser={username}):		
Cluster database user password (config.dbPass={password}): 	

From Nodes:
- Node Server API Security Access Token: 	
- Red5 Pro cluster password:
- Node IP Addresses:

red5-web-properties file values:

## SIMULATED-CLOUD CONTROLLER CONFIGURATION ##
managed.regionNames={custom-region}
managed.availabilityZoneNames={custom-region-zone}
managed.operationTimeoutMilliseconds=20000
managed.recycleDeadNodes=true

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: Simulated Cloud Services

2. Provision Nodes (note: you need to provision at least two servers, for the Origin and Edge nodes)
POST call:

https://<streammanagerurl>/streammanager/api/4.0/admin/controller/provisions?accessToken=<rest.administratorToken from red5-web.properties file>

json data (example):
[
  {
    "location": "us-test1-a",
    "host": "<instance-host-address>",
    "instanceType": "standard"
  },
  {
    "location": "us-test1-a",
    "host": "<instance-host-address>",
    "instanceType": "standard"
  }

]
3. 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": 2
                          },
                          {
                              "role": "origin",
                              "estimatedWarmUpTime": 150000,
                              "maxLimit": 10,
                              "scaleAdjustment": 1,
                              "coolDownPeriod": 180000,
                              "minLimit": 2
                          },
                                                    {
                              "role": "relay",
                              "estimatedWarmUpTime": 150000,
                              "maxLimit": 10,
                              "scaleAdjustment": 1,
                              "coolDownPeriod": 180000,
                              "minLimit": 2
                          },
                                                    {
                              "role": "transcoder",
                              "estimatedWarmUpTime": 150000,
                              "maxLimit": 10,
                              "scaleAdjustment": 1,
                              "coolDownPeriod": 180000,
                              "minLimit": 2
                          }
                      ]
                  }
                  
                      ]
                  }
      }
  }

4. 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 simulated launch configuration with all four node types",
      "image": "<ami name>",
      "version": “0.0.2”,

      "targets": {
          "target": [
        {
          "role": "origin",
          "instanceType": “standard”,
          "connectionCapacity": “30"
        },
        {
          "role": "edge",
          "instanceType": "standard",
          "connectionCapacity": "300"
        },
        {
          "role": "relay",
          "instanceType": "standard",
          "connectionCapacity": "300"
        },
        {
          "role": "transcoder",
          "instanceType": “large”,
          "connectionCapacity": "15"
        }
         ]
        },

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

5. Create a New Node Group POST call:
https://<streammanagerurl>/streammanager/api/4.0/admin/nodegroup?accessToken=<rest.administratorToken>

json data (example):
{
 "regions": [
   "us-west-1"
 ],
 "launchConfig": "default-v2",
 "scalePolicy": "default-v2"
}
Note the cluster “name” that is returned by the above call. It will be used to create a new Origin server.

6. Launch New Origin
POST call:

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

7. List nodes in your new nodegroup
GET call:

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