- Add credentials management system with automatic saving and updates - Add upload form URL to JSON output - Add Ollama model information to JSON output - Implement credential update system (update_credentials.sh) - Implement credential save system (save_credentials.sh) - Add comprehensive test suites (infrastructure, n8n, PostgREST, complete system) - Add workflow auto-reload system with systemd service - Add detailed documentation (CREDENTIALS_MANAGEMENT.md, TEST_REPORT.md, VERIFICATION_SUMMARY.md) - Improve n8n setup with robust API-based workflow import - Add .gitignore for credentials directory - All tests passing (40+ test cases) Key Features: - Credentials automatically saved to credentials/<hostname>.json - Update Ollama URL from IP to hostname without container restart - Comprehensive testing with 4 test suites - Full documentation and examples - Production-ready system
74 lines
2.2 KiB
Markdown
74 lines
2.2 KiB
Markdown
# Workflow Auto-Reload bei LXC-Neustart - Implementierungsplan
|
|
|
|
## Status: ✅ Implementierung abgeschlossen - Bereit für Tests
|
|
|
|
---
|
|
|
|
## Aufgaben
|
|
|
|
### Phase 1: Systemd-Service erstellen ✅
|
|
- [x] Systemd-Unit-Datei Template erstellen (`n8n-workflow-reload.service`)
|
|
- [x] Service wartet auf Docker und n8n-Container
|
|
- [x] Service ruft Reload-Script auf
|
|
|
|
### Phase 2: Reload-Script erstellen ✅
|
|
- [x] Bash-Script Template erstellen (`reload-workflow.sh`)
|
|
- [x] Konfiguration aus `.env` lesen
|
|
- [x] Warten bis n8n API bereit ist
|
|
- [x] Workflow-Status prüfen (existiert bereits?)
|
|
- [x] Alten Workflow löschen (sauberer Import)
|
|
- [x] Neuen Workflow importieren
|
|
- [x] Workflow aktivieren
|
|
- [x] Logging implementieren
|
|
|
|
### Phase 3: Integration in install.sh ✅
|
|
- [x] Workflow-Template persistent speichern
|
|
- [x] Systemd-Service-Datei in LXC kopieren
|
|
- [x] Reload-Script in LXC kopieren
|
|
- [x] Script ausführbar machen
|
|
- [x] Systemd-Service aktivieren
|
|
- [x] Service beim ersten Boot starten
|
|
|
|
### Phase 4: Hilfsfunktionen in libsupabase.sh ✅
|
|
- [x] `n8n_api_list_workflows()` - Workflows auflisten
|
|
- [x] `n8n_api_delete_workflow()` - Workflow löschen
|
|
- [x] `n8n_api_get_workflow_by_name()` - Workflow nach Name suchen
|
|
- [x] `n8n_api_get_credential_by_name()` - Credential nach Name suchen
|
|
|
|
### Phase 5: Tests
|
|
- [ ] Test: Initiale Installation
|
|
- [ ] Test: LXC-Neustart
|
|
- [ ] Test: Workflow wird neu geladen
|
|
- [ ] Test: Credentials bleiben erhalten
|
|
- [ ] Test: Logging funktioniert
|
|
|
|
---
|
|
|
|
## Technische Details
|
|
|
|
### Systemd-Service
|
|
- **Name**: `n8n-workflow-reload.service`
|
|
- **Type**: `oneshot`
|
|
- **After**: `docker.service`
|
|
- **Wants**: `docker.service`
|
|
|
|
### Reload-Script
|
|
- **Pfad**: `/opt/customer-stack/reload-workflow.sh`
|
|
- **Log**: `/opt/customer-stack/logs/workflow-reload.log`
|
|
- **Workflow-Template**: `/opt/customer-stack/workflow-template.json`
|
|
|
|
### Workflow-Reload-Strategie
|
|
1. Alte Workflows mit gleichem Namen löschen
|
|
2. Neuen Workflow aus Template importieren
|
|
3. Credentials automatisch zuordnen (aus bestehenden Credentials)
|
|
4. Workflow aktivieren
|
|
|
|
---
|
|
|
|
## Nächste Schritte
|
|
1. Systemd-Service-Template erstellen
|
|
2. Reload-Script-Template erstellen
|
|
3. Hilfsfunktionen in libsupabase.sh hinzufügen
|
|
4. Integration in install.sh
|
|
5. Testen
|