How to Setup Ant Media Server Clustering on Azure?

Step 1: Create a Virtual network

Firstly, we need to create a virtual network named antmediaserver, and then we will add origin-subnet and edge-subnet as described in this doc.

Step 2: Create a Public IP

Create a static public IP address described here. Name it antmediaserver-ip.

Step 3: Create a Storage Account

Create a storage account as described here. Name it antmediamediastorage.

Step 4: Create a Virtual Machine for AntMedia

1 - Click Virtual Machines on the left bar and then click +Add:

Step 5: Setup AntMedia in VM

1 - Click Virtual Machines on the left bar and choose your virtual machine. Note the public IP address:

Step 6: Create a MongoDB Virtual Machine

1 - Create another virtual machine following Step 5.

$ sudo apt-key adv — keyserver hkp://keyserver.ubuntu.com:80 — recv 9DA31620334BD75D9DCB49F368818C72E52529D4 
$ echo “deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/4.0 multiverse” | sudo tee /etc/apt/sources.list.d/mongodb-org-4.0.list
$ sudo apt-get update
$ sudo apt-get install -y mongodb-org
sudo service mongod restart
sudo systemctl enable mongod.service

Step 7: Create Application Gateway

1 - Select Create a resource on the left menu of the Azure portal. The New window appears.

Step 8: Create Scale Sets

1 - We need to setup scale sets. Click We need an image for this. So go to VM that you created and click Capture:

  • Enter a scale set name “edgescale”.
  • Set Availability zone to None.
  • Set username.
  • Set SSH public key.
  • Set instance count to minimum number that you need.
  • Select a VM size.
  • Enable AutoScale with min and max instance numbers.
  • Select Application Gateway as load balancer.
  • Select edge-subnet as subnet which is created before.
  • Enable public IP address per instance.
  • Click create
  • Enter a scale set name “originscale”
  • Click browse all images and in my items tab select the image that you created.
  • Set username.
  • Set SSH public key.
  • Set instance count to 1.
  • Select a VM size.
  • Enable AutoScale with min and max instance numbers.
  • Select Application Gateway as load balancer.
  • Select origin-subnet as subnet which is created before.
  • Enable public IP address per instance.
  • Click create.

End of Setting up Ant Media Server Clustering on Azure

This completes the setup. Now you can login to web panel via the https://application-gateway-ip.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ant Media Server

Ant Media Server

Ant Media Server, open source software, supports publishing live streams with WebRTC and RTMP. It supports HLS(HTTP Live Streaming) and MP4 as well.