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
|
||||||
15
common-mortakaz/README.md
Normal file
15
common-mortakaz/README.md
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
## Mortakaz Integration
|
||||||
|
|
||||||
|
### Integration Proposals
|
||||||
|
|
||||||
|
- **integration-1.md** — Nazel × Ghaymah Cloud
|
||||||
|
- **integration-2.md** — Hifz × Ghaymah & Mithal
|
||||||
|
|
||||||
|
### Recommended Integration
|
||||||
|
|
||||||
|
**Hifz** is the stronger candidate because:
|
||||||
|
|
||||||
|
- It is a complete web application.
|
||||||
|
- It naturally fits containerized deployment.
|
||||||
|
- It benefits directly from monitoring, persistent storage, and Auto Scaling.
|
||||||
|
- It can easily be delivered as a managed SaaS solution.
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
# Integration Proposal 1
|
||||||
|
|
||||||
|
# Nazel × Ghaymah Cloud
|
||||||
|
|
||||||
|
## Product Overview
|
||||||
|
|
||||||
|
**Nazel** is an Arabic platform for uploading, sharing, and downloading files. It enables developers and individuals to distribute applications and digital content securely and efficiently.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Proposed Integration
|
||||||
|
|
||||||
|
## Ghaymah Services
|
||||||
|
|
||||||
|
- Ghaymah Block Storage
|
||||||
|
- Ghaymah Container Registry
|
||||||
|
|
||||||
|
### Integration Idea
|
||||||
|
|
||||||
|
Replace local file storage with **Ghaymah Block Storage** to provide scalable and persistent storage.
|
||||||
|
|
||||||
|
For application uploads, integrate with **Ghaymah Container Registry**, allowing developers to publish container images directly after uploading their applications.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Architecture
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart LR
|
||||||
|
|
||||||
|
User --> Web
|
||||||
|
Web --> API
|
||||||
|
|
||||||
|
API --> BlockStorage["Ghaymah Block Storage"]
|
||||||
|
API --> Registry["Ghaymah Container Registry"]
|
||||||
|
|
||||||
|
Registry --> Deploy["Deploy on Ghaymah"]
|
||||||
|
BlockStorage --> CDN["Content Delivery"]
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Benefits
|
||||||
|
|
||||||
|
- Persistent cloud storage
|
||||||
|
- Faster file delivery
|
||||||
|
- Automatic scalability
|
||||||
|
- One-click application deployment
|
||||||
|
- Improved reliability
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Challenges
|
||||||
|
|
||||||
|
| Challenge | Solution |
|
||||||
|
|-----------|----------|
|
||||||
|
| Large storage costs | Storage quotas and premium plans |
|
||||||
|
| Existing data migration | Incremental migration strategy |
|
||||||
|
| Data compliance | Regional infrastructure and encryption |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Conclusion
|
||||||
|
|
||||||
|
Integrating Nazel with Ghaymah would improve scalability, reliability, and developer experience while reducing operational complexity.
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
# Integration Proposal 2
|
||||||
|
|
||||||
|
# Hifz × Ghaymah & Mithal
|
||||||
|
|
||||||
|
## Product Overview
|
||||||
|
|
||||||
|
**Hifz** is an open-source platform for managing Quran memorization centers. It connects administrators, teachers, students, and parents through a centralized web application.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Proposed Integration
|
||||||
|
|
||||||
|
## Ghaymah Services
|
||||||
|
|
||||||
|
- Ghaymah Container Platform
|
||||||
|
- Ghaymah Block Storage
|
||||||
|
- Mithal Monitoring
|
||||||
|
|
||||||
|
### Integration Idea
|
||||||
|
|
||||||
|
Deploy the application on Ghaymah containers while storing persistent data on Block Storage.
|
||||||
|
|
||||||
|
Use Mithal to monitor availability, latency, logs, and application health.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Architecture
|
||||||
|
|
||||||
|
```mermaid
|
||||||
|
flowchart TB
|
||||||
|
|
||||||
|
Users --> App
|
||||||
|
|
||||||
|
subgraph Ghaymah
|
||||||
|
App --> Database
|
||||||
|
App --> Storage["Block Storage"]
|
||||||
|
end
|
||||||
|
|
||||||
|
subgraph Mithal
|
||||||
|
Metrics
|
||||||
|
Alerts
|
||||||
|
Logs
|
||||||
|
end
|
||||||
|
|
||||||
|
App -.-> Metrics
|
||||||
|
Metrics --> Alerts
|
||||||
|
Metrics --> Logs
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Benefits
|
||||||
|
|
||||||
|
- High availability
|
||||||
|
- Automatic scaling
|
||||||
|
- Persistent storage
|
||||||
|
- Continuous monitoring
|
||||||
|
- Faster incident detection
|
||||||
|
- Better operational visibility
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Challenges
|
||||||
|
|
||||||
|
| Challenge | Solution |
|
||||||
|
|-----------|----------|
|
||||||
|
| Sensitive data | Encryption and IAM |
|
||||||
|
| Infrastructure cost | Auto Scaling |
|
||||||
|
| Database migration | Staged migration |
|
||||||
|
| Container compatibility | Testing before deployment |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Conclusion
|
||||||
|
|
||||||
|
Deploying Hifz on Ghaymah with Mithal monitoring creates a reliable, scalable, and production-ready platform suitable for educational organizations.
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
Qabilah Profile
|
||||||
|
|
||||||
|
Name: Noran Salm
|
||||||
|
|
||||||
|
Profile:
|
||||||
|
https://qabilah.com/profile/noransalm/posts
|
||||||
المرجع في مشكلة جديدة
حظر مستخدم