Skip to content

About

Full-stack DevOps CI/CD pipeline with Docker, Kubernetes, Terraform (IaC), GitHub Actions automation, and a Gemini AI-powered deployment log summarizer. Real-time pipeline dashboard.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

26 Commits

Folders and files

Repository files navigation

πŸ—οΈ CloudForge β€” End-to-End DevOps Pipeline.

Push code β†’ Auto-build β†’ Auto-test β†’ Auto-deploy β†’ AI-powered monitoring
Zero manual steps. Zero cost. Production-grade DevOps.

Status Docker Kubernetes Terraform CI/CD


πŸ“‹ What Is This?

CloudForge is a complete DevOps pipeline that demonstrates every major concept a DevOps engineer needs to know:

  • βœ… Containerization β€” Docker multi-stage builds
  • βœ… Infrastructure as Code β€” Terraform provisioning
  • βœ… Container Orchestration β€” Kubernetes on Minikube
  • βœ… CI/CD β€” GitHub Actions automated pipeline
  • βœ… Zero-downtime deploys β€” Kubernetes rolling updates
  • βœ… Monitoring Dashboard β€” Real-time build/deploy visibility
  • βœ… AI-powered log analysis β€” Gemini API integration

Everything runs on free tools β€” no cloud bills, no credit cards.


πŸ—οΈ Architecture

graph TB
    DEV[πŸ‘¨β€πŸ’» Developer] -->|git push| GH[GitHub Repository]
    
    GH -->|trigger| CI[πŸ”„ GitHub Actions CI]
    CI -->|lint + test| TEST[βœ… Jest Tests]
    CI -->|build| DOCKER[🐳 Docker Build]
    DOCKER -->|push| GHCR[πŸ“¦ GitHub Container Registry]
    
    GHCR -->|trigger| CD[πŸš€ GitHub Actions CD]
    CD -->|deploy| RENDER[🌐 Render - Live URL]
    CD -->|deploy| K8S[☸️ Kubernetes - Minikube]
    
    K8S -->|runs| POD1[Pod 1]
    K8S -->|runs| POD2[Pod 2]
    K8S -->|auto-scale| HPA[HPA 2-5 pods]
    
    POD1 -->|serves| API[πŸ“Š Express API]
    POD2 -->|serves| API
    API -->|stores| DB[(PostgreSQL)]
    API -->|serves| UI[πŸ–₯️ Dashboard UI]
    
    API -->|logs| AI[πŸ€– Gemini AI Summarizer]
    
    TF[πŸ“ Terraform] -->|provisions| LS[LocalStack - AWS Sim]
    LS -->|creates| S3[S3 Bucket]
    LS -->|creates| DDB[DynamoDB Table]
    LS -->|creates| IAM[IAM Role]
    
    style DEV fill:#F0FDFA,stroke:#14B8A6
    style CI fill:#EFF6FF,stroke:#3B82F6
    style CD fill:#ECFDF5,stroke:#10B981
    style K8S fill:#EFF6FF,stroke:#326CE5
    style RENDER fill:#ECFDF5,stroke:#10B981
    style AI fill:#FFF7ED,stroke:#F59E0B
    style TF fill:#F5F3FF,stroke:#7B42BC
Loading

πŸš€ Quick Start

Prerequisites

Tool Version Install
Node.js β‰₯ 18 nodejs.org
Docker Desktop β‰₯ 20 docker.com
Terraform β‰₯ 1.0 winget install Hashicorp.Terraform
Minikube β‰₯ 1.30 winget install Kubernetes.minikube
kubectl β‰₯ 1.28 Included with Docker Desktop
Git β‰₯ 2.0 git-scm.com

1. Run Locally (No Docker)

cd app/backend
npm install
npm start
# Dashboard at http://localhost:3000

2. Run with Docker

# Build the image
docker build -t cloudforge:latest .

# Run the container
docker run -p 3000:3000 cloudforge:latest
# Dashboard at http://localhost:3000

3. Run with Docker Compose (App + LocalStack)

docker compose up
# App at http://localhost:3000
# LocalStack at http://localhost:4566

4. Deploy to Kubernetes (Minikube)

# Start Minikube
minikube start --driver=docker

# Load image into Minikube
minikube image load cloudforge:latest

# Apply manifests
kubectl apply -f k8s/namespace.yaml
kubectl apply -f k8s/deployment.yaml
kubectl apply -f k8s/service.yaml
kubectl apply -f k8s/hpa.yaml

# Get URL
minikube service cloudforge -n cloudforge --url

5. Provision Infrastructure (Terraform + LocalStack)

# Start LocalStack first
docker compose up localstack -d

# Initialize and apply Terraform
cd terraform
terraform init
terraform plan
terraform apply -auto-approve

6. Deploy to Render (Live Public URL)

  1. Push this repo to GitHub
  2. Go to render.com β†’ New β†’ Blueprint
  3. Connect your GitHub repo
  4. Render auto-detects render.yaml and deploys
  5. Your app is live at https://cloudforge-xxxx.onrender.com

7. AI Log Summarizer

# Install Python dependencies
pip install requests python-dotenv

# Set your free Gemini API key
# Get one from https://aistudio.google.com
echo "GEMINI_API_KEY=your_key_here" >> .env

# Run the summarizer
python scripts/ai-summarizer.py
python scripts/ai-summarizer.py --type build

πŸ“ Project Structure

cloudforge/
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ backend/          # Node.js Express API
β”‚   β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”‚   β”œβ”€β”€ server.js       # Entry point
β”‚   β”‚   β”‚   β”œβ”€β”€ routes/api.js   # REST endpoints
β”‚   β”‚   β”‚   β”œβ”€β”€ middleware/     # Helmet, rate-limit, CORS
β”‚   β”‚   β”‚   └── data/store.js  # PostgreSQL database
β”‚   β”‚   └── tests/              # Jest test suite
β”‚   └── frontend/         # Static dashboard UI
β”‚       β”œβ”€β”€ index.html
β”‚       β”œβ”€β”€ css/styles.css
β”‚       └── js/app.js
β”œβ”€β”€ terraform/            # Infrastructure as Code
β”‚   β”œβ”€β”€ provider.tf       # LocalStack provider
β”‚   β”œβ”€β”€ main.tf           # S3, DynamoDB, IAM
β”‚   β”œβ”€β”€ variables.tf
β”‚   └── outputs.tf
β”œβ”€β”€ k8s/                  # Kubernetes manifests
β”‚   β”œβ”€β”€ namespace.yaml
β”‚   β”œβ”€β”€ deployment.yaml   # Rolling updates, health probes
β”‚   β”œβ”€β”€ service.yaml      # NodePort service
β”‚   └── hpa.yaml          # Auto-scaling 2-5 pods
β”œβ”€β”€ .github/workflows/
β”‚   β”œβ”€β”€ ci.yaml           # Build, test, push image
β”‚   └── cd.yaml           # Deploy on CI pass
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ ai-summarizer.py  # Gemini-powered log analysis
β”‚   └── deploy-local.ps1  # Minikube deploy helper
β”œβ”€β”€ Dockerfile            # Multi-stage build
β”œβ”€β”€ docker-compose.yaml   # App + LocalStack
β”œβ”€β”€ render.yaml           # Render deploy config
└── README.md             # You are here

πŸ”’ Security

Layer Protection
HTTP Headers Helmet.js β€” XSS, clickjacking, MIME sniffing
Rate Limiting 100 req/15 min per IP
CORS Whitelisted origins only
Docker Non-root user, Alpine base, multi-stage
Input Validation express-validator on all POST routes
SQL Parameterized queries (no injection)
Secrets .env file, never committed
Dependencies npm audit in CI pipeline

🎀 What to Say in an Interview

Q: Tell me about your project.

"I built CloudForge β€” a complete CI/CD pipeline that automates the entire software delivery process. When I push code to GitHub, it automatically runs linting and tests, builds a Docker image, pushes it to a registry, and deploys it with zero downtime using Kubernetes rolling updates.

The infrastructure is defined as code using Terraform, so I can spin up the entire environment with one command. I also built an AI-powered log analyzer that uses Google's Gemini API to read deployment logs and generate plain-English summaries β€” so anyone on the team can understand what happened without reading raw logs.

Everything runs on free tools β€” Docker, Minikube, LocalStack for AWS simulation, and GitHub Actions for CI/CD. The app is publicly deployed on Render's free tier."

Q: What was the hardest part?

"Getting zero-downtime deploys right. The key was configuring Kubernetes with maxUnavailable: 0 in the rolling update strategy, combined with proper liveness and readiness probes. The liveness probe checks /api/health β€” if it fails 3 times, Kubernetes restarts the container. The readiness probe controls when a pod receives traffic. This ensures users never see downtime during a deploy."

Q: How does the AI part work?

"The AI log summarizer reads raw deployment logs from the PostgreSQL database, formats them into a prompt, and sends them to Google's Gemini API. The API returns a structured summary β€” status, key events, duration, issues found, and recommendations. If the API key isn't configured, it falls back to a local pattern-matching analysis."


πŸ“„ License

Licensed under the CloudForge Non-Commercial License. Commercial use requires written permission.

About

Full-stack DevOps CI/CD pipeline with Docker, Kubernetes, Terraform (IaC), GitHub Actions automation, and a Gemini AI-powered deployment log summarizer. Real-time pipeline dashboard.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages