1
0

PROCEDURE-DEPLOIEMENT-SD.txt 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. PROCÉDURE DE DÉPLOIEMENT AUTOMATIQUE WAOUW SUR CARTE SD
  2. =======================================================
  3. OBJECTIF : Installer WaouW v2.0 COMPLETE automatiquement sur Raspberry Pi
  4. sans intervention manuelle sur le Pi (installation au premier boot)
  5. PRÉREQUIS :
  6. - Carte SD avec Raspberry Pi OS (partition boot accessible)
  7. - Connexion Internet sur le Pi
  8. - Windows avec 7-Zip installé
  9. MISE À JOUR (scripts corrigés) :
  10. =================================
  11. Les scripts supportent désormais /boot et /boot/firmware.
  12. Les prérequis (curl, wget, jq, unzip) sont installés au démarrage de waouw-install.sh.
  13. init_host.sh disponible pour le flow firstrun (extraction dans /home/pi/install-waouw).
  14. Système de log unifié : waouw-deploy.log et waouw-deploy-status.txt sur la partition boot.
  15. → Voir PROCEDURE-LOGS-DEPLOIEMENT.md pour suivre l'installation et diagnostiquer les erreurs.
  16. ÉTAPES DE DÉPLOIEMENT :
  17. =================================
  18. 1. CRÉER L'IMAGE DE DÉPLOIEMENT
  19. -----------------------------
  20. Depuis la racine du projet WaouW :
  21. ```
  22. build-windows.bat
  23. ```
  24. → Génère : dist/waouw-v2-image-latest.zip
  25. → Contient : BACKEND, DEPLOY, DEVICE_AGENT, docs, etc.
  26. 2. CONFIGURER L'AUTO-INSTALLATION SUR LA SD
  27. -----------------------------------------
  28. Depuis le dossier DEPLOY :
  29. ```
  30. setup-autoinstall.bat
  31. ```
  32. → Détecte automatiquement la carte SD
  33. → Copie waouw-v2-image-latest.zip → waouw-deploy.zip sur la SD
  34. → Copie firstrun.sh sur la SD
  35. → Crée WAOUW-README.txt avec instructions
  36. 3. QUAND PRÉPARER LA SD
  37. --------------------
  38. Préparation AVANT le premier boot du Raspberry Pi. L'expansion du système
  39. (firstboot) se fait au premier démarrage et n'affecte pas la partition boot.
  40. Si cmdline.txt est absent (Raspberry Pi OS Lite récent), config.txt suffit
  41. pour la détection. Lancez ensuite install.sh manuellement via SSH.
  42. 4. INSTALLATION AUTOMATIQUE
  43. -------------------------
  44. - Insérer la SD dans le Raspberry Pi
  45. - Démarrer le Pi (avec connexion Internet)
  46. - Attendre 20-40 minutes
  47. → L'installation se fait ENTIÈREMENT automatiquement !
  48. DÉTAILS TECHNIQUES :
  49. ===================
  50. Scripts impliqués :
  51. - build-windows.bat : Crée l'archive de déploiement
  52. - setup-autoinstall.bat : Configure la SD
  53. - firstrun.sh : Script d'auto-installation (s'exécute au premier boot)
  54. - install-complete.sh : Installation complète des services
  55. Fichiers sur la SD après configuration :
  56. - waouw-deploy.zip : Archive complète WaouW
  57. - firstrun.sh : Script d'auto-installation
  58. - WAOUW-README.txt : Instructions
  59. - cmdline.txt OU /boot/firmware/cmdline.txt : Configuration boot
  60. Fichiers de statut créés après installation :
  61. - waouw-install-success.txt : Installation réussie
  62. - waouw-install-error.txt : Erreur d'installation
  63. PROBLÈME ACTUEL À RÉSOUDRE :
  64. ============================
  65. Les scripts configure-autoboot.bat et fix-firstrun-path.bat ne fonctionnent pas
  66. sur les nouvelles versions de Raspberry Pi OS car ils cherchent /boot/cmdline.txt
  67. alors que le fichier est maintenant dans /boot/firmware/cmdline.txt
  68. SOLUTION TEMPORAIRE :
  69. ====================
  70. 1. Vérifier la structure de la SD :
  71. - /boot/cmdline.txt (ancienne version)
  72. - /boot/firmware/cmdline.txt (nouvelle version)
  73. 2. Modifier manuellement le bon fichier cmdline.txt :
  74. - Ajouter : systemd.run=/boot/firstrun.sh
  75. - Ou utiliser une méthode alternative d'auto-exécution
  76. 3. Alternative : Utiliser SSH pour lancer l'installation manuellement :
  77. ```bash
  78. ssh pi@[IP-PI]
  79. cd /opt/waouw/waouw-deploy
  80. ./install.sh
  81. ```
  82. ACCÈS APRÈS INSTALLATION :
  83. ==========================
  84. Interface web :
  85. - https://IP-DU-PI ou https://waouw.local
  86. - Finaliser l'onboarding avec les identifiants client waouw-admin
  87. - Les identifiants admin locaux sont envoyés après validation du boîtier
  88. Services inclus :
  89. - Interface web complète (React + FastAPI)
  90. - Serveur email (Postfix + Dovecot + Roundcube)
  91. - Cloud personnel (Nextcloud)
  92. - Sécurité (Fail2ban + OpenVPN + Firewall)
  93. - Monitoring (Grafana + Graylog + Prometheus)
  94. - Administration (Webmin + phpMyAdmin)
  95. VÉRIFICATION :
  96. =============
  97. 1. Après installation, remettre la SD dans Windows
  98. 2. Vérifier la présence de waouw-install-success.txt
  99. 3. Ou tester https://waouw.local depuis un navigateur
  100. AVANTAGES DE CETTE MÉTHODE :
  101. ===========================
  102. ✅ Installation 100% automatique (quand ça fonctionne)
  103. ✅ Aucune intervention manuelle sur le Pi
  104. ✅ Configuration réseau automatique (waouw.local)
  105. ✅ Récupération d'erreur avec logs détaillés
  106. ✅ Package complet et autonome
  107. NOTES IMPORTANTES :
  108. ==================
  109. - Le Pi doit avoir une connexion Internet pour l'installation
  110. - L'installation prend 20-40 minutes selon la connexion
  111. - Toujours changer le mot de passe admin après installation
  112. - Les logs sont disponibles dans /var/log/waouw-*.log
  113. - PROBLÈME : Les scripts ne gèrent pas les nouvelles versions de Raspberry Pi OS
  114. Version : WaouW v2.0 COMPLETE
  115. Date : $(Get-Date -Format "yyyy-MM-dd HH:mm:ss")
  116. STATUT : PROBLÈME IDENTIFIÉ - CORRECTION REQUISE