Skip to content

OpenVidu Elastic administration: DigitalOcean#

DigitalOcean

The deployment of OpenVidu Elastic on DigitalOcean is automated using Terraform CLI to deploy on DigitalOcean, where Media Nodes are in a Fixed Droplet Autoscale Pool .

Internally, the DigitalOcean Elastic deployment mirrors the On Premises Elastic deployment, allowing you to follow the same administration and configuration guidelines of the On Premises Elastic documentation. However, there are specific considerations unique to the DigitalOcean environment that are worth taking into account:

Cluster shutdown and startup#

The Master Node is a Droplet instance, while the Media Nodes are part of a Droplet Autoscale Pool. The process for starting and stopping these components differs:

To shut down the cluster, you need to stop the Media Nodes and then stop the Master Node.

  1. Navigate to the DigitalOcean Autoscale Pools Web .
  2. Click into the Droplet Autoscale Pool resource called <STACK_NAME>-media-node-pool, go to "Settings" and click on "Edit" in the Autoscale Pool Configuration.
    Edit Button Location Autoscale Pool
  3. Drop down the Number of Droplets to 0, click "Save" and wait for it to apply the changes.
  4. After confirming that all Media Node instances are terminated, in the "Droplets" tab select the droplet called <STACK_NAME>-master-node. Click on it to go to the Master Node instance, there click on "Power" and then "Turn off" the droplet.
    Turn Off Master Node

To start the cluster, start the Master Node first and then the Media Nodes.

  1. Navigate to the DigitalOcean Droplet Web .
  2. Select the droplet named <STACK_NAME>-master-node, then go to "Power" and then "Turn on" the droplet.
    Turn on Master Node
  3. Wait until the instance is running.
  4. Go back to the "Autoscale Pools" tab, and there click into the Droplet Autoscale Pool resource called <STACK_NAME>-media-node-pool go to "Settings" and click on "Edit" in the Autoscale Pool Configuration.
    Edit Button Location Autoscale Pool
  5. Change the number to the number of media nodes you want and click on save, now wait for it to apply the change.

Change the instance size#

It is possible to change the instance size of both the Master Node and the Media Nodes. However, since the Media Nodes are part of a Autoscale Pool, the process differs. The following section details the procedures:

Warning

This procedure requires downtime, as it involves stopping the Master Node.

  1. Shutdown the cluster.

    Info

    You can stop only the Master Node droplet to change its droplet size, but it is recommended to stop the whole cluster to avoid any issues.

  2. Go to the DigitalOcean Droplet Web and locate the resource with the name <STACK_NAME>-master-node and click on it.

  3. Click on "Upsize" and select the Droplet size you desire and click on "Resize"
    Change droplet size master
  4. Start the cluster.

Warning

This will delete the media nodes without the graceful delete option, you can stop them graceful manually by running the /usr/local/bin/graceful_shutdown.sh script and waiting for it to finish. You have to do it in all the media nodes because the autoscale pool will delete all media nodes and create new ones.

  1. Navigate to the DigitalOcean Autoscale Pools Web .
  2. Click into the Droplet Autoscale Pool resource called <STACK_NAME>-media-node-pool, go to "Settings" and click on "Edit" in the Droplet Configuration.
    Edit Droplet Configuration Location Autoscale Pool
  3. Go down into the Choose a Droplet Plan section and change the size to the one you prefer, then click on "Edit Autoscale Pool" and wait for the changes to apply.
    Edit Autoscale Pool

Change Fixed Number of Media Nodes#

You can change the fixed number of Media Node by following these steps:

  1. Go to the DigitalOcean Autoscale Pools Web .
  2. Click into the Droplet Autoscale Pool resource called <STACK_NAME>-media-node-pool, go to "Settings" and click on "Edit" in the Autoscale Pool Configuration.
    Edit Button Location Autoscale Pool
  3. Change the number to the desired one and click on "Save", then wait to the Autoscale Pool to apply the changes.

Warning

This will delete the media nodes if you have set them to less than the number of media nodes that existed, you can stop them graceful manually by running the /usr/local/bin/graceful_shutdown.sh script and waiting for it to finish. You have to do it in all the media nodes because the autoscale pool deletes all and creates new ones.

Administration and configuration#

Regarding the administration of your deployment, you can follow the instructions in section On Premises Elastic Administration.

Regarding the configuration of your deployment, you can follow the instructions in section Changing Configuration. Additionally, the How to Guides offer multiple resources to assist with specific configuration changes.

In addition to these, a DigitalOcean deployment provides the capability to manage global configurations by downloading secrets.env file of the bucket and changing it, then upload it again. Here are the detailed steps:

  1. Navigate to the DigitalOcean Spaces Object Storage and click on the bucket that you are using for the deployment.
  2. Download the secrets.env file that is in the bucket.
    Secrets.env download
  3. Open it and edit the values of the credental of your choice.
  4. Upload the edited secrets.env to the bucket, select private file and replace it.
    Secrets.env upload
    Secrets.env replace
  5. Restart Master Node by shutting it down and then starting it again. Changes will be applied automatically.

Backup and Restore#

Review the Backup and restore OpenVidu deployments guide for recommended backup workflows.