Saad Fazal
Posted on July 5, 2024
Introduction
Hey everyone! As you know, I've always been a data guy, diving deep into the realms of data science. But recently, I've decided to give DevOps a try. Why, you ask? Well, thanks to the amazing DevOps community and a special shoutout to "kubeden" for enlightening me on how fascinating this field can be, I thought, why not explore it? So, I decided to take a detour from my data journey and spend some time in the DevOps world.
My Background
Iโve been a developer for three years now, with some experience in cloud computing and AWS. So, I figured learning DevOps might be a bit easier given my background. Hereโs a rundown of what Iโve learned in the past four days during my free time:
AWS
IAM
- Users: Managing user accounts and permissions.
- Groups: Organizing users into groups for easier management.
- Policies (Permissions): Defining and assigning permissions to users and groups.
Amazon Elastic Container Service (ECS) and ECR
-
Deploy Docker Container:
- Create Cluster: Setting up a new ECS cluster.
-
Service API:
- Tasks: Running individual containers.
- Load Balancer: Distributing traffic among containers.
- Health Checker: Monitoring container health.
Elastic Beanstalk
Deploying and managing applications without worrying about the underlying infrastructure.
Docker
Basics
- Installation of Docker CLI and Desktop: Getting Docker up and running on my machine.
- Understanding Images vs. Containers: Learning the difference between Docker images and containers.
- Running Ubuntu Image in Container: Starting a container with Ubuntu.
- Multiple Containers: Managing multiple containers simultaneously.
- Port Mappings: Mapping container ports to host ports.
- Environment Variables: Setting environment variables for containers.
-
Dockerization of Node.js Application:
- Dockerfile: Creating a Dockerfile for a Node.js app.
- Caching Layers: Using caching to speed up builds.
- Publishing to Hub: Pushing images to Docker Hub.
Advanced
-
Docker Compose:
- Services: Defining multi-container applications.
- Port Mapping: Configuring port mappings for services.
- Env Variables: Setting environment variables for services.
-
Docker Networking:
- Bridge: Default network driver.
- Host: Using the hostโs networking stack.
- Volume Mounting: Persisting data using volumes.
- Efficient Caching in Layers: Optimizing Dockerfile for caching.
- Docker Multi-Stage Builds: Using multi-stage builds to reduce image size.
Nginx
Setting Up
-
Launching an EC2 Instance:
- Create and configure a virtual machine using EC2: Choosing an instance type and region.
- Assign a static IP: Ensuring consistent access.
- Set up security groups: Allowing HTTP and HTTPS traffic.
Configuration
- Accessing the EC2 Instance: Connecting via SSH.
- Updating and Installing Necessary Packages: Keeping everything up-to-date.
- Cloning the Project Repository: Downloading my Node.js app.
- Installing Project Dependencies: Using npm install.
- Running the Node.js Application: Managing with pm2.
- Setting Up a Domain: Registering and pointing a domain to my Elastic IP.
- Configuring Nginx: Proxying requests to the Node.js app.
- Setting Up SSL with Let's Encrypt: Using Certbot for SSL certificates.
Kafka
Key Concepts
- High Throughput and Less Storage: Optimized for large data streams.
-
Components:
- Producers and Consumers: Sending and receiving messages.
- Topics and Partitions: Organizing messages.
- Consumer Groups: Managing multiple consumers.
Models
- Queue and Pub/Sub: Handling different messaging patterns.
- Zookeeper: Managing Kafka infrastructure.
- Admin, Producers, and Consumers: Setting up and using Kafka.
Serverless
Overview
- No Server Management: Focusing on code, not servers.
- Event-Driven Execution: Functions triggered by events.
- Automatic Scaling: Scaling based on load.
- Pay-per-Invocation: Billing based on function usage.
Practical Example
- Creating a Lambda Function: Deploying a function to AWS Lambda.
- Trigger Setup: Using API Gateway to invoke the function.
- Testing: Verifying with a browser and Postman.
What's Next: My Learning Plan for the Next 4 Days
In the next four days, I plan to dive deeper into the following areas:
- More AWS Services: Expanding my knowledge of various AWS services beyond the basics.
- Azure: Getting familiar with Microsoft's cloud platform and its unique features.
- Terraform: Learning infrastructure as code to manage cloud resources efficiently.
- Ansible: Exploring configuration management and automation.
- CI/CD: Strengthening my understanding of continuous integration and continuous deployment practices.
- GitHub Workflows: Refining my skills in creating and managing workflows on GitHub.
Conclusion
So in these days, my free time goes to learning about DevOps and I will be sharing more about what I have learned, and in a new post, I will share the resources too.
For the DevOps community: Do let me know your thoughts and what should I need to put more focus on in this DevOps realm?
Stay curious, keep learning, and happy coding!
Posted on July 5, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.