πŸš€ My DevOps Journey β€” Week 5: Scripting, Projects & Deepening Linux Mastery

Anandhu P AAnandhu P A
6 min read

πŸš€ My DevOps Journey β€” Week 5: Scripting, Projects & Deepening Linux Mastery


πŸ—“οΈ Day 1: Shell Scripting for Beginners β€” Finished in a Day!

Week 5 kicked off with a swift start: I completed the entire Shell Scripting for Beginners course by KodeKloud β€” in just one day.

Sounds fast, right? Here's why...


πŸ‘¨β€πŸ’» Why It Felt Easy for Me

Honestly, the course was quite simple β€” not because the content was shallow (it wasn’t), but because of my past experience. I already had programming exposure from:

  • C (my first love in logic building)

  • Java (object-oriented grounding)

  • Basic Python (scripting comfort)

  • Even Flutter app development (for mobile UIs)

So this course was more about adjusting to Bash syntax than learning programming logic from scratch.


πŸ“œ What I Practiced:

  • Variables and dynamic substitution

  • Command-line arguments and user input

  • Loops and conditions

  • Functions to modularize my logic

  • Exit codes and basic error handling

  • Reading external files and validating status

  • Arithmetic using expr, $(( )), and bc


πŸ› οΈ E-Commerce Automation Script (My β€œStupid Me” Moment)

The final project was to automate a LAMP stack deployment.

I initially wrote a working script with just sequential Linux commands. It ran fine, but lacked all the scripting concepts I'd just learned β€” no loops, no functions, no validations. It was embarrassing.

β€œI just used Linux basics in a shell scripting course?”

After watching the solution, I rewrote it entirely:
βœ… Functions
βœ… Service checks
βœ… Firewall setup
βœ… SQL generation
βœ… Color output
βœ… Exit codes

That moment hit hard β€” it taught me that working scripts aren’t always good scripts.


πŸ›‘οΈ Day 2: My First Linux Project β€” Secure Server Setup (Small but Foundational)

I applied everything I learned in Day 1 by building my first practical Linux project: a secure Ubuntu server setup from scratch.


πŸ” What I Implemented:

  • πŸ‘€ Admin user configuration + sudo access

  • πŸ”’ SSH hardening with custom port and key-based login

  • πŸ”₯ UFW firewall setup (allow SSH, deny all)

  • πŸ’½ LVM setup: mounted /data + 1GB swap

  • 🌐 Static IP setup and hostname config

  • πŸ“ˆ Monitoring tools: htop, iostat, ncdu, etc.

All of it was written using modular Bash scripts!


πŸ“ Project Structure

linux-projects/
└── server-secure-setup/
    β”œβ”€β”€ scripts/
    └── notes/

I scripted everything β€” from user creation to LVM to monitoring.

✨ Highlights:

  • Learned how to structure reusable .sh scripts

  • Restarted SSH multiple times (yes, I forgot the port once πŸ˜…)

  • Used systemctl, mkfs, mount, ufw, and more β€” all in automation

  • Realized how much I retained from handwritten notes

πŸ“Œ These projects were suggested to me by ChatGPT as a way to reinforce LFCS-level concepts through practice.
πŸ“„ I wrote every script myself, but got help from ChatGPT for creating the README.md, planning.md, and commands-used.md files to keep the documentation clean and professional.


πŸ’½ Day 3: Linux Storage & Performance Lab (ACL + Partitions + Metrics)

On Day 3, I dove deeper into Linux storage, partitioning, permissions, and system diagnostics.


πŸ”§ What I Worked On:

1️⃣ Partitioning & Mounts

  • Created two partitions on /dev/sdb

  • Formatted with ext4 and xfs

  • Mounted them to /mnt/data1 and /mnt/data2

  • Made mounts persistent via /etc/fstab

🧠 I struggled trying to reuse /dev/sdb from Project 1. The LVM wasn’t properly wiped, and I had to use lvremove, vgreduce, pvremove, and wipefs.
It took a mix of Googling, ChatGPT, and my notes to fix it. A real debugging experience.

2️⃣ LVM Setup

  • Added a new disk /dev/sdc

  • Created PV ➝ VG ➝ LV

  • Mounted /mnt/lvdata and made it persistent

3️⃣ ACL Setup

  • Used setfacl and getfacl for fine-grained user permissions

  • Tested access between users

  • Learned how ACLs work on top of standard permissions

4️⃣ User Limits

  • Configured soft and hard limits for nofile using /etc/security/limits.conf

  • Validated limits using ulimit and su

5️⃣ Performance & Stress Testing

  • Tools used: iostat, htop, pidstat, du, stress

  • Ran stress tests and watched the system metrics spike in real time


πŸ“ Project Structure

linux-projects/
└── storage-performance-lab/
    β”œβ”€β”€ scripts/
    └── notes/

πŸ“Œ Again, documentation and markdown files were created with ChatGPT’s help β€” keeping everything neat and consistent.


βš™οΈ Day 4: DevOps-Ready Linux Box β€” Cron Jobs, Log Rotation, System Hygiene

On Day 4, I tackled scheduled jobs and log rotation β€” foundational automation for real-world Linux boxes.


πŸ•°οΈ What I Implemented:

1️⃣ Cron Jobs

  • Created a daily cron job to back up /mnt/data1 to /mnt/data2

  • Wrote a cron-jobs.sh script to install the job

  • Verified using crontab -l and /var/log/syslog

2️⃣ Logrotate Configuration

  • Configured a custom log file (/var/log/project4.log)

  • Used logrotate.d/ to set rotation frequency, size limits, and compression

  • Triggered and tested log rotation manually

πŸ“Œ This was a smaller project, but still critical β€” and it made me appreciate the β€œmaintenance” side of Linux.


πŸ“ Project Folder:

linux-projects/
└── devops-ready-box/
    β”œβ”€β”€ scripts/
    β”‚   β”œβ”€β”€ cron-jobs.sh
    β”‚   └── logrotate.sh
    └── notes/

🧠 This day reminded me that not every project has to be huge β€” sometimes, a simple automation script can make a system reliable over months.

πŸ“š Day 5: Documentation, GitHub Push, and Final Reflections

Today, I wrapped up Week 5 by cleaning up and pushing all my work to GitHub β€” and it felt incredibly satisfying.

Here’s what I focused on:


πŸ“ Organized My Repository

My main repo, linux-projects, now contains all completed projects with a clean structure:

linux-projects/
β”œβ”€β”€ server-secure-setup/
β”œβ”€β”€ storage-performance-lab/
└── devops-ready-linux-box/

Each project has:

  • scripts/ folder with modular .sh files

  • notes/planning.md documenting the thought process

  • notes/commands-used.md for all CLI used

  • README.md explaining objectives and usage


πŸ“ Finalized README Files

I revised and polished all the README.md files for each project. Thanks to ChatGPT, they follow a clear and professional format with:

  • Overview

  • How to run

  • Tools used

  • Folder structure


✍️ Planning and Commands Notes

Every project now includes:

  • planning.md β€” where I described why I structured things the way I did

  • commands-used.md β€” a handy reference of one-liners and CLI utilities used during testing

This helps future me (and maybe others!) to understand how everything was built.


πŸ” Final Commit & Push

After double-checking that every script was executable and every config file well documented, I did my final commit of the week:

git add .
git commit -m "week-5 added"
git push origin main

The repo now acts as my Linux project portfolio, and I’ll be building on top of it in Week 6 and beyond.


This final day might not seem as β€œtechnical” as the others β€” but honestly, organizing your work is a DevOps skill.

  • βœ… Writing reusable code

  • βœ… Documenting setup logic

  • βœ… Structuring folders

  • βœ… Keeping history clean

It’s what transforms practice projects into real, presentable proof of skill.


βœ… Week 5 is now complete.

Thanks to ChatGPT for guiding me through project ideas, helping document them clearly, and answering all my doubts as I went.
And thanks to my own discipline β€” showing up daily, debugging when stuck, and building one project at a time.

🧠 Knowledge retained through:

  • My own handwritten notes

  • Trial and error

  • Googling a lot

  • And yes, ChatGPT

⏭️ Next week, I'm planning to go deep into Bash scriptingβ€”not just loops and conditionals, but really mastering shell automation, traps, signals, functions, and error handling. I’d love to start learning Python tooβ€”especially with DevOps automation in mind.

The learning continues! πŸ‘¨β€πŸ’»

πŸ“Œ GitHub Repository: GitHub
🧾 Blog Archive: Blog
πŸ”— LinkedIn: Anandhu P A

0
Subscribe to my newsletter

Read articles from Anandhu P A directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Anandhu P A
Anandhu P A

I’m an aspiring DevOps Engineer with a strong interest in infrastructure, automation, and cloud technologies. Currently focused on building my foundational skills in Linux, Git, networking, shell scripting, and containerization with Docker. My goal is to understand how modern software systems are built, deployed, and managed efficiently at scale. I’m committed to growing step by step into a skilled DevOps professional capable of working with CI/CD pipelines, cloud platforms, infrastructure as code, and monitoring tools