forked from VKCOM/statshouse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
localrun.yml
210 lines (208 loc) · 5.25 KB
/
localrun.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
version: "3.9"
services:
metadata:
profiles:
- sh
- api-off
- scrape
build:
context: .
dockerfile: build/statshouse-metadata.Dockerfile
args:
- BUILD_TRUSTED_SUBNET_GROUPS=0.0.0.0/0
container_name: sh-metadata
user: "root:root"
command: --statshouse-addr=agent:13337 --db-path=/var/lib/statshouse/metadata/db --binlog-prefix=/var/lib/statshouse/metadata/binlog/bl
volumes:
- metadata:/var/lib/statshouse/metadata
ports:
- "2442:2442"
kh:
profiles:
- sh
- kh
- api-off
- scrape
build:
context: .
dockerfile: build/clickhouse.Dockerfile
container_name: kh
hostname: aggregator
volumes:
- kh:/var/lib/clickhouse
- type: bind
source: ./build/clickhouse-config.xml
target: /etc/clickhouse-server/config.d/clickhouse-config.xml
ports:
- "8123:8123"
- "9000:9000"
- "9363:9363"
healthcheck:
test: ["CMD-SHELL", "clickhouse-client --query='SELECT 1'"]
interval: 200ms
timeout: 1s
retries: 1500
aggregator:
profiles:
- sh
- api-off
- scrape
build:
context: .
dockerfile: build/statshouse.Dockerfile
args:
- BUILD_TRUSTED_SUBNET_GROUPS=0.0.0.0/0
container_name: sh-aggregator
user: "root:root"
command: aggregator -u=root -g=root --cluster=test_shard_aggregator --log-level=trace --agg-addr=':13336' --kh=kh:8123 --metadata-addr=metadata:2442 --auto-create --cache-dir=/var/lib/statshouse/cache/aggregator
ports:
- "13336:13336"
depends_on:
kh:
condition: service_healthy
agent:
profiles:
- sh
- api-off
- scrape
build:
context: .
dockerfile: build/statshouse.Dockerfile
args:
- BUILD_TRUSTED_SUBNET_GROUPS=0.0.0.0/0
container_name: sh-agent
user: "root:root"
command: agent -u=root -g=root --cluster=test_shard_aggregator --log-level=trace --agg-addr='aggregator:13336,aggregator:13336,aggregator:13336' --cache-dir=/var/lib/statshouse/cache/agent --remote-write-enabled
ports:
- "13337:13337/udp"
- "13337:13337/tcp"
- "13380:13380"
depends_on:
- aggregator
api:
profiles:
- sh
build:
context: .
dockerfile: build/statshouse-api.Dockerfile
args:
- BUILD_TRUSTED_SUBNET_GROUPS=0.0.0.0/0
container_name: sh-api
user: "root:root"
command: --verbose --insecure-mode --local-mode --access-log --clickhouse-v1-addrs= --clickhouse-v2-addrs=kh:9000 --listen-addr=:10888 --metadata-addr=metadata:2442 --statshouse-addr=agent:13337 --disk-cache=/var/lib/statshouse/cache/api/mapping_cache.sqlite3
ports:
- "10888:10888"
depends_on:
kh:
condition: service_healthy
all-in-one:
profiles:
- all-in-one
build:
context: .
dockerfile: build/all-in-one.Dockerfile
container_name: sh-all
user: "root:root"
ports:
- "2442:2442"
- "8123:8123"
- "9000:9000"
- "9363:9363"
- "10888:10888"
- "13336:13336"
- "13337:13337/udp"
- "13337:13337/tcp"
volumes:
- metadata:/var/lib/statshouse/metadata
- kh:/var/lib/clickhouse
- type: bind
source: ./build/clickhouse-config.xml
target: /etc/clickhouse-server/config.d/clickhouse-config.xml
all-but-aggregator:
profiles:
- aggregator-off
build:
context: .
dockerfile: build/all-in-one.Dockerfile
container_name: sh-all-but-aggregator
user: "root:root"
environment:
- AGGREGATOR_OFF=1
expose:
- 2442
- 8123
- 9000
- 9363
- 10888
- 13337/udp
- 13337/tcp
network_mode: host
volumes:
- metadata:/var/lib/statshouse/metadata
- kh:/var/lib/clickhouse
- type: bind
source: ./build/clickhouse-config.xml
target: /etc/clickhouse-server/config.d/clickhouse-config.xml
all-but-agent:
profiles:
- agent-off
build:
context: .
dockerfile: build/all-in-one.Dockerfile
container_name: sh-all-but-agent
user: "root:root"
environment:
- AGENT_OFF=1
expose:
- 2442
- 8123
- 9000
- 9363
- 10888
- 13336
network_mode: host
volumes:
- metadata:/var/lib/statshouse/metadata
- kh:/var/lib/clickhouse
- type: bind
source: ./build/clickhouse-config.xml
target: /etc/clickhouse-server/config.d/clickhouse-config.xml
all-but-metadata:
# run statshouse-metadata first, then
# ./localrun meta-off
profiles:
- meta-off
build:
context: .
dockerfile: build/all-in-one.Dockerfile
container_name: sh-all-but-metadata
user: "root:root"
environment:
- META_OFF=1
expose:
- 8123
- 9000
- 9363
- 10888
- 13336
network_mode: host
volumes:
- kh:/var/lib/clickhouse
prometheus:
profiles:
- scrape
image: "prom/prometheus"
container_name: prometheus
ports:
- "9090:9090"
volumes:
- prometheus:/prometheus
- type: bind
source: ./build/scrape.yml
target: /etc/prometheus/prometheus.yml
depends_on:
- agent
volumes:
kh:
metadata:
prometheus: