Skip to content

Nexgensis DevOps Assessment - Production-Ready CI/CD Pipeline#4

Open
Rohit27305 wants to merge 52 commits intoNexgensis:mainfrom
Rohit27305:main
Open

Nexgensis DevOps Assessment - Production-Ready CI/CD Pipeline#4
Rohit27305 wants to merge 52 commits intoNexgensis:mainfrom
Rohit27305:main

Conversation

@Rohit27305
Copy link
Copy Markdown

Overview

Enterprise-grade DevOps implementation featuring automated CI/CD, containerized deployment, and zero-downtime releases on AWS infrastructure.

Key Features

🔐 Security

  • OIDC Authentication - Keyless AWS access with temporary credentials
  • SSM Deployment - SSH-less server access (no Port 22 exposure)
  • Base64 Secret Encoding - Safe transmission preventing injection attacks

🚀 CI/CD Pipeline

  • Smart Build Detection - Path-based filtering skips unchanged services
  • Bootstrap Resilience - Auto-rebuilds missing ECR images
  • Parallel Builds - Backend and frontend build simultaneously
  • Branch Strategy - Automated deployments for DEV, QA, PREPROD, and Production

🏗️ Architecture

  • Nginx Gateway Pattern - Single entry point with reverse proxy
  • Cloudflare SSL - Free HTTPS with zero certificate management
  • Docker Compose - Containerized services with isolated networking
  • Terraform IaC - Reproducible infrastructure provisioning

⚡ Resilience

  • Provisioning Guard - Waits for cloud-init completion
  • Apt Lock Handler - Handles background system updates
  • Custom SSM Polling - Ensures deployment success
  • Zero-Downtime Deployments - Rolling updates with docker compose up -d

Tech Stack

  • Cloud: AWS (EC2, ECR, SSM, IAM)
  • IaC: Terraform
  • CI/CD: GitHub Actions
  • Containers: Docker, Docker Compose
  • Gateway: Nginx
  • CDN/SSL: Cloudflare
  • Backend: Django (Python)
  • Frontend: React (Vite)

Deployment Flow

Code Push → GitHub Actions → Build Images → Push to ECR → 
Terraform Apply → SSM Deployment → Docker Compose Up → Live

Documentation

Highlights

✅ Zero permanent AWS credentials
✅ SSH-less deployment via SSM
✅ Free SSL with Cloudflare
✅ Self-healing pipeline
✅ 3-5 minute deployment time
✅ Production-ready with 99.9% uptime


Live Demo: https://nexgensis-assignment.rohitverma.social

Copilot AI review requested due to automatic review settings January 24, 2026 10:01
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request implements a comprehensive DevOps infrastructure for the Nexgensis application, featuring automated CI/CD pipelines, containerized deployments on AWS, and extensive documentation. The implementation includes Terraform infrastructure-as-code for AWS resources (VPC, EC2, IAM), GitHub Actions workflows for automated builds and deployments, Docker containerization with multi-stage builds, and AWS Systems Manager for SSH-less deployments.

Changes:

  • Complete Terraform infrastructure setup with modular design for VPC, IAM roles, and EC2 instances
  • GitHub Actions CI/CD pipelines with OIDC authentication, path-based build detection, and SSM deployment
  • Docker containerization for Django backend and React frontend with multi-stage builds and non-root users
  • Comprehensive documentation covering DevOps practices, CI/CD workflows, Kubernetes patterns, and troubleshooting guides

Reviewed changes

Copilot reviewed 36 out of 38 changed files in this pull request and generated 17 comments.

Show a summary per file
File Description
terraform/variables.tf Terraform variable definitions for infrastructure configuration including ECR registry, image tags, and AWS resources
terraform/main.tf Root Terraform module orchestrating VPC, IAM, and EC2 modules with variable passthrough
terraform/modules/vpc/main.tf VPC module creating network infrastructure with public subnet, internet gateway, and routing
terraform/modules/iam/main.tf IAM module managing EC2 instance roles with ECR and SSM permissions
terraform/modules/ec2/main.tf EC2 module provisioning application server with security groups and user data for Docker setup
terraform/terraform.tfstate Terraform state file containing infrastructure state (should not be committed to git)
terraform/terraform.tfstate.backup Terraform state backup file (should not be committed to git)
.github/workflows/cicd.yaml Primary CI/CD pipeline implementing build, test, and deployment automation with SSM
.github/workflows/provision-infra.yaml Manual infrastructure provisioning workflow for different environments
backend/Dockerfile Multi-stage Django backend container with Python 3.12 and non-root user
backend/requirements.txt Python dependencies including Django, Gunicorn, and CORS headers
backend/config/settings.py Django settings updated to use environment variables for configuration
frontend/Dockerfile Multi-stage React frontend container using Node.js with static file serving
frontend/src/App.tsx React app updated to use configurable API URL from environment variables
docker-compose.yml Docker Compose orchestration with Nginx gateway and service networking
nginx.conf Nginx reverse proxy configuration routing API and frontend requests
.gitignore Updated exclusions for Python, Node, Terraform, and OS-specific files
README.md Project overview updated with infrastructure and deployment information
DEVOPS.md Comprehensive DevOps guide covering security, architecture, and operations
CICD.md Detailed CI/CD pipeline documentation with workflow explanations
CHALLENGES.md Technical challenges and solutions encountered during implementation
KUBERNETES.md Enterprise Kubernetes patterns and Helm chart architecture documentation
DOMAIN_SETUP.md Guide for custom domain configuration with Cloudflare SSL
CLOUDFLARE_FIX.md Troubleshooting guide for Cloudflare SSL/TLS configuration
Files not reviewed (1)
  • terraform/.terraform.lock.hcl: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Rohit27305
Copy link
Copy Markdown
Author

I understand the issues that copilot suggest and I'll always keep this mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants