🎉Introduction
Welcome back to the 90 Days of DevOps Challenge!🌟
Today, we are diving deep into Amazon Web Services (AWS) to test our knowledge and skills on various AWS services.
Whether you're a seasoned AWS pro or just starting your journey into cloud computing, these tasks will provide valuable hands-on experience and insights into AWS services.
📜Task-01: Deploy, Monitor, and Troubleshoot a Web Server on AWS EC2
Launching an EC2 Instance
Accessing the AWS Management Console: The first step is to log in to your AWS Management Console.
Navigating to EC2 Service: Go to the EC2 service within the console.
Launching a New EC2 Instance: Similar to what we've discussed in our previous blogs, launch a new EC2 instance. Opt for the free tier t2 micro to stay within the free usage limits.
Configuring Instance Details: Configure essential details, such as instance type, Virtual Private Cloud (VPC), subnet, and security group settings.
Setting Up SSH Access: Create a new key pair or use an existing one to enable SSH access to the instance.
Launching the Instance: Finally, launch the instance.
Connecting to the EC2 Instance
Once the instance is up and running, connect to it using SSH from your local machine.
Installing a Web Server
Updating Package Manager: On the EC2 instance, update the package manager using the command
sudo apt update -y
Installing Apache Web Server: Install the Apache Web Server on the EC2 instance with the command
sudo apt install apache2 -y
Deploying a Simple Web Application
Editing index.html: Use an editor like vi or nano to edit the index.html file.
Inserting Web Page Code: Insert your basic HTML and CSS code to create the content of your web page.
Monitoring EC2 Instance with Amazon CloudWatch
Accessing AWS CloudWatch: Go to the AWS CloudWatch service in the AWS Management Console.
Creating an Alarm: Click on "Create alarm" and select the EC2 metric you want to monitor, e.g. CPU utilization
Configuring Conditions: Set up alarm conditions and notification settings as needed.
Creating the Alarm: Give your alarm a name and create the alarm. This will trigger alerts based on the conditions you've set.
📃Task-02: Auto Scaling and Monitoring with AWS Console and CLI
Creating an Auto Scaling Group (ASG)
Log In and Navigate: Log in to your AWS Management Console and navigate to the Auto Scaling service.
Create a New ASG: Create a new Auto Scaling group and configure the launch template or instance configuration.
Set Scaling Policies: Define your scaling policies, specifying minimum and maximum instances.
Desired Capacity: Set the desired capacity, minimum, and maximum capacity for your ASG.
Review and Create: Review your configuration and create the Auto Scaling group.
Monitoring ASG and EC2 Instances with Amazon CloudWatch
You can monitor your ASG and EC2 instances by adding them to an AWS CloudWatch dashboard or setting up CloudWatch alarms to trigger notifications.
Verifying ASG State Using AWS CLI
Install and Configure AWS CLI: Install and configure the AWS CLI on your local machine, providing your Access Key ID, Secret Access Key, Region Name, and Output Format.
View ASG Information: Use AWS CLI commands to view information about the Auto Scaling group and its instances.
aws autoscaling describe-auto-scaling-groups
💥Conclusion
Today's journey through AWS has allowed us to explore the creation of EC2 instances, deployment of web applications, and the dynamic scaling of resources using Auto Scaling groups.
These hands-on experiences are invaluable for anyone looking to master AWS services and develop robust cloud-based solutions.
Remember, practice makes perfect in the world of DevOps, so keep experimenting and learning🤞
Keep exploring and experimenting with AWS to deepen your cloud computing expertise👍
Happy learning🎉 & may your cloud journey be filled with exciting discoveries!🎊
Thank you for joining us on this exciting Day 47 of the 90 Days of DevOps challenge. I hope you found the information helpful and insightful.💥
Stay tuned for Day 48 as we delve deeper into AWS and uncover more of its incredible capabilities.✌
So please keep yourself updated with my latest insights and articles on DevOps 🚀 by following me on :
Hashnode: vishaltoyou.hashnode.dev