This project demonstrates a production-style cloud-native deployment pipeline built using modern DevOps principles.
It automates:
- Infrastructure provisioning (Infrastructure as Code)
- Containerized application deployment
- CI/CD pipeline execution
- Reverse proxy configuration
- Secure remote deployment to AWS
The goal is to simulate a real-world enterprise deployment workflow.
graph TD
Developer((fa:fa-code Developer))
GitHub["fa:fa-github GitHub Repository"]
subgraph GH_Actions [GitHub Actions CI/CD]
Build["fa:fa-hammer Build Docker Image"]
DockerPush["fa:fa-docker Push to DockerHub"]
end
DockerHub["fa:fa-box DockerHub Registry"]
subgraph AWS_Cloud [AWS EC2 Infrastructure]
Terraform["fa:fa-cloud Terraform Provisioning"]
subgraph Instance [EC2 Instance]
Nginx["fa:fa-server Nginx Reverse Proxy"]
DockerRun["fa:fa-container Docker Runtime"]
end
end
LiveApp((fa:fa-globe Live Production App))
Developer -- "git push" --> GitHub
GitHub --> Build
Build --> DockerPush
DockerPush -. "kanvit279/devops-app" .-> DockerHub
DockerHub -- "docker pull" --> DockerRun
Terraform -- "IaC" --> AWS_Cloud
Nginx -- "Proxy (80 -> 3000)" --> DockerRun
LiveApp --- Nginx
| ☁️ 3 Cloud Services | 🏗️ 3 IaC Components | 🐳 3 Container Tools | 🔄 3 CI/CD Stages |
🚀 Click to explore the architecture
📦 cloud-native-devops-platform
├── 📂 .github # GitHub Configuration Hub
│ └── 📂 workflows
│ └── 📜 deploy.yml # ⚡ CI/CD Automation Engine
│ └── Triggers: push, PR to main
│
├── 📂 app # 🎯 Application Core
│ ├── 📜 index.js # 🧠 Node.js Core Logic
│ │ ├── Express server
│ │ ├── Health endpoints
│ │ └── API routes
│ ├── 📜 package.json # 📦 Dependency Manifest
│ │ ├── Scripts
│ │ ├── Dependencies
│ │ └── Metadata
│ └── 📜 Dockerfile # 🐳 Container Blueprint
│ ├── Multi-stage build
│ ├── Production optimization
│ └── Security hardening
│
├── 📂 terraform # 🏗️ Infrastructure as Code
│ ├── 📜 main.tf # 🏛️ Infrastructure Definition
│ │ ├── EC2 instances
│ │ ├── Security groups
│ │ └── IAM roles
│ ├── 📜 variables.tf # ⚙️ Environment Variables
│ │ ├── Instance types
│ │ ├── Region config
│ │ └── Key pairs
│ └── 📜 outputs.tf # 📍 Resource Mapping
│ ├── Public IPs
│ ├── DNS names
│ └── Instance IDs
│
├── 📂 nginx # 🌐 Reverse Proxy Layer
│ └── 📜 default.conf # 🔀 Proxy Rules
│ ├── Load balancing
│ ├── SSL termination
│ └── Request routing
│
└── 📜 README.md # 📚 Project Documentation
├── Setup guide
├── Deployment steps
└── API reference
Automated pipeline from development to production
┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ 💻 DEV │────▶│ 🔄 GITHUB │────▶│ 🐳 DOCKER │────▶│ ☁️ AWS │
│ PUSH │ │ ACTIONS │ │ BUILD │ │ EC2 │
└──────────────┘ └──────────────┘ └──────────────┘ └──────┬───────┘
▲ ▲ ▲ │
└───────────────────────┴──────────────────────┴──────────────────────┘
🚀 CONTINUOUS DEPLOYMENT PIPELINE
|
1
Code Push0s |
2
CI/CD Trigger5s |
3
Docker Build30s |
4
Push to Hub45s |
5
EC2 Deploy60s |
Automated GitHub Actions workflow for continuous delivery
|
✓
Checkout
|
→ |
🔑
Docker Login
|
→ |
🏗️
Build Image
|
→ |
📤
Push Image
|
| ↓ | ||||||
|
🔌
SSH Connect to EC2
⬇️
Pull Image
🛑
Stop Old
🚀
Deploy New
|
||||||
|
Eliminates human intervention in deployment process 100% Automated |
Reduces human mistakes in production 99.9% Reliable |
Deploy multiple times per day 2-min cycle |
Version-controlled infrastructure provisioning
|
📝 Version Control
🔄 Reproducible
🚫 No Manual Console
⚡ Auto Provision
📊 No Drift
|
The following Terraform commands are used to manage the infrastructure lifecycle:
# Initialize the working directory
terraform init
# Preview infrastructure changes before applying
terraform plan
# Deploy infrastructure
terraform apply -auto-approve
# Destroy all managed infrastructure
terraform destroy ┌─────────────────────────────────────────────────────────────┐
│ AWS Cloud │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ Security Group (Ports: 22, 80, 3000) │ │
│ │ ┌─────────────────────────────────────────────┐ │ │
│ │ │ EC2 Instance (t2.micro) │ │ │
│ │ │ ┌─────────────────────────────────────┐ │ │ │
│ │ │ │ Docker Container │ │ │ │
│ │ │ │ Node.js App on Port 3000 │ │ │ │
│ │ │ └─────────────────────────────────────┘ │ │ │
│ │ └─────────────────────────────────────────────┘ │ │
│ └─────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
|
1
Write.tf files
|
→ |
2
Planterraform plan
|
→ |
3
Applyterraform apply
|
→ |
4
Manageversion control
|
|
1
Terraform |
→ |
2
EC2 Setup |
→ |
3
Git Commit |
→ |
4
CI/CD |
→ |
5
Live App |
ssh-keygen -t rsa -b 4096 -f ~/.ssh/key-name
git clone https://github.com/your-username/cloud-native-devops-platform.git
cd cloud-native-devops-platform# Install AWS CLI and configure:
aws configureℹ️ Provide: AWS Access Key, AWS Secret Key, Region (e.g., ap-south-1)
# Navigate to the terraform directory:
cd terraform
terraform init
terraform plan
terraform applyℹ️ This creates the EC2 instance and required security groups with ports 22 (SSH), 80 (HTTP), and 3000 (Node.js) open.
# Connect to your EC2 instance
ssh -i your-key-pair.pem ubuntu@<public-ip>
Then install Docker and Nginx:
# Update package lists
sudo apt update && sudo apt upgrade -y
# Install Docker
sudo apt install docker.io -y
sudo systemctl start docker
sudo systemctl enable docker
sudo usermod -aG docker $USER # Add user to docker group
# Install Nginx
sudo apt install nginx -y
sudo systemctl start nginx
sudo systemctl enable nginx
# Verify installations
docker --version
nginx -vℹ️ EC2 instance is prepared with all necessary tools for containerization and reverse proxy.
Edit Nginx configuration:
sudo nano /etc/nginx/sites-available/default
Replace with:
server {
listen 80;
location / {
proxy_pass http://localhost:3000;
}
}
Restart nginx. Nginx listen on port 80 and forward all incoming web traffic to your application running on port 3000 inside the server.
# Add all changes
git add .
# Commit with a meaningful message
git commit -m "Deploy: Update application with new features"
# Push to main branch (triggers CI/CD)
git push origin main
Before proceeding further, ensure that all required credentials are added under: Repository Settings → Secrets and Variables → Actions.
If it appears like this, it means everything is configured correctly.
Website View
This project can be extended with:
- Auto Scaling Groups for horizontal scaling
- Application Load Balancer for high availability
- HTTPS configuration using SSL certificates
- Blue-Green or Rolling deployments
- Monitoring stack (Prometheus + Grafana)
- Centralized logging
- Kubernetes-based deployment
These enhancements would make the system production-grade at enterprise level.
To avoid unnecessary AWS charges:
terraform destroy- EC2 metrics monitored via CloudWatch
- CPU and memory usage can be tracked
- Docker container status verified using
docker ps - Logs accessible using
docker logs
Monitoring ensures application health and availability.
This project demonstrates a complete DevOps production workflow, including infrastructure provisioning, containerization, CI/CD automation, and secure cloud deployment.
It reflects real-world engineering practices used in modern cloud-native environments.
