From 1f95b816d9a507dee972c98a39ea948bc6599b5a Mon Sep 17 00:00:00 2001 From: admin Date: Sun, 25 Jan 2026 09:32:42 -0800 Subject: [PATCH] =?UTF-8?q?Installation=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Installation.md | 298 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 298 insertions(+) create mode 100644 Installation.md diff --git a/Installation.md b/Installation.md new file mode 100644 index 0000000..0a935e5 --- /dev/null +++ b/Installation.md @@ -0,0 +1,298 @@ +# Installation + +Diese Seite beschreibt die Installation und Einrichtung des Customer Installer Systems. + +## 📋 Voraussetzungen + +Bevor Sie beginnen, stellen Sie sicher, dass folgende Voraussetzungen erfüllt sind: + +- **Proxmox VE** Server (getestet mit Version 7.x und 8.x) +- **Root-Zugriff** auf den Proxmox Host +- **Debian 12 Template** (wird automatisch heruntergeladen) +- **Netzwerk-Konfiguration** (Bridge, VLAN) +- **Ollama Server** (extern, optional) + +Siehe auch: [Systemanforderungen](System-Requirements.md) + +## 🚀 Schnellstart + +### 1. Repository klonen + +```bash +cd /root +git clone ssh://backoffice.userman.de:2223/MediaMetz/customer-installer.git +cd customer-installer +``` + +### 2. Basis-Installation + +```bash +./install.sh \ + --storage local-zfs \ + --bridge vmbr0 \ + --ip dhcp \ + --vlan 90 +``` + +### 3. Installation mit allen Optionen + +```bash +./install.sh \ + --storage local-zfs \ + --bridge vmbr0 \ + --ip dhcp \ + --vlan 90 \ + --cores 4 \ + --memory 8192 \ + --disk 100 \ + --apt-proxy http://192.168.45.2:3142 \ + --base-domain userman.de \ + --n8n-owner-email admin@userman.de \ + --ollama-model ministral-3:3b \ + --embedding-model nomic-embed-text:latest +``` + +## 📝 Installations-Parameter + +### Pflicht-Parameter + +Keine - alle Parameter haben sinnvolle Standardwerte. + +### Core-Optionen + +| Parameter | Beschreibung | Standard | +|-----------|--------------|----------| +| `--ctid ` | Container-ID (optional, wird automatisch generiert) | auto | +| `--cores ` | CPU-Kerne | unlimited | +| `--memory ` | RAM in MB | 4096 | +| `--swap ` | Swap in MB | 512 | +| `--disk ` | Festplatte in GB | 50 | +| `--bridge ` | Netzwerk-Bridge | vmbr0 | +| `--storage ` | Proxmox Storage | local-zfs | +| `--ip ` | IP-Konfiguration | dhcp | +| `--vlan ` | VLAN-Tag (0 = deaktiviert) | 90 | +| `--privileged` | Privilegierter Container | unprivileged | +| `--apt-proxy ` | APT-Proxy URL | - | + +### Domain & n8n Optionen + +| Parameter | Beschreibung | Standard | +|-----------|--------------|----------| +| `--base-domain ` | Basis-Domain | userman.de | +| `--n8n-owner-email ` | n8n Admin-Email | admin@ | +| `--n8n-owner-pass ` | n8n Admin-Passwort | auto-generiert | +| `--workflow-file ` | Workflow JSON-Datei | RAGKI-BotPGVector.json | +| `--ollama-model ` | Ollama Chat-Modell | ministral-3:3b | +| `--embedding-model ` | Embedding-Modell | nomic-embed-text:latest | + +### PostgREST Optionen + +| Parameter | Beschreibung | Standard | +|-----------|--------------|----------| +| `--postgrest-port ` | PostgREST Port | 3000 | + +### Debug-Optionen + +| Parameter | Beschreibung | +|-----------|--------------| +| `--debug` | Debug-Modus aktivieren | +| `--help` | Hilfe anzeigen | + +## 📤 JSON-Output + +Nach erfolgreicher Installation gibt das Script ein JSON-Objekt aus: + +```json +{ + "ctid": 769276659, + "hostname": "sb-1769276659", + "fqdn": "sb-1769276659.userman.de", + "ip": "192.168.45.45", + "vlan": 90, + "urls": { + "n8n_internal": "http://192.168.45.45:5678/", + "n8n_external": "https://sb-1769276659.userman.de", + "postgrest": "http://192.168.45.45:3000", + "chat_webhook": "https://sb-1769276659.userman.de/webhook/rag-chat-webhook/chat", + "chat_internal": "http://192.168.45.45:5678/webhook/rag-chat-webhook/chat", + "upload_form": "https://sb-1769276659.userman.de/form/rag-upload-form", + "upload_form_internal": "http://192.168.45.45:5678/form/rag-upload-form" + }, + "postgres": { + "host": "postgres", + "port": 5432, + "db": "customer", + "user": "customer", + "password": "HUmMLP8NbW2onmf2A1" + }, + "supabase": { + "url": "http://postgrest:3000", + "url_external": "http://192.168.45.45:3000", + "anon_key": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", + "service_role_key": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", + "jwt_secret": "IM9/HRQR9mw63lU/1G7vXPMe7q0n3oLcr35dryv0ToU=" + }, + "ollama": { + "url": "http://192.168.45.3:11434", + "model": "ministral-3:3b", + "embedding_model": "nomic-embed-text:latest" + }, + "n8n": { + "encryption_key": "d0c9c0ba0551d25e4ee95b6a4b6bc8d5b64e5e14f7f0972fe50332ca051edab5", + "owner_email": "admin@userman.de", + "owner_password": "FAmeVE7t9d1iMIXWA1", + "secure_cookie": false + }, + "log_file": "/root/customer-installer/logs/sb-1769276659.log" +} +``` + +### Credentials automatisch speichern + +Die Credentials werden automatisch gespeichert: + +```bash +# Automatisch erstellt +credentials/sb-1769276659.json +``` + +Siehe auch: [Credentials-Management](Credentials-Management.md) + +## 🔍 Installations-Schritte + +Das Script führt folgende Schritte aus: + +1. **Parameter-Validierung** - Prüfung aller Eingaben +2. **CTID-Generierung** - Eindeutige Container-ID +3. **Template-Download** - Debian 12 Template +4. **Container-Erstellung** - LXC-Container mit Konfiguration +5. **Container-Start** - Initialer Boot +6. **System-Update** - APT-Update und Upgrade +7. **Docker-Installation** - Docker Engine und Compose +8. **Stack-Deployment** - Docker Compose Stack +9. **Datenbank-Initialisierung** - PostgreSQL + pgvector +10. **n8n-Setup** - Workflow-Import und Konfiguration +11. **Workflow-Reload-Service** - Systemd Service +12. **NGINX-Proxy-Setup** - Reverse Proxy (optional) +13. **Credentials-Speicherung** - JSON-Datei + +## 📊 Installations-Logs + +Logs werden automatisch gespeichert: + +```bash +# Log-Datei +logs/sb-.log + +# Log-Datei anzeigen +tail -f logs/sb-1769276659.log +``` + +## ✅ Installations-Verifikation + +Nach der Installation sollten Sie die Verifikation durchführen: + +```bash +# Vollständige System-Tests +./test_complete_system.sh + +# Beispiel +./test_complete_system.sh 769276659 192.168.45.45 sb-1769276659 +``` + +Siehe auch: [Testing](Testing.md) + +## 🔧 Post-Installation + +### 1. Credentials prüfen + +```bash +cat credentials/sb-.json +``` + +### 2. Services prüfen + +```bash +# Container-Status +pct status + +# Docker-Container +pct exec -- docker ps + +# n8n-Logs +pct exec -- docker logs n8n +``` + +### 3. Zugriff testen + +```bash +# n8n Web-Interface +curl http://:5678/ + +# PostgREST API +curl http://:3000/ + +# Chat-Webhook +curl -X POST http://:5678/webhook/rag-chat-webhook/chat \ + -H "Content-Type: application/json" \ + -d '{"query":"Hallo"}' +``` + +## 🚨 Troubleshooting + +### Container startet nicht + +```bash +# Container-Logs prüfen +pct status +journalctl -u pve-container@ +``` + +### Docker-Container starten nicht + +```bash +# In Container einloggen +pct enter + +# Docker-Logs prüfen +docker compose -f /opt/customer-stack/docker-compose.yml logs +``` + +### n8n nicht erreichbar + +```bash +# n8n-Container prüfen +pct exec -- docker logs n8n + +# Port-Binding prüfen +pct exec -- netstat -tlnp | grep 5678 +``` + +Siehe auch: [Troubleshooting](Troubleshooting.md) + +## 🔄 Neuinstallation + +Um einen Container neu zu installieren: + +```bash +# Container stoppen und löschen +pct stop +pct destroy + +# Neuinstallation +./install.sh --storage local-zfs --bridge vmbr0 --ip dhcp --vlan 90 +``` + +## 📚 Weiterführende Dokumentation + +- [Konfiguration](Configuration.md) - Detaillierte Konfigurationsoptionen +- [Deployment](Deployment.md) - Produktiv-Deployment +- [Monitoring](Monitoring.md) - Überwachung und Logs +- [Backup & Recovery](Backup-Recovery.md) - Datensicherung + +--- + +**Nächste Schritte:** +- [Credentials-Management](Credentials-Management.md) - Zugangsdaten verwalten +- [Testing](Testing.md) - System testen +- [n8n](n8n.md) - n8n konfigurieren