-
Notifications
You must be signed in to change notification settings - Fork 12
/
clickhouse_1zk-3shard-3replica.yml
92 lines (85 loc) · 2.08 KB
/
clickhouse_1zk-3shard-3replica.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
# Author: Al-assad
# Email: [email protected]
# Date: 2020-11-27
# Description: docker compose for clickhouse cluster with 3 shards and 1 replica, 1 zookeeper node
version: '2.1'
services:
zookeeper:
image: zookeeper:3.6
hostname: zk1
container_name: clickhouse-zookeeper
ports:
- "2181:2181"
networks:
clickhouse-cluster:
ipv4_address: 172.18.1.2
clickhouse1:
image: yandex/clickhouse-server:${CLICKHOUSE_VERSION:-20.11}
ports:
- "8124:8123"
hostname: ch01
container_name: clickhouse-server-ch01
ulimits:
nofile:
soft: 262144
hard: 262144
networks:
clickhouse-cluster:
ipv4_address: 172.18.1.5
extra_hosts:
- "zk1:172.18.1.2"
- "ch02:172.18.1.6"
- "ch03:172.18.1.7"
volumes:
- ./ch-conf_1zk-3shard-3replica/metrika_ch01.xml:/etc/metrika.xml
depends_on:
- "zookeeper"
clickhouse2:
image: yandex/clickhouse-server:${CLICKHOUSE_VERSION:-20.11}
ports:
- "8125:8123"
hostname: ch02
container_name: clickhouse-server-ch02
ulimits:
nofile:
soft: 262144
hard: 262144
networks:
clickhouse-cluster:
ipv4_address: 172.18.1.6
extra_hosts:
- "zk1:172.18.1.2"
- "ch01:172.18.1.5"
- "ch03:172.18.1.7"
volumes:
- ./ch-conf_1zk-3shard-3replica/metrika_ch02.xml:/etc/metrika.xml
depends_on:
- "zookeeper"
clickhouse3:
image: yandex/clickhouse-server:${CLICKHOUSE_VERSION:-20.11}
ports:
- "8126:8123"
hostname: ch03
container_name: clickhouse-server-ch03
ulimits:
nofile:
soft: 262144
hard: 262144
networks:
clickhouse-cluster:
ipv4_address: 172.18.1.7
extra_hosts:
- "zk1:172.18.1.2"
- "ch01:172.18.1.5"
- "ch02:172.18.1.6"
volumes:
- ./ch-conf_1zk-3shard-3replica/metrika_ch03.xml:/etc/metrika.xml
depends_on:
- "zookeeper"
networks:
clickhouse-cluster:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.18.1.0/16