Il y a 389 articles et 19 utilisateurs inscrits (ce bandeau est défini dans MediaWiki:Sitenotice)

Intégration de altcha-sentinel

De AJLSM
Version datée du 23 mars 2026 à 10:18 par Jlarvers (discussion | contributions) (Page créée avec « = Installation de ALTCHA Sentinel (Ubuntu 24 + Docker) = == 1. Création de la VM (Proxmox) == * OS : Ubuntu Server 24.04 * CPU : 2 vCPU minimum * RAM : 4 Go (8 Go recom... »)
(diff) ← Version précédente | Version actuelle (diff) | Version suivante → (diff)
Aller à la navigation Aller à la recherche

Installation de ALTCHA Sentinel (Ubuntu 24 + Docker)

1. Création de la VM (Proxmox)

  • 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)

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

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

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

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

curl http://10.0.0.38:8080

7. Mise en place HTTPS (HAProxy + Let's Encrypt)

Configuration HAProxy

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

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

https://sentinel.ajlsm.com

9. Notes

  • Sentinel est centralisé pour toutes les VM
  • HAProxy gère SSL et filtrage
  • ACME doit rester accessible pour renouvellement

10. Suite

  • Création utilisateur admin
  • Intégration Drupal
  • Intégration Pleade