Skip to content

BIGRS-ITI/.github

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 

Repository files navigation

BIGRS - Cloud-Native Task Manager Platform

A complete production-grade cloud-native application demonstrating modern DevOps practices, GitOps workflows, and AWS EKS deployment.

πŸ“‹ Table of Contents


🎯 Overview

BIGRS is a modern task management application built with a microservices architecture, deployed on AWS EKS using GitOps principles. The project demonstrates industry best practices for cloud-native applications including:

  • Infrastructure as Code (Terraform)
  • GitOps deployment (ArgoCD)
  • CI/CD automation (Jenkins)
  • Container orchestration (Kubernetes)
  • Secret management (External Secrets Operator)
  • Automated image updates (ArgoCD Image Updater)
  • TLS certificate management (cert-manager)
  • High availability and auto-scaling

Live Application:


πŸ—οΈ Architecture

High-Level Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                              AWS Cloud                                   β”‚
β”‚                                                                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚                         VPC (Multi-AZ)                             β”‚ β”‚
β”‚  β”‚                                                                    β”‚ β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”            β”‚ β”‚
β”‚  β”‚  β”‚ Public Subnetβ”‚  β”‚ Public Subnetβ”‚  β”‚ Public Subnetβ”‚            β”‚ β”‚
β”‚  β”‚  β”‚   (AZ-1)     β”‚  β”‚   (AZ-2)     β”‚  β”‚   (AZ-3)     β”‚            β”‚ β”‚
β”‚  β”‚  β”‚              β”‚  β”‚              β”‚  β”‚              β”‚            β”‚ β”‚
β”‚  β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚            β”‚ β”‚
β”‚  β”‚  β”‚  β”‚NAT GW  β”‚  β”‚  β”‚  β”‚NAT GW  β”‚  β”‚  β”‚  β”‚NAT GW  β”‚  β”‚            β”‚ β”‚
β”‚  β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚            β”‚ β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜            β”‚ β”‚
β”‚  β”‚         β”‚                 β”‚                 β”‚                     β”‚ β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”            β”‚ β”‚
β”‚  β”‚  β”‚Private Sub  β”‚  β”‚Private Sub   β”‚  β”‚Private Sub   β”‚            β”‚ β”‚
β”‚  β”‚  β”‚  (AZ-1)     β”‚  β”‚  (AZ-2)      β”‚  β”‚  (AZ-3)      β”‚            β”‚ β”‚
β”‚  β”‚  β”‚             β”‚  β”‚              β”‚  β”‚              β”‚            β”‚ β”‚
β”‚  β”‚  β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚  β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚  β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚            β”‚ β”‚
β”‚  β”‚  β”‚ β”‚EKS Nodesβ”‚ β”‚  β”‚ β”‚EKS Nodesβ”‚  β”‚  β”‚ β”‚EKS Nodesβ”‚  β”‚            β”‚ β”‚
β”‚  β”‚  β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚  β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚  β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚            β”‚ β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜            β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚                                                                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚                    EKS Cluster Components                       β”‚    β”‚
β”‚  β”‚                                                                 β”‚    β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚    β”‚
β”‚  β”‚  β”‚  ArgoCD    β”‚  β”‚  Jenkins   β”‚  β”‚   Nginx    β”‚  β”‚  Cert    β”‚ β”‚    β”‚
β”‚  β”‚  β”‚            β”‚  β”‚            β”‚  β”‚  Ingress   β”‚  β”‚ Manager  β”‚ β”‚    β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚    β”‚
β”‚  β”‚                                                                 β”‚    β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”               β”‚    β”‚
β”‚  β”‚  β”‚  External  β”‚  β”‚   Image    β”‚  β”‚    ECR     β”‚               β”‚    β”‚
β”‚  β”‚  β”‚  Secrets   β”‚  β”‚  Updater   β”‚  β”‚   Token    β”‚               β”‚    β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β”‚    β”‚
β”‚  β”‚                                                                 β”‚    β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚    β”‚
β”‚  β”‚  β”‚           Task Manager Application                      β”‚   β”‚    β”‚
β”‚  β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚   β”‚    β”‚
β”‚  β”‚  β”‚  β”‚ Frontend β”‚  β”‚ Backend  β”‚  β”‚  Redis   β”‚  β”‚ MySQL  β”‚  β”‚   β”‚    β”‚
β”‚  β”‚  β”‚  β”‚  (Nginx) β”‚  β”‚(Node.js) β”‚  β”‚ (Cache)  β”‚  β”‚ (RDS)  β”‚  β”‚   β”‚    β”‚
β”‚  β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚   β”‚    β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚                                                                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                  β”‚
β”‚  β”‚     ECR      β”‚  β”‚  RDS MySQL   β”‚  β”‚   Secrets    β”‚                  β”‚
β”‚  β”‚  Repositoriesβ”‚  β”‚   Database   β”‚  β”‚   Manager    β”‚                  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Data Flow

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  User    β”‚
β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
     β”‚
     β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Route53 / CloudFlare   β”‚
β”‚   DNS Resolution         β”‚
β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
     β”‚
     β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Network Load Balancer  β”‚
β”‚   (AWS NLB)              β”‚
β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
     β”‚
     β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   NGINX Ingress          β”‚
β”‚   Controller             β”‚
β”‚   - TLS Termination      β”‚
β”‚   - Routing              β”‚
β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
     β”‚
     β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
     β–Ό                              β–Ό                      β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Frontend β”‚              β”‚   Backend    β”‚      β”‚    ArgoCD      β”‚
β”‚ (Nginx)  │──────────────│   (API)      β”‚      β”‚    (GitOps)    β”‚
β”‚          β”‚     HTTP     β”‚              β”‚      β”‚                β”‚
β”‚ bigrs.appβ”‚              β”‚api.bigrs.app β”‚      β”‚argocd.bigrs.appβ”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                 β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β–Ό            β–Ό            β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚  Redis  β”‚  β”‚  MySQL  β”‚  β”‚ Secrets β”‚
              β”‚ (Cache) β”‚  β”‚  (RDS)  β”‚  β”‚ Manager β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“ Repository Structure

The project is organized into three main repositories:

1. Infrastructure Repository

Contains all Terraform code for provisioning AWS infrastructure:

Infrastructure/
β”œβ”€β”€ terraform/
β”‚   β”œβ”€β”€ environment/
β”‚   β”‚   β”œβ”€β”€ dev/              # Development environment
β”‚   β”‚   β”‚   β”œβ”€β”€ main.tf
β”‚   β”‚   β”‚   β”œβ”€β”€ variables.tf
β”‚   β”‚   β”‚   β”œβ”€β”€ terraform.tfvars
β”‚   β”‚   β”‚   β”œβ”€β”€ outputs.tf
β”‚   β”‚   β”‚   β”œβ”€β”€ provider.tf
β”‚   β”‚   β”‚   └── creds         # AWS credentials (gitignored)
β”‚   β”‚   └── prod/             # Production environment
β”‚   β”‚       └── (same structure as dev)
β”‚   └── modules/
β”‚       β”œβ”€β”€ vpc/              # Network infrastructure
β”‚       β”œβ”€β”€ eks/              # Kubernetes cluster
β”‚       β”œβ”€β”€ ecr/              # Container registry
β”‚       β”œβ”€β”€ iam/              # IAM roles & policies
β”‚       β”œβ”€β”€ rds/              # MySQL database
β”‚       β”œβ”€β”€ bastion/          # Bastion host (prod only)
β”‚       └── argocd/           # ArgoCD bootstrap
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ bootstrap-argocd.sh  # ArgoCD installation
β”‚   β”œβ”€β”€ cleanup-argocd.sh    # ArgoCD cleanup
β”‚   └── delete-nlb.sh        # Load balancer cleanup
β”œβ”€β”€ argocd/
β”‚   └── bootstrap-app.yaml   # App of Apps config
└── helm-values/
    └── argocd-values.yaml   # ArgoCD customization

Key Features:

  • Multi-AZ high availability
  • Auto-scaling node groups
  • Private subnet deployment
  • Pod Identity (modern IRSA)
  • S3 backend state management
  • Automated cleanup scripts

2. Platform Repository

Contains Kubernetes manifests and ArgoCD applications:

Platform/
β”œβ”€β”€ argo-apps/                          # ArgoCD Application definitions
β”‚   β”œβ”€β”€ pre-apps.yaml                   # Prerequisites (wave -1)
β”‚   β”œβ”€β”€ cert-manager.yaml               # TLS certificates (wave 0)
β”‚   β”œβ”€β”€ cert-manager-issuers.yaml       # Let's Encrypt issuer (wave 1)
β”‚   β”œβ”€β”€ nginx-ingress-controller.yaml   # Ingress controller (wave 2)
β”‚   β”œβ”€β”€ external-secrets-operator.yaml  # Secret manager (wave 3)
β”‚   β”œβ”€β”€ external-secrets-app.yaml       # Secret store config (wave 4)
β”‚   β”œβ”€β”€ jenkins-app.yaml                # CI/CD server (wave 5)
β”‚   β”œβ”€β”€ image-updater-app.yaml          # Auto updates (wave 6)
β”‚   └── nodejs-app.yaml                 # Main application (wave 7)
β”‚
β”œβ”€β”€ helm-values/                        # Helm chart values
β”‚   β”œβ”€β”€ cert-manager-values.yaml
β”‚   β”œβ”€β”€ cluster_issuer.yaml
β”‚   β”œβ”€β”€ nginx-values.yaml
β”‚   β”œβ”€β”€ nginx-values-tf.yaml            # Terraform-generated
β”‚   β”œβ”€β”€ jenkins-values.yaml
β”‚   β”œβ”€β”€ external-secrets-values.yaml
β”‚   └── image-updater-values.yaml
β”‚
└── apps/                               # Application manifests
    β”œβ”€β”€ pre-apps/                       # Bootstrap resources
    β”‚   β”œβ”€β”€ nginx-ingress-contrller/
    β”‚   β”œβ”€β”€ pre-jenkins/
    β”‚   β”œβ”€β”€ pre-ESO/
    β”‚   β”œβ”€β”€ ecr-token-refresher/
    β”‚   └── argocd-ingress.yaml
    β”‚
    β”œβ”€β”€ external-secrets/               # Secret management
    β”‚   β”œβ”€β”€ cluster-secretstore.yaml
    β”‚   └── secrets/
    β”‚       └── db-credentials.yaml
    β”‚
    └── nodejs-app/                     # Task Manager app
        β”œβ”€β”€ Backend/
        β”‚   β”œβ”€β”€ backend-deployment.yaml
        β”‚   β”œβ”€β”€ configmap.yaml
        β”‚   └── backend-ingress.yaml    # api.bigrs.app
        β”œβ”€β”€ Frontend/
        β”‚   β”œβ”€β”€ frontend-deployment.yaml
        β”‚   └── ingress.yaml            # bigrs.app
        β”œβ”€β”€ Redis/
        β”‚   └── redis-deployment.yaml
        β”œβ”€β”€ serviceaccount.yaml
        └── kustomization.yaml

Key Features:

  • App of Apps pattern
  • Sync wave ordering
  • Multi-source applications
  • Automated image updates
  • Secret synchronization
  • Network policies

3. nodejs_app Repository

Contains application source code:

nodejs_app/
β”œβ”€β”€ server.js                    # Express server
β”œβ”€β”€ package.json
β”œβ”€β”€ Dockerfile.backend
β”œβ”€β”€ Dockerfile.frontend
β”œβ”€β”€ Jenkinsfile                  # CI/CD pipeline
β”œβ”€β”€ docker-compose.yml           # Local development
β”œβ”€β”€ docker-entrypoint.sh
β”œβ”€β”€ docker-entrypoint-frontend.sh
β”‚
β”œβ”€β”€ config/                      # Configuration
β”‚   β”œβ”€β”€ database.js              # MySQL connection pool
β”‚   └── redis.js                 # Redis client
β”‚
β”œβ”€β”€ controllers/                 # Business logic
β”‚   └── taskController.js
β”‚
β”œβ”€β”€ models/                      # Data models
β”‚   └── Task.js
β”‚
β”œβ”€β”€ routes/                      # API routes
β”‚   └── tasks.js
β”‚
β”œβ”€β”€ public/                      # Frontend (SPA)
β”‚   β”œβ”€β”€ index.html
β”‚   β”œβ”€β”€ css/
β”‚   β”‚   └── style.css
β”‚   └── js/
β”‚       └── app.js
β”‚
β”œβ”€β”€ scripts/                     # Utilities
β”‚   └── init-db.js               # Database initialization
β”‚
β”œβ”€β”€ k8s/                         # Kubernetes manifests
β”‚   β”œβ”€β”€ namespace.yaml
β”‚   β”œβ”€β”€ backend-deployment.yaml
β”‚   β”œβ”€β”€ frontend-deployment.yaml
β”‚   β”œβ”€β”€ redis-deployment.yaml
β”‚   β”œβ”€β”€ mysql-deployment.yaml
β”‚   β”œβ”€β”€ configmaps.yaml
β”‚   β”œβ”€β”€ secrets.yaml
β”‚   β”œβ”€β”€ persistent-volumes.yaml
β”‚   β”œβ”€β”€ ingress.yaml
β”‚   └── deploy.sh
β”‚
└── nginx.conf                   # Frontend web server config

Key Features:

  • RESTful API
  • Redis caching
  • MySQL persistence
  • Health checks
  • Docker multi-stage builds
  • Horizontal pod autoscaling

πŸ› οΈ Technology Stack

Infrastructure Layer

  • Cloud Provider: AWS
  • IaC Tool: Terraform 1.5+
  • Kubernetes: AWS EKS 1.31
  • Container Registry: Amazon ECR
  • Database: Amazon RDS MySQL 8.0
  • Cache: Redis 7.0
  • Load Balancer: AWS Network Load Balancer
  • DNS: Route53 / CloudFlare
  • Secrets: AWS Secrets Manager

Platform Layer

  • GitOps: ArgoCD 8.1.0
  • CI/CD: Jenkins 2.528.1-lts-jdk21
  • Ingress: NGINX Ingress Controller 4.14.0
  • TLS: cert-manager 1.16.1 + Let's Encrypt
  • Secret Management: External Secrets Operator 1.0.0
  • Image Updates: ArgoCD Image Updater 0.14.0
  • Package Manager: Helm 3.x

Application Layer

  • Backend: Node.js 18 + Express.js 4.18
  • Frontend: HTML5, CSS3, JavaScript (Vanilla) + Tailwind CSS
  • Database ORM: mysql2 (Promise-based)
  • Cache Client: redis 4.6
  • Web Server: Nginx (Alpine)

Development Tools

  • Version Control: Git + GitHub
  • Container Runtime: Docker 25.x
  • Container Orchestration: Docker Compose 2.x
  • Code Editor: VS Code (recommended)
  • CLI Tools: kubectl, helm, aws-cli, terraform

✨ Features

Application Features

  • βœ… Task Management: Create, read, update, delete tasks
  • βœ… Status Tracking: Pending, In Progress, Completed
  • βœ… Priority Levels: Low, Medium, High
  • βœ… Due Dates: Track task deadlines
  • βœ… Statistics Dashboard: Real-time task metrics
  • βœ… Redis Caching: ~80% faster response times
  • βœ… Responsive UI: Mobile-friendly design
  • βœ… Real-time Updates: Live task synchronization

Infrastructure Features

  • πŸ—οΈ Multi-AZ Deployment: High availability across 3 AZs
  • πŸ”„ Auto-scaling: HPA for both frontend and backend
  • πŸ” Pod Identity: Secure AWS service access
  • 🌐 Private Networking: Services in private subnets
  • πŸ’Ύ Persistent Storage: EBS volumes for stateful apps
  • πŸ”’ Network Policies: Restricted pod-to-pod communication
  • πŸš€ Blue-Green Deployments: Zero-downtime updates
  • πŸ“Š Resource Limits: CPU and memory constraints

DevOps Features

  • πŸ”„ GitOps Workflow: Declarative infrastructure
  • πŸ€– Automated CI/CD: Build, test, deploy pipeline
  • πŸ–ΌοΈ Automated Image Updates: Latest images auto-deployed
  • πŸ” Secret Management: External Secrets Operator
  • πŸ“œ TLS Certificates: Automated cert issuance/renewal
  • πŸ” Health Monitoring: Liveness and readiness probes
  • πŸ“¦ Container Scanning: ECR image vulnerability scans
  • 🧹 Automated Cleanup: Resource lifecycle management

πŸ“‹ Prerequisites

Required Software

For Infrastructure Deployment:

  • AWS CLI 2.x
  • Terraform 1.5+
  • kubectl 1.28+
  • helm 3.x
  • Git 2.x

For Application Development:

  • Node.js 18+
  • Docker 25.x
  • Docker Compose 2.x
  • MySQL 8.0 (for local development)
  • Redis 7.0 (for local development)

AWS Requirements

AWS Account Setup:

  1. AWS account with appropriate permissions
  2. IAM user with programmatic access
  3. AWS credentials configured (aws configure)

Required IAM Permissions:

  • EC2 (VPC, Security Groups, etc.)
  • EKS (Cluster management)
  • ECR (Container registry)
  • RDS (Database)
  • IAM (Role management)
  • S3 (Terraform state)
  • Secrets Manager (Secret storage)
  • EBS (Persistent volumes)
  • ELB (Load balancers)

Estimated AWS Costs:

  • EKS Control Plane: ~$73/month
  • EC2 Instances (3x t3.medium): ~$90/month
  • RDS MySQL (db.t3.micro): ~$15/month
  • NAT Gateways (3x): ~$100/month
  • Load Balancers: ~$20/month
  • Total: ~$300/month (varies by usage)

Domain Requirements

  • Domain name (e.g., bigrs.app)
  • DNS management access (Route53 or CloudFlare)
  • SSL/TLS certificate (automated via Let's Encrypt)

GitHub Requirements

  • GitHub account
  • Personal Access Token (PAT) with repo permissions
  • Three repositories created:
    • Infrastructure
    • Platform
    • nodejs_app

πŸš€ Quick Start

1. Clone Repositories

# Clone all three repositories
git clone https://github.com/BIGRS-ITI/Infrastructure.git
git clone https://github.com/BIGRS-ITI/Platform.git
git clone https://github.com/BIGRS-ITI/nodejs_app.git

2. Configure AWS Credentials

cd Infrastructure/terraform/environment/dev

# Create credentials file
cat > creds << EOF
[default]
aws_access_key_id = YOUR_AWS_ACCESS_KEY
aws_secret_access_key = YOUR_AWS_SECRET_KEY
EOF

chmod 600 creds

3. Configure Terraform Variables

# Edit terraform.tfvars
vim terraform.tfvars

Minimum required variables:

cluster_name         = "bigrs-cluster"
aws_region           = "us-east-1"
github_platform_repo = "BIGRS-ITI/Platform"
github_token         = "ghp_your_github_token"

4. Deploy Infrastructure

# Initialize Terraform
terraform init

# Review plan
terraform plan

# Deploy (takes ~15-20 minutes)
terraform apply

5. Access Cluster

# Configure kubectl
aws eks update-kubeconfig --name bigrs-cluster --region us-east-1

# Verify access
kubectl get nodes
kubectl get pods -A

6. Verify Deployment

# Check ArgoCD applications
kubectl get applications -n argocd

# Wait for all apps to be healthy
kubectl wait --for=condition=Healthy application --all -n argocd --timeout=600s

# Get ingress URLs
kubectl get ingress -A

7. Access Applications

# Get ArgoCD admin password
kubectl -n argocd get secret argocd-initial-admin-secret \
  -o jsonpath='{.data.password}' | base64 -d

# Get Jenkins admin password
kubectl exec -n jenkins deployment/jenkins -- \
  cat /run/secrets/additional/chart-admin-password

Access URLs:


πŸ“š Detailed Setup

Infrastructure Deployment

Development Environment

cd Infrastructure/terraform/environment/dev

# 1. Create AWS credentials
cat > creds << EOF
[default]
aws_access_key_id = YOUR_KEY
aws_secret_access_key = YOUR_SECRET
EOF

# 2. Configure variables
cat > terraform.tfvars << EOF
# Cluster Configuration
cluster_name = "bigrs-cluster"
eks_version  = "1.31"
aws_region   = "us-east-1"

# VPC Configuration
vpc_cidr = "10.0.0.0/16"
vpc_name = "bigrs-vpc"

subnets_config = {
  public-1 = {
    cidr_block        = "10.0.1.0/24"
    availability_zone = "us-east-1a"
    map_public_ip     = true
  }
  public-2 = {
    cidr_block        = "10.0.2.0/24"
    availability_zone = "us-east-1b"
    map_public_ip     = true
  }
  public-3 = {
    cidr_block        = "10.0.3.0/24"
    availability_zone = "us-east-1c"
    map_public_ip     = true
  }
  private-1 = {
    cidr_block        = "10.0.11.0/24"
    availability_zone = "us-east-1a"
    map_public_ip     = false
  }
  private-2 = {
    cidr_block        = "10.0.12.0/24"
    availability_zone = "us-east-1b"
    map_public_ip     = false
  }
  private-3 = {
    cidr_block        = "10.0.13.0/24"
    availability_zone = "us-east-1c"
    map_public_ip     = false
  }
}

# ECR Configuration
repositories = {
  backend = {
    name        = "bigrs-nodejs-app-backend"
    description = "Backend API container"
  }
  frontend = {
    name        = "bigrs-nodejs-app-frontend"
    description = "Frontend web application"
  }
}

image_retention_count = 5
scan_on_push          = true
image_tag_mutability  = "MUTABLE"

# GitHub Configuration
github_platform_repo = "BIGRS-ITI/Platform"
github_token         = "ghp_your_token_here"

# EKS Configuration
endpoint_private_access_var = true
endpoint_public_access_var  = false
node_group_instance_type    = "t3.medium"

# Environment
use_bastion                = false
bastion_private_key_path   = ""
environment                = "dev"
EOF

# 3. Initialize and deploy
terraform init
terraform plan
terraform apply -auto-approve

Production Environment

Production includes a bastion host for secure access:

cd Infrastructure/terraform/environment/prod

# Additional production variables:
bastion_key_name         = "bigrs-bastion-key"
bastion_instance_type    = "t3.micro"
bastion_allowed_cidrs    = ["YOUR_IP/32"]
enable_bastion_elastic_ip = true
use_bastion              = true
bastion_private_key_path = "/path/to/bastion-key.pem"

Application Deployment

Local Development

cd nodejs_app

# 1. Copy environment template
cp .env.example .env

# 2. Edit environment variables
vim .env

# 3. Start with Docker Compose
docker-compose up -d

# 4. Initialize database
docker-compose exec backend npm run init-db

# 5. Access application
open http://localhost:8080

Environment Variables:

# Server
NODE_ENV=development
PORT=3000

# Database
DB_HOST=mysql
DB_PORT=3306
DB_USER=taskuser
DB_PASSWORD=taskpassword
DB_NAME=taskmanager

# Redis
REDIS_HOST=redis
REDIS_PORT=6379
REDIS_PASSWORD=

# Cache
CACHE_TTL=300

# Frontend
FRONTEND_URL=http://localhost:8080

Kubernetes Deployment (Manual)

cd nodejs_app/k8s

# 1. Update image references
vim backend-deployment.yaml
vim frontend-deployment.yaml

# 2. Deploy resources
kubectl apply -f namespace.yaml
kubectl apply -f secrets.yaml
kubectl apply -f configmaps.yaml
kubectl apply -f persistent-volumes.yaml
kubectl apply -f mysql-deployment.yaml
kubectl apply -f redis-deployment.yaml
kubectl apply -f backend-deployment.yaml
kubectl apply -f frontend-deployment.yaml
kubectl apply -f ingress.yaml

# 3. Verify deployment
kubectl get all -n taskmanager

GitOps Deployment (Recommended)

Applications are automatically deployed via ArgoCD after infrastructure provisioning.

Deployment Flow:

  1. Terraform deploys ArgoCD
  2. ArgoCD syncs from Platform repository
  3. Applications deployed in sync wave order:
    • Wave -1: Pre-requisites (namespaces, etc.)
    • Wave 0: cert-manager
    • Wave 1: Cluster issuers
    • Wave 2: NGINX Ingress
    • Wave 3: External Secrets Operator
    • Wave 4: External Secrets app
    • Wave 5: Jenkins
    • Wave 6: Image Updater
    • Wave 7: Task Manager app

πŸ”§ Application Components

Backend API (Node.js + Express)

Location: nodejs_app/

Key Features:

  • RESTful API endpoints
  • MySQL database integration
  • Redis caching layer
  • Health check endpoints
  • Request validation
  • Error handling middleware

API Endpoints:

Method Endpoint Description
GET /api/health Health check
GET /api/tasks Get all tasks (with filters)
GET /api/tasks/stats Get task statistics
GET /api/tasks/:id Get task by ID
POST /api/tasks Create new task
PUT /api/tasks/:id Update task
DELETE /api/tasks/:id Delete task
GET /api/redis-stats Redis cache statistics
POST /api/redis-reset Reset Redis cache

Request Examples:

# Create task
curl -X POST https://api.bigrs.app/api/tasks \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Deploy to production",
    "description": "Deploy v2.0 to EKS cluster",
    "status": "pending",
    "priority": "high",
    "due_date": "2025-12-01"
  }'

# Get all tasks
curl https://api.bigrs.app/api/tasks

# Filter by status
curl https://api.bigrs.app/api/tasks?status=in-progress

# Get statistics
curl https://api.bigrs.app/api/tasks/stats

# Health check
curl https://api.bigrs.app/api/health

Response Format:

{
  "success": true,
  "count": 5,
  "data": [
    {
      "id": 1,
      "title": "Deploy to production",
      "description": "Deploy v2.0 to EKS cluster",
      "status": "pending",
      "priority": "high",
      "due_date": "2025-12-01",
      "created_at": "2025-11-18T10:00:00.000Z",
      "updated_at": "2025-11-18T10:00:00.000Z"
    }
  ]
}

Frontend (Nginx + Vanilla JS)

Location: nodejs_app/public/

Key Features:

  • Single Page Application (SPA)
  • Responsive design (Tailwind CSS)
  • Real-time task updates
  • Redis cache statistics
  • Toast notifications
  • Task filtering
  • Dark mode support

UI Components:

  • Task cards with drag-and-drop (planned)
  • Statistics dashboard
  • Modal forms
  • Filter buttons
  • Redis stats viewer

Database Schema

MySQL (RDS)

CREATE TABLE tasks (
  id INT AUTO_INCREMENT PRIMARY KEY,
  title VARCHAR(255) NOT NULL,
  description TEXT,
  status ENUM('pending', 'in-progress',

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors