DevOps-Lab: Infrastructure as Code Deployment
2/1/2025
A comprehensive DevOps learning project demonstrating incremental infrastructure development using Infrastructure as Code (IaC) principles. This project showcases the transition from containerized services in a single VM to a robust multi-VM setup with automated configuration and provisioning.
System Architecture
Key Features & Achievements
- Complete 6-VM infrastructure with specialized services (Backend, Database, Cache, Leader, Registry, MinIO)
- Vagrant-managed virtual machines with static IP assignment (192.168.56.0/24 network)
- Ansible automation for configuration management across all VMs
- Private Docker registry for secure image storage and distribution
- Comprehensive monitoring stack with Prometheus, Grafana, and cAdvisor
- Database backup system with MongoDB dumps to MinIO S3-compatible storage
- UFW firewall configuration with service-specific security rules
- Node.js REST API with Swagger documentation and Redis caching
- Infrastructure as Code approach with version-controlled configurations
- CI/CD pipeline concepts with automated image building and deployment
Infrastructure Architecture
database
192.168.56.10
MongoDB with backup to MinIO
cache
192.168.56.11
Redis cache service
backend
192.168.56.12
Node.js application
leader
192.168.56.13
Ansible control + monitoring
registry
192.168.56.14
Private Docker registry
minio
192.168.56.15
S3-compatible object storage
API Endpoints
POST /api/courses - Create a new course GET /api/courses - Retrieve all courses GET /api/courses/:id - Retrieve specific course by ID GET /api/courses/stats - Get basic course statistics POST /api/students - Create a new student GET /api/students - Retrieve all students GET /api/students/:id - Retrieve specific student by ID ← Back to projects