📘 Automatisation & Déploiement — Serveurs ap31 (Prod / Test / Moniteur)
Ce projet regroupe plusieurs missions réalisées dans le cadre du BTS SIO SISR.
L’objectif général est d’automatiser l’installation, la configuration et la supervision des serveurs ap31 grâce à Ansible, Docker, Payara, MariaDB, WireGuard, GLPI, et Caddy.
📑 Sommaire
- Contexte du projet
- Environnement technique
- Mission I6 — Automatisation Ansible (Docker / Payara / MariaDB)
- Mission I7 — Mise en place d’un VPN WireGuard
- Mission I9 — Serveur GLPI + Proxy Inverse Caddy + HTTPS
- Ports ouverts & Firewall
- Définitions & technologies utilisées
- Liens vers les playbooks & fichiers
📂 Contexte du projet
Les serveurs concernés :
| Serveur | Rôle |
|---|---|
| ap31-prod | Serveur de production |
| ap31-test | Serveur de test |
| ap31-mon | Serveur de supervision / logs |
| ap31-pt | Serveur hébergeant GLPI + Caddy |
🛠️ Environnement technique
| Outil / Technologie | Usage |
|---|---|
| Ansible | Automatisation de l’installation et configuration |
| Docker / Docker Compose | Conteneurisation (Payara, GLPI, MariaDB) |
| Payara Server | Serveur d'applications Java (remplaçant moderne de Tomcat) |
| MariaDB / MySQL | Base de données pour Payara et GLPI |
| WireGuard | VPN entre les serveurs prod / test / mon |
| Caddy | Proxy inverse + HTTPS auto-signé |
| GLPI 11 | Gestion du parc informatique |
🧩 Mission I6 — Automatisation Ansible
📌 Structure des playbooks
1. Installation Docker + Payara
Playbook : payara.yml
➡️ installe Docker via get-docker.sh, configure Payara, lance les conteneurs.
2. VPN Wireguard
Playbook : wg.yml
➡️ installe Wireguard et génère les configs via un script et distribue sur ap31-test et ap31-prod.
3. GLPI
Playbook : install-glpi.yml
➡️ installe GLPI et la base de données prévue avec.
🔐 Mission I7 — Mise en place d’un VPN WireGuard
🎯 Objectifs
- Relier ap31-prod, ap31-test, ap31-mon via un VPN chiffré
📌 Playbook utilisé : wg.yml
Ce playbook :
- Installe WireGuard sur 2 machines
- Génère les fichiers de configuration (
wg0-*.conf) sur ap31-mon - Déploie la configuration adaptée sur chaque serveur
- Active le service WireGuard
🖥️ Mission I9 — Déploiement GLPI + Proxy inverse Caddy
🎯 Objectifs
- Héberger GLPI 11 via Docker (GLPI + MariaDB)
- Tester la remontée d’inventaire depuis glpi-agent sous Linux
- Écrire un playbook Ansible d’installation
- Mettre en place un proxy inverse Caddy avec HTTPS interne
📌 Fichiers docker compose
Disponible ici :
🔗 docker-compose.yml (GLPI)
https://gitea.lyc-lecastel.fr/uap31-2026-r/SDIS29/src/branch/main/partie2/ansible/files/docker-compose.yml
🔗 compose.yml (Payara)
https://gitea.lyc-lecastel.fr/uap31-2026-r/SDIS29/src/branch/main/partie2/ansible/files/compose.yml
📌 Caddyfile (reverse proxy + HTTPS interne)
ap31-pt.sio.lan {
tls internal # certificat auto-signé par Caddy
reverse_proxy localhost:4000 # Proxy vers GLPI
}
ap31-pt {
tls internal
reverse_proxy localhost:4000
}
📌 Test de remontée d’inventaire (glpi-agent)
vagrant@glpi-agent:~$ sudo glpi-agent --no-ssl-check --server https://ap31-pt.sio.lan
[info] target server0: server https://ap31-pt.sio.lan
[info] sending contact request to server0
[info] [http client] SSL Client info: Cert-Issuer: '/CN=Caddy Local Authority - ECC Intermediate'
[info] running task Inventory
[info] New inventory from glpi-agent-2025-12-05-09-30-21 for server0
[info] [http client] SSL Client warning: Peer certificate not verified
🔥 Ports ouverts & Firewall
debian@ap31-pt:~$ sudo ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), deny (routed)
New profiles: skip
To Action From
-- ------ ----
80/tcp ALLOW IN Anywhere
443/tcp ALLOW IN Anywhere
8080/tcp ALLOW IN Anywhere
22/tcp ALLOW IN Anywhere
📚 Définitions & technologies utilisées
Payara:
Serveur d’applications Java moderne, dérivé de GlassFish. Permet d’héberger des applications web Java EE / Jakarta EE.
GLPI:
Outil de gestion de parc informatique :
-
inventaire des machines
-
gestion des tickets
-
périphériques
-
contrats, licences, garanties
WireGuard:
VPN moderne, très rapide, extrêmement simple à configurer.
Caddy
Serveur web + reverse proxy capable d’émettre automatiquement des certificats HTTPS.