feat: complete SRE exam deliverables for Ghaymah & Qabilah platform submission

هذا الالتزام موجود في:
2026-07-27 21:41:32 +03:00
الأصل 3ff89490e9
التزام 2918a76340
15 ملفات معدلة مع 1067 إضافات و1 حذوفات

عرض الملف

@@ -0,0 +1,69 @@
# Mortakaz Integration Spec 1 — Ghaymah SRE Telemetry & Security Hub
## Executive Overview
This integration specification defines the data pipeline and authentication protocol connecting **Ghaymah Cloud Infrastructure** with the **Mortakaz Platform**. It ensures centralized telemetry ingestion (metrics, logs, traces) and security audit synchronization across all containerized workloads.
---
## 1. Integration Architecture
```
┌─────────────────────────────────────────┐
│ Ghaymah Container Platform (SRE) │
│ • FastAPI App / Prometheus Exporter │
│ • cAdvisor Container Telemetry │
└────────────────────┬────────────────────┘
│ HTTPS / gRPC (mTLS)
┌─────────────────────────────────────────┐
│ Mortakaz Ingestion Gateway │
│ • API Endpoint: https://api.mortakaz │
│ • Authentication: HMAC-SHA256 Token │
└────────────────────┬────────────────────┘
┌─────────────────────────────────────────┐
│ Mortakaz Security & Observability │
│ • Real-Time Threat Analysis │
│ • Centralized SRE Dashboards │
└─────────────────────────────────────────┘
```
---
## 2. Ingestion API Payload Specification
Ghaymah SRE telemetry agents stream metrics to Mortakaz via `POST /v1/telemetry/ingest`:
```json
{
"qabilah_user": "marwanabdelmoneim",
"email": "marwantamermo@gmail.com",
"source_platform": "ghaymah.systems",
"timestamp": "2026-07-27T21:30:00Z",
"cluster_id": "ghaymah-prod-cluster-01",
"metrics": {
"http_latency_p95_ms": 14.2,
"uptime_percentage": 99.99,
"total_requests": 14820,
"active_containers": 39,
"memory_utilization_pct": 68.4,
"cpu_utilization_pct": 52.1
},
"security_audit": {
"trivy_scan_status": "PASSED",
"critical_vulnerabilities": 0,
"ssl_valid": true,
"ssl_days_remaining": 49
}
}
```
---
## 3. Security & Authentication Controls
1. **Mutual TLS (mTLS)**: All communication between Ghaymah nodes and Mortakaz Hub is encrypted with X.509 certificates managed by Ghaymah Certificate Authority.
2. **API Token Rotation**: Rotates HMAC secret keys every 30 days automatically.
3. **Data Anonymization**: PII fields are sanitized prior to transmission.

عرض الملف

@@ -0,0 +1,58 @@
# Mortakaz Integration Spec 2 — Automated Incident Management & Observability Pipeline
## Executive Overview
This specification details the event-driven incident integration between **Ghaymah Cloud Monitoring** and **Mortakaz Incident Response Platform**. When container outages (such as `OOMKilled` events) or threshold breaches occur on Ghaymah, automated webhook alerts trigger incident workflows on Mortakaz.
---
## 1. Event-Driven Incident Lifecycle
```
[ Ghaymah Cloud Pod ] ──(OOMKilled Event)──> [ Ghaymah Alertmanager ]
▼ Webhook
[ Mortakaz Webhook Listener ]
[ Auto-Create Incident Ticket ]
[ Trigger HPA / Auto-Remediation ]
```
---
## 2. Mortakaz Webhook Event Schema
When Ghaymah detects a critical alert (e.g. memory saturation > 88% or pod crash), it posts the following JSON payload to Mortakaz:
```json
{
"event_id": "evt_98410294812",
"event_type": "CONTAINER_OOM_KILLED",
"severity": "CRITICAL",
"qabilah_user": "marwanabdelmoneim",
"email": "marwantamermo@gmail.com",
"affected_resource": {
"platform": "ghaymah.systems",
"namespace": "production",
"deployment": "ghaymah-api-deployment",
"pod_id": "ghaymah-api-7f8d9-x4k21",
"exit_code": 137,
"memory_limit_bytes": 536870912,
"memory_used_bytes": 536870912
},
"remediation_action_triggered": "AUTOMATIC_HPA_SCALE_UP",
"timestamp": "2026-07-27T14:19:00Z"
}
```
---
## 3. Automated Remediation Workflow
1. **Mortakaz Trigger**: Receives `CONTAINER_OOM_KILLED` event.
2. **Auto Scale Execution**: Invokes Ghaymah API endpoint `/v1/deployments/ghaymah-api-deployment/scale` to increase replica count from $N$ to $N+8$.
3. **Paging & Notification**: Pages the SRE on-call engineer via Mortakaz Mobile App and Slack `#sre-incidents` channel.
4. **Postmortem Auto-Drafting**: Generates initial incident timeline data for postmortem analysis.