feat: initial ThinkCentre setup repo — Android, Ollama, Otto migration docs + scripts

This commit is contained in:
Otto
2026-03-17 11:15:12 +01:00
commit 95f90c7dcb
8 changed files with 539 additions and 0 deletions
+62
View File
@@ -0,0 +1,62 @@
# ThinkCentre Management
## Wer managed was
| Aufgabe | Zuständig | Wie |
|---------|-----------|-----|
| Hardware (Ein/Aus, LAN) | Chris | physisch |
| OS Updates | Otto | `sudo apt upgrade` via SSH, monatlich |
| Android SDK Updates | Otto | `sdkmanager --update` bei Bedarf |
| Ollama Modelle | Otto | `ollama pull/rm` nach Absprache |
| OpenClaw Config | Otto + Chris | gemeinsam |
| Secrets | Chris | manuell, nie per Git |
| Backups | Otto | Cron-Job (täglich, nach Pi-Backup-Muster) |
## Monitoring
- **Uptime Kuma** (`uptime.zeitanker.digital`) — Push-Heartbeat von ThinkCentre 2 (Otto)
- **ThinkCentre 1** — kein Push-Monitor nötig (Build-Server, on-demand)
## SSH Zugang
```bash
# Von Pi aus:
ssh secondclaw@192.168.0.91 # ThinkCentre 1
# Key: ~/.ssh/id_ed25519 (bereits deployed)
# Von extern: via Pi als Jumphost
ssh -J claw@192.168.0.84 secondclaw@192.168.0.91
```
## Runbooks
### Neustart ThinkCentre 1
```bash
ssh secondclaw@192.168.0.91 "sudo reboot"
# Nach ~60s wieder erreichbar
```
### Android Build auslösen (manuell)
```bash
ssh secondclaw@192.168.0.91 "bash ~/scripts/build.sh staysober main"
```
### Ollama Modell wechseln
```bash
ssh secondclaw@192.168.0.91 "ollama pull mistral:7b && ollama rm qwen2.5:7b"
```
### OS Update
```bash
ssh secondclaw@192.168.0.91 "sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y"
```
## Netzwerk
| Host | IP | Port | Dienst |
|------|----|----- |--------|
| ThinkCentre 1 | 192.168.0.91 | 22 | SSH |
| ThinkCentre 1 | 192.168.0.91 | 8080 | APK Download Server |
| ThinkCentre 1 | 192.168.0.91 | 11434 | Ollama API |
| ThinkCentre 2 | TBD | 22 | SSH |
| ThinkCentre 2 | TBD | 18789 | OpenClaw Gateway |
+102
View File
@@ -0,0 +1,102 @@
# Otto Migration — Pi → ThinkCentre 2
## Ziel
OpenClaw (Otto) von `192.168.0.84` (Pi, ARM64) auf ThinkCentre 2 (x86, i5-13400T, 16 GB) migrieren.
## Vorteile
| | Pi (aktuell) | ThinkCentre 2 |
|---|---|---|
| CPU | Cortex-A76 (4C) | i5-13400T (10C/16T) |
| RAM | 8 GB | 16 GB |
| Arch | ARM64 | x86_64 |
| Node builds | langsam | schnell |
| Expo/Gradle | hakelig | nativ |
## Migrationsstrategie
**Fresh Install** (nicht in-place) — sauberer Start, keine ARM-Reste.
Pi bleibt aktiv bis ThinkCentre 2 vollständig validiert ist.
## Schritt für Schritt
### Phase 1 — ThinkCentre 2 vorbereiten
```bash
# Base provisioning
bash scripts/provision.sh
# OpenClaw fresh install
npm install -g openclaw
openclaw setup
```
### Phase 2 — Daten übertragen
```bash
# Workspace (ohne secrets, ohne node_modules)
rsync -av --exclude='node_modules' --exclude='.git' \
pi@192.168.0.84:~/.openclaw/workspace/ \
~/.openclaw/workspace/
# Secrets manuell übertragen (nie per Git!)
# - ~/.openclaw/secrets/
# - ~/.openclaw/openclaw.json (enthält API Keys)
# QMD collections neu indexieren (ARM → x86, Embeddings neu)
qmd embed -c vault
qmd embed -c workspace
```
### Phase 3 — Services migrieren
```bash
# APK Server (lighttpd)
sudo apt install lighttpd
# Config: /etc/lighttpd/lighttpd.conf → serve /var/www/downloads auf :8080
# PM2 Services
pm2 start ecosystem.config.cjs # zeitanker-tasks
pm2 save
pm2 startup
```
### Phase 4 — Cutover
```bash
# DNS/IP in relevanten Configs aktualisieren:
# - TOOLS.md: APK Server URL
# - MEMORY.md: Otto Pi IP
# - Uptime Kuma: Monitor auf neue IP
# - Discord Webhooks falls nötig
# Pi-Heartbeat-Cron auf ThinkCentre 2 umziehen
# Uptime Kuma Push-URL aktualisieren
```
### Phase 5 — Validierung
- [ ] OpenClaw antwortet auf Discord
- [ ] Heartbeat läuft (Uptime Kuma grün)
- [ ] QMD search funktioniert
- [ ] PM2 Services alle online
- [ ] APK Server erreichbar
### Phase 6 — Pi dekommissionieren
```bash
# Pi-Services stoppen
pm2 stop all
# Pi als Fallback/Backup behalten oder neu nutzen für:
# - Home Assistant (wenn .59 stirbt)
# - Reserve
```
## Offene Fragen
- [ ] ThinkCentre 2 IP bestimmen (nach Netzwerk-Einbindung)
- [ ] Neuer Hostname: `otto-tc` oder `otto-2`?
- [ ] Pi-Rolle nach Migration klären