OpenVidu Elastic administration: Azure#
The deployment of OpenVidu Elastic on Azure is automated using Azure Resource Manager Templates, with Media Nodes managed within a Virtual Machine Scale Set. This group dynamically adjusts the number of instances based on a target average CPU usage.
Internally, the Azure 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 Azure environment that are worth taking into account:
Cluster shutdown and startup#
The Master Node is a Virtual Machine Instance, while the Media Nodes are part of a Virtual Machine Scale Set. 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.
Gracefully stopping Media Nodes
There is currently a limitation with Media Nodes that prevents them from stopping gracefully. Please exercise caution when stopping Media Nodes, as they will terminate immediately without waiting for active Rooms to complete. You may want to wait for your active Rooms to finish before stopping the cluster.
We are working to implement the same graceful shutdown behavior offered by AWS and On Premises deployments. In the meantime, Media Nodes include a script that allows for a graceful shutdown. To use it, SSH to the Media Node you want to stop and execute script ./usr/local/bin/stop_media_node.sh
- Navigate to the Azure Portal Dashboard and go to the Resource Group where you deployed OpenVidu Elastic.
- Then click into the Virtual Machine Scale Set resource called
<STACK_NAME>-mediaNodeScaleSet
and click "Availability + scale" on the left panel, here click on "Scaling" option. - On this tab, go at the very bottom and modify the "Instance Limits" to 0.
- Click on save and wait until is completed, you can check how is going in the "Instances" tab.
- After confirming that all Media Node instances are terminated, go back to the Resource Group and locate the resource called "stackName-VM-MasterNode". Click on it to go to the Master Node instance. There, click on "Stop" to stop the instance.
To start the cluster, first start the Master Node and then the Media Nodes.
- Navigate to the Azure Portal Dashboard and go to the Resource Group where you deployed OpenVidu Elastic.
- In the resource group click on the resource called "stackName-VM-MasterNode", here click on start to start the Master Node.
- Wait until the instance is running.
- Go back to the Resource Group, and there click into the Virtual Machine Scale Set resource called "stackName-mediaNodeScaleSet" and click "Availability + scale" on the left panel, here click on "Scaling" option.
- On this tab, modify the "Instance Limits" to your desired ones.
- Click on save and wait until is completed. You can check the progress in the "Instances" tab.
Change the instance type#
It is possible to change the instance type of both the Master Node and the Media Nodes. However, since the Media Nodes are part of a Virtual Machine Scale Set, 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 instance to change its instance type, but it is recommended to stop the whole cluster to avoid any issues.
-
Go to the Azure Resource Group where you deployed and locate the resource with the name "stackName-VM-MasterNode" and click on it.
- On the left panel click on "Availability + scale" tab and inside click on "Size" tab. Then select the size you desire and click on "Resize"
- Start the cluster.
Info
This will forcely restart the Media Nodes. If you want to stop them gracefully to avoid the disruption of active Rooms, check the Shutting downd the cluster tab.
- Go to the Azure Portal Dashboard on Azure.
- Select the Resource Group where you deployed OpenVidu Elastic.
- Locate the resource with the name "stackName-mediaNodeScaleSet". Click on it to navigate to the Virtual Machine Scale Set.
- On the left panel click on "Availability + scale" tab, then on "Size".
- Select the new instance type and click on "Resize".
Media Nodes Autoscaling Configuration#
You can modify the autoscaling configuration of the Media Nodes by adjusting the scaling rules of the Virtual Machine Scale Set:
- Go to the Azure Portal Dashboard on Azure.
- Select the Resource Group where you deployed OpenVidu Elastic.
- Locate the resource with the name "stackName-mediaNodeScaleSet" and click on it.
- On the left panel click on "Availability + scale" tab and inside click on "Scaling" option.
-
In the "Default" box you will find a section called "Rules". Here you can add new rules or modify existing ones.
Info
Currently there is only one rule to scale out. We are actively working in providing a graceful scale in process for Media Nodes to avoid active Rooms disruption.
Info
OpenVidu Elastic is by default configured with a "Target tracking scaling" policy that scales based on the target average CPU usage. However, you can configure different autoscaling policies according to your needs. For more information on the various types of autoscaling policies and how to implement them, refer to the Azure Scaling Set documentation.
Fixed Number of Media Nodes#
If you prefer to maintain a fixed number of Media Nodes instead of allowing the Virtual Machine Scale Set to perform dynamic scaling:
- Go to the Azure Portal Dashboard on Azure.
- Select the Resource Group where you deployed OpenVidu Elastic, locate the resource with the name "stackName-mediaNodeScaleSet" and click on it
- On the left panel click on "Availability + scale" and then in "Scaling" tab.
- On this tab, go at the very bottom and modify the "Instance Limits" to the value of fixed number of Media Nodes you want. In this case is set to 2.
- Click on save and wait until is completed, you can check how is going in the "Instances" tab.
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, an Azure deployment provides the capability to manage global configurations via the Azure portal using Key Vault Secrets created during the deployment:
- Navigate to the Azure Portal Dashboard on Azure.
- Select the Resource Group where you deployed OpenVidu Elastic.
- In the "stackname-keyvault" resource, click on "Objects" 🡒 "Secrets" on the left panel. This will show you all the secrets that are stored in the Key Vault of the OpenVidu Elastic deployment.
- Click on the desired secret you want to change and click on "New Version".
- Enter the new secret value on "Secret Value" filed and click on "Create".
- Go to the Master Node resource and click on "Restart" to apply the changes to the OpenVidu Elastic deployment.
Changes will be applied automatically.