Day 40 AWS EC2 Automation โ˜

Day 40 AWS EC2 Automation โ˜

ยท

3 min read

๐Ÿ”ถ Automation in EC2:

Amazon EC2 or Amazon Elastic Compute Cloud can give you secure, reliable, high-performance, and cost-effective computing infrastructure to meet demanding business needs.

Also, if you know a few things, you can automate many things.

Read from here

๐Ÿ”ถ Launch template in AWS EC2:

  • You can make a launch template with the configuration information you need to start an instance. You can save launch parameters in launch templates so you don't have to type them in every time you start a new instance.

  • For example, a launch template can have the AMI ID, instance type, and network settings that you usually use to launch instances.

  • You can tell the Amazon EC2 console to use a certain launch template when you start an instance.

Read more here

๐Ÿ”ถ Instance Types:

Amazon EC2 has a large number of instance types that are optimized for different uses. The different combinations of CPU, memory, storage and networking capacity in instance types give you the freedom to choose the right mix of resources for your apps. Each instance type comes with one or more instance sizes, so you can adjust your resources to meet the needs of the workload you want to run.

Read from here

๐Ÿ”ถ AMI:

An Amazon Machine Image (AMI) is an image that AWS supports and keeps up to date. It contains the information needed to start an instance. When you launch an instance, you must choose an AMI. When you need multiple instances with the same configuration, you can launch them from a single AMI.

๐Ÿ”ถ Task 1:

  • Create a launch template with Amazon Linux 2 AMI and t2.micro instance type with Jenkins and Docker setup (You can use the Day 39 User data script for installing the required tools).

  • Login to AWS and select EC2 > Launch Instances

  • Add Network Setting.

  • Add Advance details, and paste here all the scripts for installing Jenkins and docker for Amazon Linux 2 AMI.

  • Now Create a Template from the instance.

  • Now Verify your created templates.

  • Now go to launch instance and create an instance by using launch instance from templates.

  • Create 3 Instances using Launch Template, There must be an option that shows the number of instances to be launched, can you find it?

  • Launch the Instance and verify all the instances.

  • You can go one step ahead and create an auto-scaling group, Sounds tough?
    Select to create Auto Scaling Group.

  • Create auto scaling group.

  • Select your launch Template.

  • Choose the VPC Network and subnet you want the instances to launch in.

  • For Loadbalancing Select Attach to a new load balancer and give a load a balancer name.

  • Configure group size and scaling policies.

  • Scaling policies.

  • Add notification if you want to receive notification.

  • Review and create your auto-scaling group.

  • Verify your auto scaling group created.

  • The auto-scaling group will launch the desired number of instances based on the launch template and the configuration we specified.

Check this out

Happy Learning :)

If you find my blog valuable, I invite you to like, share, and join the discussion. Your feedback is immensely cherished as it fuels continuous improvement. Let's embark on this transformative DevOps adventure together! ๐Ÿš€ #devops #90daysofdevop #AWS

ย