/
githubmirror
/
slo-tests
Обзор
Документация
Войти
/
githubmirror
/
slo-tests
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
docker/compose.yaml
266 строк
6 KB
Vladislav Polyakov
feat: configure monitoring stack
18 окт 2024, 12:27
18 окт 2024, 12:27
35e1e82
Код
Авторство
О чём код?
x-node: &ydb-common image: cr.yandex/crptqonuodf51kdj7a7d/ydb:24.2.7 restart: always hostname: localhost platform: linux/amd64 privileged: true network_mode: host volumes: - ./configs/ydb/config.yaml:/opt/ydb/cfg/config.yaml x-deploy: &ydb-deploy restart_policy: condition: any resources: limits: cpus: '1' memory: 1000M reservations: cpus: '0.1' memory: 250M name: ydb services: static-0: <<: *ydb-common container_name: ydb-static-0 command: - /opt/ydb/bin/ydbd - server - --grpc-port - "2135" - --mon-port - "8765" - --ic-port - "19001" - --yaml-config - /opt/ydb/cfg/config.yaml - --node - static - --label - deployment=docker ports: - 2135:2135 - 8765:8765 - 19001:19001 healthcheck: test: bash -c "exec 6<> /dev/tcp/localhost/2135" interval: 10s timeout: 1s retries: 3 start_period: 30s deploy: <<: *ydb-deploy static-init: <<: *ydb-common restart: on-failure container_name: static-init command: - /opt/ydb/bin/ydbd - -s - grpc://localhost:2135 - admin - blobstorage - config - init - --yaml-file - /opt/ydb/cfg/config.yaml depends_on: static-0: condition: service_healthy tenant-init: <<: *ydb-common restart: on-failure container_name: tenant-init command: - /opt/ydb/bin/ydbd - -s - grpc://localhost:2135 - admin - database - /Root/slo - create - ssd:1 depends_on: static-init: condition: service_completed_successfully dynamic-1: <<: *ydb-common container_name: ydb-dynamic-1 command: - /opt/ydb/bin/ydbd - server - --grpc-port - "2136" - --mon-port - "8766" - --ic-port - "19002" - --yaml-config - /opt/ydb/cfg/config.yaml - --tenant - /Root/slo - --node-broker - grpc://localhost:2135 - --label - deployment=docker ports: - 2136:2136 - 8766:8766 - 19002:19002 healthcheck: test: bash -c "exec 6<> /dev/tcp/localhost/2136" interval: 10s timeout: 1s retries: 3 start_period: 30s depends_on: static-0: condition: service_healthy static-init: condition: service_completed_successfully tenant-init: condition: service_completed_successfully deploy: <<: *ydb-deploy dynamic-2: <<: *ydb-common container_name: ydb-dynamic-2 command: - /opt/ydb/bin/ydbd - server - --grpc-port - "2137" - --mon-port - "8767" - --ic-port - "19003" - --yaml-config - /opt/ydb/cfg/config.yaml - --tenant - /Root/slo - --node-broker - grpc://localhost:2135 - --label - deployment=docker ports: - 2137:2137 - 8767:8767 - 19003:19003 healthcheck: test: bash -c "exec 6<> /dev/tcp/localhost/2137" interval: 10s timeout: 1s retries: 3 start_period: 30s depends_on: static-0: condition: service_healthy static-init: condition: service_completed_successfully tenant-init: condition: service_completed_successfully deploy: <<: *ydb-deploy dynamic-3: <<: *ydb-common container_name: ydb-dynamic-3 command: - /opt/ydb/bin/ydbd - server - --grpc-port - "2138" - --mon-port - "8768" - --ic-port - "19004" - --yaml-config - /opt/ydb/cfg/config.yaml - --tenant - /Root/slo - --node-broker - grpc://localhost:2135 - --label - deployment=docker ports: - 2138:2138 - 8768:8768 - 19004:19004 healthcheck: test: bash -c "exec 6<> /dev/tcp/localhost/2138" interval: 10s timeout: 1s retries: 3 start_period: 30s depends_on: static-0: condition: service_healthy static-init: condition: service_completed_successfully tenant-init: condition: service_completed_successfully deploy: <<: *ydb-deploy prometheus: image: prom/prometheus restart: unless-stopped ports: - "9090:9090" volumes: - ./configs/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml network_mode: host deploy: &monitoring-deploy resources: limits: cpus: '0.1' memory: 1000M reservations: cpus: '0.001' memory: 50M prometheus-pushgateway: image: prom/pushgateway restart: unless-stopped ports: - "9091:9091" network_mode: host deploy: <<: *monitoring-deploy grafana: image: grafana/grafana-oss restart: unless-stopped platform: linux/amd64 ports: - "10000:10000" volumes: - ./configs/grafana/provisioning:/etc/grafana/provisioning environment: - GF_SERVER_HTTP_PORT=10000 - GF_AUTH_DISABLE_LOGIN_FORM=true - GF_AUTH_ANONYMOUS_ENABLED=true - GF_AUTH_ANONYMOUS_ORG_NAME=Main Org. - GF_AUTH_ANONYMOUS_ORG_ROLE=Admin - GF_USERS_ALLOW_SIGN_UP=false - GF_RENDERING_SERVER_URL=http://localhost:10001/render - GF_RENDERING_CALLBACK_URL=http://localhost:10000/ network_mode: host deploy: <<: *monitoring-deploy grafana-renderer: image: grafana/grafana-image-renderer ports: - "10001:10001" volumes: - ./configs/grafana/renderer/config.json:/usr/src/app/config.json network_mode: host deploy: <<: *monitoring-deploy