RoboShop — VM-Based Multi-Environment AWS Infrastructure
The foundation. Before touching Kubernetes, I built the entire platform on EC2 — 15 Terraform modules, 13 security groups, Ansible-pull config, custom AMI baking, and dev/prod parity.
Overview
An 11-service e-commerce stack provisioned end-to-end on AWS with modular Terraform, configured via Ansible-pull, deployed to Auto Scaling Groups behind internal + external ALBs, and promoted dev → prod through a Jenkins pipeline. This is where I learned why infrastructure has to be code, not clicks.
Repositories
- RoboShop-Infra-StandardMain infrastructure — Terraform modules, Jenkins CI/CD.
- Roboshop-Dev-Prod-Infra-CICD-DeploymentInfra CI/CD promotion pipeline.
- Terraform-AWS-VPC-AdvancedReusable VPC module — dual-mode, region-agnostic.
- RoboShop-Security-Group-ModuleReusable security-group module.
- RoboShop-Ansible-Roles-tfAnsible roles for configuration management.
- RoboShop-Shell-Script-For-Alma-LinuxBootstrap shell scripts for AlmaLinux.
Problem
Rebuilding infrastructure by hand takes hours and drifts between engineers. Codifying it makes a full stand-up a 15-minute apply with an audit trail — and forces you to understand every SG rule, every route, every IAM boundary.
Architecture
Root + child modules. Remote state on S3, locked via DynamoDB.
CI/CD Flow
- 01Terraform reviewed via PR with tflint + tfsec in CI; plan posted to the PR as a comment.
- 02Merge to main triggers Jenkins to apply against dev; promotion job applies to staging/prod.
- 03AMI baking pipeline: EC2 → Ansible configure → stop → bake AMI → delete → Launch Template → ASG.
- 04Catalogue service CI: version detection from package.json → npm build → SonarQube + SAST → Nexus publish → downstream CD.
Infrastructure
- 15 Terraform modules with S3 remote state + DynamoDB locking; cross-module data via SSM Parameter Store — zero hardcoded values.
- Custom VPC across 2 AZs: public, private, and database subnets — all module-managed.
- 13 least-privilege security groups. Service-to-service on exact ports; SSH restricted to a VPN CIDR.
- ASGs with 50% CPU target tracking; internal ALB with host-header routing per service; external ALB + Route 53 on stallions.space.
- Ansible-pull model — instances pull their own config at boot. No manual SSH, no drift.
Technologies Used
Challenges
Lessons Learned
- Modules over monoliths. One root, many small versioned modules — never copy-paste HCL.
- State is production data. Remote backend + locking from day one.
- If you can't Terraform it, you don't understand it. The console hides too much.