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 keeping in mind:
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.
- Navigate to the DigitalOcean Autoscale Pools Web .
- 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.
- Drop down the Number of Droplets to 0, click "Save" and wait for it to apply the changes.
- 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.
To start the cluster, start the Master Node first and then the Media Nodes.
- Navigate to the DigitalOcean Droplet Web .
- Select the droplet named
<STACK_NAME>-master-node, then go to "Power" and then "Turn on" the droplet.
- Wait until the instance is running.
- Go back to the "Autoscale Pools" tab, and there click into the Droplet Autoscale Pool resource called
<STACK_NAME>-media-node-poolgo to "Settings" and click on "Edit" in the Autoscale Pool Configuration.
- Change the number to the number of media nodes you want and click "Save", then wait for the change to be applied.
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.
-
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.
-
Go to the DigitalOcean Droplet Web and locate the resource with the name
<STACK_NAME>-master-nodeand click on it. - Click on "Upsize" and select the Droplet size you desire and click on "Resize"
- Start the cluster.
Warning
This will delete the media nodes without the graceful delete option. You can manually stop them gracefully 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.
- Navigate to the DigitalOcean Autoscale Pools Web .
- Click into the Droplet Autoscale Pool resource called
<STACK_NAME>-media-node-pool, go to "Settings" and click on "Edit" in the Droplet Configuration.
- Scroll down to 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.
Media Nodes Autoscaling Configuration#
You can modify the autoscaling configuration of the Media Nodes via terraform.tfvars file and terraform apply:
-
Go to the
terraform.tfvarsfile and change the config related to autoscaling, such as:- scaleTargetCPU
- minNumberOfMediaNodes
- maxNumberOfMediaNodes
-
Open a terminal and write the following command once you've changed the value/s.
- Confirm the change that Terraform proposes (it will redeploy the autoscale function with the new values), and the changes will take effect.
Change Fixed Number of Media Nodes#
You can change the fixed number of Media Nodes in case you put a number of fixed Media Nodes by following these steps:
- Go to the DigitalOcean Autoscale Pools Web .
- 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.
- Change the number to the desired value and click "Save", then wait for the Autoscale Pool to apply the changes.
Warning
This will delete the media nodes if you have set the count lower than the existing number. You can manually stop them gracefully 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.
Activate Scale In when Fixed Number of Media Nodes#
You can activate or deactivate the scale in when you decide you need autoscale option activated or not.
-
Go to the
terraform.tfvarsfile and change the config related to autoscaling, such as:- fixedNumberOfMediaNodes need to be set to 0.
- scaleTargetCPU if you don't want the default.
- minNumberOfMediaNodes if you don't want the default.
- maxNumberOfMediaNodes if you don't want the default.
-
Open a terminal and write the following command once you've changed the value/s.
- Confirm the change that Terraform proposes (it will destroy the fixed media nodes and deploy the scale-in function), and the changes will take effect.
-
Go to the
terraform.tfvarsfile and change the config related to autoscaling, such as:- fixedNumberOfMediaNodes need to be set to the value of your desire.
-
Open a terminal and write the following command once you've changed the value/s.
- Confirm the change that Terraform proposes (it will destroy the scale-in function and all media nodes, then deploy the fixed media nodes pool), and the changes will take effect.
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:
- Navigate to the DigitalOcean Spaces Object Storage and click on the bucket that you are using for the deployment.
- Download the
secrets.envfile that is in the bucket.
- Open it and edit the values of the credential of your choice.
- Upload the edited
secrets.envto the bucket, select private file and replace it.
- 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.