forked from getsentry/snuba
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.gcb.yml
96 lines (95 loc) · 2.62 KB
/
docker-compose.gcb.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
---
version: '3.4'
services:
snuba-test:
depends_on:
- redis_cluster
- kafka
- clickhouse
- zookeeper
image: '$SNUBA_IMAGE'
volumes:
- '.artifacts:/.artifacts'
command:
- '-m'
- 'pytest'
- '-vv'
- '--cov'
- '.'
- '--cov-report'
- 'xml:/.artifacts/coverage.xml'
- '--junit-xml'
- '/.artifacts/pytest.junit.xml'
environment:
SNUBA_SETTINGS: '$SNUBA_SETTINGS'
CLICKHOUSE_HOST: clickhouse
USE_REDIS_CLUSTER: '1'
REDIS_HOST: 'redis1'
REDIS_PORT: 6379
REDIS_DB: 0
DEFAULT_BROKERS: 'kafka:9092'
entrypoint: python
# override the `snuba` user to write to the /.artifacts mount
user: root
zookeeper:
image: 'confluentinc/cp-zookeeper:5.1.2'
environment:
ZOOKEEPER_CLIENT_PORT: '2181'
CONFLUENT_SUPPORT_METRICS_ENABLE: 'false'
ZOOKEEPER_LOG4J_ROOT_LOGLEVEL: 'WARN'
ZOOKEEPER_TOOLS_LOG4J_LOGLEVEL: 'WARN'
kafka:
depends_on:
- zookeeper
image: 'confluentinc/cp-kafka:5.1.2'
environment:
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://kafka:9092'
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: '1'
CONFLUENT_SUPPORT_METRICS_ENABLE: 'false'
KAFKA_LOG4J_LOGGERS: 'kafka.cluster=WARN,kafka.controller=WARN,kafka.coordinator=WARN,kafka.log=WARN,kafka.server=WARN,kafka.zookeeper=WARN,state.change.logger=WARN'
KAFKA_LOG4J_ROOT_LOGLEVEL: 'WARN'
KAFKA_TOOLS_LOG4J_LOGLEVEL: 'WARN'
clickhouse:
image: 'yandex/clickhouse-server:20.3.9.70'
volumes:
- ./config/clickhouse/macros.xml:/etc/clickhouse-server/config.d/macros.xml
- ./config/clickhouse/zookeeper.xml:/etc/clickhouse-server/config.d/zookeeper.xml
- ./config/clickhouse/remote_servers.xml:/etc/clickhouse-server/config.d/remote_servers.xml
ulimits:
nofile:
soft: 262144
hard: 262144
redis1: &redis_config
image: redis:5.0-alpine
command:
- redis-server
- '--appendonly'
- 'no'
- '--cluster-enabled'
- 'yes'
- '--cluster-config-file'
- '/data/redis_cluster.conf'
redis2:
<< : *redis_config
redis3:
<< : *redis_config
redis_cluster:
<< : *redis_config
command:
- '/bin/sh'
- '-c'
- >-
echo yes |
redis-cli --cluster create
$$(getent hosts redis1 | awk '{ print $$1 }'):6379
$$(getent hosts redis2 | awk '{ print $$1 }'):6379
$$(getent hosts redis3 | awk '{ print $$1 }'):6379
depends_on:
- redis1
- redis2
- redis3
networks:
default:
external:
name: cloudbuild