From 2d829b74dd79f6bcad83ceefa214e953ad34b065 Mon Sep 17 00:00:00 2001 From: stephan Date: Sun, 28 Dec 2025 23:44:00 +0100 Subject: [PATCH] docs: add update client flow --- CHANGELOG.md | 2 + docs/update-client.md | 44 +++++++++++++++++++ .../requirements/tasks/TASK_000028.md | 4 +- 3 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 docs/update-client.md diff --git a/CHANGELOG.md b/CHANGELOG.md index c13e86e..a02a301 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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: 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 | 📝 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 diff --git a/docs/update-client.md b/docs/update-client.md new file mode 100644 index 0000000..f19a3da --- /dev/null +++ b/docs/update-client.md @@ -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": "", + "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. diff --git a/project-management/requirements/tasks/TASK_000028.md b/project-management/requirements/tasks/TASK_000028.md index 8dacf51..fa055da 100644 --- a/project-management/requirements/tasks/TASK_000028.md +++ b/project-management/requirements/tasks/TASK_000028.md @@ -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) # TASK_000028: Verify and apply update @@ -14,8 +14,10 @@ US_000027 - `tar.gz` herunterladen und SHA256 pruefen. - Update atomar anwenden (staging, swap, rollback). - Fehlerfall dokumentieren (Rollback, Status). +- Ablauf dokumentiert in `docs/update-client.md`. ## Definition of Done (DoD) - Verifikation (Checksum/Signatur) ist beschrieben. - Atomare Anwendung und Rollback-Strategie sind definiert. - Fehlerbilder sind erfasst. +- Prototyp-Skript ist als Referenz vorhanden.