Releases: kmadsdev/devops-challenge
Releases · kmadsdev/devops-challenge
v1.0.0
DevOps Challenge - Release v1.0.0
Release Date: December 29, 2025
Overview
This release represents a complete microservices-based application demonstrating modern DevOps practices and cloud-ready architecture. Built as a technical challenge for Jr DevOps/SRE Engineers, the project showcases containerization, service orchestration, and distributed system design principles.
Architecture
The application implements a microservices architecture with service segregation and network isolation:
┌─────────────┐
│ Client │
└──────┬──────┘
│
↓
┌─────────────┐ Frontend Network
│ Web Service │────────────────┐
│ (Node.js) │ │
└──────┬──────┘ │
│ │
│ Backend Network │
├───────────────────────┘
│
├──────────────┬──────────────┐
↓ ↓ ↓
┌──────────┐ ┌──────────┐ ┌──────────┐
│ Reader │ │ Writer │ │ Redis │
│ (Go) │ │ (Python) │ │ DB │
└──────────┘ └──────────┘ └──────────┘
Architecture Components
1. Frontend Service (Node.js)
- Single Page Application (SPA) serving static content
- Communicates with backend microservices via REST APIs
- Port:
5000 - Network:
frontend,backend
2. Reader Service (Go)
- Microservice responsible for data retrieval operations
- Reads from Redis database using the
SHAREDKEY - Implements health check endpoint
- CORS-enabled for cross-origin requests
- Port:
8082 - Network:
backend
3. Writer Service (Python)
- Microservice handling data persistence operations
- Writes data to Redis database
- Provides write endpoint with error handling
- CORS-enabled for cross-origin requests
- Port:
8083 - Network:
backend
4. Redis Database
- In-memory data store for shared state
- Used as the central data repository
- Port:
6379 - Network:
backend
Network Segmentation
- Frontend Network: Isolates web service public-facing components
- Backend Network: Secures internal service communication and database access
- Web service bridges both networks for controlled access
Technology Stack
Languages
| Language | Version | Service | Purpose |
|---|---|---|---|
| JavaScript | ES6+ | Frontend | Client-side application |
| Node.js | Latest | Frontend | Static file serving |
| Python | 3.x | Writer | Data persistence service |
| Go | 1.x | Reader | Data retrieval service |
Frameworks & Libraries
- Frontend:
- Bootstrap 4.1.0 (UI framework)
- Vanilla JavaScript (SPA routing)
servepackage (static file server)
- Backend:
- Go:
go-redis/redis/v8,rs/cors - Python:
redis, nativehttp.server
- Go:
Infrastructure
- Containerization: Docker
- Orchestration: Docker Compose
- Database: Redis Alpine
- Web Server: Node.js serve
DevOps Checklist
Containerization
- Multi-service Docker setup with individual Dockerfiles per service
- Docker Compose orchestration for local development and testing
- Optimized images using Alpine Linux where applicable
- Service isolation through container networking
Services:
- web (frontend)
- reader (Go service)
- writer (Python service)
- redis (data store)
Networks:
- frontend (public-facing)
- backend (internal services)
Infrastructure as Code
- Docker Compose YAML for declarative infrastructure
- Environment-agnostic configuration
- Port mapping for external access
- Network policies for security
Development Workflow
# Build all services
docker compose build
# Start application stack
docker compose up --build
# Access application
http://localhost:5000Microservices Implementation
Service Independence
Each microservice is:
- Independently deployable with its own Dockerfile
- Technology-agnostic - different languages per service
- Single-responsibility - focused on one domain
- Loosely coupled - communicates via REST APIs
API Endpoints
Reader Service (:8082)
GET /health- Service health checkGET /data- Retrieve data from Redis
Writer Service (:8083)
GET /health- Service health checkPOST /write- Write data to Redis
Frontend Service (:5000)
GET /- Serve SPA#home,#reader,#writer- Client-side routing
Inter-Service Communication
- Protocol: HTTP/REST
- CORS: Enabled for all services
- Error Handling: Graceful degradation with user feedback
- Health Checks: Implemented for service monitoring
Future Cloud Architecture
Container Orchestration
- Kubernetes for production orchestration
- Deployment manifests for each service
- Service discovery via Kubernetes DNS
- Horizontal Pod Autoscaling (HPA)
- ConfigMaps and Secrets management
Cloud Infrastructure (Proposed)
┌──────────────────────────────────────────────────┐
│ Load Balancer / Ingress │
└────────────────────┬─────────────────────────────┘
│
┌───────────┴───────────┐
↓ ↓
┌─────────────────┐ ┌─────────────────┐
│ Frontend Pods │ │ API Gateway │
│ (Replicated) │ │ (Optional) │
└─────────────────┘ └────────┬────────┘
│
┌───────────┼───────────┐
↓ ↓
┌──────────────┐ ┌──────────────┐
│ Reader Pods │ │ Writer Pods │
│ (Replicated) │ │ (Replicated) │
└──────┬───────┘ └──────┬───────┘
│ │
└───────────┬───────────┘
↓
┌─────────────────────┐
│ Managed Redis │
│ (ElastiCache/Cloud) │
└─────────────────────┘
Proposed Cloud Services
AWS Implementation:
- EKS (Elastic Kubernetes Service) - Container orchestration
- ECR (Elastic Container Registry) - Docker image repository
- ElastiCache (Redis) - Managed Redis service
- ALB (Application Load Balancer) - Traffic distribution
- CloudWatch - Logging and monitoring
- IAM - Security and access control
- VPC - Network isolation
Alternative Cloud Providers:
- GCP: GKE, Cloud Memorystore, Cloud Load Balancing
- Azure: AKS, Azure Cache for Redis, Azure Load Balancer
CI/CD Pipeline (Planned)
┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐
│ Code │───▶│ Build │───▶│ Test │───▶│ Deploy │
│ Commit │ │ Images │ │ Services │ │ to K8s │
└──────────┘ └──────────┘ └──────────┘ └──────────┘
Pipeline Stages:
- Source Control: GitHub/GitLab integration
- Build: Docker image creation per service
- Test: Unit tests, integration tests, health checks
- Scan: Security scanning (Trivy, Snyk)
- Push: Upload images to container registry
- Deploy: Rolling updates to Kubernetes
- Monitor: Health checks and observability
Proposed Tools:
- GitHub Actions / GitLab CI - Pipeline automation
- ArgoCD / Flux - GitOps deployment
- Helm - Kubernetes package management
- Prometheus + Grafana - Metrics and visualization
- ELK Stack / Loki - Centralized logging
Scalability Enhancements
- Horizontal scaling for reader/writer services
- Redis clustering or managed cache service
- CDN integration for frontend assets
- Auto-scaling policies based on metrics
- Multi-region deployment for high availability
Security Improvements
- Service mesh (Istio/Linkerd) for mTLS
- Network policies for pod-to-pod communication
- Secrets management (Vault, AWS Secrets Manager)
- RBAC for Kubernetes access control
- API authentication (JWT, OAuth2)
- Rate limiting and DDoS protection
Installation & Usage
Prerequisites
- Docker Engine 20.x or higher
- Docker Compose 3.9 or higher
Quick Start
# Clone repository
git clone <repository-url>
cd devops-challenge
# Build and start all services
docker compose up --build
# Access the application
open http://localhost:5000Service Endpoints
- Web Application: http://localhost:5000
- Reader API: http://localhost:8082
- Writer API: http://localhost:8083
- Redis: localhost:6379
Testing
Health Checks:
# Reader service
curl http://localhost:8082/health
# Writer service
curl http://localhost:8083/healthWrite Data:
curl -X POST http://localhost:8083/write -d "hello world"Read Data:
curl http://localhost:8082/dataKey Features
Implemented
- Multi-service architecture with 4 containers
- Docker containerization for all services
- Docker Compose orchestration
- Network segmentation (frontend/backend)
- REST API communication
- CORS-enabled services
- Health check endpoints
- Polyglot microservices (Go, Python, Node.js)
- Redis data persistence
- Responsive web interface with Bootstrap
- SPA with client-side routing
Planned Enhancements
- Kubernetes deployment manifests
- CI/CD pipeline implementation
- Automated testing suite
- Production-grade logging
- Distributed trac...