If you have Ant Media Server deployed on a AWS cluster and you wish to upgrade it to the latest version, this tutorial will guide you through the necessary steps.
By following these instructions, you can upgrade your Ant Media Server AWS cluster and also retain all your existing settings without affecting the MongoDB configuration. If you don’t have a streaming service at scale on AWS yet, then go get one now using AWS Streaming Service Wizard.
Let’s get started!
Manually Upgrading your AWS Cluster
Step 1: Find the Image ID of the Current Version
- Visit http://image-id.antmedia.io/ and find the zone where your Ant Media Server cluster is installed.
- Note down the “Image ID” of your current Ant Media Server version. For example, let’s consider the Image ID of Ant Media Server version 2.5.3 in Frankfurt. The Image Id for Frankfurt is ami-0908f8767fc9d7f59.
Step 2: Copy the Launch Configuration
- Login to your AWS console and Navigate to EC2 > Launch Configurations.
- Select the Launch Configuration for the “Origin” instance and click on “Copy launch configuration.”
- In the Amazon Machine Image (AMI) section, enter the Image ID for your region as the AMI.
- Create a new launch configuration by clicking on “Create launch configuration” without making any changes.
- Then repeat the same steps mentioned above for the “Edge” Launch Configuration.
- One all the those steps are completed, you’ll see the Launch configurations as in the below screenshot.
Step 3: Upgrade to the Latest version of the Ant Media Server
- Navigate to EC2 > Auto Scaling groups.
- Locate the Auto Scaling group for both Origin and Edge.
- Access the Group details for each Auto Scaling group.
- Set the Desired capacity and Minimum capacity to 0 for both Origin and Edge groups.
This action will terminate the instances associated with the Auto Scaling groups.
- Now it’s time to assign the newly created Launch Configurations to the Autoscaling group. Navigate to EC2 > Auto Scaling groups and access the “Launch configuration” for each Auto Scaling group. Then assign the Launch Configuration for each group.
- After the instances are terminated, change the “Desired capacity” and “Minimum capacity” back to the original values on the Group details screen.
Finally, the newly opened instances will be updated to the latest version while retaining your old settings.
Auto Update Script
Alternatively, you can update your AWS cluster to the latest version automatically by running the Python script below. All you need to do is to write the AutoScale Group names for both Origin and Edge in the Python script.
You can find the Python script here.
By following these simple steps, you can successfully upgrade Ant Media Server on an AWS cluster to the latest version.
It’s important to note that this upgrade process does not modify the MongoDB settings, ensuring your existing configurations remain intact.
Please note that there have been reports of a security group modification on AWS that occurred after upgrading your Ant Media Server. This change led to the closure of TCP ports 5000-65000 for internal traffic, causing difficulties in playing back streams from the edge group. If you do experience any issues make sure you check the security groups and that all the necessary ports are open.
Enjoy the enhanced features and improvements offered by the latest version of Ant Media Server!