هذا الالتزام موجود في:
momenlotfy
2026-07-28 23:49:18 +03:00
الأصل 5348817b51
التزام 51517b5971
14 ملفات معدلة مع 882 إضافات و195 حذوفات

207
README.md
عرض الملف

@@ -1,28 +1,187 @@
# مشروع تدريب: نشر ومراقبة على Ghaymah — الحل الكامل
# Ghaymah SRE Technical Assessment
هذا المشروع يغطي الأنشطة الخمسة المطلوبة:
This repository contains my submission for the **Ghaymah Internship Program SRE Technical Assessment**.
| # | المجلد | المهمة |
|---|---|---|
| 1 | `task1-deploy/` | Dockerfile + API + /health + سكريبت مراقبة + dashboard |
| 2 | `task2-postmortem/` | تقرير Postmortem لحادثة OOMKilled + سياسة auto-scaling |
| 3 | `task3-cicd/` | GitHub Actions workflow + شرح staging/production + ghaymah CLI |
| 4 | `task4-scalability/` | Architecture diagram + حسابات 15,000 req/s + Cold start + Block Storage |
| 5 | `task5-mithal-dashboard/` | جامع مقاييس + dashboard لموقع mithal.space |
The project demonstrates deployment, monitoring, incident analysis, CI/CD automation, scalability planning, and monitoring dashboard implementation using Ghaymah Cloud Platform.
## ⚠️ ملاحظة مهمة عن أوامر Ghaymah CLI
لم أستطع الوصول لتوثيق تفصيلي حي لأوامر `ghaymah` CLI الدقيقة (الموقع الرسمي
docs.ghaymah.cloud مبني بجافاسكربت ولا يظهر المحتوى الكامل عبر البحث). لذلك
كل أوامر `ghaymah ...` في هذا المشروع هي **بالنمط القياسي المتوقع** لمنصات
الحاويات (login → build/push → deploy → status/logs → rollback)، وتحتاج منك
التأكد من الصياغة الدقيقة من https://docs.ghaymah.cloud أو من CLI نفسه عبر
`ghaymah --help` قبل الاستخدام الفعلي في التسليم.
---
## ترتيب مقترح للعمل
1. جرّب `task1-deploy` محلياً بـ Docker أولاً، ثم انشرها فعلياً على Ghaymah.
2. شغّل `monitor.sh` على الرابط المنشور وافتح `dashboard.html`.
3. اقرأ `task2-postmortem/postmortem.md` وطبّق سياسة الـ auto-scaling على نفس التطبيق إن أمكن.
4. أعدّ الـ CI/CD (`task3-cicd`) وفعّل الموافقة اليدوية في GitHub Environments.
5. استخدم حسابات `task4-scalability/scalability.md` كجزء من التقرير الكتابي.
6. شغّل `task5-mithal-dashboard/collector.py` وانشر اللوحة كما في المهمة 1.
# Ghaymah-sre-tasks
# Repository Structure
```
.
├── q1-deploy-monitor/
│ ├── Dockerfile
│ ├── health-check.sh
│ ├── dashboard.html
│ └── README.md
├── q2-postmortem/
│ ├── postmortem-report.md
│ └── README.md
├── q3-cicd/
│ ├── workflow.yml
│ └── README.md
├── q4-scalability/
│ ├── architecture.png
│ ├── calculations.md
│ └── README.md
├── q5-mithal-monitor/
│ ├── collector.py
│ ├── dashboard.html
│ ├── Dockerfile
│ ├── requirements.txt
│ └── README.md
├── common-mortakaz/
├── common-qabilah/
└── README.md
```
---
# Task 1 — Deploy & Monitor
### Objective
Deploy a containerized web application on **Ghaymah Cloud** and implement a basic monitoring dashboard.
### Deliverables
- Dockerized application
- Health check endpoint
- Monitoring dashboard
- Successful deployment on Ghaymah
---
# Task 2 — Incident Postmortem
### Objective
Analyze a production outage caused by repeated **OOMKilled** events.
### Deliverables
- Executive summary
- Timeline
- Root cause analysis
- Corrective actions
- Preventive recommendations
- Auto-scaling proposal
---
# Task 3 — CI/CD Pipeline
### Objective
Create a complete deployment pipeline using **GitHub Actions** and **Ghaymah CLI**.
### Features
- Docker image build
- Application validation
- Deploy to Staging
- Manual Approval
- Deploy to Production
- Health checks
---
# Task 4 — Scalability Design
### Objective
Design infrastructure capable of serving **15,000 Requests/sec**.
### Includes
- Architecture diagram
- Capacity calculations
- Horizontal scaling strategy
- Cold-start optimization
- Block Storage usage
- Auto-scaling recommendations
---
# Task 5 — Mithal Monitoring Dashboard
### Objective
Build a monitoring solution for **https://mithal.space**
### Metrics Collected
- HTTP Latency
- Uptime
- DNS Resolution Time
- SSL Certificate Status
- Search Response Time
### Dashboard Features
- 24-hour uptime percentage
- Latency chart
- SSL expiration status
- Latest monitoring checks
- Automatic refresh
---
# Technologies Used
- Python
- Docker
- GitHub Actions
- Ghaymah CLI
- HTML
- CSS
- JavaScript
- Chart.js
---
# Deployment
Applications were deployed using the official **Ghaymah CLI**.
General deployment workflow:
```bash
gy auth login
gy resource app init --project-id <PROJECT_ID>
gy resource app launch
```
---
# Notes
- Each task is self-contained.
- Every task includes its own documentation.
- The implementation follows the official Ghaymah documentation whenever applicable.
---
# Author
**Moamen Lotfy**
SRE Track Candidate
Ghaymah Internship Program
## Qabilah Profile
As required by the technical assessment, I created a Qabilah account and followed the official Ghaymah account.
**Profile Link:**
https://qabilah.com/profile/momendevops/professional-profile