Skip to content

Repository files navigation

Microservices GitOps Platform

Production-ready cloud-native platform demonstrating GitOps, Progressive Delivery, Distributed Tracing, and Event-Driven Architecture on Kubernetes.

🎯 Overview

Reference implementation featuring:

  • 4 Polyglot Microservices (Node.js, Go, Python) with REST & message queues
  • GitOps via ArgoCD ApplicationSets & App-of-Apps pattern
  • Progressive Delivery with Argo Rollouts (Canary & Blue-Green)
  • Observability via OpenTelemetry, Jaeger & Prometheus
  • Event-Driven architecture with RabbitMQ
  • Interactive Dashboard (React + TypeScript) for monitoring & testing
  • Dual Deployment: Local K3d + Production CSC cPouta OpenStack (via Terraform IaC)
  • Live Production IP: 86.50.229.254 (Floating IP)

📐 Architecture

Interactive Command Center

Microservices Command Center

Real-time platform monitoring, health checks, order creation, and event streaming

System Design

                    Showcase Dashboard (React + TypeScript)
                    ↓
            API Gateway (Node.js:30080) → Prometheus + Deep Health
            ↓           ↓              ↓
    Auth Service  Order Service   Notification Service
    (Go:8081)     (Node.js:8082)  (Python:8083)
                  ↓          ↓             ↑
              PostgreSQL  RabbitMQ --------┘
                         (Event Queue)
    
    Observability: OpenTelemetry → Jaeger + Prometheus
    GitOps: ArgoCD ApplicationSets (App-of-Apps)
    Progressive Delivery: Argo Rollouts (Canary + Blue-Green)
    Infrastructure: CSC cPouta OpenStack VM (Floating IP: 86.50.229.254)

Architecture Layers:

  1. Client: Interactive web dashboard
  2. Application: 4 polyglot microservices with progressive delivery
  3. Infrastructure: PostgreSQL (orders DB) + RabbitMQ (message broker)
  4. Observability: OpenTelemetry, Jaeger, Prometheus, Argo Rollouts
  5. GitOps: ArgoCD with ApplicationSets
  6. CI/CD: GitHub Actions → GHCR container registry
  7. IaC: Terraform (CSC cPouta OpenStack) + K3d (local)

🏗️ Technology Stack

Cloud & Infrastructure: CSC cPouta OpenStack, Terraform, K3d/K3s, ArgoCD, Helm 3, GitHub Actions
Public Floating IP: 86.50.229.254

Microservices:

Service Stack Port Features
api-gateway Node.js + Express 8080 Routing, CORS, health aggregation
auth-service Go + Gin 8081 JWT validation (mock)
order-service Node.js + Express 8082 CRUD, PostgreSQL, RabbitMQ pub, Canary rollout
notification-service Python + FastAPI 8083 RabbitMQ consumer, Blue-green rollout

Data: PostgreSQL 15, RabbitMQ 3.12 (fanout exchange)
Observability: OpenTelemetry, Jaeger, Prometheus, Argo Rollouts
Frontend: React 18 + TypeScript + Vite + Radix UI + Tailwind CSS


🚀 Quick Start

Prerequisites

  • Docker, kubectl, k3d, Helm 3, make
  • Production (CSC cPouta OpenStack): Terraform 1.5+, OpenStack credentials, PowerShell

Local K3d Deployment (5 Stages)

# Stage 1: Create cluster
make cluster-up

# Stage 2: Install ArgoCD
make bootstrap-argocd

# Stage 3: Deploy microservices
kubectl apply -f 02-gitops-core/applicationsets/microservices-applicationset.yaml

# Stage 4: Deploy infrastructure (PostgreSQL, RabbitMQ, Jaeger)
kubectl apply -f 02-gitops-core/applicationsets/infrastructure-applicationset.yaml

# Stage 5: Install Argo Rollouts
bash 05-observability/argo-rollouts/install.sh

# Get ArgoCD password
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d

Production CSC cPouta OpenStack Deployment

cd 01-infrastructure/scripts
.\deploy-k8s-cluster.ps1  # Automated Terraform provisioning + K3s setup on CSC cPouta

Orchestrates: OpenStack Floating IP (86.50.229.254) & Security Groups → K3s installation → ArgoCD → Microservices → Observability


📊 Access & Testing

Endpoints

API Testing (Production Floating IP 86.50.229.254 or localhost):

curl http://86.50.229.254:30080/healthz
curl http://86.50.229.254:30080/api/v1/health/deep | jq
curl -X POST http://86.50.229.254:30080/api/v1/orders -H "Content-Type: application/json" \
  -d '{"item":"Kubernetes Handbook","price":49.99}' | jq
curl http://86.50.229.254:30080/api/v1/orders | jq
curl http://86.50.229.254:30080/api/v1/notifications | jq

Dashboards:

Service Production URL (CSC cPouta) Local URL Credentials
Showcase Dashboard - http://localhost:5173 -
API Gateway http://86.50.229.254:30080 http://localhost:30080 -
ArgoCD Dashboard https://86.50.229.254:30008 https://localhost:30008 admin / [get secret]
Jaeger Tracing http://86.50.229.254:30006 http://localhost:30006 -
RabbitMQ Management http://86.50.229.254:31672 http://localhost:31672 guest / guest

Run Dashboard Locally:

cd 06-showcase-dashboard
npm install && npm run dev

🔄 Progressive Delivery

Canary Rollout (Order Service)

# Trigger canary (20% → 50% → 80% → 100%)
kubectl argo rollouts set image order-service \
  microservice-base=ghcr.io/junaid-sadiq/order-service:v1.1.0 -n default

# Watch live
kubectl argo rollouts get rollout order-service -n default --watch

# Manual promote/abort
kubectl argo rollouts promote order-service -n default
kubectl argo rollouts abort order-service -n default

Automated Analysis: Success rate ≥95%, P95 latency <500ms (Prometheus-based)

Blue-Green Rollout (Notification Service)

# Deploy green environment
kubectl argo rollouts set image notification-service \
  microservice-base=ghcr.io/junaid-sadiq/notification-service:v1.1.0 -n default

# Promote to production
kubectl argo rollouts promote notification-service -n default

# Rollback
kubectl argo rollouts undo notification-service -n default

🔍 Observability

Distributed Tracing: Jaeger UI at http://<ip>:30006 - traces across all services
Metrics: Each service exposes /metrics (Prometheus format)
Logs:

kubectl logs -f deployment/api-gateway -n default
kubectl logs -f deployment/order-service -n default
kubectl logs -f deployment/notification-service -n default

🧪 E2E Testing

# 1. Create order → writes to PostgreSQL, publishes to RabbitMQ
curl -X POST http://localhost:30080/api/v1/orders \
  -H "Content-Type: application/json" -d '{"item":"Test","price":9.99}' | jq

# Response shows pipeline: {"postgresql":"stored","rabbitmq":"published","httpNotification":"SENT"}

# 2. Verify persistence
curl http://localhost:30080/api/v1/orders | jq

# 3. Check notifications (RabbitMQ consumer received event)
curl http://localhost:30080/api/v1/notifications | jq

🛠️ Development

Local Docker Compose:

cd 04-services
docker-compose up -d

Build Custom Image:

cd 04-services/order-service
docker build -t ghcr.io/your-user/order-service:v1.2.0 .
docker push ghcr.io/your-user/order-service:v1.2.0
# Update values.yaml and ArgoCD will sync

CI/CD: GitHub Actions auto-builds on push to main → ghcr.io/junaid-sadiq/*


📚 Key Concepts

  1. GitOps App-of-Apps - Root app manages ApplicationSets for services & infrastructure
  2. Helm Abstraction - Single microservice-base chart, customized via values.yaml
  3. Progressive Delivery - Canary (automated) + Blue-Green (manual promotion)
  4. Event-Driven - RabbitMQ fanout exchange for async communication
  5. Polyglot - Node.js, Go, Python demonstrating language flexibility
  6. Observability as Code - OpenTelemetry auto-instrumentation via env vars

🧹 Cleanup

make cluster-down  # K3d local
cd 01-infrastructure/terraform && terraform destroy -auto-approve  # OpenStack

📖 Resources

About

End-to-end GitOps & Progressive Delivery platform on Kubernetes with polyglot microservices, ArgoCD, Argo Rollouts, OpenTelemetry tracing, RabbitMQ, and a React dashboard

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages