775f719701
Neue install.sh (1570 → 866 Zeilen, -56% Komplexität): Punkte 1-9 alle abgedeckt: 1. System-Dependencies (Python 3.13, pipx, git, curl, Ollama) 2. Hermes Agent via pipx + snowballstemmer in pipx-venv (P1) 3. Plugin nach site-packages/plugins/platforms/rocketchat/ (P3) 4. config.yaml aus env-Variablen (P2/P6/P7) 5. .env aus env-Variablen (P4/P8) 6. room-map.json leer — Onboarding füllt sie (P10) 7. SOUL.md ohne 'Bestätigung vor Bearbeitung' (P9) 8. systemd user service mit enable (P5) 9. Verifikation am Ende prüft alle Pitfalls Env-Variablen-First: - OLLAMA_CLOUD_API_KEY, ROCKETCHAT_PASSWORD, ROCKETCHAT_USER_ID (erforderlich) - MODEL_NAME=nemotron-3-super, CONTEXT_LENGTH=131072, COMPRESSION_THRESHOLD=0.85 (defaults) - ARCHIVAR_LLM_BASE_URL=http://localhost:11434 (P8: lokal, nicht cloud) - Alle Werte über env, nichts hardcodiert Neue Optionen: - --dry-run zeigt was gemacht würde, ändert nichts - --check prüft nur Voraussetzungen - --update-only Notfall-Deploy (nur Plugin + Restart) - --force überschreibt bestehende Dateien - --skip-system-deps / --skip-ollama-models für CI/Container Pitfalls (alle automatisch abgefangen): P1 snowballstemmer in pipx-venv (NICHT system-python) P2 auxiliary=ollama-cloud (NICHT openrouter/Nous — payment errors) P3 Plugin-Pfad site-packages/plugins/platforms/rocketchat/ P4 .env nicht zwischen Maschinen kopieren P5 systemctl --user enable hermes-gateway (Autostart) P6 provider=ollama-cloud (NICHT custom) P7 model=nemotron-3-super (NICHT nemotron-3-super-120b) P8 ARCHIVAR_LLM_BASE_URL=localhost:11434 (NICHT ollama-cloud) P9 SOUL.md ohne 'Bestätigung vor Bearbeitung' P10 room-map.json leer starten Doku: INSTALL.md mit allen env-Variablen und Beispiel-Aufruf.
102 lines
4.0 KiB
Markdown
102 lines
4.0 KiB
Markdown
# install.sh — Dokumentation
|
|
|
|
## Aufruf
|
|
|
|
```bash
|
|
# Interaktiv (mit Prompts für fehlende Werte)
|
|
./install.sh
|
|
|
|
# Vollständig nicht-interaktiv (alle Werte aus env)
|
|
./install.sh --non-interactive
|
|
|
|
# Nur anzeigen, was gemacht würde (nichts ändern)
|
|
./install.sh --dry-run
|
|
|
|
# Nur Voraussetzungen prüfen
|
|
./install.sh --check
|
|
|
|
# Notfall-Deploy: nur Plugin-Dateien + Gateway-Neustart
|
|
./install.sh --update-only
|
|
|
|
# Bestehende Dateien überschreiben (SOUL.md etc.)
|
|
./install.sh --force
|
|
|
|
# apt-Install überspringen (Container/CI)
|
|
./install.sh --skip-system-deps
|
|
```
|
|
|
|
## Erforderliche env-Variablen (Secrets)
|
|
|
|
| Variable | Beschreibung |
|
|
|----------|--------------|
|
|
| `OLLAMA_CLOUD_API_KEY` | API-Key für ollama-cloud |
|
|
| `ROCKETCHAT_PASSWORD` | Passwort des Bot-Accounts |
|
|
| `ROCKETCHAT_USER_ID` | User-ID des Bots auf dem RC-Server |
|
|
|
|
## Optionale env-Variablen (mit Defaults)
|
|
|
|
| Variable | Default | Beschreibung |
|
|
|----------|---------|--------------|
|
|
| `ROCKETCHAT_BASE_URL` | `https://rocketchat.thomander.de` | RC-Server-URL |
|
|
| `ROCKETCHAT_USER` | `mytestbot` | Bot-Username |
|
|
| `ARCHIVAR_LLM_BASE_URL` | `http://localhost:11434` | P8: lokal, NICHT cloud |
|
|
| `ARCHIVAR_EMBEDDING_BASE_URL` | `http://localhost:11434` | lokal für nomic-embed-text |
|
|
| `MODEL_NAME` | `nemotron-3-super` | P7: NICHT `nemotron-3-super-120b` |
|
|
| `CONTEXT_LENGTH` | `131072` | Kontextfenster |
|
|
| `COMPRESSION_THRESHOLD` | `0.85` | Schwellwert für Kontextkompression |
|
|
| `ROCKETCHAT_HOME_CHANNEL` | `""` (leer) | Home-Channel; Onboarding fragt nach |
|
|
| `RC_MULTIROOM` | `true` | Archivar aktiv (V8.5) |
|
|
| `ROCKETCHAT_ALLOW_ALL_USERS` | `true` | |
|
|
| `GATEWAY_ALLOW_ALL_USERS` | `true` | |
|
|
| `ROCKETCHAT_PING_SEC` | `8` | |
|
|
| `ROCKETCHAT_IDLE_SEC` | `900` | |
|
|
|
|
## Vollständiger Beispiel-Aufruf
|
|
|
|
```bash
|
|
export OLLAMA_CLOUD_API_KEY='sk-ollama-...'
|
|
export ROCKETCHAT_PASSWORD='geheimes-passwort'
|
|
export ROCKETCHAT_USER_ID='5f8a2b3c...'
|
|
export ROCKETCHAT_USER='mytestbot'
|
|
export ROCKETCHAT_BASE_URL='https://rocketchat.thomander.de'
|
|
export MODEL_NAME='nemotron-3-super'
|
|
export CONTEXT_LENGTH=131072
|
|
|
|
./install.sh --non-interactive
|
|
```
|
|
|
|
## Was install.sh macht (9 Punkte)
|
|
|
|
1. **System-Dependencies**: Python 3.13, pip, pipx, git, curl, Ollama (lokal)
|
|
2. **Hermes Agent**: `pipx install hermes-agent`, `snowballstemmer` in pipx-venv (P1), `requirements.txt`
|
|
3. **Plugin aus Gitea**: Kopiert nach `site-packages/plugins/platforms/rocketchat/` (P3)
|
|
4. **config.yaml**: model=nemotron-3-super, provider=ollama-cloud, auxiliary auf ollama-cloud (P2)
|
|
5. **.env**: Alle Secrets aus env-Variablen; maschinenspezifisch (P4)
|
|
6. **room-map.json**: Leere Version 5 — Onboarding füllt sie (P10)
|
|
7. **SOUL.md**: Standard, ohne 'Bestätigung vor Bearbeitung' (P9)
|
|
8. **Gateway Service**: systemd user service mit `enable` für Autostart (P5)
|
|
9. **Verifikation**: Alle Pitfalls werden am Ende geprüft
|
|
|
|
## Pitfalls (automatisch abgefangen)
|
|
|
|
- **P1**: `snowballstemmer` in pipx-venv, NICHT system-python
|
|
- **P2**: auxiliary=ollama-cloud, NICHT openrouter/Nous (payment errors)
|
|
- **P3**: Plugin-Pfad `site-packages/plugins/platforms/rocketchat/`, NICHT `~/.hermes/plugins/`
|
|
- **P4**: `.env` nicht zwischen Maschinen kopieren (Identitätskonflikt)
|
|
- **P5**: `systemctl --user enable hermes-gateway` für Autostart nach Reboot
|
|
- **P6**: `provider=ollama-cloud`, NICHT `custom` für Cloud
|
|
- **P7**: `model=nemotron-3-super`, NICHT `nemotron-3-super-120b`
|
|
- **P8**: `ARCHIVAR_LLM_BASE_URL=localhost:11434`, NICHT ollama-cloud
|
|
- **P9**: SOUL.md ohne 'Bestätigung vor Bearbeitung'
|
|
- **P10**: `room-map.json` leer starten — Onboarding füllt sie
|
|
|
|
## Pfade
|
|
|
|
- pipx-venv: `~/.local/share/pipx/venvs/hermes-agent/`
|
|
- Plugin: `<venv>/lib/python3.13/site-packages/plugins/platforms/rocketchat/`
|
|
- Hermes-Home: `~/.hermes/`
|
|
- config.yaml: `~/.hermes/config.yaml`
|
|
- .env: `~/.hermes/.env` + `~/.config/hermes/rocketchat.env` (für systemd)
|
|
- room-map.json: `~/.hermes/hermes-agent/data/room-map.json`
|
|
- SOUL.md: `~/.hermes/SOUL.md`
|
|
- systemd unit: `~/.config/systemd/user/hermes-gateway.service` |