Complete SRE technical assessment with deployment, monitoring, CI/CD, scalability, and documentation
هذا الالتزام موجود في:
310
README.md
310
README.md
@@ -0,0 +1,310 @@
|
||||
# Ghaymah SRE Technical Assessment
|
||||
|
||||
A complete solution for the Ghaymah Site Reliability Engineering (SRE) technical assessment.
|
||||
|
||||
This repository demonstrates practical SRE and DevOps skills including containerization, monitoring, incident response, CI/CD automation, scalability planning, cloud architecture, and infrastructure documentation.
|
||||
|
||||
---
|
||||
|
||||
# Repository Structure
|
||||
|
||||
```text
|
||||
.
|
||||
├── README.md
|
||||
│
|
||||
├── q1-deploy-monitor/
|
||||
│ ├── Dockerfile
|
||||
│ ├── app.py
|
||||
│ ├── requirements.txt
|
||||
│ ├── health-check.sh
|
||||
│ ├── dashboard.html
|
||||
│ ├── update_monitor.py
|
||||
│ └── monitoring-data.json
|
||||
│
|
||||
├── q2-postmortem/
|
||||
│ └── postmortem-report.md
|
||||
│
|
||||
├── q3-cicd/
|
||||
│ ├── workflow.yml
|
||||
│ └── README.md
|
||||
│
|
||||
├── q4-scalability/
|
||||
│ ├── architecture-diagram.png
|
||||
│ └── calculations.md
|
||||
│
|
||||
├── q5-mithal-monitor/
|
||||
│ ├── monitor.py
|
||||
│ ├── dashboard.html
|
||||
│ ├── monitoring-data.json
|
||||
│ └── requirements.txt
|
||||
│
|
||||
├── common-mortakaz/
|
||||
│ ├── integration-1.md
|
||||
│ └── integration-2.md
|
||||
│
|
||||
└── common-qabilah/
|
||||
└── qabilah-profile.txt
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
# Project Overview
|
||||
|
||||
The repository contains implementations for the following SRE topics:
|
||||
|
||||
| Question | Topic | Status |
|
||||
|----------|-------|--------|
|
||||
| Q1 | Container Deployment & Monitoring | ✅ |
|
||||
| Q2 | Incident Postmortem & Auto Scaling | ✅ |
|
||||
| Q3 | CI/CD Pipeline | ✅ |
|
||||
| Q4 | Scalability & Load Balancing | ✅ |
|
||||
| Q5 | Monitoring Dashboard | ✅ |
|
||||
| Bonus A | Mortakaz Integration Proposals | ✅ |
|
||||
| Bonus B | Qabilah Profile | ✅ |
|
||||
|
||||
---
|
||||
|
||||
# Technologies Used
|
||||
|
||||
- Python
|
||||
- Flask
|
||||
- Docker
|
||||
- GitHub Actions
|
||||
- HTML
|
||||
- CSS
|
||||
- JavaScript
|
||||
- Chart.js
|
||||
- Bash
|
||||
- JSON
|
||||
- Git
|
||||
- Ghaymah Platform
|
||||
- mithal.space
|
||||
|
||||
---
|
||||
|
||||
# Question 1 — Deploy & Monitor an API
|
||||
|
||||
Implemented:
|
||||
|
||||
- Dockerized Python API
|
||||
- `/health` endpoint
|
||||
- Monitoring script
|
||||
- Simple monitoring dashboard
|
||||
- Response time tracking
|
||||
- Request counting
|
||||
|
||||
Features
|
||||
|
||||
- Docker container
|
||||
- Health endpoint
|
||||
- Automatic health checks
|
||||
- Live dashboard
|
||||
- JSON-based monitoring storage
|
||||
|
||||
---
|
||||
|
||||
# Question 2 — Incident Postmortem
|
||||
|
||||
Created a complete production-style postmortem including:
|
||||
|
||||
- Executive Summary
|
||||
- Timeline
|
||||
- Root Cause Analysis
|
||||
- Corrective Actions
|
||||
- Preventive Actions
|
||||
- Auto-scaling Policy
|
||||
- Monitoring Strategy
|
||||
- Lessons Learned
|
||||
|
||||
---
|
||||
|
||||
# Question 3 — CI/CD Pipeline
|
||||
|
||||
Implemented a GitHub Actions workflow that includes:
|
||||
|
||||
- Docker image build
|
||||
- Push to Ghaymah Container Registry
|
||||
- Staging deployment
|
||||
- Manual approval before production
|
||||
- Production deployment
|
||||
- Docker layer caching
|
||||
|
||||
Pipeline Flow
|
||||
|
||||
```
|
||||
Push
|
||||
│
|
||||
▼
|
||||
Build Docker Image
|
||||
│
|
||||
▼
|
||||
Push Image
|
||||
│
|
||||
▼
|
||||
Deploy to Staging
|
||||
│
|
||||
▼
|
||||
Manual Approval
|
||||
│
|
||||
▼
|
||||
Deploy to Production
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
# Question 4 — Scalability Design
|
||||
|
||||
Designed an architecture capable of handling:
|
||||
|
||||
- **15,000 requests/second**
|
||||
|
||||
Included:
|
||||
|
||||
- High-level architecture
|
||||
- Container sizing calculations
|
||||
- Auto Scaling strategy
|
||||
- Cold-start optimization
|
||||
- Load balancing
|
||||
- Block Storage usage
|
||||
|
||||
Result:
|
||||
|
||||
- **39 application containers**
|
||||
|
||||
---
|
||||
|
||||
# Question 5 — Monitoring Dashboard
|
||||
|
||||
Implemented a monitoring solution for **mithal.space**.
|
||||
|
||||
Collected metrics include:
|
||||
|
||||
- HTTP Latency
|
||||
- Uptime
|
||||
- HTTP Status
|
||||
- DNS Resolution Time
|
||||
- SSL Certificate Status
|
||||
- SSL Expiration
|
||||
- Search Response Time
|
||||
|
||||
Dashboard Features
|
||||
|
||||
- 24-hour uptime
|
||||
- Response time graph
|
||||
- SSL health
|
||||
- Recent checks table
|
||||
- Live status indicator
|
||||
|
||||
---
|
||||
|
||||
# Mortakaz Integration
|
||||
|
||||
Prepared two integration proposals demonstrating how products from Mortakaz can integrate with the Ghaymah ecosystem.
|
||||
|
||||
Included:
|
||||
|
||||
- Product overview
|
||||
- Integration architecture
|
||||
- Business value
|
||||
- Technical challenges
|
||||
- Architecture diagrams
|
||||
|
||||
---
|
||||
|
||||
# Qabilah
|
||||
|
||||
Qabilah profile:
|
||||
|
||||
**Profile**
|
||||
|
||||
https://qabilah.com/profile/noransalm/posts
|
||||
|
||||
The profile link is also included in:
|
||||
|
||||
```
|
||||
common-qabilah/qabilah-profile.txt
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
# Running the Project
|
||||
|
||||
## Q1
|
||||
|
||||
```bash
|
||||
cd q1-deploy-monitor
|
||||
|
||||
docker build -t api .
|
||||
|
||||
docker run -p 5000:5000 api
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Monitoring Script
|
||||
|
||||
```bash
|
||||
bash health-check.sh
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```bash
|
||||
python monitor.py
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Dashboard
|
||||
|
||||
Open:
|
||||
|
||||
```
|
||||
dashboard.html
|
||||
```
|
||||
|
||||
or serve locally:
|
||||
|
||||
```bash
|
||||
python -m http.server 8000
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
# Best Practices Applied
|
||||
|
||||
- Dockerized applications
|
||||
- Health endpoints
|
||||
- Automated monitoring
|
||||
- Infrastructure documentation
|
||||
- Production-style incident analysis
|
||||
- GitHub Actions CI/CD
|
||||
- Manual production approval
|
||||
- Auto Scaling recommendations
|
||||
- Persistent monitoring data
|
||||
- Separation of environments
|
||||
- Lightweight container design
|
||||
- Cloud-native architecture
|
||||
|
||||
---
|
||||
|
||||
# References
|
||||
|
||||
- Docker Documentation
|
||||
- GitHub Actions Documentation
|
||||
- Flask Documentation
|
||||
- Chart.js Documentation
|
||||
- Ghaymah Platform Documentation
|
||||
- mithal.space
|
||||
|
||||
---
|
||||
|
||||
# Author
|
||||
|
||||
**Noran Salm**
|
||||
|
||||
Computer and Systems Engineering Student
|
||||
|
||||
Qabilah Profile
|
||||
|
||||
https://qabilah.com/profile/noransalm/posts
|
||||
المرجع في مشكلة جديدة
حظر مستخدم