Initial commit: Project setup and switch to VictoriaLogs for observability, with updated tech stack requirements.
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
# ------------------------------------------------------------------
|
||||
# Core Services
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
postgres:
|
||||
image: postgres:15
|
||||
container_name: camel_ops_db
|
||||
@@ -13,26 +17,99 @@ services:
|
||||
volumes:
|
||||
- pg_data:/var/lib/postgresql/data
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appliance-network
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# Appliance Hub: Persistence, Telemetry & Alerting
|
||||
# ------------------------------------------------------------------
|
||||
|
||||
# Time Series Database
|
||||
victoriametrics:
|
||||
image: victoriametrics/victoria-metrics:v1.93.0
|
||||
container_name: camel_ops_vm
|
||||
image: victoriametrics/victoria-metrics:v1.93.3
|
||||
ports:
|
||||
- "8428:8428"
|
||||
command:
|
||||
- "--retentionPeriod=1y"
|
||||
- "--retentionPeriod=1y" # From my original commit
|
||||
- "--storageDataPath=/vmetrics-data"
|
||||
- "--httpListenAddr=:8428"
|
||||
volumes:
|
||||
- vm_data:/victoria-metrics-data
|
||||
- vmetrics-data:/vmetrics-data
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appliance-network
|
||||
|
||||
# Alert Evaluation Engine
|
||||
vmalert:
|
||||
image: victoriametrics/vmalert:v1.93.3
|
||||
ports:
|
||||
- "8880:8880"
|
||||
command:
|
||||
- "-rule=/etc/alerts/alerts.yml"
|
||||
- "-datasource.url=http://victoriametrics:8428"
|
||||
- "-notifier.url=http://alertmanager:9093"
|
||||
- "-remoteWrite.url=http://victoriametrics:8428"
|
||||
- "-remoteRead.url=http://victoriametrics:8428"
|
||||
volumes:
|
||||
- ./alerts:/etc/alerts
|
||||
depends_on:
|
||||
- victoriametrics
|
||||
- alertmanager
|
||||
networks:
|
||||
- appliance-network
|
||||
restart: unless-stopped
|
||||
|
||||
loki:
|
||||
image: grafana/loki:2.9.2
|
||||
container_name: camel_ops_loki
|
||||
# Alert Routing, Grouping, Deduplication
|
||||
alertmanager:
|
||||
image: prom/alertmanager:v0.26.0
|
||||
ports:
|
||||
- "3100:3100"
|
||||
command: -config.file=/etc/loki/local-config.yaml
|
||||
- "9093:9093"
|
||||
command:
|
||||
- "--config.file=/etc/alertmanager/config.yml"
|
||||
- "--storage.path=/alertmanager"
|
||||
volumes:
|
||||
- ./alertmanager-config.yml:/etc/alertmanager/config.yml
|
||||
- alertmanager-data:/alertmanager
|
||||
networks:
|
||||
- appliance-network
|
||||
restart: unless-stopped
|
||||
|
||||
# Log Aggregation (VictoriaLogs instead of Loki)
|
||||
victorialogs:
|
||||
image: victoriametrics/victorialogs:v0.40.0 # Using a recent version, replace v2.9.1 Loki with VictoriaLogs
|
||||
ports:
|
||||
- "9428:9428" # Default VictoriaLogs port
|
||||
command:
|
||||
- "-storageDataPath=/victorialogs-data"
|
||||
- "-httpListenAddr=:9428"
|
||||
volumes:
|
||||
- victorialogs-data:/victorialogs-data
|
||||
networks:
|
||||
- appliance-network
|
||||
restart: unless-stopped
|
||||
|
||||
# OpenTelemetry Collector (receives from Worker nodes)
|
||||
otel-collector:
|
||||
image: otel/opentelemetry-collector-contrib:0.87.0
|
||||
ports:
|
||||
- "4317:4317" # OTLP gRPC
|
||||
- "4318:4318" # OTLP HTTP
|
||||
command: ["--config=/etc/otelcol/config.yaml"]
|
||||
volumes:
|
||||
- ./otel-config.yaml:/etc/otelcol/config.yaml
|
||||
depends_on:
|
||||
- victoriametrics
|
||||
- victorialogs # Depend on victorialogs now
|
||||
networks:
|
||||
- appliance-network
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
pg_data:
|
||||
vm_data:
|
||||
vmetrics-data:
|
||||
alertmanager-data:
|
||||
victorialogs-data: # New volume for VictoriaLogs
|
||||
|
||||
networks:
|
||||
appliance-network:
|
||||
driver: bridge
|
||||
|
||||
Reference in New Issue
Block a user