CloudOpsHub is a growing SaaS company that provides real-time analytics to a diverse customer base across multiple regions. As their user base scales, they face challenges with manual infrastructure provisioning, inconsistent environment setups, and delayed deployments due to their reliance on traditional, non-automated processes.
The company is looking to modernize its infrastructure management and deployment pipelines. Specifically, they need to automate the creation of multi-environment platforms (development, staging, production), containerize their microservices using Docker, and build a GitOps pipeline for continuous deployment and reliable monitoring.

This blog documents the actual implementation — from initial single-file Terraform through modular refactor to production deployment with multiple live environments.
Source code: https://github.com/lakunzy7/CloudOpsHub.git
| Layer | Technology | Why |
|---|---|---|
| Infrastructure as Code | Terraform (modular) | Declarative, state management, workspace isolation |
| Containerization | Docker + Docker Compose | Simple multi-service orchestration |
| CI/CD | GitHub Actions | Native GitHub integration, matrix builds |
| GitOps | Custom systemd agent | Lightweight, no external dependencies |
| Monitoring | Prometheus + Grafana | Open source, extensible, industry standard |
| Alerting | Alertmanager + Slack | Configurable routing, silencing |
| Security Scanning | Gitleaks, Trivy, tfsec, Snyk, SonarCloud | Comprehensive coverage |
| Application | Node.js + MySQL + Nginx | Full-stack reference implementation |