docs: add update client flow

This commit is contained in:
2025-12-28 23:44:00 +01:00
parent b508f5c58c
commit 2d829b74dd
3 changed files with 49 additions and 1 deletions

View File

@ -23,6 +23,8 @@ By: Codex (GPT-5)
| 28.12.2025 | 🏗️ Planning | ID: EPIC_000009 Update Webservice (External Team) dokumentiert. By: Codex (GPT-5) | | 28.12.2025 | 🏗️ Planning | ID: EPIC_000009 Update Webservice (External Team) dokumentiert. By: Codex (GPT-5) |
| 28.12.2025 | 🏗️ Planning | ID: TASK_000027-TASK_000029 fuer EPIC_000008 ausgearbeitet. By: Codex (GPT-5) | | 28.12.2025 | 🏗️ Planning | ID: TASK_000027-TASK_000029 fuer EPIC_000008 ausgearbeitet. By: Codex (GPT-5) |
| 28.12.2025 | ⚙️ Code | ID: Update-Config Keys in Settings/ENV/README definiert. By: Codex (GPT-5) | | 28.12.2025 | ⚙️ Code | ID: Update-Config Keys in Settings/ENV/README definiert. By: Codex (GPT-5) |
| 28.12.2025 | 📝 Req | ID: Update-Flow fuer Client dokumentiert. By: Codex (GPT-5) |
| 28.12.2025 | 📝 Req | ID: Update-Flow Prototyp dokumentiert. By: Codex (GPT-5) |
--- ---
## Legende ## Legende

44
docs/update-client.md Normal file
View File

@ -0,0 +1,44 @@
ID: DOC_000004 | Version: 0.1.0 | Status: Draft
By: Codex (GPT-5)
# Client Update Flow (Kiddo)
## Purpose
Definiert den Client-seitigen Ablauf fuer das Pull-Update vom Update-Service.
## Manifest Format (JSON)
Beispiel:
```json
{
"version": "0.1.2",
"artifact_url": "https://update.wlkns.org/kiddo/kiddo-0.1.2.tar.gz",
"sha256": "<hex>",
"sig_url": "https://update.wlkns.org/kiddo/kiddo-0.1.2.sig"
}
```
## Flow (High Level)
1. Manifest abrufen (auth optional via Bearer Token).
2. `artifact_url` herunterladen.
3. SHA256 pruefen (Signatur optional).
4. In Staging-Verzeichnis entpacken.
5. Service stoppen.
6. Atomic swap: aktuelles Verzeichnis sichern, Staging nach `/opt/sk` verschieben.
7. Service starten.
8. Bei Fehlern Rollback auf Backup.
## Prototype Script
- `scripts/update_client.sh` implementiert den Flow als CLI-Prototyp.
- Erfordert `curl`, `tar`, `sha256sum`, `python3` und `systemctl`.
## Rollback
- Wenn Start fehlschlaegt: Backup nach `/opt/sk` zurueck, Service neu starten.
- Backup-Verzeichnis benoetigt genuegend Speicher.
## Security Notes
- Artefakte muessen checksum-verifiziert sein.
- Token-Handling ueber `SKD_UPDATE_TOKEN`.
## Constraints
- Update-Service ist extern (update.wlkns.org).
- Service muss als root stoppen/starten koennen.

View File

@ -1,4 +1,4 @@
ID: TASK_000028 | Version: 0.1.0 | Status: Draft ID: TASK_000028 | Version: 0.1.0 | Status: In Progress
By: Codex (GPT-5) By: Codex (GPT-5)
# TASK_000028: Verify and apply update # TASK_000028: Verify and apply update
@ -14,8 +14,10 @@ US_000027
- `tar.gz` herunterladen und SHA256 pruefen. - `tar.gz` herunterladen und SHA256 pruefen.
- Update atomar anwenden (staging, swap, rollback). - Update atomar anwenden (staging, swap, rollback).
- Fehlerfall dokumentieren (Rollback, Status). - Fehlerfall dokumentieren (Rollback, Status).
- Ablauf dokumentiert in `docs/update-client.md`.
## Definition of Done (DoD) ## Definition of Done (DoD)
- Verifikation (Checksum/Signatur) ist beschrieben. - Verifikation (Checksum/Signatur) ist beschrieben.
- Atomare Anwendung und Rollback-Strategie sind definiert. - Atomare Anwendung und Rollback-Strategie sind definiert.
- Fehlerbilder sind erfasst. - Fehlerbilder sind erfasst.
- Prototyp-Skript ist als Referenz vorhanden.