<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[DevOps-Engineer]]></title><description><![CDATA[DevOps-Engineer]]></description><link>https://mridul.shop</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 13:30:53 GMT</lastBuildDate><atom:link href="https://mridul.shop/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[🚀 Jenkins CI/CD – Real-World Challenges & Solutions from #90DaysOfDevOps]]></title><description><![CDATA[As part of my #90DaysOfDevOps journey, Week 6 was all about diving deep into Jenkins—not just the basics, but real-world scenarios that simulate job-grade challenges. From building pipelines to scaling agents and integrating security scans, this week...]]></description><link>https://mridul.shop/jenkins-cicd-real-world-challenges-and-solutions-from-90daysofdevops</link><guid isPermaLink="true">https://mridul.shop/jenkins-cicd-real-world-challenges-and-solutions-from-90daysofdevops</guid><dc:creator><![CDATA[Mridul Pandey]]></dc:creator><pubDate>Sat, 02 Aug 2025 16:45:55 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1754153120096/a3b228ba-d31a-4e17-8e79-5b08a31ff855.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>As part of my #90DaysOfDevOps journey, Week 6 was all about diving deep into <strong>Jenkins</strong>—not just the basics, but real-world scenarios that simulate job-grade challenges. From building pipelines to scaling agents and integrating security scans, this week pushed me to think like a DevOps engineer in production.</p>
<p>Here’s a breakdown of what I tackled, how I solved it, and what I learned:</p>
<hr />
<h3 id="heading-task-1-cicd-pipeline-for-a-sample-app">🔧 Task 1: CI/CD Pipeline for a Sample App</h3>
<p>I created a Jenkins Pipeline job using a declarative <code>Jenkinsfile</code> with three stages:</p>
<ul>
<li><p><strong>Build</strong>: Compiled the app and created a Docker image.</p>
</li>
<li><p><strong>Test</strong>: Ran unit tests inside a container.</p>
</li>
<li><p><strong>Deploy</strong>: Deployed the container locally and verified using <code>docker ps</code>.</p>
</li>
</ul>
<p>📌 <em>Lesson</em>: Declarative pipelines simplify CI/CD by enforcing structure and readability. Breaking stages improves debugging and visibility.</p>
<hr />
<h3 id="heading-task-2-multi-branch-pipeline-for-microservices">🌐 Task 2: Multi-Branch Pipeline for Microservices</h3>
<p>I configured a <strong>Multi-Branch Pipeline</strong> to scan multiple Git repos and build services concurrently. Each service had its own <code>Jenkinsfile</code> with parallel test stages.</p>
<p>📌 <em>Lesson</em>: Multi-branch pipelines streamline microservices CI by isolating builds per branch. Merge simulations helped me test PR workflows effectively.</p>
<hr />
<h3 id="heading-task-3-scaling-jenkins-agents">🖥️ Task 3: Scaling Jenkins Agents</h3>
<p>I added two agents:</p>
<ul>
<li><p>A <strong>Linux-based Docker container</strong></p>
</li>
<li><p>A <strong>Windows VM</strong></p>
</li>
</ul>
<p>Each was labeled and used selectively in the pipeline via <code>agent { label 'linux' }</code>.</p>
<p>📌 <em>Lesson</em>: Distributed builds reduce bottlenecks and improve reliability. Labeling agents ensures platform-specific tasks run where they belong.</p>
<hr />
<h3 id="heading-task-4-rbac-for-multi-team-access">🔐 Task 4: RBAC for Multi-Team Access</h3>
<p>Using the <strong>Role Strategy Plugin</strong>, I created roles for Admin, Developer, and Tester. Each had tailored permissions, and I verified access using test accounts.</p>
<p>📌 <em>Lesson</em>: RBAC is critical for securing Jenkins. Without it, a misconfigured role could expose sensitive jobs or credentials.</p>
<hr />
<h3 id="heading-task-5-jenkins-shared-library">📦 Task 5: Jenkins Shared Library</h3>
<p>I built a shared library repo with reusable functions like:</p>
<pre><code class="lang-plaintext">def notifySlack(String message) {
    sh "curl -X POST --data '${message}' https://hooks.slack.com/services/..."
}
</code></pre>
<p>Then I loaded it in pipelines using:</p>
<pre><code class="lang-plaintext">@Library('my-shared-library') _
</code></pre>
<p>📌 <em>Lesson</em>: Shared libraries reduce duplication and enforce consistency across pipelines.</p>
<hr />
<h3 id="heading-task-6-vulnerability-scanning-with-trivy">🛡️ Task 6: Vulnerability Scanning with Trivy</h3>
<p>I added a <code>Vulnerability Scan</code> stage:</p>
<pre><code class="lang-plaintext">stage('Scan') {
    steps {
        sh 'trivy image my-app:v1.0'
    }
}
</code></pre>
<p>📌 <em>Lesson</em>: Trivy helps catch known CVEs early. I configured the pipeline to fail on critical vulnerabilities—security-first mindset!</p>
<hr />
<h3 id="heading-task-7-dynamic-parameterization">⚙️ Task 7: Dynamic Parameterization</h3>
<p>I added runtime parameters:</p>
<pre><code class="lang-plaintext">parameters {
    string(name: 'TARGET_ENV', defaultValue: 'staging')
    string(name: 'APP_VERSION', defaultValue: '1.0.0')
}
</code></pre>
<p>📌 <em>Lesson</em>: Parameterization makes pipelines flexible for multi-environment deployments.</p>
<hr />
<h3 id="heading-task-8-email-notifications">📧 Task 8: Email Notifications</h3>
<p>Configured SMTP and added:</p>
<pre><code class="lang-plaintext">emailext (
    subject: "Build #${env.BUILD_NUMBER} Status",
    body: "Check details at ${env.BUILD_URL}",
    recipientProviders: [[$class: 'DevelopersRecipientProvider']]
)
</code></pre>
<p>📌 <em>Lesson</em>: Automated alerts keep teams informed and reduce response time to failures.</p>
<hr />
<h3 id="heading-task-9-troubleshooting-amp-monitoring">🧠 Task 9: Troubleshooting &amp; Monitoring</h3>
<p>I simulated pipeline failures and used:</p>
<ul>
<li><p><code>docker logs</code></p>
</li>
<li><p>Jenkins console output</p>
</li>
<li><p><code>echo</code> statements for debugging</p>
</li>
<li><p>Jenkins Replay feature for quick fixes</p>
</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[Docker Basics & Advanced Challenge]]></title><description><![CDATA[🚀 Mastering Docker: A Practical Guide for Modern Development
Docker has revolutionized the way applications are built, deployed, and managed in today’s DevOps ecosystem. Let’s dive into its fundamentals, setup a sample project, and explore optimizat...]]></description><link>https://mridul.shop/docker-basics-and-advanced-challenge</link><guid isPermaLink="true">https://mridul.shop/docker-basics-and-advanced-challenge</guid><category><![CDATA[Docker]]></category><category><![CDATA[Devops]]></category><category><![CDATA[Devops articles]]></category><category><![CDATA[Developer]]></category><category><![CDATA[docker images]]></category><dc:creator><![CDATA[Mridul Pandey]]></dc:creator><pubDate>Sun, 08 Jun 2025 13:19:59 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1749388754178/04153835-403f-4b5d-b218-6e2ebdd8203f.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-mastering-docker-a-practical-guide-for-modern-development">🚀 <strong>Mastering Docker: A Practical Guide for Modern Development</strong></h2>
<p><em>Docker has revolutionized the way applications are built, deployed, and managed in today’s DevOps ecosystem. Let’s dive into its fundamentals, setup a sample project, and explore optimization techniques for security and performance.</em></p>
<h3 id="heading-task-1-introduction-amp-conceptual-understanding">🔹 <strong>Task 1: Introduction &amp; Conceptual Understanding</strong></h3>
<p>Docker simplifies software development by packaging applications and their dependencies into containers. This ensures consistency across environments, reducing the infamous “works on my machine” issue.</p>
<h4 id="heading-virtualization-vs-containerization"><strong>Virtualization vs. Containerization</strong></h4>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Feature</td><td>Virtualization (VMs)</td><td>Containerization</td></tr>
</thead>
<tbody>
<tr>
<td>Isolation</td><td>Full OS-level isolation</td><td>Process-level isolation</td></tr>
<tr>
<td>Resource Usage</td><td>Heavy (each VM has its own OS)</td><td>Lightweight (shared host OS)</td></tr>
<tr>
<td>Startup Time</td><td>Minutes</td><td>Seconds</td></tr>
<tr>
<td>Portability</td><td>Limited</td><td>High</td></tr>
<tr>
<td>Microservices</td><td>Not ideal</td><td>Perfect fit</td></tr>
</tbody>
</table>
</div><p>🚀 <strong>Why Containerization?</strong><br />For microservices &amp; CI/CD pipelines, containerization enables faster deployments, improved scalability, and minimal resource usage.</p>
<hr />
<h3 id="heading-task-2-dockerfile-for-a-sample-project">🔹 <strong>Task 2: Dockerfile for a Sample Project</strong></h3>
<p>I chose a simple Python web app:</p>
<pre><code class="lang-dockerfile"><span class="hljs-comment"># Use official Python image as the base</span>
<span class="hljs-keyword">FROM</span> python:<span class="hljs-number">3.9</span>-slim

<span class="hljs-comment"># Set working directory inside container</span>
<span class="hljs-keyword">WORKDIR</span><span class="bash"> /app</span>

<span class="hljs-comment"># Copy application files</span>
<span class="hljs-keyword">COPY</span><span class="bash"> app.py .</span>

<span class="hljs-comment"># Run the application</span>
<span class="hljs-keyword">CMD</span><span class="bash"> [<span class="hljs-string">"python"</span>, <span class="hljs-string">"app.py"</span>]</span>
</code></pre>
<p><strong>Building &amp; Running</strong></p>
<pre><code class="lang-bash">docker build -t mridul/sample-app:latest .
docker run -d -p 8080:80 mridul/sample-app:latest
docker ps
docker logs &lt;container_id&gt;
</code></pre>
<hr />
<h3 id="heading-task-3-key-docker-terminologies">🔹 <strong>Task 3: Key Docker Terminologies</strong></h3>
<ul>
<li><p><strong>Image</strong>: Blueprint for containers</p>
</li>
<li><p><strong>Container</strong>: Running instance of an image</p>
</li>
<li><p><strong>Dockerfile</strong>: Script defining how an image is built</p>
</li>
<li><p><strong>Volume</strong>: Data persistence mechanism</p>
</li>
<li><p><strong>Network</strong>: Enables container communication</p>
</li>
</ul>
<p>🔹 <strong>Docker Engine &amp; Docker Hub</strong> facilitate image creation, storage, and distribution.</p>
<hr />
<h3 id="heading-task-4-multi-stage-build-optimization">🔹 <strong>Task 4: Multi-Stage Build Optimization</strong></h3>
<p>A <strong>multi-stage build</strong> reduces the final image size by eliminating unnecessary files.</p>
<p>Modified Dockerfile:</p>
<pre><code class="lang-dockerfile"><span class="hljs-comment"># Build Stage</span>
<span class="hljs-keyword">FROM</span> python:<span class="hljs-number">3.9</span> AS builder
<span class="hljs-keyword">WORKDIR</span><span class="bash"> /app</span>
<span class="hljs-keyword">COPY</span><span class="bash"> app.py .</span>
<span class="hljs-keyword">RUN</span><span class="bash"> pip install --no-cache-dir flask</span>

<span class="hljs-comment"># Production Stage</span>
<span class="hljs-keyword">FROM</span> python:<span class="hljs-number">3.9</span>-slim
<span class="hljs-keyword">WORKDIR</span><span class="bash"> /app</span>
<span class="hljs-keyword">COPY</span><span class="bash"> --from=builder /app .</span>
<span class="hljs-keyword">CMD</span><span class="bash"> [<span class="hljs-string">"python"</span>, <span class="hljs-string">"app.py"</span>]</span>
</code></pre>
<p>📉 <strong>Comparison of Image Sizes</strong><br />Before optimization: <code>500MB</code> → After optimization: <code>50MB</code></p>
<p>Multi-stage builds reduce image bloat, improving security and efficiency.</p>
<hr />
<h3 id="heading-task-5-pushing-image-to-docker-hub">🔹 <strong>Task 5: Pushing Image to Docker Hub</strong></h3>
<pre><code class="lang-bash">docker tag mridul/sample-app:latest mridul/sample-app:v1.0
docker login
docker push mridul/sample-app:v1.0
docker pull mridul/sample-app:v1.0  <span class="hljs-comment"># Verification</span>
</code></pre>
<hr />
<h3 id="heading-task-6-persisting-data-with-docker-volumes">🔹 <strong>Task 6: Persisting Data with Docker Volumes</strong></h3>
<pre><code class="lang-bash">docker volume create my_volume
docker run -d -v my_volume:/app/data mridul/sample-app:v1.0
</code></pre>
<p>🔹 <strong>Why Volumes?</strong><br />They ensure <strong>data persistence</strong> across container restarts, making stateful applications reliable.</p>
<hr />
<h3 id="heading-task-7-docker-networking">🔹 <strong>Task 7: Docker Networking</strong></h3>
<pre><code class="lang-bash">docker network create my_network
docker run -d --name sample-app --network my_network mridul/sample-app:v1.0
docker run -d --name my-db --network my_network -e MYSQL_ROOT_PASSWORD=root mysql:latest
</code></pre>
<p>🔹 <strong>Inter-container communication</strong> enables seamless service interaction.</p>
<hr />
<h3 id="heading-task-8-orchestrating-with-docker-compose">🔹 <strong>Task 8: Orchestrating with Docker Compose</strong></h3>
<pre><code class="lang-yaml"><span class="hljs-attr">version:</span> <span class="hljs-string">'3'</span>
<span class="hljs-attr">services:</span>
  <span class="hljs-attr">web:</span>
    <span class="hljs-attr">image:</span> <span class="hljs-string">mridul/sample-app:v1.0</span>
    <span class="hljs-attr">ports:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">"8080:80"</span>
    <span class="hljs-attr">networks:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">app_net</span>

  <span class="hljs-attr">db:</span>
    <span class="hljs-attr">image:</span> <span class="hljs-string">mysql:latest</span>
    <span class="hljs-attr">environment:</span>
      <span class="hljs-attr">MYSQL_ROOT_PASSWORD:</span> <span class="hljs-string">root</span>
    <span class="hljs-attr">networks:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">app_net</span>

<span class="hljs-attr">networks:</span>
  <span class="hljs-attr">app_net:</span>
</code></pre>
<pre><code class="lang-bash">docker-compose up -d
docker-compose down
</code></pre>
<p>📌 <strong>Docker Compose simplifies multi-container applications.</strong></p>
<hr />
<h3 id="heading-task-9-security-with-docker-scout">🔹 <strong>Task 9: Security with Docker Scout</strong></h3>
<pre><code class="lang-bash">docker scout cves mridul/sample-app:v1.0 &gt; scout_report.txt
</code></pre>
]]></content:encoded></item><item><title><![CDATA[🔹 Week 4: Git & GitHub Challenge]]></title><description><![CDATA[1️⃣ Fork & Clone the Repository
🔹 Fork the repository on GitHub🔹 Clone your fork locally (replace <your-fork-url>):
git clone <your-fork-url>
cd 2025/git/01_Git_and_Github_Basics


2️⃣ Initialize a Local Repository & Create a File
🔹 Create a new d...]]></description><link>https://mridul.shop/week-4-git-and-github-challenge</link><guid isPermaLink="true">https://mridul.shop/week-4-git-and-github-challenge</guid><category><![CDATA[Devops]]></category><category><![CDATA[DevOps Journey]]></category><category><![CDATA[GitHub]]></category><category><![CDATA[Git]]></category><dc:creator><![CDATA[Mridul Pandey]]></dc:creator><pubDate>Sun, 18 May 2025 09:44:58 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1747561442991/9580dac2-d10e-46ce-b997-4e9aad0f0b3e.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-1-fork-amp-clone-the-repository"><strong>1️⃣ Fork &amp; Clone the Repository</strong></h2>
<p>🔹 <strong>Fork the repository</strong> on GitHub<br />🔹 <strong>Clone your fork locally</strong> (replace <code>&lt;your-fork-url&gt;</code>):</p>
<pre><code class="lang-bash">git <span class="hljs-built_in">clone</span> &lt;your-fork-url&gt;
<span class="hljs-built_in">cd</span> 2025/git/01_Git_and_Github_Basics
</code></pre>
<hr />
<h3 id="heading-2-initialize-a-local-repository-amp-create-a-file"><strong>2️⃣ Initialize a Local Repository &amp; Create a File</strong></h3>
<p>🔹 <strong>Create a new directory for the challenge</strong></p>
<pre><code class="lang-bash">mkdir week-4-challenge &amp;&amp; <span class="hljs-built_in">cd</span> week-4-challenge
</code></pre>
<p>🔹 <strong>Initialize Git &amp; add a file</strong></p>
<pre><code class="lang-bash">git init
<span class="hljs-built_in">echo</span> <span class="hljs-string">"Hello, I’m [Your Name]!"</span> &gt; info.txt
</code></pre>
<p>🔹 <strong>Stage &amp; commit the file</strong></p>
<pre><code class="lang-bash">git add info.txt
git commit -m <span class="hljs-string">"Initial commit: Added info.txt"</span>
</code></pre>
<hr />
<h3 id="heading-3-configure-remote-with-pat-amp-push-changes"><strong>3️⃣ Configure Remote with PAT &amp; Push Changes</strong></h3>
<p>🔹 <strong>Add remote using your PAT (replace placeholders)</strong></p>
<pre><code class="lang-bash">git remote add origin https://&lt;your-username&gt;:&lt;your-PAT&gt;@github.com/&lt;your-username&gt;/90DaysOfDevOps.git
</code></pre>
<p>🔹 <strong>Push changes to GitHub</strong></p>
<pre><code class="lang-bash">git push -u origin main
</code></pre>
<p>🔹 <strong>Pull latest changes if needed</strong></p>
<pre><code class="lang-bash">git pull origin main
</code></pre>
<hr />
<h3 id="heading-4-view-commit-history"><strong>4️⃣ View Commit History</strong></h3>
<p>🔹 <strong>Check previous commits</strong></p>
<pre><code class="lang-bash">git <span class="hljs-built_in">log</span>
</code></pre>
<p>✍️ Take note of commit hashes for documentation.</p>
<hr />
<h3 id="heading-5-advanced-branching-amp-switching"><strong>5️⃣ Advanced Branching &amp; Switching</strong></h3>
<p>🔹 <strong>Create &amp; switch to a new branch</strong></p>
<pre><code class="lang-bash">git branch feature-update
git switch feature-update
</code></pre>
<p>🔹 <strong>Modify</strong> <code>info.txt</code>, then stage &amp; commit changes</p>
<pre><code class="lang-bash">git add info.txt
git commit -m <span class="hljs-string">"Feature update: Improved info.txt"</span>
git push origin feature-update
</code></pre>
<p>🔹 <strong>Merge changes via a GitHub Pull Request (PR).</strong></p>
<p>📌 <strong>Extra Challenge:</strong> Try handling a <strong>merge conflict</strong> with a second branch (<code>experimental</code>), then resolve and commit.</p>
<hr />
<h3 id="heading-6-explain-branching-strategies"><strong>6️⃣ Explain Branching Strategies</strong></h3>
<p>🔹 <strong>Create</strong> <a target="_blank" href="http://solution.md"><code>solution.md</code></a> in your repo<br />🔹 <strong>Document all Git commands used</strong><br />🔹 <strong>Write why branching strategies matter:</strong><br />✅ <strong>Isolating features</strong> &amp; bug fixes<br />✅ <strong>Parallel development</strong> for teams<br />✅ <strong>Reducing merge conflicts</strong><br />✅ <strong>Enhancing code reviews</strong></p>
<hr />
<h3 id="heading-bonus-ssh-authentication"><strong>🔹 BONUS: SSH Authentication</strong></h3>
<p>🔹 <strong>Generate SSH key &amp; add to GitHub</strong></p>
<pre><code class="lang-bash">ssh-keygen
cat ~/.ssh/id_ed25519.pub
</code></pre>
<p>🔹 <strong>Switch to SSH-based remote URL</strong></p>
<pre><code class="lang-bash">git remote set-url origin git@github.com:&lt;your-username&gt;/90DaysOfDevOps.git
git push origin feature-update
</code></pre>
<p>Completing this challenge strengthens your Git and GitHub workflow, making collaborative development smoother.</p>
]]></content:encoded></item><item><title><![CDATA[User Account Management Using shell Scripting]]></title><description><![CDATA[Task 1: Account Creation
Steps:

Check if the username already exists before creating the account.

Prompt for username and password securely.

Create the new account and set the password.

Confirm successful account creation.


Execution:
#!/bin/bas...]]></description><link>https://mridul.shop/user-account-management-using-shell-scripting</link><guid isPermaLink="true">https://mridul.shop/user-account-management-using-shell-scripting</guid><category><![CDATA[Devops]]></category><category><![CDATA[DevOps Journey]]></category><category><![CDATA[development]]></category><category><![CDATA[#Devopscommunity]]></category><dc:creator><![CDATA[Mridul Pandey]]></dc:creator><pubDate>Wed, 14 May 2025 15:03:03 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1747234881186/b60c2642-cda2-4546-99a9-6706f52ce0b5.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Task 1: Account Creation</strong></p>
<h4 id="heading-steps"><strong>Steps:</strong></h4>
<ol>
<li><p><strong>Check if the username already exists</strong> before creating the account.</p>
</li>
<li><p><strong>Prompt for username and password</strong> securely.</p>
</li>
<li><p><strong>Create the new account</strong> and set the password.</p>
</li>
<li><p><strong>Confirm successful account creation.</strong></p>
</li>
</ol>
<h4 id="heading-execution"><strong>Execution:</strong></h4>
<pre><code class="lang-bash"><span class="hljs-meta">#!/bin/bash</span>

<span class="hljs-comment"># Function to create a user account</span>
<span class="hljs-function"><span class="hljs-title">create_user</span></span>() {
    <span class="hljs-built_in">read</span> -p <span class="hljs-string">"Enter new username: "</span> username
    <span class="hljs-keyword">if</span> id <span class="hljs-string">"<span class="hljs-variable">$username</span>"</span> &amp;&gt;/dev/null; <span class="hljs-keyword">then</span>
        <span class="hljs-built_in">echo</span> <span class="hljs-string">"Error: User '<span class="hljs-variable">$username</span>' already exists."</span>
        <span class="hljs-built_in">exit</span> 1
    <span class="hljs-keyword">fi</span>
    <span class="hljs-built_in">read</span> -s -p <span class="hljs-string">"Enter password for <span class="hljs-variable">$username</span>: "</span> password
    <span class="hljs-built_in">echo</span>
    sudo useradd <span class="hljs-string">"<span class="hljs-variable">$username</span>"</span>
    <span class="hljs-built_in">echo</span> <span class="hljs-string">"<span class="hljs-variable">$username</span>:<span class="hljs-variable">$password</span>"</span> | sudo chpasswd
    <span class="hljs-built_in">echo</span> <span class="hljs-string">"User '<span class="hljs-variable">$username</span>' created successfully."</span>
}

create_user
</code></pre>
<p><strong>Explanation:</strong></p>
<ul>
<li><p><code>id "$username"</code> checks if the user already exists.</p>
</li>
<li><p><code>read -s -p</code> ensures password entry is hidden.</p>
</li>
<li><p><code>useradd</code> creates the account.</p>
</li>
<li><p><code>chpasswd</code> sets the password.</p>
</li>
<li><p>Prints success confirmation.</p>
</li>
</ul>
<hr />
<h3 id="heading-task-2-account-deletion"><strong>Task 2: Account Deletion</strong></h3>
<h4 id="heading-steps-1"><strong>Steps:</strong></h4>
<ol>
<li><p><strong>Check if the username exists</strong> before deletion.</p>
</li>
<li><p><strong>Prompt for username</strong> to be deleted.</p>
</li>
<li><p><strong>Delete the account and confirm.</strong></p>
</li>
</ol>
<h4 id="heading-execution-1"><strong>Execution:</strong></h4>
<pre><code class="lang-bash"><span class="hljs-function"><span class="hljs-title">delete_user</span></span>() {
    <span class="hljs-built_in">read</span> -p <span class="hljs-string">"Enter username to delete: "</span> username
    <span class="hljs-keyword">if</span> ! id <span class="hljs-string">"<span class="hljs-variable">$username</span>"</span> &amp;&gt;/dev/null; <span class="hljs-keyword">then</span>
        <span class="hljs-built_in">echo</span> <span class="hljs-string">"Error: User '<span class="hljs-variable">$username</span>' does not exist."</span>
        <span class="hljs-built_in">exit</span> 1
    <span class="hljs-keyword">fi</span>
    sudo userdel -r <span class="hljs-string">"<span class="hljs-variable">$username</span>"</span>
    <span class="hljs-built_in">echo</span> <span class="hljs-string">"User '<span class="hljs-variable">$username</span>' deleted successfully."</span>
}

delete_user
</code></pre>
<p><strong>Explanation:</strong></p>
<ul>
<li><p><code>id "$username"</code> ensures the user exists before deletion.</p>
</li>
<li><p><code>userdel -r</code> removes the user along with their home directory.</p>
</li>
<li><p>Prints a success message.</p>
</li>
</ul>
<hr />
<h3 id="heading-task-3-password-reset"><strong>Task 3: Password Reset</strong></h3>
<h4 id="heading-steps-2"><strong>Steps:</strong></h4>
<ol>
<li><p><strong>Check if the username exists</strong> before resetting password.</p>
</li>
<li><p><strong>Prompt for username and new password.</strong></p>
</li>
<li><p><strong>Reset the password securely.</strong></p>
</li>
<li><p><strong>Confirm password change.</strong></p>
</li>
</ol>
<h4 id="heading-execution-2"><strong>Execution:</strong></h4>
<pre><code class="lang-bash"><span class="hljs-function"><span class="hljs-title">reset_password</span></span>() {
    <span class="hljs-built_in">read</span> -p <span class="hljs-string">"Enter username to reset password: "</span> username
    <span class="hljs-keyword">if</span> ! id <span class="hljs-string">"<span class="hljs-variable">$username</span>"</span> &amp;&gt;/dev/null; <span class="hljs-keyword">then</span>
        <span class="hljs-built_in">echo</span> <span class="hljs-string">"Error: User '<span class="hljs-variable">$username</span>' does not exist."</span>
        <span class="hljs-built_in">exit</span> 1
    <span class="hljs-keyword">fi</span>
    <span class="hljs-built_in">read</span> -s -p <span class="hljs-string">"Enter new password: "</span> password
    <span class="hljs-built_in">echo</span>
    <span class="hljs-built_in">echo</span> <span class="hljs-string">"<span class="hljs-variable">$username</span>:<span class="hljs-variable">$password</span>"</span> | sudo chpasswd
    <span class="hljs-built_in">echo</span> <span class="hljs-string">"Password for '<span class="hljs-variable">$username</span>' reset successfully."</span>
}

reset_password
</code></pre>
<p><strong>Explanation:</strong></p>
<ul>
<li><p>Ensures the account exists before modifying credentials.</p>
</li>
<li><p>Uses <code>chpasswd</code> to securely reset passwords.</p>
</li>
<li><p>Prints confirmation.</p>
</li>
</ul>
<hr />
<h3 id="heading-task-4-list-user-accounts"><strong>Task 4: List User Accounts</strong></h3>
<h4 id="heading-steps-3"><strong>Steps:</strong></h4>
<ol>
<li><p><strong>Fetch all system users</strong> and their corresponding UIDs.</p>
</li>
<li><p><strong>Format the output for readability.</strong></p>
</li>
</ol>
<h4 id="heading-execution-3"><strong>Execution:</strong></h4>
<pre><code class="lang-bash"><span class="hljs-function"><span class="hljs-title">list_users</span></span>() {
    <span class="hljs-built_in">echo</span> <span class="hljs-string">"User Accounts on the System:"</span>
    cut -d: -f1,3 /etc/passwd | column -t -s:
}

list_users
</code></pre>
<p><strong>Explanation:</strong></p>
<ul>
<li><p>Extracts usernames and their UIDs from <code>/etc/passwd</code>.</p>
</li>
<li><p>Formats output neatly using <code>column -t -s:</code>.</p>
</li>
</ul>
<hr />
<h3 id="heading-task-5-help-and-usage"><strong>Task 5: Help and Usage</strong></h3>
<h4 id="heading-steps-4"><strong>Steps:</strong></h4>
<ol>
<li><strong>Display available command options</strong> and their usage.</li>
</ol>
<h4 id="heading-execution-4"><strong>Execution:</strong></h4>
<pre><code class="lang-bash"><span class="hljs-function"><span class="hljs-title">usage</span></span>() {
    <span class="hljs-built_in">echo</span> <span class="hljs-string">"Usage: user_management.sh [OPTION]"</span>
    <span class="hljs-built_in">echo</span> <span class="hljs-string">"Options:"</span>
    <span class="hljs-built_in">echo</span> <span class="hljs-string">"  -c, --create    Create a new user account"</span>
    <span class="hljs-built_in">echo</span> <span class="hljs-string">"  -d, --delete    Delete an existing user account"</span>
    <span class="hljs-built_in">echo</span> <span class="hljs-string">"  -r, --reset     Reset password for an existing user account"</span>
    <span class="hljs-built_in">echo</span> <span class="hljs-string">"  -l, --list      List all user accounts"</span>
    <span class="hljs-built_in">echo</span> <span class="hljs-string">"  -h, --help      Display usage information"</span>
}

usage
</code></pre>
<p><strong>Explanation:</strong></p>
<ul>
<li><p>Prints all available command-line options.</p>
</li>
<li><p>Ensures users understand script functionality.</p>
</li>
</ul>
<hr />
<h3 id="heading-final-implementation-running-the-full-script"><strong>Final Implementation: Running the Full Script</strong></h3>
<p>Now, let's package everything into one script (<code>user_</code><a target="_blank" href="http://management.sh"><code>management.sh</code></a>) with proper argument handling:</p>
<pre><code class="lang-bash"><span class="hljs-meta">#!/bin/bash</span>

<span class="hljs-comment"># Function to display usage</span>
<span class="hljs-function"><span class="hljs-title">usage</span></span>() {
    <span class="hljs-built_in">echo</span> <span class="hljs-string">"Usage: <span class="hljs-variable">$0</span> [-c|--create] [-d|--delete] [-r|--reset] [-l|--list] [-h|--help]"</span>
}

<span class="hljs-function"><span class="hljs-title">create_user</span></span>() {
    <span class="hljs-built_in">read</span> -p <span class="hljs-string">"Enter new username: "</span> username
    <span class="hljs-keyword">if</span> id <span class="hljs-string">"<span class="hljs-variable">$username</span>"</span> &amp;&gt;/dev/null; <span class="hljs-keyword">then</span>
        <span class="hljs-built_in">echo</span> <span class="hljs-string">"Error: User '<span class="hljs-variable">$username</span>' already exists."</span>
        <span class="hljs-built_in">exit</span> 1
    <span class="hljs-keyword">fi</span>
    <span class="hljs-built_in">read</span> -s -p <span class="hljs-string">"Enter password for <span class="hljs-variable">$username</span>: "</span> password
    <span class="hljs-built_in">echo</span>
    sudo useradd <span class="hljs-string">"<span class="hljs-variable">$username</span>"</span>
    <span class="hljs-built_in">echo</span> <span class="hljs-string">"<span class="hljs-variable">$username</span>:<span class="hljs-variable">$password</span>"</span> | sudo chpasswd
    <span class="hljs-built_in">echo</span> <span class="hljs-string">"User '<span class="hljs-variable">$username</span>' created successfully."</span>
}

<span class="hljs-function"><span class="hljs-title">delete_user</span></span>() {
    <span class="hljs-built_in">read</span> -p <span class="hljs-string">"Enter username to delete: "</span> username
    <span class="hljs-keyword">if</span> ! id <span class="hljs-string">"<span class="hljs-variable">$username</span>"</span> &amp;&gt;/dev/null; <span class="hljs-keyword">then</span>
        <span class="hljs-built_in">echo</span> <span class="hljs-string">"Error: User '<span class="hljs-variable">$username</span>' does not exist."</span>
        <span class="hljs-built_in">exit</span> 1
    <span class="hljs-keyword">fi</span>
    sudo userdel -r <span class="hljs-string">"<span class="hljs-variable">$username</span>"</span>
    <span class="hljs-built_in">echo</span> <span class="hljs-string">"User '<span class="hljs-variable">$username</span>' deleted successfully."</span>
}

<span class="hljs-function"><span class="hljs-title">reset_password</span></span>() {
    <span class="hljs-built_in">read</span> -p <span class="hljs-string">"Enter username to reset password: "</span> username
    <span class="hljs-keyword">if</span> ! id <span class="hljs-string">"<span class="hljs-variable">$username</span>"</span> &amp;&gt;/dev/null; <span class="hljs-keyword">then</span>
        <span class="hljs-built_in">echo</span> <span class="hljs-string">"Error: User '<span class="hljs-variable">$username</span>' does not exist."</span>
        <span class="hljs-built_in">exit</span> 1
    <span class="hljs-keyword">fi</span>
    <span class="hljs-built_in">read</span> -s -p <span class="hljs-string">"Enter new password: "</span> password
    <span class="hljs-built_in">echo</span>
    <span class="hljs-built_in">echo</span> <span class="hljs-string">"<span class="hljs-variable">$username</span>:<span class="hljs-variable">$password</span>"</span> | sudo chpasswd
    <span class="hljs-built_in">echo</span> <span class="hljs-string">"Password for '<span class="hljs-variable">$username</span>' reset successfully."</span>
}

<span class="hljs-function"><span class="hljs-title">list_users</span></span>() {
    <span class="hljs-built_in">echo</span> <span class="hljs-string">"User Accounts on the System:"</span>
    cut -d: -f1,3 /etc/passwd | column -t -s:
}

<span class="hljs-keyword">case</span> <span class="hljs-string">"<span class="hljs-variable">$1</span>"</span> <span class="hljs-keyword">in</span>
    -c|--create) create_user ;;
    -d|--delete) delete_user ;;
    -r|--reset) reset_password ;;
    -l|--list) list_users ;;
    -h|--<span class="hljs-built_in">help</span>) usage ;;
    *) <span class="hljs-built_in">echo</span> <span class="hljs-string">"Invalid option! Use -h or --help for usage."</span>; <span class="hljs-built_in">exit</span> 1 ;;
<span class="hljs-keyword">esac</span>
</code></pre>
<h3 id="heading-how-to-use-the-script"><strong>How to Use the Script</strong></h3>
<ol>
<li><p><strong>Create a User</strong> → <code>./user_</code><a target="_blank" href="http://management.sh"><code>management.sh</code></a> <code>-c</code></p>
</li>
<li><p><strong>Delete a User</strong> → <code>./user_</code><a target="_blank" href="http://management.sh"><code>management.sh</code></a> <code>-d</code></p>
</li>
<li><p><strong>Reset a Password</strong> → <code>./user_</code><a target="_blank" href="http://management.sh"><code>management.sh</code></a> <code>-r</code></p>
</li>
<li><p><strong>List Users</strong> → <code>./user_</code><a target="_blank" href="http://management.sh"><code>management.sh</code></a> <code>-l</code></p>
</li>
<li><p><strong>Show Help</strong> → <code>./user_</code><a target="_blank" href="http://management.sh"><code>management.sh</code></a> <code>-h</code></p>
</li>
</ol>
<p>This script follows <strong>DevOps best practices</strong>, ensuring security, error handling, and user-friendly execution.</p>
]]></content:encoded></item><item><title><![CDATA[🚀 DevOps Essentials: Mastering Linux Administration]]></title><description><![CDATA[Linux Administration
If you're diving into DevOps, understanding Linux system administration is crucial! Here’s a beginner-friendly breakdown of key concepts, covering user management, permissions, log analysis, disk usage, process monitoring, and au...]]></description><link>https://mridul.shop/devops-essentials-mastering-linux-administration</link><guid isPermaLink="true">https://mridul.shop/devops-essentials-mastering-linux-administration</guid><category><![CDATA[Devops]]></category><category><![CDATA[Devops articles]]></category><category><![CDATA[Linux]]></category><category><![CDATA[DevOps Journey]]></category><dc:creator><![CDATA[Mridul Pandey]]></dc:creator><pubDate>Tue, 13 May 2025 15:32:40 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1747150181135/5b03381d-680e-4525-a20a-ef159a36b2fe.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-linux-administration">Linux Administration</h2>
<p>If you're diving into <strong>DevOps</strong>, understanding <strong>Linux system administration</strong> is <strong>crucial</strong>! Here’s a <strong>beginner-friendly</strong> breakdown of key concepts, covering <strong>user management, permissions, log analysis, disk usage, process monitoring, and automation</strong>.</p>
<h2 id="heading-1-user-amp-group-management">🔹 <strong>1️⃣ User &amp; Group Management</strong></h2>
<p>Linux users and groups help <strong>organize access control</strong>.</p>
<ul>
<li><p>Every user is stored in <code>/etc/passwd</code>, and group details are in <code>/etc/group</code>.</p>
</li>
<li><p>You can create a <strong>user</strong> and add them to a <strong>group</strong> for better access management.</p>
</li>
<li><p>Grant <strong>sudo access</strong> to allow administrative privileges.</p>
</li>
<li><p>Restrict <strong>SSH logins</strong> for security in <code>/etc/ssh/sshd_config</code>.</p>
</li>
</ul>
<p>💡 <strong>Example:</strong><br />To create a user <strong>devops_user</strong> and add them to <strong>devops_team</strong>:</p>
<p>sudo useradd -m devops_user sudo groupadd devops_team sudo usermod -aG devops_team devops_user sudo passwd devops_user # Set a password</p>
<pre><code class="lang-plaintext">sudo useradd -m devops_user  
sudo groupadd devops_team  
sudo usermod -aG devops_team devops_user  
sudo passwd devops_user  # Set a password
</code></pre>
<h2 id="heading-2-file-amp-directory-permissions">📁 <strong>2️⃣ File &amp; Directory Permissions</strong></h2>
<p>File permissions define <strong>who can read, write, or execute</strong> files in Linux.</p>
<ul>
<li><p>The <code>ls -l</code> command shows file permissions.</p>
</li>
<li><p>Use <code>chmod</code> to modify them.</p>
</li>
<li><p>A <strong>secure directory structure</strong> ensures <strong>controlled access</strong> to files.</p>
</li>
</ul>
<p>💡 <strong>Example:</strong><br />To create a <strong>workspace directory</strong> and <strong>restrict access</strong>:</p>
<pre><code class="lang-plaintext">mkdir /devops_workspace  
touch /devops_workspace/project_notes.txt  
chmod 740 /devops_workspace/project_notes.txt  # Owner can edit, group can read, others denied
</code></pre>
<h2 id="heading-3-log-file-analysis-with-awk-grep-amp-sed">📝 <strong>3️⃣ Log File Analysis with AWK, Grep &amp; Sed</strong></h2>
<p>Logs help <strong>monitor system activity</strong>. Using Linux tools, we can analyze them efficiently.</p>
<ul>
<li><p><code>grep</code> finds specific <strong>error messages</strong> in log files.</p>
</li>
<li><p><code>awk</code> extracts useful data like <strong>timestamps</strong> and <strong>log levels</strong>.</p>
</li>
<li><p><code>sed</code> replaces sensitive details for <strong>security</strong>.</p>
</li>
</ul>
<p>💡 <strong>Example:</strong><br />To filter logs containing <strong>errors</strong> and hide IP addresses:</p>
<pre><code class="lang-plaintext">grep "error" Linux_2k.log  
awk '{print $1, $2, $3}' Linux_2k.log  # Extract timestamp and log level  
sed 's/[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}/[REDACTED]/g' Linux_2k.log
</code></pre>
<h2 id="heading-4-volume-management-amp-disk-usage">💾 <strong>4️⃣ Volume Management &amp; Disk Usage</strong></h2>
<p>Efficient storage management prevents <strong>performance bottlenecks</strong>.</p>
<ul>
<li><p>Mount new <strong>storage volumes</strong> for expanding data capacity.</p>
</li>
<li><p>Use <code>df -h</code> to check <strong>disk space usage</strong>.</p>
</li>
<li><p>Verify mounts with <code>mount | grep devops_data</code>.</p>
</li>
</ul>
<p>💡 <strong>Example:</strong><br />To create and mount a <strong>new directory</strong>:</p>
<pre><code class="lang-plaintext">mkdir /mnt/devops_data  
mount /dev/sdb1 /mnt/devops_data  # Mount a new volume  
df -h | grep devops_data  # Verify disk space
</code></pre>
<h2 id="heading-5-process-management-amp-monitoring">🔍 <strong>5️⃣ Process Management &amp; Monitoring</strong></h2>
<p>Processes keep systems running, but monitoring them prevents <strong>overload</strong>.</p>
<ul>
<li><p>Use <code>ps</code>, <code>top</code>, and <code>htop</code> to <strong>monitor system performance</strong>.</p>
</li>
<li><p>Stop unwanted processes with <code>kill</code>.</p>
</li>
</ul>
<p>💡 <strong>Example:</strong><br />To <strong>start a background process</strong> and monitor it:</p>
<pre><code class="lang-plaintext">ping google.com &gt; ping_test.log &amp;  
ps aux | grep ping  
top  # Real-time monitoring  
kill $(pgrep ping)  # Stop the process
</code></pre>
<h2 id="heading-6-automate-backups-with-shell-scripting">🔄 <strong>6️⃣ Automate Backups with Shell Scripting</strong></h2>
<p>Automate backups to <strong>protect important data</strong>!</p>
<p>💡 <strong>Example:</strong><br />A simple script to create <strong>daily backups</strong>:</p>
<pre><code class="lang-plaintext">#!/bin/bash  
tar -czf /backups/backup_$(date +%F).tar.gz /devops_workspace  
echo -e "\e[32mBackup successful!\e[0m"
</code></pre>
<ul>
<li>Save this script in <code>/backups</code> and schedule it with <strong>cron</strong> for automatic execution!</li>
</ul>
]]></content:encoded></item><item><title><![CDATA[🚀 DevOps Basics: Getting Started with Networking]]></title><description><![CDATA[🌍 OSI & TCP/IP Models – How Data Travels Across Networks
Networks function like a well-organized postal system for data, ensuring information is efficiently transmitted, received, and understood. The OSI Model (7 layers) and TCP/IP Model (4 layers) ...]]></description><link>https://mridul.shop/devops-basics-getting-started-with-networking</link><guid isPermaLink="true">https://mridul.shop/devops-basics-getting-started-with-networking</guid><category><![CDATA[Devops]]></category><category><![CDATA[Devops articles]]></category><category><![CDATA[90 days of DevOps Challenge]]></category><category><![CDATA[#Devopscommunity]]></category><dc:creator><![CDATA[Mridul Pandey]]></dc:creator><pubDate>Tue, 13 May 2025 12:26:09 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1747139097884/6ad7ca37-2fa9-4a79-84ce-e36e49553ad0.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3 id="heading-osi-amp-tcpip-models-how-data-travels-across-networks">🌍 OSI &amp; TCP/IP Models – How Data Travels Across Networks</h3>
<p>Networks function like a well-organized postal system for data, ensuring information is efficiently transmitted, received, and understood. The <strong>OSI Model</strong> (7 layers) and <strong>TCP/IP Model</strong> (4 layers) are frameworks that describe this process. Each layer has a specific role in managing data transmission.</p>
<hr />
<h2 id="heading-osi-model-7-layers"><strong>OSI Model (7 Layers)</strong></h2>
<p>The OSI (Open Systems Interconnection) model provides a <strong>structured</strong> approach to how data moves through a network, from the user interface to physical transmission.</p>
<h3 id="heading-1-application-layer"><strong>1. Application Layer</strong></h3>
<ul>
<li><p>Acts as the interface between users and the network.</p>
</li>
<li><p>Handles services like web browsing, email, and messaging.</p>
</li>
<li><p>Common protocols: <strong>HTTP, HTTPS, FTP, SMTP, POP3, IMAP, DNS</strong>.</p>
</li>
</ul>
<h3 id="heading-2-presentation-layer"><strong>2. Presentation Layer</strong></h3>
<ul>
<li><p>Formats and encrypts data for secure communication.</p>
</li>
<li><p>Ensures compatibility across different systems.</p>
</li>
<li><p>Handles compression, encoding, and encryption.</p>
</li>
<li><p>Example formats: <strong>JPEG, MP3, TLS, SSL</strong>.</p>
</li>
</ul>
<h3 id="heading-3-session-layer"><strong>3. Session Layer</strong></h3>
<ul>
<li><p>Establishes, manages, and terminates connections between devices.</p>
</li>
<li><p>Ensures data exchanges happen properly between sender and receiver.</p>
</li>
<li><p>Protocols: <strong>RPC, NetBIOS, PPTP, SOCKS</strong>.</p>
</li>
</ul>
<h3 id="heading-4-transport-layer"><strong>4. Transport Layer</strong></h3>
<ul>
<li><p>Guarantees reliable communication between devices.</p>
</li>
<li><p>Provides error checking and ensures complete data delivery.</p>
</li>
<li><p>Common protocols: <strong>TCP (reliable) and UDP (fast, but less reliable)</strong>.</p>
</li>
</ul>
<h3 id="heading-5-network-layer"><strong>5. Network Layer</strong></h3>
<ul>
<li><p>Determines the best path for data to travel.</p>
</li>
<li><p>Assigns IP addresses to packets.</p>
</li>
<li><p>Handles routing decisions.</p>
</li>
<li><p>Protocols: <strong>IP, ICMP, IGMP</strong>.</p>
</li>
</ul>
<h3 id="heading-6-data-link-layer"><strong>6. Data Link Layer</strong></h3>
<ul>
<li><p>Ensures error-free transmission between directly connected nodes.</p>
</li>
<li><p>Divides data into frames for delivery.</p>
</li>
<li><p>Protocols: <strong>Ethernet, MAC (Media Access Control), ARP (Address Resolution Protocol)</strong>.</p>
</li>
</ul>
<h3 id="heading-7-physical-layer"><strong>7. Physical Layer</strong></h3>
<ul>
<li><p>Transmits raw data as electrical, optical, or radio signals.</p>
</li>
<li><p>Defines hardware aspects like cables, switches, and wireless networks.</p>
</li>
</ul>
<hr />
<h2 id="heading-tcpip-model-4-layers"><strong>TCP/IP Model (4 Layers)</strong></h2>
<p>The <strong>TCP/IP (Transmission Control Protocol/Internet Protocol) model</strong> is a more simplified version of OSI, widely used for real-world internet communication.</p>
<h3 id="heading-1-application-layer-1"><strong>1. Application Layer</strong></h3>
<ul>
<li><p>Functions similarly to the OSI Application, Presentation, and Session layers.</p>
</li>
<li><p>Handles protocols such as <strong>HTTP, SMTP, FTP, DNS</strong>.</p>
</li>
</ul>
<h3 id="heading-2-transport-layer"><strong>2. Transport Layer</strong></h3>
<ul>
<li>Ensures <strong>reliable</strong> or <strong>fast</strong> communication using <strong>TCP (error-checked)</strong> or <strong>UDP (speed-focused)</strong> protocols.</li>
</ul>
<h3 id="heading-3-internet-layer"><strong>3. Internet Layer</strong></h3>
<ul>
<li>Defines how packets move across networks using <strong>IP addressing, routing, and forwarding</strong>.</li>
</ul>
<h3 id="heading-4-network-access-layer"><strong>4. Network Access Layer</strong></h3>
<ul>
<li>Combines OSI's <strong>Data Link</strong> and <strong>Physical</strong> layers to manage the actual data transmission.</li>
</ul>
<h2 id="heading-devops-protocols-amp-ports">🔗 DevOps Protocols &amp; Ports</h2>
<p>Different network services use <strong>specific protocols and port numbers</strong> to communicate. Some of the most important ones in DevOps include:</p>
<ul>
<li><p><strong>HTTP/HTTPS (80/443)</strong> – Loads websites securely.</p>
</li>
<li><p><strong>FTP (21)</strong> – Transfers files between systems.</p>
</li>
<li><p><strong>SSH (22)</strong> – Secure remote login to servers.</p>
</li>
<li><p><strong>DNS (53)</strong> – Converts domain names (like <a target="_blank" href="http://google.com">google.com</a>) into IP addresses.</p>
</li>
</ul>
<p>These protocols keep <strong>applications running smoothly and securely</strong> across networks!</p>
<h2 id="heading-aws-ec2-amp-security-groups-cloud-basics">☁️ AWS EC2 &amp; Security Groups – Cloud Basics</h2>
<p>AWS <strong>EC2</strong> lets you create a <strong>virtual server</strong> in the cloud. But security matters!</p>
<ul>
<li><p><strong>Security Groups</strong> act like firewalls, controlling access to your cloud instance.</p>
</li>
<li><p>They <strong>define rules</strong> for what kind of traffic can enter or leave your server.</p>
</li>
</ul>
<p>By setting up <strong>security rules</strong>, you ensure your cloud environment is <strong>safe and efficient</strong></p>
<h2 id="heading-essential-networking-commands">🔍 Essential Networking Commands</h2>
<p>DevOps engineers often <strong>use commands</strong> to check connectivity, troubleshoot networks, and interact with servers. Here are some useful ones:</p>
<ul>
<li><p><strong>ping</strong> – Tests if a system is reachable.</p>
</li>
<li><p><strong>traceroute / tracert</strong> – Tracks how data moves across networks.</p>
</li>
<li><p><strong>netstat</strong> – Shows active network connections.</p>
</li>
<li><p><strong>curl</strong> – Sends HTTP requests via the command line.</p>
</li>
<li><p><strong>dig / nslookup</strong> – Looks up domain names and IPs.</p>
</li>
</ul>
<p>These commands help <strong>diagnose and optimize</strong> network performance!</p>
]]></content:encoded></item></channel></rss>