Skip to content

This project demonstrates a complete DevOps CI/CD pipeline for deploying a containerized MERN stack application using industry-standard tools. It automates infrastructure provisioning, configuration management, containerization, orchestration, and deployment.

Notifications You must be signed in to change notification settings

khaledhawil/ITI-Project

Repository files navigation

ITI E-Commerce Platform - Amazona

Build Status Docker Kubernetes Terraform Ansible ArgoCD License

Information Technology Institute (ITI) - AWS Restart Track Final Project

A comprehensive, enterprise-grade e-commerce platform showcasing modern DevOps practices and cloud-native architecture.

Built with the MERN stack and deployed using Infrastructure as Code (Terraform), Configuration Management (Ansible), Container Orchestration (Kubernetes), CI/CD automation (Jenkins), and GitOps workflows (ArgoCD).

DevOps Platform Banner

    ██╗████████╗██╗    ██████╗ ███████╗██╗   ██╗ ██████╗ ██████╗ ███████╗
    ██║╚══██╔══╝██║    ██╔══██╗██╔════╝██║   ██║██╔═══██╗██╔══██╗██╔════╝
    ██║   ██║   ██║    ██║  ██║█████╗  ██║   ██║██║   ██║██████╔╝███████╗
    ██║   ██║   ██║    ██║  ██║██╔══╝  ╚██╗ ██╔╝██║   ██║██╔═══╝ ╚════██║
    ██║   ██║   ██║    ██████╔╝███████╗ ╚████╔╝ ╚██████╔╝██║     ███████║
    ╚═╝   ╚═╝   ╚═╝    ╚═════╝ ╚══════╝  ╚═══╝   ╚═════╝ ╚═╝     ╚══════╝
    
    E-Commerce DevOps Infrastructure Deployment

Table of Contents


Architecture Diagrams

CI/CD Pipeline Architecture

CI/CD Pipeline

AWS Infrastructure Overview

AWS Infrastructure

Kubernetes Cluster Topology

Kubernetes Architecture

Continuous Integration Flow

Continuous Integration

Continuous Deployment Workflow

Continuous Deployment

Complete DevOps Workflow

Complete CI/CD Workflow


DevOps Architecture Overview

This project demonstrates a complete DevOps lifecycle implementation:

Component Technology Purpose
Infrastructure as Code Terraform AWS infrastructure provisioning
Configuration Management Ansible Server configuration and software installation
Containerization Docker Multi-stage builds for optimized containers
Container Orchestration Kubernetes Scalable production deployment
CI/CD Pipeline Jenkins Automated testing and deployment
GitOps ArgoCD Declarative, Git-driven continuous deployment
Monitoring & Observability AWS CloudWatch Comprehensive monitoring
Security Trivy, cert-manager SSL/TLS automation, secrets management

Features

Core E-Commerce Features

Feature Description Technology
Authentication & Authorization JWT-based secure authentication system Node.js, JWT
Product Catalog Management Complete CRUD operations with image upload React, AWS S3
Shopping Cart & Checkout Real-time cart management with secure payment Redux, Stripe API
Order Management System Full order lifecycle from placement to fulfillment MongoDB, Express
User Profile Management Account settings, order history, and preferences React, MongoDB
Admin Dashboard Administrative interface for product and order management React Admin
Responsive Design Mobile-first UI built with React and Bootstrap React, Bootstrap

Technical Features

Feature Description Technology
Microservices Architecture Scalable, containerized service design Docker, Kubernetes
RESTful API Well-structured backend with Express.js Express.js, MongoDB
Cloud Storage Integration AWS S3 for file uploads and static assets AWS S3, SDK
Database Management MongoDB with Mongoose ODM and persistent storage MongoDB, Mongoose
SSL/TLS Encryption Automated certificate management cert-manager
Load Balancing NGINX ingress controller with traffic distribution NGINX Ingress
Auto-scaling Horizontal Pod Autoscaling based on metrics Kubernetes HPA
Backup & Recovery Automated AWS backup strategies AWS Backup

Component Documentation

This project includes comprehensive documentation for each major component. Each document provides detailed explanations, configuration details, and implementation guides.

Component Documentation Description
Terraform Infrastructure as Code Complete Terraform modules, AWS resource provisioning, and infrastructure management
Ansible Configuration Management Ansible playbooks, roles, and automation for system configuration
Kubernetes Kubernetes Manifests K8s deployments, services, ingress, monitoring, and EKS optimization
Jenkins CI/CD Pipeline Jenkins pipeline configuration, shared libraries, and automation workflows
Code Application Source Code MERN stack architecture, API documentation, and component structure
ArgoCD GitOps & ArgoCD GitOps principles, ArgoCD configuration, and continuous deployment
Docker Docker Configuration Containerization strategy, multi-stage builds, and registry management
Scripts Scripts & Automation Deployment scripts, utilities, and automation tools

Documentation Highlights

  • Comprehensive Guides: Each document includes step-by-step instructions and best practices
  • Configuration Details: Complete configuration files with explanations
  • Troubleshooting: Common issues and their solutions
  • Quick Start: Fast deployment guides for each component
  • Security: Security best practices and compliance guidelines
  • Monitoring: Observability and monitoring configurations

Getting Started with Documentation

  1. For Infrastructure Setup: Start with Terraform Infrastructure
  2. For Application Development: Check Application Source Code
  3. For Deployment: Follow Kubernetes Manifests and CI/CD Pipeline
  4. For GitOps: Implement GitOps & ArgoCD
  5. For Automation: Use Scripts & Automation

Project Structure

Click to expand/collapse DevOps Architecture Structure

DevOps Architecture Structure

ITI-Project/
├── Infrastructure as Code (Terraform/)
│   ├── main.tf                         # Main infrastructure orchestration
│   ├── variables.tf                    # Input variables definition
│   ├── terraform.tfvars               # Environment-specific values
│   ├── Provider_init.tf               # AWS provider configuration
│   ├── Inventory_Output.tf            # Ansible inventory generation
│   └── Modules/                       # Reusable infrastructure modules
│       ├── Network_Module/            # VPC, subnets, security groups
│       ├── Jenkins_EC2_Module/        # Jenkins server infrastructure
│       ├── EKS_Cluster_Module/        # Kubernetes cluster setup
│       ├── ECR_Module/                # Container registry configuration
│       ├── S3_Logs_Module/            # Centralized logging storage
│       └── Aws_Backup_Module/         # Backup and disaster recovery
│
├── Configuration Management (Ansible/)
│   ├── ansible.cfg                    # Ansible configuration
│   ├── my_inventory.ini              # Dynamic inventory from Terraform
│   ├── roles_playbook.yml            # Main playbook execution
│   └── roles/                        # Ansible roles for automation
│       ├── Jenkins_Server_Installation/    # Jenkins setup and configuration
│       ├── Docker_installation/           # Docker runtime installation
│       ├── Cloud_Watch_Agent_Installation/ # AWS monitoring agent
│       └── trivy_installation/           # Security vulnerability scanner
│
├── Container Orchestration (k8s/)
│   ├── Core Application Manifests
│   │   ├── namespace.yaml              # Application namespace isolation
│   │   ├── configmap-secret.yaml       # Environment configuration & secrets
│   │   ├── backend.yaml                # Node.js API deployment & service
│   │   ├── frontend.yaml               # React app deployment & service
│   │   └── mongodb.yaml                # MongoDB StatefulSet with persistence
│   ├── Network & Security
│       ├── ingress.yaml                # NGINX ingress with SSL termination
│       └── cert-manager.yaml           # Automated SSL certificate management
│
├── GitOps Configuration (argoCD/)
│   └── application.yaml               # ArgoCD application definition
│
├── CI/CD Pipeline
│   ├── Jenkinsfile                    # Declarative pipeline definition
│   └── sendDiscordNotification.groovy # Custom notification integration
│
├── Application Source Code
│   ├── backend/                       # Node.js/Express API server
│   │   ├── Dockerfile                 # Multi-stage production container
│   │   ├── models/                    # Database schemas (User, Product, Order)
│   │   ├── routes/                    # RESTful API endpoints
│   │   ├── server.js                  # Application entry point
│   │   └── package.json               # Dependencies and scripts
│   │
│   ├── frontend/                      # React single-page application
│   │   ├── Dockerfile                 # Optimized production build
│   │   ├── nginx.conf                 # Production web server configuration
│   │   ├── src/screens/               # React components and pages
│   │   ├── public/                    # Static assets
│   │   └── package.json               # Frontend dependencies
│   │
│   └── template/                      # Static landing pages
│       ├── index.html                 # Marketing page template
│       └── style.css                  # Custom styling
│
├── DevOps Documentation (docs/)
│   ├── DEPLOYMENT-SUMMARY.md          # Complete deployment architecture guide
│   ├── KUBERNETES-DEPLOYMENT-GUIDE.md # Step-by-step Kubernetes setup
│   ├── README-AWS-SETUP.md            # AWS services configuration guide
│   ├── README-KUBERNETES.md           # Kubernetes best practices
│   ├── FEATURE-SUMMARY.md             # Platform capabilities overview
│   └── KEY-CODE-SNIPPETS.js           # Critical implementation patterns
│
├── Architecture Visualization (svg/)
│   ├── cicd.drawio.svg                # CI/CD pipeline architecture
│   ├── infra_aws.drawio.svg           # AWS cloud infrastructure design
│   ├── k8s.drawio.svg                 # Kubernetes cluster topology
│   ├── ci.drawio.svg                  # Continuous integration workflow
│   ├── cd.drawio.svg                  # Continuous deployment process
│   └── Cicd_kh.drawio.svg             # End-to-end DevOps pipeline
│
└── Deployment Configurations
    ├── docker-compose.yaml            # Local development environment
    ├── Procfile                       # Heroku PaaS deployment configuration
    └── .env.example                   # Environment variables template

Technology Stack

Infrastructure & DevOps

Technology Purpose Version
Terraform Infrastructure as Code for AWS resource provisioning ~> 1.0
Ansible Configuration management and server automation ~> 2.9
Docker Application containerization with multi-stage builds ~> 20.10
Kubernetes Container orchestration and service mesh ~> 1.21
Jenkins CI/CD pipeline automation with shared libraries ~> 2.300
ArgoCD GitOps-based continuous deployment ~> 2.4
NGINX Reverse proxy, load balancer, and ingress controller ~> 1.20

Cloud Services (AWS)

Service Purpose Icon
Amazon EKS Managed Kubernetes service AWS
Amazon ECR Container image registry ECR
Amazon S3 Object storage for files and backups S3
Amazon VPC Virtual private cloud networking VPC
AWS CloudWatch Monitoring, logging, and alerting CloudWatch
AWS Backup Automated backup and disaster recovery Backup
Certificate Manager SSL/TLS certificate management ACM

Application Stack (MERN)

Technology Purpose Version
React Frontend user interface library 16.12.0
Redux State management for React applications ^4.0.5
Node.js JavaScript runtime environment ^14.0.0
Express Web application framework ^4.17.1
MongoDB NoSQL document database ^4.4
Mongoose MongoDB object document mapper ^5.10.0

Monitoring & Security

Tool Purpose Badge
AWS CloudWatch Metrics collection, logging, and alerting CloudWatch
AWS X-Ray Distributed tracing and performance insights X-Ray
Trivy Container vulnerability scanning Security
Discord Integration Real-time notifications and alerts Discord

Quick Start

Prerequisites

Before starting, ensure you have the following tools installed:

Tool Version Installation
AWS CLI >= 2.0 Install AWS CLI
Terraform >= 1.0 Install Terraform
kubectl >= 1.21 Install kubectl
Docker >= 20.10 Install Docker

One-Click Deployment

# Clone the repository
git clone https://github.com/your-repo/ITI-Project.git
cd ITI-Project

# Deploy complete infrastructure
./deploy-complete.sh

# Access the application
kubectl port-forward svc/frontend 3000:80 -n amazona

Infrastructure Deployment

Step-by-Step Infrastructure Deployment

1. Provision AWS Infrastructure with Terraform
# Navigate to Terraform directory
cd Terraform

# Initialize Terraform backend
terraform init

# Review planned infrastructure changes
terraform plan

# Apply infrastructure configuration
terraform apply -auto-approve

# Verify infrastructure deployment
terraform output

Expected Output:

  • VPC and networking components
  • EKS cluster with worker nodes
  • ECR repositories
  • S3 buckets for storage and logs
  • IAM roles and policies
2. Configure Servers with Ansible
# Navigate to Ansible directory
cd Ansible

# Verify inventory file from Terraform output
cat my_inventory.ini

# Run configuration playbooks
ansible-playbook -i my_inventory.ini roles_playbook.yml

# Verify Jenkins installation
ansible all -i my_inventory.ini -m ping

Configured Components:

  • Jenkins server with plugins
  • Docker runtime environment
  • CloudWatch monitoring agent
  • Trivy security scanner
3. Deploy Applications to Kubernetes
# Navigate to Kubernetes manifests
cd k8s

# Create namespace and apply configurations
kubectl apply -f namespace.yaml
kubectl apply -f configmap-secret.yaml
kubectl apply -f mongodb-persistent.yaml
kubectl apply -f backend.yaml
kubectl apply -f frontend.yaml
kubectl apply -f ingress.yaml

# Verify deployment status
kubectl get all -n amazona
kubectl get ingress -n amazona

Deployed Services:

  • MongoDB with persistent storage
  • Backend API service
  • Frontend React application
  • NGINX ingress controller
4. Setup GitOps with ArgoCD
# Install ArgoCD
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

# Apply application configuration
cd argoCD
kubectl apply -f application.yaml

# Access ArgoCD UI
kubectl port-forward svc/argocd-server -n argocd 8080:443

GitOps Benefits:

  • Automated application deployment
  • Git-based configuration management
  • Rollback capabilities
  • Drift detection and correction

Local Development

Local Development Setup

Quick Start with Docker Compose
# Clone the repository
git clone https://github.com/your-repo/ITI-Project.git
cd ITI-Project

# Setup environment variables
cp .env.example .env
# Edit .env with your configuration

# Start all services with Docker Compose
docker-compose up -d

# View running services
docker-compose ps

# View logs
docker-compose logs -f
Manual Development Setup

Backend Setup:

cd backend
npm install
npm run dev

Frontend Setup:

cd frontend
npm install
npm start

Database Setup:

# Using Docker
docker run -d -p 27017:27017 --name mongodb mongo:4.4

# Or install MongoDB locally
# Follow: https://docs.mongodb.com/manual/installation/

Access Points

Service URL Purpose
Frontend http://localhost:3000 React application
Backend API http://localhost:5000 Express.js API
MongoDB localhost:27017 Database connection
API Docs http://localhost:5000/api-docs API documentation

Monitoring & Observability

Comprehensive Monitoring Stack

Metric Type Tool Purpose Dashboard
Application Performance AWS CloudWatch Response times, error rates, throughput Available
Infrastructure Monitoring CloudWatch + X-Ray CPU, memory, disk, network metrics Available
Business Metrics Custom Dashboards User engagement, conversion rates, revenue Available
Security Monitoring Trivy + CloudTrail Vulnerability scanning, compliance checking Available
Log Aggregation CloudWatch Logs Centralized logging with AWS CloudWatch Available

Alerting & Notifications

Alert Configuration

AWS CloudWatch Alarms:

  • CPU usage > 80% for 5 minutes
  • Memory usage > 85% for 5 minutes
  • Application error rate > 5%
  • Response time > 2 seconds

Discord Notifications:

  • Build status updates
  • Deployment notifications
  • Security alerts
  • Performance warnings

Monitoring Dashboards

# Access CloudWatch Dashboard
aws cloudwatch get-dashboard --dashboard-name "ITI-ECommerce-Dashboard"

# View application metrics
kubectl top pods -n amazona
kubectl top nodes

# Check application health
curl http://your-domain/health

Security Implementation

Multi-Layer Security Approach

Security Layer Implementation Status
Network Security VPC isolation, security groups, NACLs Implemented
Container Security Trivy vulnerability scanning, minimal base images Implemented
Secrets Management Kubernetes secrets, AWS Systems Manager Implemented
SSL/TLS Encryption Automated certificate management with cert-manager Implemented
Access Control RBAC for Kubernetes, IAM for AWS resources Implemented
Compliance Security best practices and regular auditing Implemented

Security Scanning & Compliance

Container Security Scanning
# Run Trivy security scan
trivy image your-registry/backend:latest
trivy image your-registry/frontend:latest

# Kubernetes security scan
trivy k8s --report summary cluster
Network Security Configuration

VPC Configuration:

  • Private subnets for application workloads
  • Public subnets for load balancers only
  • NAT gateways for outbound internet access
  • Security groups with principle of least privilege

Kubernetes Network Policies:

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: deny-all-ingress
spec:
  podSelector: {}
  policyTypes:
  - Ingress

Deployment Strategies

The project supports multiple deployment strategies for zero-downtime deployments:

Strategy Use Case Downtime Complexity
Rolling Updates Standard deployments Zero Low
Blue-Green Critical applications Zero Medium
Canary Releases Risk-sensitive deployments Zero High
GitOps Workflow Automated deployments Zero Medium

Team

This comprehensive DevOps project was developed by a talented team of engineers from the ITI AWS Restart Track:

Khaled Hawil
Khaled Hawil

DevOps Engineer
Abdelrahman Elshahat
Abdelrahman Elshahat

DevOps Engineer
Menna Hamouda
Menna Hamouda

DevOps Engineer
Alaa Elnagy
Alaa Elnagy

DevOps Engineer
Sara Ghonim
Sara Ghonim

DevOps Engineer

ITI Badge
Team Project
Final Capstone
2025 Cohort

Team Responsibilities

Infrastructure & Automation

Terraform Infrastructure:

  • AWS VPC and networking setup
  • EKS cluster provisioning
  • ECR and S3 configuration
  • IAM roles and policies

CI/CD Pipeline:

  • Jenkins pipeline configuration
  • Docker image building and pushing
  • Automated testing integration
  • Deployment automation
Container Orchestration

Kubernetes Management:

  • Cluster setup and configuration
  • Application deployment manifests
  • Service mesh configuration
  • Resource management and scaling

Application Deployment:

  • MERN stack containerization
  • Database persistence configuration
  • Load balancing and ingress
  • Health checks and monitoring
Security & Compliance

Security Implementation:

  • Container vulnerability scanning
  • Network security policies
  • Secrets management
  • SSL/TLS certificate automation

Compliance & Auditing:

  • Security best practices
  • Regular vulnerability assessments
  • Compliance documentation
  • Security monitoring setup

Contributing

We welcome contributions to improve this DevOps demonstration project! Here's how you can contribute:

How to Contribute

Code Contributions
  1. Fork the repository

    git clone https://github.com/your-username/ITI-Project.git
    cd ITI-Project
  2. Create a feature branch

    git checkout -b feature/awesome-enhancement
  3. Make your changes

    • Follow the existing code style
    • Add tests for new features
    • Update documentation as needed
  4. Commit your changes

    git commit -m "feat: add awesome enhancement"
  5. Push and create a Pull Request

    git push origin feature/awesome-enhancement
Documentation Contributions
  • Improve existing documentation
  • Add new guides and tutorials
  • Fix typos and formatting issues
  • Translate documentation to other languages
Bug Reports

When reporting bugs, please include:

  • Detailed description of the issue
  • Steps to reproduce
  • Expected vs actual behavior
  • Environment details (OS, versions, etc.)
  • Screenshots or logs if applicable

Contribution Guidelines

  • Follow Conventional Commits specification
  • Ensure all tests pass before submitting PR
  • Update documentation for any new features
  • Keep PRs focused and atomic
  • Be respectful and constructive in discussions

Areas for Contribution

Area Priority Skills Needed
Security Enhancements High Security, DevSecOps
Monitoring Improvements Medium Prometheus, Grafana
CI/CD Optimizations Medium Jenkins, GitOps
Documentation High Technical Writing
Testing Coverage Medium Testing, Automation

Acknowledgments

Special thanks to the Information Technology Institute (ITI) for providing the AWS Restart Track program and the opportunity to work on this comprehensive DevOps project.

Made with Love ITI 2025 AWS Restart

Educational Impact

This project serves as a comprehensive learning resource for:

  • DevOps Best Practices - Industry-standard implementations
  • Cloud-Native Architecture - Modern application design patterns
  • Infrastructure as Code - Automated infrastructure management
  • GitOps Methodology - Git-driven operational workflows
  • Container Orchestration - Kubernetes production deployments
  • CI/CD Automation - End-to-end pipeline implementation

If this project helped you learn DevOps concepts, please consider giving it a star!

Built with passion by the ITI DevOps Team - Demonstrating enterprise-grade DevOps practices for modern cloud-native applications.

© 2025 ITI DevOps Team | AWS Restart Track Final Project

About

This project demonstrates a complete DevOps CI/CD pipeline for deploying a containerized MERN stack application using industry-standard tools. It automates infrastructure provisioning, configuration management, containerization, orchestration, and deployment.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published