|
1 | | -# 🌌 Solar System - Enterprise DevOps Application |
| 1 | +# 🌌 Solar System DevOps Application |
2 | 2 |
|
3 | 3 | <div align="center"> |
4 | 4 |
|
5 | | - |
| 5 | + |
6 | 6 |
|
7 | | -[](https://github.com/features/actions) |
8 | | -[](https://kubernetes.io/) |
9 | | -[](https://terraform.io/) |
10 | | -[](https://argoproj.github.io/cd/) |
11 | | - |
12 | | -**Interactive Solar System web app with enterprise-grade DevOps practices** |
| 7 | +**Enterprise-grade Python web application with complete DevOps pipeline** |
13 | 8 |
|
14 | 9 | </div> |
15 | 10 |
|
16 | 11 | --- |
17 | 12 |
|
18 | | -## 🚀 Overview |
19 | | - |
20 | | -Production-ready Solar System visualization platform demonstrating modern DevOps practices with complete automation, monitoring, and scalability. |
| 13 | +## 🚀 **What This Project Does** |
21 | 14 |
|
22 | | -**Key Features:** |
23 | | -- 🪐 Interactive planet data visualization with Flask + MongoDB |
24 | | -- 🔄 Smart CI/CD pipeline with change detection |
25 | | -- 🏗️ AWS EKS infrastructure with Terraform |
26 | | -- 🚀 GitOps deployment with ArgoCD |
27 | | -- 📊 Complete monitoring stack (Prometheus + Grafana) |
28 | | -- ⚡ Auto-scaling with Karpenter |
| 15 | +**Interactive Solar System web app** that demonstrates modern DevOps practices in production. |
29 | 16 |
|
30 | | -### 🏗️ Architecture |
31 | | - |
32 | | -<p align="center"> |
33 | | -<img src="assets/Diagram.gif" alt="Architecture Diagram" width="600" /> |
34 | | -</p> |
| 17 | +### **🎯 Key Features** |
| 18 | +- 🪐 **Solar System Visualization** - Interactive planets with real data |
| 19 | +- 🐍 **Python Backend** - Flask API with MongoDB database |
| 20 | +- 📱 **Responsive Frontend** - Modern HTML/CSS/JavaScript interface |
| 21 | +- 🔄 **Complete CI/CD** - Automated testing, building, and deployment |
| 22 | +- ☸️ **Kubernetes Deployment** - AWS EKS cluster with auto-scaling |
| 23 | +- 🚀 **GitOps** - ArgoCD for automated deployments |
| 24 | +- 📊 **Monitoring** - Prometheus + Grafana dashboards |
35 | 25 |
|
36 | 26 | --- |
37 | 27 |
|
38 | | -## 🛠️ Tech Stack |
39 | | - |
40 | | -<table> |
41 | | -<tr> |
42 | | -<td width="50%"> |
| 28 | +## 🛠️ **Technology Stack** |
43 | 29 |
|
44 | | -### 📱 Application |
| 30 | +### **Application** |
45 | 31 | - **Frontend:** HTML5, CSS3, JavaScript |
46 | | -- **Backend:** Python Flask 2.3.3 |
47 | | -- **Database:** MongoDB with PyMongo |
| 32 | +- **Backend:** Python Flask |
| 33 | +- **Database:** MongoDB |
48 | 34 | - **Testing:** pytest with coverage |
49 | | -- **Monitoring:** Prometheus metrics |
50 | 35 |
|
51 | | -</td> |
52 | | -<td width="50%"> |
53 | | - |
54 | | -### 🏗️ Infrastructure |
55 | | -- **Cloud:** AWS EKS, VPC, S3 |
56 | | -- **IaC:** Terraform with modular design |
57 | | -- **Containers:** Docker + Kubernetes + Helm |
58 | | -- **GitOps:** ArgoCD for automated deployment |
59 | | -- **Auto-scaling:** Karpenter for dynamic nodes |
60 | | - |
61 | | -</td> |
62 | | -</tr> |
63 | | -</table> |
| 36 | +### **DevOps Infrastructure** |
| 37 | +- **Containers:** Docker with multi-stage builds |
| 38 | +- **Orchestration:** Kubernetes (AWS EKS) |
| 39 | +- **Infrastructure:** Terraform (AWS VPC, EKS, Load Balancers) |
| 40 | +- **CI/CD:** GitHub Actions workflows |
| 41 | +- **GitOps:** ArgoCD for deployment automation |
| 42 | +- **Monitoring:** Prometheus metrics + Grafana dashboards |
| 43 | +- **Scaling:** Karpenter for auto-scaling nodes |
64 | 44 |
|
65 | 45 | --- |
66 | 46 |
|
67 | | -## ✅ Prerequisites |
68 | | - |
69 | | -- **AWS CLI** with EKS/VPC permissions |
70 | | -- **Terraform** v1.5.7+ |
71 | | -- **kubectl** and **Helm** v3.14+ |
72 | | -- **Docker** for local testing |
| 47 | +## 📋 **Prerequisites** |
73 | 48 |
|
74 | | -**Required Secrets:** |
75 | | -`AWS_ACCOUNT_ID`, `DOCKER_USERNAME`, `DOCKER_TOKEN`, `MONGO_URI`, `MONGO_USERNAME`, `MONGO_PASSWORD`, `GRAFANA_ADMIN_PASSWORD`, `PAT_GITHUB`, `SONAR_TOKEN` |
| 49 | +**Required tools:** |
| 50 | +- AWS CLI (configured with permissions) |
| 51 | +- Terraform |
| 52 | +- kubectl |
| 53 | +- Helm |
| 54 | +- Docker |
76 | 55 |
|
77 | 56 | --- |
78 | 57 |
|
79 | | -## 🚀 Quick Start |
| 58 | +## 🚀 **Quick Start** |
80 | 59 |
|
81 | | -### 1. **Clone & Setup** |
| 60 | +### **1. Clone Repository** |
82 | 61 | ```bash |
83 | | -git clone https://github.com/KarimZakzouk/Graduation-Project-Devops.git |
84 | | -cd Graduation-Project-Devops |
| 62 | +git clone https://github.com/karimzakzouk/graduation-project-devops.git |
| 63 | +cd graduation-project-devops |
85 | 64 | ``` |
86 | 65 |
|
87 | | -### 2. **Configure Backend** |
88 | | -Update `infrastructure/2-backend.tf` with your S3 bucket for Terraform state. |
| 66 | +### **2. Configure Terraform Backend** |
| 67 | +Update `Terraform/2-backend.tf` with your S3 bucket details. |
89 | 68 |
|
90 | | -### 3. **Deploy via GitHub Actions** |
91 | | -- Go to **Actions** → **Solar System - Main Pipeline** → **Run workflow** |
92 | | -- Or deploy manually: |
| 69 | +### **3. Deploy Infrastructure** |
93 | 70 | ```bash |
94 | | -cd Terraform/ |
95 | | -terraform init && terraform apply -auto-approve |
96 | | -aws eks update-kubeconfig --name solar-system-app-cluster --region us-east-1 |
97 | | -kubectl apply -f argocd/applications/ |
| 71 | +cd infrastructure/ |
| 72 | +terraform init |
| 73 | +terraform apply -auto-approve |
98 | 74 | ``` |
| 75 | +*Creates: VPC, EKS cluster, ArgoCD, monitoring stack* |
99 | 76 |
|
100 | | ---- |
| 77 | +### **4. Configure kubectl** |
| 78 | +Run the kubectl command from Terraform output to connect to your cluster. |
101 | 79 |
|
102 | | -## 🔄 CI/CD Pipeline |
| 80 | +### **5. Deploy Application** |
| 81 | +```bash |
| 82 | +kubectl apply -f argocd/application.yaml |
| 83 | +``` |
103 | 84 |
|
104 | | -### **Smart Multi-Workflow Architecture** |
| 85 | +--- |
105 | 86 |
|
106 | | -- **🎯 Main Pipeline** - Orchestrates all workflows with change detection |
107 | | -- **🧪 CI Workflow** - Multi-platform testing (Python 3.10-3.12) + SonarCloud |
108 | | -- **🐳 Docker Workflow** - Multi-registry builds with testing |
109 | | -- **🏗️ Terraform Workflow** - AWS infrastructure deployment |
110 | | -- **⚡ Karpenter Workflow** - Auto-scaling node provisioner |
111 | | -- **🚀 ArgoCD Workflow** - GitOps controller setup |
112 | | -- **📊 Monitoring Workflow** - Prometheus/Grafana stack |
113 | | -- **🌐 Endpoints Workflow** - Service discovery and URLs |
| 87 | +## 📁 **Project Structure** |
114 | 88 |
|
115 | | -**Features:** |
116 | | -- Intelligent change detection (app vs infrastructure) |
117 | | -- Manual workflow control with skip options |
118 | | -- Multi-registry container deployment |
119 | | -- Automated Helm chart updates |
120 | | -- Complete infrastructure teardown capability |
| 89 | +``` |
| 90 | +├── 📱 app.py, index.html, Dockerfile # Application code |
| 91 | +├── ☸️ helm/ # Kubernetes manifests |
| 92 | +├── 🏗️ infrastructure/ # Terraform modules |
| 93 | +├── 🚀 argocd/ # GitOps configurations |
| 94 | +├── 🔄 .github/workflows/ # CI/CD pipelines |
| 95 | +└── 🖼️ static/ # Assets and images |
| 96 | +``` |
121 | 97 |
|
122 | 98 | --- |
123 | 99 |
|
124 | | -## 🎯 GitOps with ArgoCD |
| 100 | +## 🔄 **DevOps Pipeline** |
125 | 101 |
|
126 | | -- **📋 Declarative:** Git as single source of truth |
127 | | -- **🔄 Automated Sync:** Real-time cluster synchronization |
128 | | -- **🛡️ Self-Healing:** Automatic drift correction |
129 | | -- **↩️ Easy Rollbacks:** One-click version recovery |
| 102 | +### **Automated Workflows** |
| 103 | +1. **🧪 CI Pipeline** - Code testing, quality checks, security scanning |
| 104 | +2. **🐳 Docker Build** - Multi-arch container images with vulnerability scanning |
| 105 | +3. **🏗️ Infrastructure** - Terraform deployment of AWS resources |
| 106 | +4. **⚡ Auto-scaling** - Karpenter provisioner for dynamic node management |
| 107 | +5. **🚀 GitOps** - ArgoCD setup and application deployment |
| 108 | +6. **📊 Monitoring** - Prometheus and Grafana stack deployment |
130 | 109 |
|
131 | | -**Applications Managed:** |
132 | | -- Solar System app (via separate Helm repo) |
133 | | -- Monitoring stack (kube-prometheus-stack) |
| 110 | +### **Key Pipeline Features** |
| 111 | +- **✅ Quality Gates** - Automated testing and code coverage |
| 112 | +- **🔒 Security Scanning** - Container vulnerability detection |
| 113 | +- **📦 Multi-Registry Push** - Docker Hub + GitHub Container Registry |
| 114 | +- **🎯 Smart Triggers** - Conditional workflow execution |
| 115 | +- **⚡ Parallel Execution** - Optimized build times |
134 | 116 |
|
135 | 117 | --- |
136 | 118 |
|
137 | | -## 📊 Monitoring & Access |
| 119 | +## 🚀 **GitOps with ArgoCD** |
138 | 120 |
|
139 | | -### **Service Endpoints:** |
140 | | -- **🌌 Solar System App:** `http://{app-lb}/` |
141 | | -- **🚀 ArgoCD:** `http://{argocd-lb}/` |
142 | | -- **📊 Prometheus:** `http://{nginx-lb}/prometheus` |
143 | | -- **📈 Grafana:** `http://{nginx-lb}/grafana` |
144 | | -- **🚨 AlertManager:** `http://{nginx-lb}/alertmanager` |
| 121 | +**ArgoCD provides:** |
| 122 | +- **📋 Declarative Deployments** - Git as single source of truth |
| 123 | +- **🔄 Automatic Sync** - Continuous monitoring and deployment |
| 124 | +- **🛡️ Self-Healing** - Automatic drift correction |
| 125 | +- **↩️ Easy Rollbacks** - One-click revert to previous versions |
| 126 | +- **👀 Visibility** - Real-time deployment status and history |
145 | 127 |
|
146 | | -### **Default Credentials:** |
147 | | -- **ArgoCD:** admin / `{auto-generated}` |
148 | | -- **Grafana:** admin / `{from secrets}` |
| 128 | +--- |
| 129 | + |
| 130 | +## 📊 **Monitoring & Observability** |
| 131 | + |
| 132 | +### **Prometheus Stack** |
| 133 | +- **📊 Metrics Collection** - Application, infrastructure, and Kubernetes metrics |
| 134 | +- **🎯 Service Discovery** - Automatic target detection |
| 135 | +- **🚨 Alert Rules** - Proactive issue detection |
| 136 | + |
| 137 | +### **Grafana Dashboards** |
| 138 | +- **📱 Application Metrics** - Request rates, response times, errors |
| 139 | +- **🖥️ Infrastructure Monitoring** - CPU, memory, disk, network usage |
| 140 | +- **☸️ Kubernetes Cluster** - Pod status, resource utilization |
149 | 141 |
|
150 | 142 | --- |
151 | 143 |
|
152 | | -## 📁 Key Files |
| 144 | +## ☸️ **Kubernetes Infrastructure** |
153 | 145 |
|
154 | | -``` |
155 | | -├── app.py # Flask app with MongoDB & metrics |
156 | | -├── index.html # Interactive Solar System UI |
157 | | -├── Dockerfile # Alpine-based container |
158 | | -├── helm/ # Kubernetes manifests & values |
159 | | -├── Terraform/ # AWS infrastructure modules |
160 | | -├── .github/workflows/ # 8 specialized CI/CD workflows |
161 | | -│ ├── main-pipeline.yml # Orchestrator workflow |
162 | | -│ ├── ci.yml # Test & quality checks |
163 | | -│ ├── docker.yml # Container build & push |
164 | | -│ ├── terraform.yml # Infrastructure deployment |
165 | | -│ ├── karpenter.yml # Auto-scaling provisioner |
166 | | -│ ├── argocd.yml # GitOps controller setup |
167 | | -│ ├── monitoring.yml # Observability stack deployment |
168 | | -│ ├── deploy.yml # Kubernetes application deployment |
169 | | -│ ├── endpoints.yml # Service discovery & reporting |
170 | | -│ └── destroy.yml # Infrastructure cleanup |
171 | | -├── argocd/ # GitOps application definitions |
172 | | -└── karpenter/ # Auto-scaling configurations |
173 | | -``` |
| 146 | +### **AWS EKS Cluster** |
| 147 | +- **📦 Version:** Kubernetes 1.30 |
| 148 | +- **🖥️ Node Groups:** Auto-scaling t3.medium instances |
| 149 | +- **🌐 Networking:** Custom VPC with multi-AZ deployment |
| 150 | +- **🔧 Management:** Helm charts for templated deployments |
| 151 | +- **🔐 Security:** Proper RBAC and secrets management |
174 | 152 |
|
175 | 153 | --- |
176 | 154 |
|
177 | | -## 🤝 Contributing |
| 155 | +## 🤝 **Contributing** |
| 156 | + |
| 157 | +**Want to contribute?** |
178 | 158 |
|
179 | 159 | 1. **Fork** the repository |
180 | 160 | 2. **Create** feature branch: `git checkout -b feature/amazing-feature` |
181 | 161 | 3. **Commit** changes: `git commit -m 'Add amazing feature'` |
182 | | -4. **Push** to branch: `git push origin feature/amazing-feature` |
183 | | -5. **Open** Pull Request |
| 162 | +4. **Push** branch: `git push origin feature/amazing-feature` |
| 163 | +5. **Open** a Pull Request |
| 164 | + |
| 165 | +--- |
| 166 | + |
| 167 | +## 📚 **What You'll Learn** |
| 168 | + |
| 169 | +This project demonstrates: |
| 170 | + |
| 171 | +- **🏗️ Infrastructure as Code** with Terraform |
| 172 | +- **🔄 CI/CD Pipeline Design** with GitHub Actions |
| 173 | +- **☸️ Kubernetes Orchestration** on AWS EKS |
| 174 | +- **🚀 GitOps Implementation** with ArgoCD |
| 175 | +- **📊 Monitoring & Alerting** with Prometheus/Grafana |
| 176 | +- **🐳 Container Best Practices** with Docker |
| 177 | +- **⚡ Auto-scaling Strategies** with Karpenter |
| 178 | +- **🛡️ Security Integration** throughout the pipeline |
184 | 179 |
|
185 | 180 | --- |
186 | 181 |
|
187 | 182 | <div align="center"> |
188 | 183 |
|
189 | | -### 🌟 **Enterprise DevOps Excellence** |
| 184 | +## ⭐ **Star This Repository If You Found It Helpful!** |
190 | 185 |
|
191 | | - |
| 186 | +**Built with ❤️ for DevOps Excellence** |
192 | 187 |
|
193 | | -**⭐ Star this repo if you found it helpful!** |
| 188 | + |
| 189 | + |
194 | 190 |
|
195 | 191 | </div> |
0 commit comments