Installazione
Seer Box Sentinel può essere eseguito come un container stand-alone con Docker (e runtime compatibili come Podman), come un service di Docker Compose o sotto systemd come un Podman Quadlet.
Tutte le alternative di installazione condividono un file di configurazione con la stessa struttura, un file .env chiave=valore.
Un named volume sentinel_certs viene utilizzato per la persistenza di certificati ed altri dati di autenticazione ma al suo posto si può utilizzare un bind mount.
La rete può essere limitata alla sola porta SBX_LISTEN_PORT.
1. Docker compose
Esempio di file per Docker compose:
name: sentinel
services:
sentinel:
image: quay.io/pluribus_one/seer_box_sentinel:latest
pull_policy: always
network_mode: host
env_file: .env
volumes:
certs:/opt/seer_box/etc/tls/certs
volumes:
certs:
Avvio:
docker compose up
2. Docker/Podman
Comando d'esempio:
docker run \
--rm \
--env-file .env \
--network host \
--volume sentinel_certs:/opt/seer_box/etc/tls/certs \
quay.io/pluribus_one/seer_box_sentinel:latest
3. Podman Quadlet
Assicurarsi di avere una versione supportata di systemd (>= 245) e podman (>= 4.4).
Quadlet sentinel.container di esempio:
[Install]
WantedBy=default.target
[Unit]
Description=Seer Box Sentinel
[Container]
Image=quay.io/pluribus_one/seer_box_sentinel:latest
AutoUpdate=registry
Pull=newer
ContainerName=seer-box-sentinel
Network=host
EnvironmentFile=./%p.env
Volume=sentinel_certs:/opt/seer_box/etc/tls/certs
[Service]
Restart=on-success
Installazione della unit di systemd ed .env file nel path di systemd:
# Altri path supportati si possono trovare su https://docs.podman.io/en/latest/markdown/podman-systemd.unit.5.html
systemd_units_user_path=$XDG_CONFIG_HOME/containers/systemd
# Usare un nome più descrittivo nel caso si utilizzino multipli Sentinel sullo stesso host
sentinel_service_name=sentinel
mkdir -p $systemd_units_user_path
# Copia del service file
cp sentinel.container "$systemd_units_user_path/$sentinel_service_name.container"
# Copia del file di configurazione
cp .env "$systemd_units_user_path/$sentinel_service_name.env"
# Caricamento della nuova unit
systemctl --user daemon-reload
Operazioni comuni:
# Avviare il servizio
systemctl --user start $sentinel_service_name
# Accedere ai log
journalctl --user --follow --unit $sentinel_service_name
# Avviare al boot
systemctl --user enable $sentinel_service_name
# Abilitare linger per l'utente corrente per evitare interruzioni dopo il logout (richiede privilegi di root per essere abilitato)
sudo loginctl enable-linger $USER