<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Md Sharjil Alam</title>
    <description>The latest articles on DEV Community by Md Sharjil Alam (@sharjil).</description>
    <link>https://dev.to/sharjil</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1919949%2F22d2720e-0f7f-4dde-91da-ecc067e28635.jpg</url>
      <title>DEV Community: Md Sharjil Alam</title>
      <link>https://dev.to/sharjil</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sharjil"/>
    <language>en</language>
    <item>
      <title>🔐 AWS IAM: Identity and Access Management Simplified</title>
      <dc:creator>Md Sharjil Alam</dc:creator>
      <pubDate>Thu, 03 Jul 2025 12:59:57 +0000</pubDate>
      <link>https://dev.to/sharjil/aws-iam-identity-and-access-management-simplified-245k</link>
      <guid>https://dev.to/sharjil/aws-iam-identity-and-access-management-simplified-245k</guid>
      <description>&lt;p&gt;Hey Dev.to Family! 👋&lt;br&gt;&lt;br&gt;
In this article, we'll explore &lt;strong&gt;AWS IAM (Identity and Access Management)&lt;/strong&gt; — a foundational AWS service that helps you securely manage &lt;strong&gt;who can access your resources&lt;/strong&gt; and &lt;strong&gt;what actions they can perform&lt;/strong&gt;. If you're starting your AWS cloud journey, IAM is where it all begins.&lt;/p&gt;




&lt;h2&gt;
  
  
  📚 Table of Contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;What is IAM?&lt;/li&gt;
&lt;li&gt;Why Do We Need IAM?&lt;/li&gt;
&lt;li&gt;Key Components of IAM&lt;/li&gt;
&lt;li&gt;Hands-On IAM: Creating User, Group, and Permissions&lt;/li&gt;
&lt;li&gt;IAM Use Case Example&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  🛡️ What is IAM?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;IAM (Identity and Access Management)&lt;/strong&gt; is a secure AWS service that allows you to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Manage &lt;strong&gt;users&lt;/strong&gt;, &lt;strong&gt;groups&lt;/strong&gt;, &lt;strong&gt;roles&lt;/strong&gt;, and &lt;strong&gt;policies&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Control &lt;strong&gt;who&lt;/strong&gt; can access &lt;strong&gt;what&lt;/strong&gt; in your AWS account&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Think of IAM as the &lt;strong&gt;security gatekeeper&lt;/strong&gt; for your cloud infrastructure.&lt;/p&gt;




&lt;h2&gt;
  
  
  ❓ Why Do We Need IAM?
&lt;/h2&gt;

&lt;p&gt;IAM solves multiple security problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ &lt;strong&gt;Granular access control&lt;/strong&gt; (least privilege)&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;No need to share passwords&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;Temporary and limited access for apps and users&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;IAM makes your AWS environment secure, manageable, and scalable.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧩 Key Components of IAM
&lt;/h2&gt;

&lt;h3&gt;
  
  
  👤 1. Users
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Represents &lt;strong&gt;an individual person or app&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Gets &lt;strong&gt;username, password&lt;/strong&gt;, and/or &lt;strong&gt;access keys&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Example: A developer who logs into AWS console&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  👥 2. Groups
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;collection of IAM users&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;You apply permissions to the group — all users in the group inherit them&lt;/li&gt;
&lt;li&gt;Example: &lt;code&gt;Development-Team&lt;/code&gt; group with EC2/S3 access&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  📜 3. Policies
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;JSON documents&lt;/strong&gt; that define permissions&lt;/li&gt;
&lt;li&gt;Attached to &lt;strong&gt;users&lt;/strong&gt;, &lt;strong&gt;groups&lt;/strong&gt;, or &lt;strong&gt;roles&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"Effect"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Allow"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"Action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"s3:*"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"Resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"*"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  🧑‍💼 4. Roles
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Used to grant &lt;strong&gt;temporary access&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Best for &lt;strong&gt;EC2&lt;/strong&gt;, &lt;strong&gt;Lambda&lt;/strong&gt;, or &lt;strong&gt;cross-account access&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;No username or password — &lt;strong&gt;trust-based&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🛠️ Hands-On IAM: Creating User, Group, and Permissions
&lt;/h2&gt;

&lt;p&gt;Here’s a real-world setup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;👤 &lt;strong&gt;User Created&lt;/strong&gt;: &lt;code&gt;test-user-101&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;👥 &lt;strong&gt;Group Created&lt;/strong&gt;: &lt;code&gt;Development-Team&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;📜 &lt;strong&gt;Policy Attached&lt;/strong&gt;: &lt;code&gt;AmazonEC2FullAccess&lt;/code&gt;, &lt;code&gt;AmazonS3FullAccess&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;✅ &lt;strong&gt;User added to group&lt;/strong&gt; and inherited access&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💻 &lt;strong&gt;Screenshots&lt;/strong&gt;:  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F44rnougfmn5qe133jmn7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F44rnougfmn5qe133jmn7.png" alt="AWS IAM console showing the user 'test-user-101' added to the 'Development-Team' group." width="800" height="421"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Adding our new user &lt;code&gt;test-user-101&lt;/code&gt; to the &lt;code&gt;Development-Team&lt;/code&gt; group.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwh3dvpipskie0uyinh13.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwh3dvpipskie0uyinh13.png" alt="The 'Development-Team' group in AWS IAM showing the 'AmazonEC2FullAccess' and 'AmazonS3FullAccess' policies attached under the Permissions tab." width="800" height="327"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Verifying that the correct permissions are attached to the &lt;code&gt;Development-Team&lt;/code&gt; group.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🧪 IAM Use Case Example
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Scenario&lt;/strong&gt;: A developer needs access only to &lt;strong&gt;EC2 and S3&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  🛠️ Steps:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Create user &lt;code&gt;dev-user&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Create group &lt;code&gt;dev-team&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Attach &lt;strong&gt;S3 + EC2 policies&lt;/strong&gt; to the group&lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;dev-user&lt;/code&gt; to &lt;code&gt;dev-team&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;✅ Now &lt;code&gt;dev-user&lt;/code&gt; has access to EC2 and S3 — &lt;strong&gt;nothing else&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔄 Bonus: EC2 to S3 Access Using Roles
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Create a role with &lt;code&gt;AmazonS3FullAccess&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Attach the role to an EC2 instance&lt;/li&gt;
&lt;li&gt;EC2 now has &lt;strong&gt;temporary S3 access without access keys&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  📌 Conclusion
&lt;/h2&gt;

&lt;p&gt;IAM is not just an AWS service — it’s the &lt;strong&gt;foundation of cloud security&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;With IAM, you gain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🔐 &lt;strong&gt;Better security control&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;🧼 &lt;strong&gt;Clean access management&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;📈 &lt;strong&gt;Scalable permission model&lt;/strong&gt; for teams and services&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🔗 Let’s Connect!
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/md-sharjil-alam" rel="noopener noreferrer"&gt;LinkedIn – Md Sharjil Alam&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://twitter.com/mdsharjilalam" rel="noopener noreferrer"&gt;Twitter – @mdsharjilalam&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  🏷️ Tags:
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;#AWS&lt;/code&gt; &lt;code&gt;#IAM&lt;/code&gt; &lt;code&gt;#CloudSecurity&lt;/code&gt; &lt;code&gt;#DevOps&lt;/code&gt; &lt;code&gt;#TechBlog&lt;/code&gt; &lt;code&gt;#SharjilLearnsCloud&lt;/code&gt;&lt;/p&gt;




</description>
    </item>
    <item>
      <title>How to Set Up Jenkins with Docker for CI/CD Pipelines: A Step-by-Step Guide</title>
      <dc:creator>Md Sharjil Alam</dc:creator>
      <pubDate>Sat, 07 Sep 2024 19:21:03 +0000</pubDate>
      <link>https://dev.to/sharjil/how-to-set-up-jenkins-with-docker-for-cicd-pipelines-a-step-by-step-guide-1mj5</link>
      <guid>https://dev.to/sharjil/how-to-set-up-jenkins-with-docker-for-cicd-pipelines-a-step-by-step-guide-1mj5</guid>
      <description>&lt;p&gt;Hey Dev.to Family! 👋&lt;br&gt;
In this article, we'll explore the CI/CD process and how Jenkins can simplify the automation of building, testing, and deploying your applications. We'll also cover how Docker can be used as an agent in Jenkins to make your builds more reliable and easier to manage.&lt;/p&gt;
&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;CI/CD: Continuous Integration and Continuous Delivery&lt;/li&gt;
&lt;li&gt;Standard Steps in CI/CD Pipeline&lt;/li&gt;
&lt;li&gt;Why Jenkins for CI/CD?&lt;/li&gt;
&lt;li&gt;Step-by-Step Jenkins Setup on AWS EC2&lt;/li&gt;
&lt;li&gt;Jenkins in Detail&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ol&gt;


&lt;h2&gt;
  
  
  CI/CD: Continuous Integration and Continuous Delivery
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;CI/CD&lt;/strong&gt; is a crucial process in software development that automates the integration of code changes (CI) and their delivery to production (CD). This automation helps in improving code quality, reducing errors, and accelerating deployment.&lt;/p&gt;
&lt;h2&gt;
  
  
  Standard Steps in CI/CD Pipeline
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Unit Testing&lt;/strong&gt;: Verifies that individual components of the code work as intended.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Static Code Analysis&lt;/strong&gt;: Checks the code for potential bugs, adherence to coding standards, and style violations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Code Quality/Vulnerability Checks&lt;/strong&gt;: Ensures the security and performance of the code by identifying vulnerabilities and quality issues.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automation&lt;/strong&gt;: Automates the build, test, and deployment processes to streamline development workflows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reports&lt;/strong&gt;: Provides feedback on test results, code quality, and other relevant metrics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Deployment&lt;/strong&gt;: Automates the delivery of code to production or staging environments.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Why Jenkins for CI/CD?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Open-Source&lt;/strong&gt;: Jenkins is a free and widely-used tool that supports automating the entire build, test, and deployment pipeline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plugin Ecosystem&lt;/strong&gt;: Offers a wide range of plugins to extend its capabilities and integrate with various tools.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Master-Worker Architecture&lt;/strong&gt;: Supports a distributed system with a master node managing and worker nodes executing tasks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integration with Tools&lt;/strong&gt;: Easily integrates with Docker, AWS, Git, and other tools to create a seamless CI/CD pipeline.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5m2532ei426fmne1gghh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5m2532ei426fmne1gghh.png" alt="Jenkins Architecture" width="800" height="611"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Step-by-Step Jenkins Setup on AWS EC2
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Set Up an EC2 Instance&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Launch an AWS EC2 instance (preferably Ubuntu) to host Jenkins.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Security Group Configuration&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Edit Inbound Rules&lt;/strong&gt;: In the Security Group settings, add a rule for &lt;strong&gt;Custom TCP&lt;/strong&gt; on port &lt;strong&gt;8080&lt;/strong&gt; (Jenkins) and ensure &lt;strong&gt;SSH&lt;/strong&gt; access via port &lt;strong&gt;22&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Access Jenkins&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use the public IP of your EC2 instance to access Jenkins via &lt;code&gt;http://&amp;lt;public_ip&amp;gt;:8080&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Log in with the &lt;strong&gt;admin username&lt;/strong&gt; and &lt;strong&gt;password&lt;/strong&gt; provided during Jenkins setup.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Jenkins Master and Worker Nodes&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Master Node&lt;/strong&gt;: The central server that manages Jenkins operations and job scheduling.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Worker Nodes&lt;/strong&gt;: Servers that execute the build and test jobs distributed by the master node.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Installing Docker as a Jenkins Agent&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Why Docker?&lt;/strong&gt;: Docker simplifies the creation of isolated, reproducible environments for each build, enhancing build reliability and management.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Installation&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;docker.io
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Grant Jenkins Access to Docker&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;usermod &lt;span class="nt"&gt;-aG&lt;/span&gt; docker jenkins
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;&lt;strong&gt;Install Docker Pipeline Plugin&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navigate to &lt;strong&gt;Manage Jenkins&lt;/strong&gt; → &lt;strong&gt;Manage Plugins&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Search for and install the &lt;strong&gt;Docker Pipeline&lt;/strong&gt; plugin.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;&lt;strong&gt;Docker as an Agent&lt;/strong&gt;:&lt;/p&gt;&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fou9g6os4pirt6pid4vwg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fou9g6os4pirt6pid4vwg.png" alt="Docker as an Agent" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Further Configuration&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Adjust the sequence and configuration based on best practices and specific requirements of your environment.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Jenkins in Detail
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Jenkins Master&lt;/strong&gt;: The central controller that manages job scheduling and execution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Jenkins Worker Nodes&lt;/strong&gt;: Nodes that execute the build and test jobs as directed by the master.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Docker as Agent&lt;/strong&gt;: Using Docker as an agent allows Jenkins to create isolated build environments. This approach improves the consistency and manageability of builds.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Getting hands-on with Jenkins and Docker has provided valuable insights into automating and managing your CI/CD pipelines. Jenkins excels at managing builds and integrating with a wide array of tools, while Docker makes the build environments reproducible and easier to manage. Together, these tools offer a comprehensive solution for CI/CD automation.&lt;/p&gt;

&lt;p&gt;Let's Connect! 🔗 For more updates and insights:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/md-sharjil-alam" rel="noopener noreferrer"&gt;Connect with me on LinkedIn!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/mdsharjilalam" rel="noopener noreferrer"&gt;Follow me on Twitter!&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;#DevOps #Jenkins #Docker #CI/CD #TechBlog&lt;/p&gt;

&lt;p&gt;Happy learning! 😊&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Configuration Management with Ansible and Infrastructure as Code (IaC) Using Terraform: A Step-by-Step Guide</title>
      <dc:creator>Md Sharjil Alam</dc:creator>
      <pubDate>Sat, 31 Aug 2024 10:01:01 +0000</pubDate>
      <link>https://dev.to/sharjil/understanding-configuration-management-and-infrastructure-as-code-with-ansible-and-terraform-2l7k</link>
      <guid>https://dev.to/sharjil/understanding-configuration-management-and-infrastructure-as-code-with-ansible-and-terraform-2l7k</guid>
      <description>&lt;p&gt;Hey Dev.to community! 👋&lt;/p&gt;

&lt;p&gt;Managing infrastructure can be a complex task, especially when handling multiple servers and environments. In this guide, we’ll explore how Ansible and Terraform can simplify and automate your infrastructure management. Whether you’re new to these tools or looking to enhance your skills, this guide provides a clear, step-by-step approach.&lt;/p&gt;

&lt;h2&gt;
  
  
  Table of Contents
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Introduction&lt;/li&gt;
&lt;li&gt;
Configuration Management with Ansible

&lt;ul&gt;
&lt;li&gt;Why Use Ansible?&lt;/li&gt;
&lt;li&gt;Challenges with Ansible&lt;/li&gt;
&lt;li&gt;Key Questions About Ansible&lt;/li&gt;
&lt;li&gt;
Common Commands in Ansible

&lt;ul&gt;
&lt;li&gt;Example Playbook&lt;/li&gt;
&lt;li&gt;Example Ad-hoc Command&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Ansible Roles&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
Infrastructure as Code (IaC) with Terraform

&lt;ul&gt;
&lt;li&gt;Why Terraform?&lt;/li&gt;
&lt;li&gt;
Lifecycle of Terraform

&lt;ul&gt;
&lt;li&gt;Example Terraform Configuration&lt;/li&gt;
&lt;li&gt;Example Commands&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Terraform State File&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Managing infrastructure across different systems and environments can be challenging. Configuration management and Infrastructure as Code (IaC) are two powerful practices that can help streamline and automate this process. In this guide, we’ll delve into Ansible for configuration management and Terraform for IaC, exploring their benefits, challenges, and practical applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Configuration Management with Ansible
&lt;/h2&gt;

&lt;p&gt;Configuration management is crucial for maintaining consistency and reliability across your infrastructure. Ansible is a popular tool that simplifies this process by automating repetitive tasks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Use Ansible?
&lt;/h3&gt;

&lt;p&gt;Ansible offers several benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Consistency&lt;/strong&gt;: It ensures the same configuration is applied across multiple machines.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ease of Use&lt;/strong&gt;: Ansible uses simple, human-readable YAML syntax.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No Need for Agents&lt;/strong&gt;: It connects directly using SSH (for Linux) or WinRCA (for Windows).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ansible Galaxy&lt;/strong&gt;: You can share and reuse modules using Ansible Galaxy, speeding up your work.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4p9m05ul4fk0jiga2sgk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4p9m05ul4fk0jiga2sgk.png" alt="Ansible Overview Diagram" width="800" height="552"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;h3&gt;
  
  
  Challenges with Ansible
&lt;/h3&gt;

&lt;p&gt;Ansible has some drawbacks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Windows Configurations&lt;/strong&gt;: Managing configurations on Windows systems is not as seamless as on Linux.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Debugging Issues&lt;/strong&gt;: Tracking down issues can sometimes be complex.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Performance&lt;/strong&gt;: For very large infrastructures, performance may become a concern.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Key Questions About Ansible
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Which programming language does Ansible use?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Ansible is written in Python.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Does Ansible support both Linux and Windows?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Yes, it uses SSH for Linux and WinRCA for Windows.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Is Ansible push or pull-based?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Ansible follows a push mechanism.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Which programming language does Ansible use for playbooks?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Ansible uses YAML for writing playbooks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Does Ansible support all cloud providers?&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Yes, as long as they are publicly accessible via SSH.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Common Commands in Ansible
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Playbooks&lt;/strong&gt;: A set of instructions to configure the server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ad-hoc commands&lt;/strong&gt;: Execute simple tasks directly without using playbooks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Example Playbook
&lt;/h4&gt;

&lt;p&gt;Here’s a simple Ansible playbook to install and start the Apache HTTP server on a Linux server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="nn"&gt;---&lt;/span&gt;
&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Ensure Apache is installed and running&lt;/span&gt;
  &lt;span class="na"&gt;hosts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;webservers&lt;/span&gt;
  &lt;span class="na"&gt;become&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;yes&lt;/span&gt;
  &lt;span class="na"&gt;tasks&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Install Apache&lt;/span&gt;
      &lt;span class="na"&gt;apt&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;apache2&lt;/span&gt;
        &lt;span class="na"&gt;state&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;present&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Start Apache&lt;/span&gt;
      &lt;span class="na"&gt;service&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;apache2&lt;/span&gt;
        &lt;span class="na"&gt;state&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;started&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Example Ad-hoc Command
&lt;/h4&gt;

&lt;p&gt;To check disk usage on all servers, use the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ansible &lt;span class="nt"&gt;-i&lt;/span&gt; inventory all &lt;span class="nt"&gt;-m&lt;/span&gt; shell &lt;span class="nt"&gt;-a&lt;/span&gt; &lt;span class="s2"&gt;"df -h"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command runs the df -h shell command on all hosts specified in the inventory file.&lt;/p&gt;

&lt;h3&gt;
  
  
  Ansible Roles
&lt;/h3&gt;

&lt;p&gt;Ansible allows you to group tasks into &lt;strong&gt;roles&lt;/strong&gt; to manage complex configurations more effectively. Roles help in organizing playbooks and reusing code. You can create a new role using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ansible-galaxy role init &amp;lt;role_name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace  with the name you want for your role. This command initializes a new role directory with a standard structure, which you can then customize according to your needs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Infrastructure as Code (IaC) with Terraform
&lt;/h2&gt;

&lt;p&gt;Managing infrastructure manually can be inefficient. &lt;strong&gt;Terraform&lt;/strong&gt;, often called "API as Code," offers a solution by allowing you to write infrastructure as code. It can manage any cloud infrastructure, track changes, and automate the deployment process.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyhwe1gug8p0mk5aq4fo6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyhwe1gug8p0mk5aq4fo6.png" alt="Terraform Overview Diagram" width="800" height="249"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Terraform?
&lt;/h3&gt;

&lt;p&gt;Terraform helps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Manage any infrastructure&lt;/strong&gt;: Cloud, on-premises, etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Track your infrastructure&lt;/strong&gt;: Keeps a record of all changes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automate changes&lt;/strong&gt;: Makes applying changes simpler and more reliable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Standardize configurations&lt;/strong&gt;: Ensures consistency across environments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collaborate easily&lt;/strong&gt;: Teams can work together on infrastructure changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Lifecycle of Terraform
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Write&lt;/strong&gt;: Define your infrastructure in code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plan&lt;/strong&gt;: Preview the changes before applying them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Apply&lt;/strong&gt;: Deploy the changes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Destroy&lt;/strong&gt;: Tear down the infrastructure when it’s no longer needed.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Funbencwafxt53w5zcnat.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Funbencwafxt53w5zcnat.png" alt="Terraform lifecycle Diagram" width="587" height="392"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Example Terraform Configuration
&lt;/h4&gt;

&lt;p&gt;Here’s a basic Terraform configuration to provision an AWS EC2 instance:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight hcl"&gt;&lt;code&gt;&lt;span class="nx"&gt;provider&lt;/span&gt; &lt;span class="s2"&gt;"aws"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;region&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"us-west-2"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;resource&lt;/span&gt; &lt;span class="s2"&gt;"aws_instance"&lt;/span&gt; &lt;span class="s2"&gt;"web"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;ami&lt;/span&gt;           &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"ami-0c55b159cbfafe1f0"&lt;/span&gt;
  &lt;span class="nx"&gt;instance_type&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"t2.micro"&lt;/span&gt;

  &lt;span class="nx"&gt;tags&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;Name&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"MyWebServer"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Example Commands
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Initialize the Terraform working directory&lt;/span&gt;
terraform init

&lt;span class="c"&gt;# Preview the changes Terraform will make&lt;/span&gt;
terraform plan

&lt;span class="c"&gt;# Apply the changes to create the infrastructure&lt;/span&gt;
terraform apply

&lt;span class="c"&gt;# Destroy the infrastructure when it is no longer needed&lt;/span&gt;
terraform destroy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Terraform State File
&lt;/h3&gt;

&lt;p&gt;Terraform maintains a state file (&lt;code&gt;terraform.tfstate&lt;/code&gt;) that acts as the source of truth for your infrastructure. This file should not be stored in version control, as it can lead to security risks and issues with syncing. Instead, store it remotely, such as on Amazon S3 with DynamoDB for locking.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpfgqydmdaewozsx64wtf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpfgqydmdaewozsx64wtf.png" alt="Terraform State Management Diagram" width="800" height="365"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is an example of what a &lt;code&gt;terraform.tfstate&lt;/code&gt; file might look like in YAML format:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;4&lt;/span&gt;
&lt;span class="na"&gt;terraform_version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;1.0.0"&lt;/span&gt;
&lt;span class="na"&gt;resources&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;aws_instance&lt;/span&gt;
    &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;web&lt;/span&gt;
    &lt;span class="na"&gt;provider&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;provider.aws&lt;/span&gt;
    &lt;span class="na"&gt;instances&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;attributes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;ami&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ami-0c55b159cbfafe1f0&lt;/span&gt;
          &lt;span class="na"&gt;instance_type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;t2.micro&lt;/span&gt;
          &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;i-0abcd1234efgh5678&lt;/span&gt;
          &lt;span class="na"&gt;tags&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
            &lt;span class="na"&gt;Name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;MyWebServer&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Getting hands-on with Ansible and Terraform has provided valuable insights into managing and automating infrastructure. Ansible excels at configuration management and automating tasks across systems, while Terraform shines in managing infrastructure as code, tracking changes, and automating deployments. Together, these tools offer a comprehensive approach to infrastructure management, making it simpler and more standardized.&lt;/p&gt;

&lt;p&gt;Let's Connect! 🔗 For more updates and insights:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/md-sharjil-alam" rel="noopener noreferrer"&gt;Connect with me on LinkedIn!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://twitter.com/mdsharjilalam" rel="noopener noreferrer"&gt;Follow me on Twitter!&lt;/a&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;#DevOps #Ansible #Terraform #TechBlog&lt;/p&gt;

&lt;p&gt;Happy learning! 😊&lt;/p&gt;

</description>
      <category>devops</category>
      <category>ansible</category>
      <category>terraform</category>
      <category>learning</category>
    </item>
    <item>
      <title>Learn How to Master Shell Scripting with GitHub API, Git Essentials, and AWS EC2 Deployment</title>
      <dc:creator>Md Sharjil Alam</dc:creator>
      <pubDate>Sun, 25 Aug 2024 22:51:38 +0000</pubDate>
      <link>https://dev.to/sharjil/mastering-shell-scripting-with-github-api-git-essentials-and-aws-ec2-deployment-44ne</link>
      <guid>https://dev.to/sharjil/mastering-shell-scripting-with-github-api-git-essentials-and-aws-ec2-deployment-44ne</guid>
      <description>&lt;p&gt;Hey Dev Community! In this article, you'll explore how to integrate shell scripts with the GitHub API, understand the core concepts of Git and GitHub, get acquainted with essential Git commands, learn about effective branching strategies, and follow a step-by-step guide for deploying a website using AWS EC2.&lt;/p&gt;

&lt;h3&gt;
  
  
  Table of Contents
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Integrating Shell Scripts with GitHub API&lt;/li&gt;
&lt;li&gt;
Git and GitHub: Version Control and Collaboration Simplified

&lt;ul&gt;
&lt;li&gt;Before Git: The Evolution of Version Control Systems&lt;/li&gt;
&lt;li&gt;Centralized vs Distributed Version Control&lt;/li&gt;
&lt;li&gt;Git vs GitHub: Key Differences&lt;/li&gt;
&lt;li&gt;Fork vs Clone: What’s the Difference?&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Essential Git Commands Explained&lt;/li&gt;
&lt;li&gt;Git Branching Strategy: Best Practices for Teams&lt;/li&gt;
&lt;li&gt;Deploying a Website on AWS EC2: Step-by-Step Guide&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  1. Integrating Shell Scripts with GitHub API
&lt;/h3&gt;

&lt;p&gt;Shell scripts can streamline interactions with GitHub via the GitHub API. The &lt;code&gt;curl&lt;/code&gt; command is a handy tool for sending API requests directly from the terminal.&lt;/p&gt;

&lt;h4&gt;
  
  
  Steps to Integrate:
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Create a Personal Access Token (PAT)&lt;/strong&gt;:&lt;br&gt;
To interact with GitHub securely, generate a PAT by navigating to GitHub’s settings.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use &lt;code&gt;curl&lt;/code&gt; to Access the GitHub API&lt;/strong&gt;:&lt;br&gt;
For instance, to list all repositories in an organization, you will need to use a command similar to:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   curl &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: token YOUR_TOKEN"&lt;/span&gt; https://api.github.com/orgs/YOUR_ORG/repos
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Creating a GitHub Organization (Optional)
&lt;/h4&gt;

&lt;p&gt;While managing repositories with a personal account is usually sufficient for individuals, creating an organization becomes useful if you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Work with larger teams.&lt;/li&gt;
&lt;li&gt;Need structured role assignments and permission control.&lt;/li&gt;
&lt;li&gt;Want centralized management of multiple repositories.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Creating an organization can streamline access and collaboration, though it’s entirely optional for smaller projects.&lt;/p&gt;

&lt;p&gt;By combining shell scripting with the GitHub API, you can automate tasks like creating repositories, managing branches, and controlling access permissions efficiently.&lt;/p&gt;




&lt;h3&gt;
  
  
  2. Git and GitHub: Version Control and Collaboration Simplified
&lt;/h3&gt;

&lt;h4&gt;
  
  
  2.1 Before Git: The Evolution of Version Control Systems
&lt;/h4&gt;

&lt;p&gt;Before Git became the standard for version control, industry solutions like CVS, SVN, and GT were used to manage source code. These older systems operated primarily as centralized solutions.&lt;/p&gt;

&lt;h4&gt;
  
  
  2.2 Centralized vs Distributed Version Control
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Centralized Version Control&lt;/strong&gt;: All project versions are stored on a central server, and developers check in and out (e.g., CVS, SVN).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Distributed Version Control&lt;/strong&gt;: Developers work with a complete copy of the project’s history on their local machines, making it easier to collaborate without a central bottleneck (e.g., Git).&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  2.3 Git vs GitHub: Key Differences
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Git&lt;/th&gt;
&lt;th&gt;GitHub&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;A version control tool for tracking code changes locally.&lt;/td&gt;
&lt;td&gt;A platform for hosting and collaborating on Git repositories.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Usage&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Used on your local machine to manage versions of code.&lt;/td&gt;
&lt;td&gt;Used online to share and collaborate on code repositories.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Primary Function&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Tracks changes, manages branches, and maintains history.&lt;/td&gt;
&lt;td&gt;Provides a central hub for repository hosting, collaboration, and code review.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h4&gt;
  
  
  2.4 Fork vs Clone: What’s the Difference?
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;Fork&lt;/th&gt;
&lt;th&gt;Clone&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Definition&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Creates a copy of a repository under your own GitHub account.&lt;/td&gt;
&lt;td&gt;Downloads a repository to your local machine.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Purpose&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Allows you to make changes independently and propose modifications via pull requests.&lt;/td&gt;
&lt;td&gt;Enables you to work on a local copy of the repository.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Effect on Original&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No effect on the original repository.&lt;/td&gt;
&lt;td&gt;No effect on the original repository; changes are local until pushed.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In short, forking creates a new remote copy on your GitHub account, while cloning makes a local copy on your machine.&lt;/p&gt;




&lt;h3&gt;
  
  
  3. Essential Git Commands Explained
&lt;/h3&gt;

&lt;p&gt;Here’s a breakdown of some key Git commands every developer should know:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;git add&lt;/code&gt;: Stages changes for the next commit.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git commit&lt;/code&gt;: Saves the changes to the local repository.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git push&lt;/code&gt;: Sends the local commits to a remote repository.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git diff&lt;/code&gt;: Shows the differences between working directory and staging area.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git log&lt;/code&gt;: Displays a list of all previous commits.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git reset&lt;/code&gt;: Unstages files or moves the HEAD pointer to an earlier commit.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git status&lt;/code&gt;: Shows the current status of your working directory.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git clone&lt;/code&gt;: Creates a local copy of a remote repository.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git remote&lt;/code&gt;: Manages connections to remote repositories.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git branch&lt;/code&gt;: Lists, creates, or deletes branches.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git checkout&lt;/code&gt;: Switches between branches or restores files.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git merge&lt;/code&gt;: Combines two branches, preserving their commit histories.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git rebase&lt;/code&gt;: Reapplies commits on top of another base commit for a cleaner history.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;git cherry-pick&lt;/code&gt;: Applies specific commits from one branch onto another.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Differences Between Git Merge, Git Rebase, and Git Cherry-pick
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Git Merge&lt;/strong&gt;: Combines branches while retaining all commits from both.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Git Rebase&lt;/strong&gt;: Moves or re-applies commits on top of another base commit, creating a cleaner, linear history.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Git Cherry-pick&lt;/strong&gt;: Lets you apply specific commits from one branch to another, without merging the entire branch.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For a cleaner project history, &lt;strong&gt;Git Rebase&lt;/strong&gt; is often considered the best practice.&lt;/p&gt;




&lt;h3&gt;
  
  
  4. Git Branching Strategy: Best Practices for Teams
&lt;/h3&gt;

&lt;p&gt;A clear branching strategy is essential for smooth collaboration. One popular approach is &lt;strong&gt;Gitflow&lt;/strong&gt;, which uses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;master/main&lt;/strong&gt;: The stable production branch.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;develop&lt;/strong&gt;: The branch for integrating new features.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;feature branches&lt;/strong&gt;: Dedicated branches for individual features.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;hotfix branches&lt;/strong&gt;: Quick fixes for production bugs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Following a branching strategy helps teams stay organized and reduces conflicts when merging code.&lt;/p&gt;




&lt;h3&gt;
  
  
  5. Deploying a Website on AWS EC2: Step-by-Step Guide
&lt;/h3&gt;

&lt;p&gt;Deploying a website on AWS EC2 involves a few essential steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create an IAM User&lt;/strong&gt;: Set up an IAM user with the necessary permissions to manage EC2 instances.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Launch an EC2 Instance&lt;/strong&gt;: Choose the appropriate Amazon Machine Image (AMI) and instance type to create a virtual machine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Access the EC2 Instance&lt;/strong&gt;: Use SSH to connect to your EC2 instance with the key pair generated during the setup.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Modify Security Groups&lt;/strong&gt;: Update your EC2 instance’s security group to allow incoming traffic. For example, if your application runs on port 3000, configure the security group to allow TCP access on that port. Use &lt;code&gt;0.0.0.0/0&lt;/code&gt; as the source IP for public access.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Once everything is configured, your website will be accessible via the public IP address of your EC2 instance.&lt;/p&gt;




&lt;p&gt;This article covers a range of essential topics, from automating GitHub with shell scripts to deploying a website using AWS EC2. By following these steps, you’ll build practical knowledge of version control, automation, and cloud deployment.&lt;/p&gt;




&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Getting hands-on with AWS, Linux, and shell scripting has provided valuable insights into managing and automating infrastructure. These tools and commands form a solid foundation for anyone in DevOps.&lt;/p&gt;

&lt;p&gt;Let’s Connect! 🔗 For more updates and insights:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/in/md-sharjil-alam" rel="noopener noreferrer"&gt;Connect with me on LinkedIn!&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://x.com/mdsharjilalam" rel="noopener noreferrer"&gt;Follow me on Twitter!&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;#DevOps #AWS #Linux #ShellScripting #TechBlog&lt;/p&gt;

&lt;p&gt;Happy learning! 😊&lt;/p&gt;

</description>
    </item>
    <item>
      <title>DevOps Foundations: Exploring AWS, Linux, and Shell Scripting</title>
      <dc:creator>Md Sharjil Alam</dc:creator>
      <pubDate>Mon, 19 Aug 2024 10:26:51 +0000</pubDate>
      <link>https://dev.to/sharjil/devops-foundations-exploring-aws-linux-and-shell-scripting-202h</link>
      <guid>https://dev.to/sharjil/devops-foundations-exploring-aws-linux-and-shell-scripting-202h</guid>
      <description>&lt;h2&gt;
  
  
  DevOps Essentials: Diving into AWS, Linux, and Shell Scripting
&lt;/h2&gt;

&lt;p&gt;Hey Dev.to Community!&lt;/p&gt;

&lt;p&gt;Diving into AWS, Linux, and shell scripting has been a key part of my DevOps journey. These skills are fundamental for managing and automating IT infrastructure. Let’s explore what I’ve learned and how it translates into practical usage.&lt;/p&gt;

&lt;h2&gt;
  
  
  Table Of Contents
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Setting Up AWS Instances&lt;/li&gt;
&lt;li&gt;Getting to Know Linux&lt;/li&gt;
&lt;li&gt;Must-Know Linux Commands&lt;/li&gt;
&lt;li&gt;Exploring Useful Tools&lt;/li&gt;
&lt;li&gt;Writing Basic Shell Scripts&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Setting Up AWS Instances
&lt;/h2&gt;

&lt;p&gt;Starting with AWS, I focused on creating and managing EC2 instances. Here’s a brief guide:&lt;/p&gt;

&lt;h3&gt;
  
  
  Launch an EC2 Instance
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Go to the AWS Management Console.&lt;/li&gt;
&lt;li&gt;Select EC2 and click &lt;strong&gt;Launch Instance&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Choose an AMI (Amazon Machine Image), select an instance type, and configure details.&lt;/li&gt;
&lt;li&gt;Review and launch the instance.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Connect to Your VM
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Use an SSH client like MobaXterm.&lt;/li&gt;
&lt;li&gt;Connect using the command:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   ssh &lt;span class="nt"&gt;-i&lt;/span&gt; &lt;span class="s2"&gt;"your-key.pem"&lt;/span&gt; ec2-user@your-instance-ip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Getting to Know Linux
&lt;/h2&gt;

&lt;p&gt;Linux is a cornerstone of DevOps due to its security, customization, and effectiveness in managing servers. Here’s why it’s important:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Why Linux?&lt;/strong&gt; It’s secure, customizable, and ideal for managing servers and automating tasks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Must-Know Linux Commands
&lt;/h2&gt;

&lt;p&gt;Here are essential Linux commands and their functions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;ls&lt;/code&gt;&lt;/strong&gt;: Lists files and directories. Example: &lt;code&gt;ls -ltr&lt;/code&gt; shows files sorted by modification time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;pwd&lt;/code&gt;&lt;/strong&gt;: Prints the current working directory. Example: &lt;code&gt;pwd&lt;/code&gt; displays the full path of the directory you’re in.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;cd&lt;/code&gt;&lt;/strong&gt;: Changes directory. Example: &lt;code&gt;cd /path/to/directory&lt;/code&gt; navigates to the specified directory.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;vim / vi&lt;/code&gt;&lt;/strong&gt;: Edits files. Example: &lt;code&gt;vim filename.txt&lt;/code&gt; opens a file for editing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;cat&lt;/code&gt;&lt;/strong&gt;: Displays file contents. Example: &lt;code&gt;cat filename.txt&lt;/code&gt; shows the content of a file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;mkdir&lt;/code&gt;&lt;/strong&gt;: Creates a directory. Example: &lt;code&gt;mkdir new_directory&lt;/code&gt; creates a new directory.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;touch&lt;/code&gt;&lt;/strong&gt;: Creates a new file or updates the timestamp of an existing file. Example: &lt;code&gt;touch new_file.txt&lt;/code&gt; creates a file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;rm&lt;/code&gt;&lt;/strong&gt;: Removes files or directories. Example: &lt;code&gt;rm filename.txt&lt;/code&gt; deletes a file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;free&lt;/code&gt;&lt;/strong&gt;: Shows memory usage. Example: &lt;code&gt;free -h&lt;/code&gt; provides a summary of memory usage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;nproc&lt;/code&gt;&lt;/strong&gt;: Displays the number of CPU cores. Example: &lt;code&gt;nproc&lt;/code&gt; shows the number of processing units.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;df -h&lt;/code&gt;&lt;/strong&gt;: Shows disk space usage. Example: &lt;code&gt;df -h&lt;/code&gt; displays disk usage in a readable format.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;top&lt;/code&gt;&lt;/strong&gt;: Provides real-time system performance data. Example: &lt;code&gt;top&lt;/code&gt; shows system processes and resource usage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;man&lt;/code&gt;&lt;/strong&gt;: Accesses command manuals. Example: &lt;code&gt;man ls&lt;/code&gt; provides detailed information about the &lt;code&gt;ls&lt;/code&gt; command.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Exploring Useful Tools
&lt;/h2&gt;

&lt;p&gt;Here are some tools that have been game-changers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;grep&lt;/code&gt;&lt;/strong&gt;: Searches for patterns in text. Example: &lt;code&gt;ps -ef | grep amazon&lt;/code&gt; finds processes related to amazon.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;awk&lt;/code&gt;&lt;/strong&gt;: Processes and extracts data. Example: &lt;code&gt;echo "one two three" | awk '{print $2}'&lt;/code&gt; prints the second word.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;curl&lt;/code&gt;&lt;/strong&gt;: Fetches data from URLs. Example: &lt;code&gt;curl https://api.example.com/data&lt;/code&gt; retrieves data from a specified URL.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;wget&lt;/code&gt;&lt;/strong&gt;: Downloads files from the web. Example: &lt;code&gt;wget https://example.com/file.zip&lt;/code&gt; downloads a file from a given URL.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Writing Basic Shell Scripts
&lt;/h2&gt;

&lt;p&gt;Shell scripting is a powerful way to automate tasks. Here’s an example:&lt;/p&gt;

&lt;h3&gt;
  
  
  if-else Statements
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="s2"&gt;"file.txt"&lt;/span&gt; &lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;then
  &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"File exists."&lt;/span&gt;
&lt;span class="k"&gt;else
  &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"File does not exist."&lt;/span&gt;
&lt;span class="k"&gt;fi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Loops
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;for &lt;/span&gt;i &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;1..5&lt;span class="o"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do
  &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Number &lt;/span&gt;&lt;span class="nv"&gt;$i&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
&lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Getting hands-on with AWS, Linux, and shell scripting has provided valuable insights into managing and automating infrastructure. These tools and commands form a solid foundation for anyone in DevOps.&lt;br&gt;
Let’s Connect!&lt;br&gt;
🔗 For more updates and insights&lt;br&gt;
connect with me on &lt;a href="//www.linkedin.com/in/md-sharjil-alam"&gt;LinkedIn&lt;/a&gt;!&lt;br&gt;
connect with me on &lt;a href="https://x.com/mdsharjilalam" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;#DevOps #AWS #Linux #ShellScripting #TechBlog&lt;/p&gt;

</description>
      <category>aws</category>
      <category>devops</category>
      <category>linux</category>
      <category>shell</category>
    </item>
    <item>
      <title>DevOps Foundations: Understanding Servers, Virtualization, and Hypervisors</title>
      <dc:creator>Md Sharjil Alam</dc:creator>
      <pubDate>Wed, 14 Aug 2024 16:53:27 +0000</pubDate>
      <link>https://dev.to/sharjil/devops-foundations-understanding-servers-virtualization-and-hypervisors-29l2</link>
      <guid>https://dev.to/sharjil/devops-foundations-understanding-servers-virtualization-and-hypervisors-29l2</guid>
      <description>&lt;p&gt;Hey Dev.to Community!&lt;/p&gt;

&lt;p&gt;As I continue my DevOps learning journey, I’ve dived into some fundamental concepts essential for building and maintaining modern IT infrastructure. In this article, I’ll break down key ideas around servers, virtualization, and hypervisors.&lt;/p&gt;

&lt;h3&gt;
  
  
  Table of Contents
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;What is DevOps?&lt;/li&gt;
&lt;li&gt;What is a Server?&lt;/li&gt;
&lt;li&gt;Physical vs. Virtual Servers&lt;/li&gt;
&lt;li&gt;Hypervisors&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  What is DevOps?
&lt;/h3&gt;

&lt;p&gt;DevOps is a set of practices and cultural philosophies aimed at improving collaboration between development (Dev) and IT operations (Ops) teams. It focuses on continuous integration, continuous delivery, automation, and infrastructure as code to shorten the software development lifecycle and increase the frequency of releases.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is a Server?
&lt;/h3&gt;

&lt;p&gt;A server is a specialized computer that provides resources, services, or data to other computers over a network. Servers are designed to be reliable and powerful, often hosting websites, managing databases, or handling complex computations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Physical vs. Virtual Servers
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Physical Servers:&lt;/strong&gt; These are standalone hardware machines with dedicated resources. They offer high performance but come with higher costs and less flexibility.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Virtual Servers:&lt;/strong&gt; Virtual servers are abstracted from physical hardware through virtualization, allowing multiple virtual machines (VMs) to run on a single physical server. This approach improves resource utilization, scalability, and cost efficiency.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Hypervisors
&lt;/h3&gt;

&lt;p&gt;Hypervisors are software tools that create and manage virtual machines (VMs) on physical servers. They are essential in virtualization, enabling the efficient use of resources.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Type 1 (Bare-Metal):&lt;/strong&gt; Directly interacts with the physical hardware, offering better performance and efficiency for production environments.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Type 2 (Hosted):&lt;/strong&gt; Runs on top of a host operating system, making it suitable for development and testing.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Understanding these concepts is vital for anyone involved in DevOps, as they form the foundation for modern, scalable, and efficient IT environments.&lt;/p&gt;

&lt;h3&gt;
  
  
  Let’s Connect!
&lt;/h3&gt;

&lt;p&gt;🔗 For more insights and updates&lt;br&gt;
&lt;a href="https://www.linkedin.com/in/md-sharjil-alam" rel="noopener noreferrer"&gt;connect with me on LinkedIn&lt;/a&gt;&lt;br&gt;
&lt;a href="https://x.com/mdsharjilalam" rel="noopener noreferrer"&gt;connect with me on Twitter&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  DevOps #Servers #Virtualization #Hypervisors #TechBlog
&lt;/h1&gt;

</description>
      <category>cloudcomputing</category>
      <category>devops</category>
      <category>virtualmachine</category>
      <category>aws</category>
    </item>
    <item>
      <title>Kickstarting My DevOps Learning Journey! 🚀</title>
      <dc:creator>Md Sharjil Alam</dc:creator>
      <pubDate>Mon, 12 Aug 2024 20:16:28 +0000</pubDate>
      <link>https://dev.to/sharjil/kickstarting-my-devops-learning-journey-1i1j</link>
      <guid>https://dev.to/sharjil/kickstarting-my-devops-learning-journey-1i1j</guid>
      <description>&lt;h1&gt;
  
  
  Table of Contents
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;Introduction to DevOps&lt;/li&gt;
&lt;li&gt;Getting Started with Linux for DevOps&lt;/li&gt;
&lt;li&gt;Mastering GitHub: Version Control and Collaboration&lt;/li&gt;
&lt;li&gt;Introduction to Docker: Containerization Basics&lt;/li&gt;
&lt;li&gt;Kubernetes: Managing and Orchestrating Containers&lt;/li&gt;
&lt;li&gt;CI/CD with Jenkins: Automating Deployment Pipelines&lt;/li&gt;
&lt;li&gt;Ansible: Automating Configuration and Deployment&lt;/li&gt;
&lt;li&gt;Terraform: Infrastructure as Code&lt;/li&gt;
&lt;li&gt;Monitoring &amp;amp; Logging: Best Practices&lt;/li&gt;
&lt;li&gt;Security in DevOps: Ensuring Best Practices&lt;/li&gt;
&lt;li&gt;Working with Cloud Platforms: AWS, Azure, and GCP&lt;/li&gt;
&lt;li&gt;Advanced Kubernetes: Helm and Operators&lt;/li&gt;
&lt;li&gt;Final Project: Integrating DevOps Concepts&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  Introduction to DevOps
&lt;/h1&gt;

&lt;p&gt;DevOps is a set of practices that integrates development and operations to improve collaboration, automation, and efficiency. It emphasizes continuous integration, continuous delivery, and quick feedback loops to enhance software development and deployment processes.&lt;/p&gt;

&lt;h1&gt;
  
  
  Getting Started with Linux for DevOps
&lt;/h1&gt;

&lt;p&gt;Learn essential Linux command line skills and scripting to manage and automate tasks in a DevOps environment.&lt;/p&gt;

&lt;h1&gt;
  
  
  Mastering GitHub: Version Control and Collaboration
&lt;/h1&gt;

&lt;p&gt;Explore advanced GitHub techniques for version control, collaboration, and managing code repositories effectively.&lt;/p&gt;

&lt;h1&gt;
  
  
  Introduction to Docker: Containerization Basics
&lt;/h1&gt;

&lt;p&gt;Understand the fundamentals of Docker for containerization, including creating, managing, and deploying containers.&lt;/p&gt;

&lt;h1&gt;
  
  
  Kubernetes: Managing and Orchestrating Containers
&lt;/h1&gt;

&lt;p&gt;Dive into Kubernetes for orchestrating and managing containerized applications at scale.&lt;/p&gt;

&lt;h1&gt;
  
  
  CI/CD with Jenkins: Automating Deployment Pipelines
&lt;/h1&gt;

&lt;p&gt;Build and automate deployment pipelines with Jenkins to streamline continuous integration and continuous delivery processes.&lt;/p&gt;

&lt;h1&gt;
  
  
  Ansible: Automating Configuration and Deployment
&lt;/h1&gt;

&lt;p&gt;Use Ansible to automate configuration management and deployment tasks across your infrastructure.&lt;/p&gt;

&lt;h1&gt;
  
  
  Terraform: Infrastructure as Code
&lt;/h1&gt;

&lt;p&gt;Learn Terraform for managing infrastructure as code, enabling version-controlled infrastructure deployments.&lt;/p&gt;

&lt;h1&gt;
  
  
  Monitoring &amp;amp; Logging: Best Practices
&lt;/h1&gt;

&lt;p&gt;Implement robust monitoring and logging systems to track application performance and diagnose issues effectively.&lt;/p&gt;

&lt;h1&gt;
  
  
  Security in DevOps: Ensuring Best Practices
&lt;/h1&gt;

&lt;p&gt;Explore best practices for securing DevOps processes and ensuring that your applications and infrastructure are protected.&lt;/p&gt;

&lt;h1&gt;
  
  
  Working with Cloud Platforms: AWS, Azure, and GCP
&lt;/h1&gt;

&lt;p&gt;Manage and deploy applications on major cloud platforms, including AWS, Azure, and Google Cloud Platform.&lt;/p&gt;

&lt;h1&gt;
  
  
  Advanced Kubernetes: Helm and Operators
&lt;/h1&gt;

&lt;p&gt;Delve deeper into Kubernetes with advanced topics like Helm for package management and custom operators for managing complex applications.&lt;/p&gt;

&lt;h1&gt;
  
  
  Final Project: Integrating DevOps Concepts
&lt;/h1&gt;

&lt;p&gt;Apply all learned concepts in a final project that integrates the tools and practices covered throughout the learning journey.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>kubernetes</category>
      <category>docker</category>
      <category>linux</category>
    </item>
  </channel>
</rss>
