Skip to content

A comprehensive Node.js web application demonstrating enterprise-grade DevOps practices with complete CI/CD pipeline, Infrastructure as Code, GitOps implementation, and comprehensive monitoring.

Notifications You must be signed in to change notification settings

karimzakzouk/graduation-project-devops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌌 Solar System - Enterprise DevOps Application

Solar System Banner

GitHub Actions Kubernetes Terraform AWS ArgoCD Karpenter Prometheus Grafana Helm Docker

A comprehensive Python web application demonstrating enterprise-grade DevOps practices with a complete CI/CD pipeline, Infrastructure as Code, GitOps implementation, and comprehensive monitoring.


πŸš€ Project Overview

This project showcases a Solar System visualization web application built with modern DevOps practices, featuring:

🎨 Application Features

  • πŸͺ Interactive Solar System UI with planet data and animations
  • 🐍 Python backend with MongoDB integration
  • πŸ“± Responsive web interface with modern design

βš™οΈ DevOps Excellence

  • πŸ”„ Complete CI/CD pipeline with GitHub Actions
  • πŸ—οΈ Infrastructure as Code using Terraform and AWS EKS
  • πŸš€ GitOps deployment with ArgoCD for automated delivery
  • πŸ“Š Comprehensive monitoring with Prometheus and Grafana
  • πŸ“¦ Containerization with Docker and Kubernetes
  • πŸš€ Scalability using Karpenter

πŸ—οΈ Project Architecture Diagram

You can view the architecture diagram below for a visual overview of the system design:

Project Architecture Diagram


πŸ› οΈ Technology Stack

πŸ“± Application Stack
Technology Purpose Version
HTML5 Frontend Structure Latest
CSS3 Styling & Animations Latest
JavaScript Interactive UI ES6+
Python Backend API 3.x
MongoDB Database Latest
pytest Testing Framework Latest
πŸš€ DevOps & Infrastructure
Category Technologies
🐳 Containerization Docker Multi-stage builds
☸️ Orchestration Kubernetes Helm Charts
☁️ Cloud Provider AWS (EKS, VPC, Load Balancers, S3)
πŸ—οΈ Infrastructure as Code Terraform with modular design
πŸ”„ CI/CD GitHub Actions with workflow orchestration
πŸš€ GitOps ArgoCD for automated deployments and drift detection
πŸ“¦ Container Registry Docker Hub + GitHub
πŸš€ Scalability & Auto-scaling
Tool Purpose
Karpenter Auto-scaling and resource management
πŸ“Š Monitoring & Observability
Tool Purpose
Prometheus Metrics collection and alerting
Grafana Visualization dashboards and analytics
πŸ” Health Checks Built-in health checks and structured logging

βœ… Prerequisites

πŸ’‘ Tip: Make sure you have the following tools installed and configured before starting:

☁️ Cloud Tools

  • AWS CLI
    • Configured with appropriate permissions
    • EKS, VPC, DynamoDB, and S3 resource access

πŸ—οΈ Infrastructure Tools

  • Terraform
    • Infrastructure management
  • kubectl
    • Kubernetes cluster interaction

🐳 Development Tools

  • Helm
    • Kubernetes application management
  • Docker
    • Container building and testing

πŸš€ Scalability Tools

  • Karpenter
    • Auto-scaling and resource management

πŸ“₯ Deployment Tools

  • ArgoCD
    • GitOps deployment and drift detection

πŸ“Š Monitoring Tools

  • Prometheus
    • Metrics collection and alerting
  • Grafana
    • Visualization dashboards and analytics

πŸš€ Getting Started

Follow these steps to get your Solar System DevOps application up and running:

πŸ“₯ Step 1: Clone the Repository

git clone https://github.com/karimzakzouk/graduation-project-devops.git
cd graduation-project-devops

βš™οΈ Step 2: Configure Infrastructure Backend

Update the Terraform/2-backend.tf file with your S3 bucket details for Terraform remote state storage.

πŸ—οΈ Step 3: Deploy the Infrastructure

Navigate to the Terraform directory and initialize the deployment:

cd Terraform/
terraform init
terraform apply -auto-approve

⏳ This will provision: VPC, EKS cluster, ArgoCD, and the monitoring stack.

πŸ”§ Step 4: Configure kubectl

After Terraform completes, it will output the command to configure kubectl. Run that command to connect to your new EKS cluster.

πŸš€ Step 5: Deploy the Application

The CI/CD pipeline handles this automatically. To deploy manually:

kubectl apply -f argocd/application.yaml

πŸ“ Project Structure

πŸ—‚οΈ Click to expand project structure
β”œβ”€β”€ πŸ“± Application Code
β”‚   β”œβ”€β”€ app.py                # Main Python application
β”‚   β”œβ”€β”€ app_test.py           # Test suites
β”‚   β”œβ”€β”€ index.html            # Frontend UI
β”‚   └── Dockerfile            # Container definition
β”‚
β”œβ”€β”€ ☸️ Helm
β”‚   └── helm/
β”‚       β”œβ”€β”€ Chart.yaml        # Helm chart metadata
β”‚       β”œβ”€β”€ values.yaml       # Configuration values
β”‚       └── templates/        # Kubernetes manifests
β”‚   
β”‚
β”œβ”€β”€ πŸ—οΈ Terraform
β”‚   β”œβ”€β”€ 0-versions.tf         # Provider versions
β”‚   β”œβ”€β”€ ...                   # Main infrastructure files
β”‚   └── modules/
β”‚       β”œβ”€β”€ vpc/              # VPC module
β”‚       └── eks/              # EKS cluster module

β”œβ”€β”€ πŸš€ Scalability (Karpenter)
β”‚   └── karpenter/
β”‚       └── karpenter-resources.yaml    # Auto-scaling configuration
β”‚
β”œβ”€β”€ πŸ“Š Monitoring & GitOps
β”‚   └── argocd/
β”‚       β”œβ”€β”€ monitoring.yml    # Prometheus & Grafana configuration
β”‚       └── application.yml   # Application dashboards
β”‚
β”œβ”€β”€ πŸ”„ CI/CD Workflows
β”‚   └── .github/workflows/
β”‚       β”œβ”€β”€ main-pipeline.yml # Orchestrator workflow
β”‚       β”œβ”€β”€ ci.yml            # Test, quality checks & SonarQube
β”‚       β”œβ”€β”€ docker.yml        # Container build & push
β”‚       β”œβ”€β”€ terraform.yml     # Infrastructure deployment
β”‚       β”œβ”€β”€ karpenter.yml     # Auto-scaling provisioner
β”‚       β”œβ”€β”€ argocd.yml        # GitOps controller setup
β”‚       β”œβ”€β”€ monitoring.yml    # Observability stack deployment
β”‚       └── deploy.yml        # Application deployment

β”œβ”€β”€ πŸ”§ backend/
β”‚   └── main.tf            # Terraform S3 & DynamoDB
β”‚
└── πŸ–ΌοΈ Static Assets
    └── static/               # Planet images & backgrounds

πŸ”„ DevOps Pipeline

Robust CI/CD Pipeline with GitHub Actions

Pipeline Flow

1️⃣ Continuous Integration (CI)

  • βœ… Code Quality: Automated testing with pytest
  • πŸ“Š Code Coverage: Coverage reports to maintain standards
  • πŸ”’ Code Scanning: Code quality checks using SonarQube

2️⃣ Continuous Deployment (CD)

  • πŸ“¦ Multi-Registry Push: Docker Hub & GitHub Container Registry
  • πŸ—οΈ Infrastructure Deployment: Terraform-managed AWS EKS
  • πŸš€ GitOps Deployment: ArgoCD ensures Git-to-cluster sync

3️⃣ GitHub Actions Workflows

  • 🎯 Main Pipeline: Orchestrates all sub-workflows
  • ⚑ Configurable Skips: Faster development cycles
  • πŸ”„ Automated Triggers: Push, PR, and scheduled runs
  • πŸ“‹ Trigger Filters: Detect which workflow to run
πŸ” Detailed Workflow Breakdown

🎯 Main Pipeline (main-pipeline.yml)

  • Orchestrates all sub-workflows (CI, Docker, Terraform, etc.)
  • Allows configurable skips for faster development cycles

πŸ§ͺ CI Workflow (ci.yml)

  • Runs unit tests and code coverage
  • Enforces quality gates before allowing code to be merged

🐳 Docker Workflow (docker.yml)

  • Builds multi-architecture container images
  • Scans images for vulnerabilities and pushes to multiple registries

πŸ—οΈ Terraform Workflow (terraform.yml)

  • Manages infrastructure provisioning and updates via IaC
  • Uses an S3 backend for secure state management

πŸš€ Karpenter Workflow (karpenter.yml)

  • Manages auto-scaling and resource management

πŸ“Š Monitoring Workflow (monitoring.yml)

  • Manages monitoring stack deployment

πŸ“₯ ArgoCD Workflow (argocd.yml)

  • Manages ArgoCD deployment and drift detection

πŸ“€ Deploy Workflow (deploy.yml)

  • Manages application deployment

🎯 GitOps with ArgoCD

GitOps

πŸš€ ArgoCD Implementation

πŸ“‹ Declarative GitOps

Git repository serves as the single source of truth for all deployments

πŸ”„ Automated Sync

ArgoCD continuously monitors Git repo and automatically syncs changes to cluster

πŸ›‘οΈ Self-Healing

Automatically corrects configuration drift to ensure live state matches desired state

↩️ Rollback Capabilities

Easily revert to previous stable application states with a single command


πŸ“Š Monitoring & Observability

Complete Monitoring Stack

Prometheus Grafana

πŸ“ˆ Prometheus Stack

  • πŸ“Š Metrics Collection: Detailed metrics from application, infrastructure, and Kubernetes
  • πŸ” Service Discovery: Automatically discovers new services and pods to monitor
  • 🚨 Alerting Rules: Pre-configured alerts for critical application and infrastructure issues

πŸ“ˆ Grafana Dashboards

  • πŸ“± Application Metrics: Request rates, response times, and error rates
  • πŸ–₯️ Infrastructure Monitoring: Node CPU, memory, disk, and network usage
  • ☸️ Kubernetes Cluster: Pod status, resource utilization, and cluster health

πŸš€ Auto-scaling & Resource Management

Karpenter

πŸš€ Karpenter Implementation

βš™οΈ Cluster Configuration

  • Version: Kubernetes 1.30
  • Node Groups: Auto-scaling worker nodes
  • Instance Type: t3.medium instances

πŸ“Š Auto-scaling

  • Auto-scaling: Auto-scaling worker nodes
  • Instance Type: t3.medium instances

☸️ Kubernetes Infrastructure

AWS EKS

πŸ›οΈ AWS EKS Cluster

βš™οΈ Cluster Configuration

  • Version: Kubernetes 1.30
  • Node Groups: Auto-scaling worker nodes
  • Instance Type: t3.medium instances

🌐 Networking

  • VPC: Custom VPC deployment
  • Subnets: Public/private across multiple AZs
  • High Availability: Multi-zone deployment

πŸš€ Application Deployment

  • Helm Charts: Templated Kubernetes manifests
  • Secrets Management: Secure credential handling
  • Load Balancing: External exposure with health checks

🀝 Contributing

Contributors Welcome

Contributions are welcome! If you have suggestions for improvement, please open an issue or submit a pull request.

πŸ“ How to Contribute

  1. 🍴 Fork the Project
  2. 🌿 Create your Feature Branch
    git checkout -b feature/AmazingFeature
  3. πŸ’Ύ Commit your Changes
    git commit -m 'Add some AmazingFeature'
  4. πŸ“€ Push to the Branch
    git push origin feature/AmazingFeature
  5. πŸ”„ Open a Pull Request

🌟 Built with ❀️ for DevOps Excellence

Made with Love DevOps

⭐ Star this repository if you found it helpful!

About

A comprehensive Node.js web application demonstrating enterprise-grade DevOps practices with complete CI/CD pipeline, Infrastructure as Code, GitOps implementation, and comprehensive monitoring.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 6