🚀 Building a Mini CI Pipeline Using Bash (From Scratch) Over the past few days, I’ve been deepening my understanding of Linux by moving beyond isolated commands and focusing on practical automation. What started as a simple exercise—parsing log files with grep—evolved into building a structured, pipeline-like workflow using Bash. Here’s what I implemented: 🔹 Input validation to ensure robustness (handling missing/invalid directories) 🔹 Dynamic log scanning across multiple .log files 🔹 Error and warning aggregation using grep and wc 🔹 Identification of recurring issues using: cut → sort → uniq → sort -nr 🔹 Stage-based execution to simulate pipeline behavior: [STAGE 1] → [STAGE 4] 🔹 Status classification (OK / WARNING / CRITICAL) based on thresholds 🔹 Exit codes (0, 1, 2) to represent machine-level decisions 🔹 Dual output handling using tee (terminal + report file) 💡 A key insight from this exercise: There’s a fundamental distinction between: • Human-readable output → “STATUS: WARNING” • Machine-readable signals → exit 1 This is precisely how CI/CD systems determine whether to proceed, warn, or halt execution. ⚠️ One subtle but important lesson: Using tee -a without resetting the file led to duplicated reports — a small oversight, but a valuable reminder of how state management impacts automation reliability. What this project reinforced for me is that: DevOps is not about memorizing tools. It’s about designing workflows, enforcing logic, and enabling systems to make decisions autonomously. Next, I’ll be extending this into a basic alerting system, moving closer to real-world monitoring scenarios. If you’re on a similar path, I’d strongly recommend: Don’t just learn commands — engineer processes with them. #DevOps #Linux #Bash #Automation #CICD #Scripting #LearningInPublic
Building a Mini CI Pipeline with Bash from Scratch
More Relevant Posts
-
🚀 End-to-End Deployment Automation with Bash & Docker I recently worked on a hands-on DevOps challenge where I automated the deployment of a Django Notes application using a Bash script — and it was a great learning experience! 🎯 Objective: Build a complete deployment pipeline using simple Bash scripting. 🛠️ What I implemented: 🔹 Cloned the application repository 🔹 Installed all required dependencies 🔹 Built a Docker image for the application 🔹 Pushed the image to Docker Hub 🔹 Deployed the container on a VM 🔹 Verified the deployment by checking container status 💡 Key Takeaways: ✔️ Learned how to structure Bash scripts for real-world automation ✔️ Improved understanding of Docker workflows (build, tag, push, run) ✔️ Gained practical exposure to deployment on a virtual machine ✔️ Understood how small scripts can simplify repetitive DevOps tasks Thanks Shubham Londhe for the repo "django-notes-app". I am able to deploy this application on my ubuntu-server VM. It was a good learning experience. 😊 #DevOps #BashScripting #Docker #Automation #CloudComputing #Linux
To view or add a comment, sign in
-
Day 17 of learning and practicing DevOps 🔁 Today I Practiced more on my shell scripting skills Worked on: • Writing for and while loops • Using command-line arguments like $1, $@, $# • Automating package installation using scripts • Adding basic error handling with set -e and || Important part: Building a script that checks and installs packages automatically — this felt like something actually used in real setups. Also made a small mistake in my script ($pkg vs $pkgs) — fixed it and learned. learning today --> It’s about making things reliable, reusable, and error-safe. Here are my notes: https://lnkd.in/gP8KEVcE 📍 #DevOps #Linux #ShellScripting #Automation #LearningInPublic #90DaysOfDevOps #TrainWithShubham
To view or add a comment, sign in
-
Day 21 of learning and practicing DevOps 🔁 Today was a #revision + consolidation day — built my own Shell Scripting Cheat Sheet I focused on organizing everything from the last few days for shell scripting Covered: • Script basics (shebang, variables, arguments) • Conditions, loops, and functions • Text processing tools like grep, awk, sed • Error handling (set -e, $?, debugging) • Useful one-liners I can use in real scenarios many more...... Important part: Writing a cheat sheet made me realize what I actually understand vs what I just “used once”. This cheat sheet will be something I can refer to anytime during scripting or debugging. Here are my notes: https://lnkd.in/gzXn3Jrv 📍 #DevOps #Linux #ShellScripting #Automation #LearningInPublic #90DaysOfDevOps #TrainWithShubham
To view or add a comment, sign in
-
🚀 Getting Started with Command Line (CLI) – A Beginner’s Guide (with Examples) Today, I explored the fundamentals of the Command Line Interface (CLI) — a powerful way to interact with systems using simple text-based commands. 💻 Key Concepts I Learned: 🔹 User Interfaces GUI (Graphical User Interface) – Visual interaction CLI (Command Line Interface) – Text-based control with powerful commands 🔹 Shell & Terminal Shell acts as a command interpreter Terminal is where we execute commands Popular shells: bash, zsh, sh, ksh 🔹 Essential Commands (with examples) ls → List files & directories 👉 Example: ls whoami → Shows current user 👉 Example: whoami history → Displays command history 👉 Example: history clear → Clears terminal 👉 Example: clear alias → Create shortcut 👉 Example: alias cls='clear' unalias → Remove shortcut 👉 Example: unalias cls exit → Close terminal 👉 Example: exit 📂 Working with Files (with examples) touch → Create a file 👉 Example: touch practice.txt cat → View file content 👉 Example: cat practice.txt echo → Print or write text 👉 Example: echo "Hello World" 👉 Write to file: echo "Hello World" > practice.txt mv → Rename or move file 👉 Example: mv practice.txt exam.txt cp → Copy file 👉 Example: cp exam.txt backup.txt rm → Delete file 👉 Example: rm exam.txt ls -a → Show hidden files 👉 Example: ls -a ✨ Why CLI? Faster than GUI More control over system Essential for developers, DevOps & system admins This is just the beginning of my journey into the command line world. Excited to explore more! 🔥 NxtWave #CommandLine #Linux #Bash #Programming #LearningJourney #TechSkills #Developers#FullstackDevelopement
To view or add a comment, sign in
-
-
Day 20 of #90DaysOfDevOps 💻🔥 Today I built a Log Analyzer using Bash scripting — stepping closer to real-world DevOps tasks. ✔ Processed log files using shell scripts ✔ Counted ERROR / FAILED events ✔ Extracted CRITICAL issues with line numbers ✔ Identified top error patterns ✔ Generated a summary report automatically 💡 Biggest learning: Logs are gold — understanding them helps in debugging and system reliability. ⚡ Real-world DevOps use: Log analysis is used in monitoring systems, incident debugging, and alerting pipelines. From scripts → to insights 🚀 #DevOps #Linux #ShellScripting #Automation #Logging #90DaysOfDevOps
To view or add a comment, sign in
-
Day 18 of learning and practicing DevOps 🔁 Today I focused on writing clean and reusable shell scripts. Worked on: • Writing functions to organize code • Using set -euo pipefail for safer scripts • Understanding local vs global variables • Building a system info script using multiple functions Important part: Learning strict mode — scripts should fail fast instead of silently breaking. This is actually a best practice in production scripting (OneUptime). learning today == good scripts are not just working scripts. They should be clean, reusable, and safe from hidden errors. Here are my notes: https://lnkd.in/gesnUbVx 📍 #DevOps #Linux #ShellScripting #Automation #LearningInPublic #90DaysOfDevOps #TrainWithShubham
To view or add a comment, sign in
-
LEARNING KUBERNETES: A STEP-BY-STEP ROADMAP Phase 1: Foundations The journey begins with the absolute essentials. Before touching Kubernetes, you must understand Container Basics (Docker), Linux Fundamentals, and general Networking Concepts. It’s the "bedrock" of the entire ecosystem. Phase 2: Understand K8s Architecture This section visualizes the internal "brain" of Kubernetes. It highlights the Control Plane (Master Node) with components like the API Server, ETCD, and Scheduler, and how they interact with Worker Nodes containing Kubelets and Pods. Phase 3: Deploy & Manage Transitioning from theory to practice. This phase focuses on the tools used to interact with the cluster: * kubectl Commands: The primary CLI tool. * YAML Manifests: Defining your infrastructure as code. * Helm: Managing complex applications with "charts." Phase 4: Core Concepts Here, the roadmap dives into the "heavy lifting" of orchestration: * Networking: Ingress and DNS. * Storage: Persistent Volumes (PVs) and Claims (PVCs). * Configuration: Using Secrets and ConfigMaps to manage environment settings. Phase 5: Advanced Topics The final stretch for production-ready environments. This covers Observability (monitoring and logging), Security (RBAC and Network Policies), and CI/CD integration using tools like ArgoCD or Jenkins to automate the entire lifecycle. #Kubernetes #DevOps #CloudNative #LearningPath
To view or add a comment, sign in
-
-
🚀 Debugging a small issue that taught me a bigger DevOps lesson While working on my Flask-based Status API and setting up a CI pipeline with GitHub Actions, I ran into an issue that looked simple on the surface but made me think deeper about environments. I was trying to create the .github/workflows directory using a command I had seen commonly used: mkdir -p .github/workflows It kept failing with a syntax error. At first, I thought I had made a typo, but the real issue was more subtle — I was running this on Windows CMD, where that syntax doesn’t work the same way as in Linux. After digging into it, I fixed it by explicitly creating the directory structure: mkdir .github mkdir .github\workflows This small fix made me realize something important: DevOps is not just about tools like Docker or CI/CD pipelines, but about understanding how different environments behave and how small assumptions can break automation. 🔹 What this project covers: - Flask-based API with structured JSON responses - Dockerfile for containerizing the application - GitHub Actions pipeline triggered on every push - Automated dependency installation and Docker image build - Basic monitoring exposure using a /metrics endpoint 🔹 Key takeaway: Even a minor issue like directory creation can break an entire CI pipeline if the structure is not exactly what the system expects (.github/workflows in this case). Attention to detail really matters in automation. Still building, still learning — focusing on getting the fundamentals right. 🔗 Project Repo: https://lnkd.in/gCfZZM4M #DevOps #CI #Docker #GitHubActions #Python #Flask #LearningInPublic
To view or add a comment, sign in
-
𝗜 𝗷𝘂𝘀𝘁 𝗿𝗲𝗹𝗲𝗮𝘀𝗲𝗱 𝗺𝘆 𝗗𝗼𝗰𝗸𝗲𝗿 𝗖𝗼𝗺𝗺𝗮𝗻𝗱 𝗥𝗲𝗳𝗲𝗿𝗲𝗻𝗰𝗲 𝗠𝗮𝗻𝘂𝗮𝗹 A cheat sheet built for engineers who are tired of Googling the same flags over and over. Here's what's inside: 📦 Part 1 — Container Lifecycle Every command you need to run, create, exec into, stop, kill, restart, pause, list, remove, rename, update, and copy containers — with flags organized by skill level (Beginner → Intermediate → Advanced). 📊 Part 2 — Logs & Monitoring Complete flag breakdowns for docker logs, docker stats (with a full column reference), docker inspect with real Go template examples, plus docker top, docker events, and docker system df. ⚡ Quick Reference Tables At-a-glance command tables so you never have to dig through docs mid-deployment. 🧠 10 Key Takeaways The core principles every engineer should internalize to actually understand what Docker is doing under the hood — not just copy-paste commands. Whether you're just getting started with containers or you're managing production workloads daily, this reference will save you time. #Docker #DevOps #SoftwareEngineering #Containers #Linux #CloudNative #Programming #CheatSheet
To view or add a comment, sign in
-
#️⃣ 1️⃣ Get Intimate with Your Shell 🐧 0️⃣ If you're doing any serious scripting, there’s a hard truth you need to accept: you can't just copy-paste your way through forever. You need to intimately know your shell. 🐚 1️⃣ I see a lot of engineers dive into writing automation without checking what environment they're actually executing in. 2️⃣ Is it bash ❓ ➡️ Probably. It’s the undisputed workhorse of the Linux world. But if you’re doing local dev on a modern Mac, you’re likely dropping into zsh. And if you're working with lightweight Docker containers (like Alpine) or legacy systems, you might find yourself face-to-face with sh—the direct lineage of the ancient, original Thompson shell. ⁉️ Why does this matter ❔ Because portability is everything. ➡️ What works effortlessly in bash (like arrays or specific parameter expansions) will often blow up your script in sh. If you're writing automation for CI/CD pipelines, cron jobs, or container entrypoints, assuming you have bash when you only have a barebones sh is a guaranteed recipe for a failed build. 3️⃣ Take the time to understand the nuances: 👉 Check your shebangs (#!/bin/bash vs #!/bin/sh). 👉 Know when to write strict, POSIX-compliant code for maximum portability across environments. 👉 Know when it’s safe to lean into the rich, modern features of zsh or bash. 4️⃣ Mastering your shell doesn't just make you a faster typist; it makes your scripts vastly more robust, your pipelines more reliable, and your debugging sessions a lot shorter. ⁉️ What’s your daily driver ❔ Are you team Bash, Zsh, or do you prefer something entirely different like Fish? ‼️ Let me know below. 👇 #Linux #DevOps #ShellScripting #Bash #Zsh #Automation #SoftwareEngineering #TechTips
To view or add a comment, sign in
Explore related topics
- How to Understand CI/CD Processes
- CI/CD Pipeline Optimization
- DevOps Principles and Practices
- How to Optimize DEVOPS Processes
- Secure DevOps Practices
- Integrating DevOps Into Software Development
- Key Skills for a DEVOPS Career
- Tips for Continuous Improvement in DevOps Practices
- DevOps Engineer Core Skills Guide
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development
Excellent