Proposition : Smart-Deploy Phase 7
Date : 21/01/2026
Status : ✅ TERMINÉ (21/01/2026 13:31)
Objectif
Finaliser le système Smart-Deploy avec documentation, tests réels et intégration dashboard.
Tâches proposées
1. Documentation utilisateur (README.md)
Créer /stock_8to/33800-stack/scripts/deploy/README.md avec :
- Guide de démarrage rapide
- Format conf.gouroubleu.yml détaillé
- Exemples par type de projet (Node, Bun, Python, Static)
- Commandes rollback
- Troubleshooting
Estimation : ~150 lignes
2. Test pipeline GitLab CI/CD réel
Choisir un projet existant et le déployer via le système complet :
- Option A :
notif-logger (déjà fonctionnel, Docker)
- Option B : Dashboard monitoring (remote/o2switch)
- Option C : Nouveau projet de test
Étapes :
- Ajouter conf.gouroubleu.yml au projet
- Modifier .gitlab-ci.yml pour utiliser smart-deploy
- Push et vérifier le déploiement complet
- Tester rollback
3. Page dashboard registre services
Créer /stock_8to/33800-stack/monitoring/generate.d/XX-services.sh :
- Tableau des services déployés (depuis services-registry.json)
- Status, target, dernier déploiement, commit
- Liens vers les URLs
- Bouton rollback (optionnel, v2)
4. Health checks automatiques
Ajouter dans smart-deploy.sh après déploiement :
# Vérifier que le service répond
health_check() {
local url="$1"
local max_attempts=10
for i in $(seq 1 $max_attempts); do
if curl -sf "$url/health" > /dev/null 2>&1; then
return 0
fi
sleep 3
done
return 1
}
Si health check échoue → rollback automatique + notification
Ordre d'exécution proposé
- README.md - Documentation (permet de valider la compréhension)
- Health checks - Amélioration critique avant tests réels
- Test CI/CD réel - Validation complète du système
- Page dashboard - Visualisation pour suivi
Fichiers à créer/modifier
| Fichier |
Action |
| scripts/deploy/README.md |
Créer |
| scripts/deploy/smart-deploy.sh |
Modifier (health check) |
| scripts/deploy/lib/health.sh |
Créer (nouveau module) |
| monitoring/generate.d/25-services.sh |
Créer |
| monitoring/generate.sh |
Modifier (ajouter appel) |
Questions
- Projet test CI/CD : Tu préfères tester avec un projet existant ou créer un projet de test dédié ?
- Health check obligatoire : Le health check doit-il être optionnel (configurable) ou toujours actif ?
- Rollback auto sur échec health : On active le rollback automatique ou juste une notification ?
Validation requise avant exécution