2.9 KiB
2.9 KiB
CI/CD Pipeline - Setup Checklist
✅ Status
1. Repository Secrets in Gitea ✅ BEREIT
Pfad: Repository → Settings → Secrets
Schnelles Setup:
bash scripts/prepare-secrets.sh
Erforderliche Secrets:
- REGISTRY_USER:
admin - REGISTRY_PASSWORD:
registry-secure-password-2025 - SSH_PRIVATE_KEY: Vollständiger Inhalt von
~/.ssh/production
Details: Siehe .gitea/workflows/QUICK_SECRETS_SETUP.md
Hinweis: Alle Secrets müssen in Gitea konfiguriert werden, bevor die Pipeline läuft.
2. Docker Registry ✅
- ✅ Registry läuft auf
git.michaelschiemer.de:5000 - ✅ Authentifizierung konfiguriert (admin/registry-secure-password-2025)
- ✅ Erreichbar via HTTP auf
127.0.0.1:5000 - ✅ Image
frameworkbereits vorhanden
Registry-Test:
curl -u admin:registry-secure-password-2025 http://127.0.0.1:5000/v2/_catalog
# Erwartete Ausgabe: {"repositories":["framework"]}
3. Ansible Playbooks ✅
- ✅
deploy-update.yml- Aktualisiert für Docker Compose - ✅
rollback.yml- Aktualisiert für Docker Compose - ✅
setup-infrastructure.yml- Enthält Registry-Setup - ✅
sync-stacks.yml- Synchronisiert Stack-Konfigurationen
4. Workflow-Konfiguration ✅
- ✅
.gitea/workflows/production-deploy.yml- Haupt-Workflow - ✅
Dockerfile.production- Production Dockerfile erstellt - ✅ Application Stack konfiguriert (
deployment/stacks/application/docker-compose.yml)
📋 Nächste Schritte
Schritt 1: Secrets in Gitea hinzufügen
Siehe .gitea/workflows/SECRETS_SETUP.md für detaillierte Anleitung.
Schritt 2: Workflow manuell testen
- Gehe zu:
https://git.michaelschiemer.de/<username>/michaelschiemer/actions - Wähle "Production Deployment Pipeline"
- Klicke "Run workflow"
- Wähle Branch
main - Beobachte die Ausführung
Schritt 3: Automatisches Deployment testen
- Push zu
mainBranch - Workflow sollte automatisch starten
- Prüfe Logs in Gitea Actions
🔧 Troubleshooting
Registry nicht erreichbar
# Prüfe Registry-Status
ssh deploy@94.16.110.151 "docker ps | grep registry"
# Teste Registry-Erreichbarkeit
ssh deploy@94.16.110.151 "curl -u admin:registry-secure-password-2025 http://127.0.0.1:5000/v2/_catalog"
Workflow schlägt bei Registry-Login fehl
- Prüfe, ob
REGISTRY_USERundREGISTRY_PASSWORDSecrets korrekt gesetzt sind - Prüfe, ob das Passwort in Gitea mit dem Server übereinstimmt
Image Pull schlägt fehl
- Prüfe, ob das Image in der Registry existiert:
curl -u admin:registry-secure-password-2025 http://127.0.0.1:5000/v2/framework/tags/list - Prüfe Registry-Logs für Fehler
Deployment schlägt fehl
- Prüfe Ansible-Logs im Workflow
- Prüfe, ob
deployment/stacks/application/docker-compose.ymlauf dem Server existiert - Prüfe Docker-Logs auf dem Server:
ssh deploy@94.16.110.151 "cd ~/deployment/stacks/application && docker compose logs"