Try Live Demo

Welcome to the future of streaming on Azure with Azure Resource Manager and Ant Media Server! In this guide, we’ll show you how to effortlessly deploy and scale your Ant Media Server cluster infrastructure on Azure using the Azure Resource Manager (ARM) template.

There are different ways in which the Ant Media Server Cluster can be deployed on Azure. Be it using the Azure Kubernetes Service or creating it through the Azure resource group. This approach requires lots of manual inputs and can be a bit tough at times, especially if you are looking to minimize the time taken and the efforts required to set up the infrastructure.

But not more, gone are the days of manual scaling and infrastructure bottlenecks. With Azure Resource Manager, you have the power to automate and orchestrate the deployment of Ant Media Server clusters with ease. Say goodbye to manual deployment and hello to a seamless, cost-effective streaming solution. Let’s dive in and take control of your streaming destiny!

What is Azure Resource Manager?

Azure Resource Manager (ARM) is a service provided by Microsoft within its cloud computing platform Azure, allowing centralized management of resources. With Azure Resource Manager, you have the power to automate and orchestrate the deployment of Ant Media Server clusters with ease by using just one file.

By leveraging the scalability and flexibility of Azure Resource Manager, you can optimize costs and resource utilization, ensuring that you’re getting the most bang for your buck. Whether you’re running a small-scale video blog or managing a large-scale streaming platform, Ant Media Server and Azure Resource Manager allow you to scale your infrastructure according to your needs, without breaking the bank.

Let’s dive in and seize control of your streaming infra and move on to this easy installation.

Creating Azure Resource Group

  • Sign in to your Azure account and navigate to the Azure portal.
  • Search Resource groups from the search bar, then click the New to create a new resource group. Specify the resource group name and region.

Screenshot 2024 04 02 005015

  • Review the details on the next page and click Create.

Screenshot 2024 04 02 005100

  • The resource group is created.

Screenshot 2024 04 02 005139

Azure Resource Manager Custom Deployment Template

  • Search Deploy a custom template from the search bar.
  • click the Build your own template in the editor button to upload the template.

Screenshot 2024 04 02 005212

  • Download the antmedia-azure-autoscale.yaml file from the Ant Media GitHub repository.
  • Upload the template file by using the Load file option and click Save.

azure-resource-manager

  • After uploading the Azure Resource Manager (ARM) template you will see a screen like the one below. Fill in the required parameters.

ams cluster in azure 3 2

Resource Group: The resource group where the cluster will be installed.
Region: The region where the cluster will be deployed.
Origin Instance Capacity: The number of instances that will be created in the origin group.
Origin Instance Type: The origin node instance type.
Edge Instance Capacity: The number of instances that will be created in the edge group.
Edge Instance Type: The edge node instance type.
CPU Policy Target Value: Average CPU utilization of the auto-scaling group. When the server reaches %60 CPU utilization average, new servers will be added.
MongoDB Instance Type: MongoDB’s instance type.
Cert Data: The base64 version of your certificate in pfx format.
Cert Password: Password of your certificate.
Authentication Type: Whether the connection/SSH method to all instances will be password or SSH key. If you choose the password, you must fill in the password field.

How to get the Certificate (Cert Data and Cert Password)

  • You can check this post to create a certificate for your Azure resource manager template cluster if you do not have one.

After you have created an SSL certificate, you need to follow the below steps.

  • Convert the existing or newly created certificate to pfx format as shown below (enter the password you entered here in the Cert Password field).

openssl pkcs12 -inkey /etc/letsencrypt/live/azure.antmedia.cloud/privkey.pem -in /etc/letsencrypt/live/azure.antmedia.cloud/cert.pem -export -out azure.antmedia.cloud.pfx
  • Now convert the *.pfx format to base64 as follows.
openssl base64 -in azure.antmedia.cloud.pfx -out azure.antmedia.cloud.base64

Note: Replace the azure.antmedia.cloud domain with your domain.

  • Enter the content of the resulting file with the .base64 extension into the “Cert Data” field.
  • Click the Review + Create button to start the deployment process.

Screenshot 2024 04 02 010132

  • Wait for the Deployment Completion.

Screenshot 2024 04 02 010205

  • This process usually takes a few minutes but may vary depending on the size and configuration of the cluster. When the deployment process is complete, you will see a screen like the one below.

Screenshot 2024 04 02 011115

Connecting to the Cluster

Now that the cluster is created and ready, let’s connect to it.

  • Navigate to the Application Gateway service.

Screenshot 2024 04 02 011235

  • You can connect to your cluster via the application gateway Public IP or you can update your DNS records based on the certificate hostname.

Screenshot 2024 04 02 011309

  • Once you reach the application gateway IP address, you will see the Ant Media Server Web panel dashboard and can create your login credentials.

Screenshot 2024 04 02 011350

  • The common name of the certificate was azure.antmedia.cloud, after I entered the IP address of the Application Gateway from DNS as an A record, I was able to access the Ant Media Server cluster with the domain directly.

ams cluster in azure 5

  • The origin node pool is routed to port 443 whereas the edge nodes can be reached on port 5443.

Experience WebRTC Samples

You can explore our collection of WebRTC samples designed to immerse you in various scenarios with Ant Media Server. Dive into our WebRTC demos to visualize and understand how your streams will appear. 

sample webrtc publish page

Conclusion

In conclusion, deploying an Ant Media Server cluster on Azure using Azure Resource Manager offers a powerful solution for scaling your video streaming infrastructure. By following the steps outlined in this guide, you can ensure high-performance, seamless streaming experiences for your audience while leveraging the scalability and reliability of Azure’s cloud platform.

Based on my experiences, I can say that it’s not as daunting as it may seem, and ARM template do make things easier. Now, you can kick off your project and manage your media streams with a powerful AMS infrastructure! If you have questions or need any type of support, contact us via a form or schedule a meeting to have a coffee and chat, or write directly to contact@antmedia.io so that we can democratize live streaming together

Cheers


Murat Ugur

Murat is a Software Developer and a Technical Support Engineer at the same time at Ant Media. With a remarkable 15+ years in the IT domain, including 13 years dedicated to Linux System administration, Murat brings a wealth of experience to the table. His expertise is grounded in technologies like bash scripting, python, and puppet.

chatsimple
Warning: Undefined array key "promocode" in /home/mirror.antmedia.io/public_html/wp-content/themes/hestia-child/footer.php on line 70