146 lines
5.3 KiB
YAML
146 lines
5.3 KiB
YAML
# =============================================================================
|
|
# Omika — Pile d'observabilité externe (Phase 5)
|
|
# =============================================================================
|
|
# Topologie cible (VM Ubuntu dédiée via Hyper-V, §21) :
|
|
#
|
|
# API/Worker Omika ──OTLP HTTP/protobuf──▶ omika-otel-collector ──▶ SigNoz
|
|
# │
|
|
# ClickHouse
|
|
#
|
|
# Ce fichier est une référence MINIMALE et commentée. Les images SigNoz doivent
|
|
# être épinglées aux versions stables officielles au moment de l'installation
|
|
# (l'installateur officiel SigNoz reste la référence exacte) :
|
|
# curl -sL https://github.com/SigNoz/signoz/raw/main/scripts/install.sh | bash
|
|
#
|
|
# RÈGLE ABSOLUE : rien ici n'est requis pour qu'Omika fonctionne. Arrêter toute
|
|
# cette pile ne casse jamais le métier (fail-open, §2/§97).
|
|
# =============================================================================
|
|
|
|
services:
|
|
# ---------------------------------------------------------------------------
|
|
# 1. Notre Collector Omika (le SEUL point d'entrée OTLP d'Omika).
|
|
# Reçoit OTLP des composants autorisés, limite la mémoire, batche, exporte
|
|
# vers SigNoz. Ports 4317/4318 = réseau privé uniquement, jamais publics.
|
|
# ---------------------------------------------------------------------------
|
|
omika-otel-collector:
|
|
image: otel/opentelemetry-collector:0.128.0
|
|
container_name: omika-otel-collector
|
|
command: ["--config=/etc/otel-collector-config.yaml"]
|
|
volumes:
|
|
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml:ro
|
|
environment:
|
|
SIGNOZ_OTLP_ENDPOINT: "signoz-otel-collector:4317"
|
|
ports:
|
|
# Exposer uniquement sur le réseau privé de la VM (bind 127.0.0.1 ou VPN).
|
|
# JAMAIS "0.0.0.0" sur un réseau public.
|
|
- "127.0.0.1:4318:4318" # HTTP/protobuf (utilisé par Omika)
|
|
- "127.0.0.1:4317:4317" # gRPC (non utilisé par Omika, désactivable)
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "1.0"
|
|
memory: 768M # cohérent avec memory_limiter (512 MiB + marge)
|
|
reservations:
|
|
memory: 256M
|
|
networks: [observability]
|
|
restart: unless-stopped
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# 2. ClickHouse (stockage des signaux — infrastructure externe, jamais embarqué
|
|
# dans Omika, §22). Réseau restreint au réseau interne de la pile.
|
|
# ---------------------------------------------------------------------------
|
|
clickhouse:
|
|
image: clickhouse/clickhouse-server:24.8
|
|
container_name: signoz-clickhouse
|
|
ports:
|
|
- "127.0.0.1:8123:8123"
|
|
- "127.0.0.1:9000:9000"
|
|
volumes:
|
|
- clickhouse-data:/var/lib/clickhouse
|
|
environment:
|
|
CLICKHOUSE_DB: signoz_metrics
|
|
CLICKHOUSE_USER: signoz
|
|
CLICKHOUSE_PASSWORD: "${CLICKHOUSE_PASSWORD:-change-me}"
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "2.0"
|
|
memory: 4G
|
|
reservations:
|
|
memory: 1G
|
|
networks: [observability]
|
|
restart: unless-stopped
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# 3. Collector SigNoz : reçoit l'OTLP de notre collector et écrit dans
|
|
# ClickHouse. Jamais exposé au mobile ni au public (§5/§28).
|
|
# ---------------------------------------------------------------------------
|
|
signoz-otel-collector:
|
|
image: signoz/otel-collector:0.128.1
|
|
container_name: signoz-otel-collector
|
|
command: ["--config=/etc/otel-collector-config.yaml"]
|
|
volumes:
|
|
- ./signoz/otel-collector-config.yaml:/etc/otel-collector-config.yaml:ro
|
|
ports:
|
|
- "127.0.0.1:4319:4317" # entrée OTLP SigNoz (interne à la pile)
|
|
environment:
|
|
CLICKHOUSE_HOST: clickhouse
|
|
CLICKHOUSE_USER: signoz
|
|
CLICKHOUSE_PASSWORD: "${CLICKHOUSE_PASSWORD:-change-me}"
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "1.0"
|
|
memory: 768M
|
|
reservations:
|
|
memory: 256M
|
|
depends_on: [clickhouse]
|
|
networks: [observability]
|
|
restart: unless-stopped
|
|
|
|
# ---------------------------------------------------------------------------
|
|
# 4. Query service SigNoz (backend API) + 5. Frontend (UI support/dev).
|
|
# Réservés à l'équipe support autorisée, jamais aux utilisateurs Omika (§27).
|
|
# ---------------------------------------------------------------------------
|
|
signoz-query-service:
|
|
image: signoz/query-service:0.72.0
|
|
container_name: signoz-query-service
|
|
ports:
|
|
- "127.0.0.1:8085:8085"
|
|
environment:
|
|
ClickHouseUrl: "tcp://signoz:@clickhouse:9000"
|
|
STORAGE: clickhouse
|
|
SIGNOZ_LOCAL_DB_PATH: /var/lib/signoz
|
|
volumes:
|
|
- signoz-query-data:/var/lib/signoz
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "1.0"
|
|
memory: 1G
|
|
depends_on: [clickhouse]
|
|
networks: [observability]
|
|
restart: unless-stopped
|
|
|
|
signoz-frontend:
|
|
image: signoz/frontend:0.72.0
|
|
container_name: signoz-frontend
|
|
ports:
|
|
- "127.0.0.1:3301:3301"
|
|
depends_on: [signoz-query-service]
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
cpus: "0.5"
|
|
memory: 512M
|
|
networks: [observability]
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
clickhouse-data:
|
|
signoz-query-data:
|
|
|
|
networks:
|
|
observability:
|
|
driver: bridge
|