This project demonstrates a complete end-to-end DevOps workflow by deploying a polyglot microservices voting application on AWS.
Users vote between Cats π± and Dogs πΆ. The system processes votes asynchronously and displays real-time results.
The application is intentionally multi-language and multi-framework to showcase real-world polyglot infrastructure skills:
| Service | Language / Framework | Role |
|---|---|---|
| Vote | Python + Flask | Frontend β accept votes |
| Result | Node.js + Express | Frontend β display live results |
| Worker | C# / .NET | Background worker |
| Redis | Redis | In-memory message queue |
| Postgres | PostgreSQL | Persistent data store |
Infrastructure is fully managed as code using Terraform.
Configuration & deployment are automated with Ansible.
All application components run as Docker containers.
Goal: Production-style multi-tier architecture on AWS with proper networking, security groups, bastion host, and remote state management β ready for a professional GitHub portfolio.
Key Components:
- VPC with Public and Private Subnets
- Bastion / Frontend EC2 (Public Subnet) β Vote + Result services + Jump Host
- Backend EC2 (Private Subnet) β Redis + Worker
- Database EC2 (Private Subnet) β PostgreSQL
- NAT Gateway β Outbound internet access for private instances
- Security Groups β Least-privilege rules between tiers
- Terraform Remote State β S3 + DynamoDB locking
User β Vote (Python) β Redis β Worker (.NET) β PostgreSQL β Result (Node.js) β User
| Category | Tools / Services |
|---|---|
| Cloud Provider | Amazon Web Services (AWS) |
| Infrastructure as Code | Terraform |
| Configuration Management | Ansible |
| Containerization | Docker & Docker Compose |
| Networking | VPC, Subnets, Route Tables, NAT Gateway, Security Groups, Bastion Host |
| Application Stack | Python (Flask), Node.js (Express), .NET Worker |
| Data Stores | Redis (queue), PostgreSQL (persistence) |
| CI / State | Terraform Remote Backend (S3 + DynamoDB) |
| Version Control | Git + GitHub |
- β Multi-tier AWS architecture (Public + Private subnets)
- β Infrastructure provisioned entirely with Terraform
- β Configuration management & container deployment with Ansible
- β Bastion host pattern for secure access to private instances
- β Least-privilege Security Groups
- β Dockerized polyglot microservices
- β Redis as message queue + PostgreSQL for persistence
- β Real-time voting results via WebSockets
- β Remote Terraform state with locking
- β Portfolio-ready documentation and architecture diagrams
.
βββ terraform/ # Infrastructure as Code
β βββ main.tf
β βββ variables.tf
β βββ outputs.tf
β βββ vpc.tf
β βββ ec2.tf
β βββ security_groups.tf
β βββ backend.tf # S3 + DynamoDB remote state
β βββ ...
βββ ansible/ # Configuration Management
β βββ inventory/
β βββ group_vars/
β βββ playbooks/
β β βββ site.yml
β β βββ install_docker.yml
β β βββ deploy_containers.yml
β βββ roles/
β βββ docker_install/
β βββ deploy_containers/
β βββ postgres_persist/
βββ app/ # Application source (or Docker images from Docker Hub)
β βββ vote/
β βββ result/
β βββ worker/
βββ docs/
β βββ architecture.png
β βββ app-architecture.jpg
βββ docker-compose.yml # Local development
βββ README.md
- AWS Account with appropriate IAM permissions
- Terraform β₯ 1.5
- Ansible β₯ 2.14
- Docker & Docker Compose
- AWS CLI configured (
aws configure) - SSH key pair for EC2 access
git clone https://github.com/<your-username>/multi-stack-devops-voting-app.git
cd multi-stack-devops-voting-appcd terraform
terraform init
terraform plan
terraform applyThis creates:
- VPC + Public/Private Subnets
- NAT Gateway
- 3 EC2 instances (Frontend/Bastion, Backend, Database)
- Security Groups
- Remote state backend (S3 + DynamoDB)
Update inventory with private IPs / hostnames and configure SSH ProxyJump via the bastion.
cd ../ansible
ansible-playbook -i inventory/hosts playbooks/site.ymlThe playbooks will:
- Install & configure Docker
- Pull images from Docker Hub
- Deploy containers with correct environment variables
- Persist PostgreSQL data on a volume
- Vote UI:
http://<FRONTEND_PUBLIC_IP>:8080 - Result UI:
http://<FRONTEND_PUBLIC_IP>:8081
Cast votes and watch results update in real time.
- Private subnets for Redis, Worker, and PostgreSQL (no direct internet exposure)
- Bastion host pattern for SSH access
- Security Groups enforce least privilege:
- Frontend SG β Internet (HTTP)
- Backend SG β Accept Redis traffic only from Frontend
- DB SG β Accept Postgres traffic only from Worker/Backend
- Terraform remote state stored securely in S3 with DynamoDB locking
- No secrets committed to Git (use environment variables / Ansible Vault)
docker compose up --buildAccess:
- Vote β http://localhost:8080
- Result β http://localhost:8081
This project is designed for a 15-minute portfolio presentation covering:
- Terraform plan & infrastructure walkthrough
- Ansible playbooks & roles
- Live demo of voting + real-time results
- Architecture diagram explanation
- Security group & networking decisions
- Designing multi-tier VPC architectures (public/private subnets, NAT, route tables)
- Writing production-grade Terraform modules and remote state
- Using Ansible with jump hosts / ProxyJump for private instances
- Container networking across multiple EC2 hosts
- Least-privilege security group design
- Orchestrating polyglot microservices (Python, Node.js, .NET)
- End-to-end Infrastructure-as-Code + Configuration-as-Code workflow
**Penchalaiah Jammula **
This project is for portfolio purposes.
Original application inspired by the Docker Sample Voting App.
Built with β€οΈ for DevOps Portfolio
AWS Β· Terraform Β· Ansible Β· Docker Β· Networking

