PRACTICAL
Creating a Launch Configuration Group
A launch configuration is a template that an Auto Scaling groupuses to launch EC2 instances. When we create a launchconfiguration, we specify information for the instances such as the ID of the Amazon Machine Image (AMI), the instance type, a key pair, one or more security groups, and a block device mapping. If we launched an EC2 instance before, we can specify the same information in order to launch the instance.
Create launch configuration -> select the instance -> assign a name and role if any -> add storage -> configure SG so that it can access http and ssh -> assign a key pair -> launch
2.Creating an Auto Scaling Group
Create an auto scaling group with existing launch configuration -> assign a group name -> group size with 1 instance -> select the default network -> add subnet available in region ( subnet represent AZ, if we select only 1 subnet instance will be created in that AZ for fault tolerance create in all available AZ) -> use scaling policies to adjust the capacity of this group -> increase group size -> add a new alarm ( give your mail id so that we will receive mail if cpu utilization reaches above the limit ) - > ls : 60% -> period : 1min -> take the action add 1 instance -> decrease group size - > add a new alarm ( give your mail id so that we will receive mail if cpu utilization reaches above the limit ) -> ls : 30% -> period : 1min -> take the action remove 1 instance -> configure notification - > add tags -> create auto scaling group.
(note: for verification login to instance and use #yes > /dev/null & or #dd /dev/null > /dev/null).
Last updated
Was this helpful?