CMPUTE has direct support for running your ECS cluster. The following guide gives the step by step approach of managing your ECS cluster through the CMPUTE platform.
During ECS cluster creation, AWS creates an auto scaling group for the cluster. If you are running a ECS cluster with Name “ProdApp”, there will be a corresponding AWS autoscaling group in the format EC2ContainerService-ProdApp-EcsInstanceAsg-
Step 1: Create a CloudWatch Alarm for the Metric
For this setup, you create an alarm on the cluster MemoryReservation metric to alert when the cluster’s memory reservation is above 75%.
Description: Cluster memory reservation above 75%
Set the threshold and time period requirement to MemoryReservation greater than 75% for 1 period. Choose Create Alarm. Now you can use this alarm to trigger your Auto Scaling group to add a container instance when the memory reservation is above 75%.
Optionally, You can also create another alarm that triggers when the memory reservation is below 25%, which you can use to remove a container instance from your Auto Scaling group.
Step 2: Login to your cmpute.io account. In the top pane click on Apps and then click the Run job button in Auto Scaling Group.
Step 3: Select your AWS account and the Region.
Job Name: You can give any desired name to your job.
Account: Select your AWS Account where you want to run the job.
Cloud Region: The Cloud region will be selected automatically.
Auto Scaling Group name: Select the ECS Auto scaling group from the list of auto scaling groups.
Min OnDemand instances: Specify the minimum number of on-demand instances to be run as part of the cluster.
Step 4: Click on Save and then either schedule or run the job.
CMPUTE will launch the specified number of instances and associate with the ECS cluster. Continuously monitor and manage entire cluster. If any of the scaling thresholds are hit, CMPUTE will scale up/ down instances.