Skip to main content

Command Palette

Search for a command to run...

πŸš€ DevSecOps Journey β€” Day 20

Updated
β€’3 min read
πŸš€ DevSecOps Journey β€” Day 20

Introduction to CI/CD & Jenkins Architecture (Hands-on Foundations)

After completing build tools, 2-tier & 3-tier applications, and NGINX, I’ve now moved into the heart of DevOps: CI/CD (Continuous Integration & Continuous Delivery).

This is where automation meets reliability, and where modern software delivery truly begins.


πŸ”„ What is CI/CD? (Simple Explanation)

CI/CD is a pipeline of automated steps that ensures code is always ready for deployment.

A typical CI/CD flow looks like:

Code β†’ Tests β†’ Security Checks β†’ Build β†’ Deploy β†’ Monitor

Each stage validates the code before moving forward, reducing failures in production.


🎯 Why CI/CD Is So Important

CI/CD helps organizations achieve:

  • βš™οΈ Automation – Less manual work

  • πŸ“œ Tracking & History – Every change is recorded

  • πŸ§ͺ Early Testing – Bugs caught before deployment

  • πŸ” Security Checks – Safer releases

  • πŸš€ Faster Deployments – Release with confidence

  • πŸ“ˆ Continuous Monitoring – Faster feedback loops

Because of CI/CD, code remains deploy-ready at all times.


πŸ”Ή Jenkins

  • Requires manual setup & maintenance

  • Runs on self-managed VMs

  • Uses Groovy for pipeline scripting

  • Highly customizable and widely adopted

πŸ”Ή GitHub Actions

  • Minimal setup effort

  • Free hosted runners available

  • Uses YAML workflows

  • Tight integration with GitHub repos

πŸ”Ή GitLab CI

  • Minimal setup effort

  • Free shared runners

  • Uses YAML

  • Built-in CI/CD experience

Each tool solves CI/CD differently, but Jenkins remains a core enterprise tool.


βš™οΈ Getting Started with Jenkins

Before running Jenkins:

  • β˜• Java must be installed on the server/VM

🧱 Jenkins Architecture: Master–Agent Model

❌ Single Master Problem

If a single Jenkins master:

  • Runs Jenkins itself

  • Executes large pipelines (15–20 stages)

  • Has limited resources (e.g., 4GB RAM, 2 vCPU)

It can lead to:

  • Pipeline hangs

  • Failed jobs

  • ❗ Error 137 (Out of Memory)


βœ… Master–Agent Solution

  • Jenkins Master manages jobs & UI

  • Jenkins Agents (Slaves) execute pipelines

  • Workload is distributed across multiple VMs

πŸ“ˆ Result:

  • Better performance

  • No memory bottlenecks

  • Scalable CI/CD setup


🧩 Jenkins Job Types

Jenkins supports multiple job types:

  • 🧱 Freestyle Jobs – Simple, UI-based tasks

  • πŸ” Pipeline Jobs – Code-defined pipelines

  • 🌿 Multibranch Pipelines – Auto-detect branches

Each is used depending on project complexity.


πŸ›  Jenkins Configuration Areas (Explored)

βš™οΈ System

  • Global server settings

  • Email notifications

  • Tool integrations

πŸ”Œ Plugins

  • Extend Jenkins capabilities

  • Git, Maven, Docker, Node, etc.

  • Older Java versions & third-party tools

🧰 Tools

  • Java versions

  • Maven / Node / Gradle

  • Configured globally

πŸ–₯ Nodes

  • Configure agent machines

  • Distribute workload

☁️ Cloud

  • Docker containers

  • Kubernetes pods

πŸ” Credentials

  • Secure storage for:

    • Usernames

    • Passwords

    • Tokens

    • SSH keys

πŸ‘₯ Users & RBAC

  • Role-based access control

  • Secure Jenkins access


🎯 Why This Matters for DevOps / DevSecOps

Understanding CI/CD tools and Jenkins internals helps with:

  • Designing scalable pipelines

  • Secure secret handling

  • Efficient build execution

  • Zero-downtime deployments

  • Enterprise-grade automation

This is core DevOps engineering knowledge.


βœ… Day 20 Summary

Today I learned:

  • What CI/CD is and why it matters

  • Typical CI/CD pipeline stages

  • Comparison of Jenkins, GitHub Actions & GitLab CI

  • Jenkins Master–Agent architecture

  • Job types in Jenkins

  • Core Jenkins configuration areas

This lays the foundation for real pipeline implementation and automation.


➑️ Coming Next:
Hands-on demos of:

  • Freestyle Jobs

  • Pipeline Jobs

  • Multibranch Pipelines in Jenkins