Red5 Documentation

Configure Terraform Server

Install Red5 Pro Terraform Software on the Instance

  • Copy the file up to the /usr/local directory on your server.
  • SSH into the server, then run apt-get update.
  • Install Java 11 and NTP (to ensure that the terraform server is in sync with your stream manager(s). Run: apt-get install -y openjdk-11-jdk unzip ntp *
  • Unzip in the /usr/local/ directory (new directory added will be called red5service)
  • Delete all .tf files in the red5service folder
  • Copy everything from the folder cloud_controller_oracle to red5service (all of the .tf files as well as the modules directory)
cd /usr/local/red5service
sudo rm *.tf
sudo cp -r cloud_controller_oracle/* .
  • Make and terraform executable (chmod +x terraform)
  • Copy red5proterraform.service to /lib/systemd/system/
  • Copy your public ssh key to folder /usr/local/red5service/ (generated in this step)
  • Copy your private Oracle API key to folder /usr/local/red5service/ (generated in this step)
  • IMPORTANT: From the /usr/local/red5service directory, change the permissions of your Oracle private API key per SSH requirements (sudo chmod 400 *.pem).

Update red5service/

Modify the following values in the file:

  • server.port – the port you will be running this service on (default = 8083; make sure that this port is open in your network security group)

  • api.accessToken – the passphrase to use for making API calls to this service (to be used in the stream manager configuration)

  • terra.operationTimeoutMilliseconds – default timeout is set to 5 minutes (320000 milliseconds). Make this value higher if you will be initiating more than 20 nodes concurrently

  • terra.parallelism – the default, 10, should work well. If you are creating very large groups, you can set this to 30, but we don’t recommend going much higher

  • cloud.oracle_tenancy_ocid — Tenancy OCID from Orcale cloud. Example: ocid1.tenancy.oc1..111222333

  • cloud.oracle_user_ocid — User OCID from Orcale cloud in User profile. Example: ocid1.user.oc1..111222333

  • cloud.oracle_fingerprint — SSH key fingerprint from Orcale cloud. Example: cb:af:a6:81:20:ff:21:47:eb:cc:b6:9a:a3:33:22:11

  • cloud.oracle_private_key_path — Path to Orcale SSH private key. Example: /usr/local/red5service/oracle_red5pro_develop_2023-06-26T14_58_56.077Z.pem

  • cloud.oracle_compartment_id — Compartment OCID from Oracle cloud. This ID will be the same for all regions. Example: ocid1.compartment.oc1..111222333

  • cloud.oracle_subnet_name — Subnet name from Oracle cloud. The name should be the same for all regions. Example: red5pro-sandbox1

  • cloud.oracle_ssh_pub_path — Path to SSH public key for autoscaling nodes (Origin,Edge,Transcoder,Relay). Example: /usr/local/red5service/

  • cloud.oracle_network_security_group — Node network security group name. Example: red5pro-nodes-sg

  • config.dbHost — the DB Endpoint URL of your MySQL server instance

  • config.dbPort — the default MySQL port is 3306

  • config.dbUser — Database Master Username

  • config.dbPass — Database Master Password

  • config.dbDrivercom.mysql.cj.jdbc.Driver – indicates MySQL

  • config.dbSSL — should be set to true for OCI

The Settings to maintain application health should be left to the default settings. These are used in conjunction with the Stream Manager to ensure that the Terraform service is functional.

sample file:

#Server port configurations

#Log level
logging.pattern.console=%d{yyyy-MM-dd} | %d{HH:mm:ss.SSS} | %5p | %-40.40logger{40} | %m%n

#Terraform Service Rest API token to be used by stream manager to connect to this service

#Terraform configurations

#set to 180000 for small groups; higher for larger groups (for Azure and vSphere recommended 320000)

# Cloud-specific params must start with cloud.

# Azure
# if running on Azure, be sure to remove the, and files
# cloud.az_subscription_id={}
# cloud.az_client_id={}
# cloud.az_client_secret={}
# cloud.az_tenant_id={}
# cloud.az_resource_group_name={}
# cloud.az_ssh_user_name={}
# cloud.az_ssh_user_password={}
# cloud.az_resource_prefix_name={}

# DigitalOcean
# if running on Digital Ocean, be sure to remove the, and files
# cloud.do_api_token={}
# cloud.do_ssh_key_name={}

# Linode
# if running on Linode, be sure to remove the, and files
# cloud.linode_api_token={}
# cloud.linode_ssh_key_name={}
# cloud.linode_tag={}

# Oracle Cloud
# if running on OCI, be sure to remove the,, and

# vSphere
# if running on vSphere, be sure to remove the, and files
# cloud.vsphere_user={}
# cloud.vsphere_password={}
# cloud.vsphere_server={}
# cloud.vsphere_datacenter={}
# cloud.vsphere_datastore={}
# cloud.vsphere_resource_pool={}
# cloud.vsphere_network={}
# cloud.vsphere_domain={}

#DataBase configurations

#Settings to maintain application health

Start terraform service

  • Reload the daemon: systemctl daemon-reload
  • Start the service systemctl start red5proterraform.service
  • Enable run the service on startup systemctl enable red5proterraform.service

Test terraform service

Navigate in a browser to http://{host}:8083/terraform/test?accessToken={api.accessToken} – the response should be: Red5Pro Terraform Service is working