Il y a 389 articles et 19 utilisateurs inscrits (ce bandeau est défini dans MediaWiki:Sitenotice)
Intégration de altcha-sentinel
Installation de ALTCHA Sentinel (Ubuntu 24 + Docker)
[modifier | modifier le wikicode]1. Création de la VM (Proxmox)
[modifier | modifier le wikicode]- OS : Ubuntu Server 24.04
- CPU : 2 vCPU minimum
- RAM : 4 Go (8 Go recommandé)
- Disque : 30 Go
Réseau :
- LAN (OPNsense) → vmbr2
- WAN si nécessaire → vmbr1
2. Configuration réseau (Netplan)
[modifier | modifier le wikicode]Fichier : /etc/netplan/50-cloud-init.yaml
network:
version: 2
renderer: networkd
ethernets:
lo:
renderer: networkd
match:
name: lo
addresses:
- 51.83.117.124/32
ens18:
dhcp4: no
dhcp6: no
addresses: [10.0.0.38/24]
routes:
- to: default
via: 10.0.0.4
nameservers:
addresses: [10.0.0.4]
ens19:
dhcp4: no
dhcp6: no
addresses: [192.168.123.25/24]
Appliquer :
sudo netplan try
sudo netplan apply
3. Installation Docker
[modifier | modifier le wikicode]sudo apt update
sudo apt install -y ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
docker --version
docker compose version
sudo systemctl enable docker
sudo systemctl start docker
sudo usermod -aG docker $USER
Reconnecter la session.
4. Installation Sentinel
[modifier | modifier le wikicode]sudo mkdir -p /opt/altcha
sudo chown -R ajlsm:ajlsm /opt/altcha
cd /opt/altcha
mkdir -p data
docker-compose.yml :
services:
sentinel:
image: ghcr.io/altcha-org/sentinel:latest
container_name: altcha-sentinel
restart: unless-stopped
ports:
- "10.0.0.38:8080:8080"
volumes:
- ./data:/var/lib/altcha
environment:
NODE_ENV: production
Lancement :
docker compose up -d
5. Vérifications
[modifier | modifier le wikicode]docker ps
docker logs --tail 100 altcha-sentinel
curl http://127.0.0.1:8080
curl -I http://127.0.0.1:8080
curl http://127.0.0.1:8080/v1
curl http://127.0.0.1:8080/v1/docs
docker inspect altcha-sentinel --format '{{.State.Status}} {{.State.Restarting}} {{.State.ExitCode}}'
6. Accès interne
[modifier | modifier le wikicode]curl http://10.0.0.38:8080
7. Mise en place HTTPS (HAProxy + Let's Encrypt)
[modifier | modifier le wikicode]Configuration HAProxy
[modifier | modifier le wikicode]Modification du fichier ansible : __SVN__/ansible-ajlsm/trunk/inventory/group_vars/ajlsm_loadbalancer/haproxy.yml pour ajout de la configuration de sentinel
acl host_sentinel hdr(host) -i sentinel.ajlsm.com
acl acme_challenge path_beg /.well-known/acme-challenge/
http-request allow if host_sentinel acme_challenge
http-request deny if host_sentinel !allowed_ajlsm !allowed_sentinel_client !acme_challenge
http-request redirect scheme https if host_sentinel !{ ssl_fc } !acme_challenge
use_backend back_sentinel if host_sentinel
backend back_sentinel
server SENTINEL 10.0.0.38:8080 check
Génération certificat
[modifier | modifier le wikicode]Depuis chaque haproxy en simultané :
sudo -u acme -s
acme.sh --issue -d sentinel.ajlsm.com --stateless --server letsencrypt
DEPLOY_HAPROXY_HOT_UPDATE=yes DEPLOY_HAPROXY_STATS_SOCKET=/var/run/haproxy/admin.sock DEPLOY_HAPROXY_PEM_PATH=/etc/haproxy/certs acme.sh --deploy -d sentinel.ajlsm.com --deploy-hook haproxy
8. Accès final
[modifier | modifier le wikicode]9. Notes
[modifier | modifier le wikicode]- Sentinel est centralisé pour toutes les VM
- HAProxy gère SSL et filtrage
- ACME doit rester accessible pour renouvellement
10. Suite
[modifier | modifier le wikicode]- Création utilisateur admin
- Intégration Drupal
- Intégration Pleade