Préparation
Prérequis
- Serveur Rocky Linux 9 avec au moins 4 Go de RAM et 2 vCPUs
- Accès root
- Nom de domaine configuré : foreman.mondomaine.com
- Firewall configuré pour autoriser les ports nécessaires
Checklist avant de commencer
- Serveur HAProxy : IP =
<IP_HAPROXY>(serveur mutualisé séparé) - Serveur Foreman : IP =
<IP_SERVEUR_FOREMAN> - Les deux serveurs peuvent communiquer entre eux
- DNS configuré :
foreman.mondomaine.com→<IP_HAPROXY> - Certificats SSL disponibles (ou génération prévue)
- Accès root sur les deux serveurs
Informations à préparer
| Information | Valeur à renseigner |
|---|---|
| IP HAProxy | <IP_HAPROXY> |
| IP Foreman | <IP_SERVEUR_FOREMAN> |
| Nom de domaine | foreman.mondomaine.com |
| Organisation | MonOrganisation |
| Location | MonDatacenter |
| Mot de passe admin Foreman | MotDePasseSecurise |
Architecture
- Serveur HAProxy (serveur mutualisé séparé) : Frontend (ports 443 et 8443)
- Serveur Foreman : Backend (ports 80, 8443, 8140)
- Interface Web : https://foreman.mondomaine.com (HAProxy → Foreman:80)
- Smart Proxy : https://foreman.mondomaine.com:8443 (HAProxy → Foreman:8443)
Important : HAProxy et Foreman sont sur des serveurs distincts. HAProxy agit comme reverse proxy SSL/TLS et redirige le trafic vers le serveur Foreman backend.
Schéma de l'architecture
┌─────────────────────────┐
│ Clients / Agents │
│ Puppet & Browsers │
└───────────┬─────────────┘
│
│ HTTPS (443, 8443)
│ TCP (8140 optionnel)
▼
┌─────────────────────────┐
│ Serveur HAProxy │
│ (Mutualisé/Séparé) │
│ │
│ - Port 443 → WebUI │
│ - Port 8443 → Proxy │
│ - Port 8140 → Puppet │
└───────────┬─────────────┘
│
┌─────────────────────────┼─────────────────────────┐
│ HTTP (80) │ HTTPS (8443) │ TCP (8140)
▼ ▼ ▼
┌───────────────────┐ ┌───────────────────┐ ┌───────────────────┐
│ Apache/Foreman │ │ Smart Proxy │ │ Puppet Server │
│ (Port 80) │ │ (Port 8443) │ │ (Port 8140) │
└───────────────────┘ └───────────────────┘ └───────────────────┘
▲ ▲ ▲
└─────────────────────────┴─────────────────────────┘
Serveur Foreman Backend
(IP : <IP_SERVEUR_FOREMAN>)
Flux de communication
- WebUI : Client → HAProxy:443 (HTTPS) → Foreman:80 (HTTP)
- Smart Proxy : Client → HAProxy:8443 (HTTPS) → Foreman:8443 (HTTPS)
- Puppet : Agent → HAProxy:8140 (TCP) → Foreman:8140 (TCP) OU Agent → Direct Foreman:8140