mirror of
https://github.com/outbackdingo/clickhouse-cluster-example.git
synced 2026-08-25 14:53:17 +00:00
Update
This commit is contained in:
+6
-38
@@ -115,48 +115,14 @@
|
|||||||
<!-- Configuration of clusters that could be used in Distributed tables.
|
<!-- Configuration of clusters that could be used in Distributed tables.
|
||||||
https://clickhouse.yandex/reference_en.html#Distributed
|
https://clickhouse.yandex/reference_en.html#Distributed
|
||||||
-->
|
-->
|
||||||
<remote_servers>
|
<remote_servers incl="clickhouse_remote_servers" />
|
||||||
<ck_cluster>
|
|
||||||
<shard>
|
|
||||||
<internal_replication>true</internal_replication>
|
|
||||||
<replica>
|
|
||||||
<host>clickhouse1</host>
|
|
||||||
<port>9000</port>
|
|
||||||
</replica>
|
|
||||||
<replica>
|
|
||||||
<host>clickhouse2</host>
|
|
||||||
<port>9000</port>
|
|
||||||
</replica>
|
|
||||||
</shard>
|
|
||||||
<shard>
|
|
||||||
<internal_replication>true</internal_replication>
|
|
||||||
<replica>
|
|
||||||
<host>clickhouse3</host>
|
|
||||||
<port>9000</port>
|
|
||||||
</replica>
|
|
||||||
<replica>
|
|
||||||
<host>clickhouse4</host>
|
|
||||||
<port>9000</port>
|
|
||||||
</replica>
|
|
||||||
</shard>
|
|
||||||
</ck_cluster>
|
|
||||||
</remote_servers>
|
|
||||||
|
|
||||||
<!-- If element has 'incl' attribute, then for it's value will be used corresponding substitution from another file.
|
<!-- If element has 'incl' attribute, then for it's value will be used corresponding substitution from another file.
|
||||||
By default, path to file with substitutions is /etc/metrika.xml. It could be changed in config in 'include_from' element.
|
By default, path to file with substitutions is /etc/metrika.xml. It could be changed in config in 'include_from' element.
|
||||||
Values for substitutions are specified in /yandex/name_of_substitution elements in that file.
|
Values for substitutions are specified in /yandex/name_of_substitution elements in that file.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<zookeeper>
|
<zookeeper incl="clickhouse_zookeeper_servers" optional="true" />
|
||||||
<node index="1">
|
|
||||||
<host>zoo1</host>
|
|
||||||
<port>2181</port>
|
|
||||||
</node>
|
|
||||||
<node index="2">
|
|
||||||
<host>zoo2</host>
|
|
||||||
<port>2181</port>
|
|
||||||
</node>
|
|
||||||
</zookeeper>
|
|
||||||
|
|
||||||
<!-- Substitutions for parameters of replicated tables.
|
<!-- Substitutions for parameters of replicated tables.
|
||||||
Optional. If you don't use replicated tables, you could omit that.
|
Optional. If you don't use replicated tables, you could omit that.
|
||||||
@@ -164,10 +130,12 @@
|
|||||||
See https://clickhouse.yandex/reference_en.html#Creating%20replicated%20tables
|
See https://clickhouse.yandex/reference_en.html#Creating%20replicated%20tables
|
||||||
-->
|
-->
|
||||||
<macros>
|
<macros>
|
||||||
<shard>01</shard>
|
<shard>shard_01</shard>
|
||||||
<replica>01</replica>
|
<replica>replica_01</replica>
|
||||||
</macros>
|
</macros>
|
||||||
|
|
||||||
|
<include_from>/etc/clickhouse-server/metrika.xml</include_from>
|
||||||
|
|
||||||
<!-- Reloading interval for embedded dictionaries, in seconds. Default: 3600. -->
|
<!-- Reloading interval for embedded dictionaries, in seconds. Default: 3600. -->
|
||||||
<builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval>
|
<builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval>
|
||||||
|
|
||||||
|
|||||||
+6
-38
@@ -114,48 +114,14 @@
|
|||||||
<!-- Configuration of clusters that could be used in Distributed tables.
|
<!-- Configuration of clusters that could be used in Distributed tables.
|
||||||
https://clickhouse.yandex/reference_en.html#Distributed
|
https://clickhouse.yandex/reference_en.html#Distributed
|
||||||
-->
|
-->
|
||||||
<remote_servers>
|
<remote_servers incl="clickhouse_remote_servers" />
|
||||||
<ck_cluster>
|
|
||||||
<shard>
|
|
||||||
<internal_replication>true</internal_replication>
|
|
||||||
<replica>
|
|
||||||
<host>clickhouse1</host>
|
|
||||||
<port>9000</port>
|
|
||||||
</replica>
|
|
||||||
<replica>
|
|
||||||
<host>clickhouse2</host>
|
|
||||||
<port>9000</port>
|
|
||||||
</replica>
|
|
||||||
</shard>
|
|
||||||
<shard>
|
|
||||||
<internal_replication>true</internal_replication>
|
|
||||||
<replica>
|
|
||||||
<host>clickhouse3</host>
|
|
||||||
<port>9000</port>
|
|
||||||
</replica>
|
|
||||||
<replica>
|
|
||||||
<host>clickhouse4</host>
|
|
||||||
<port>9000</port>
|
|
||||||
</replica>
|
|
||||||
</shard>
|
|
||||||
</ck_cluster>
|
|
||||||
</remote_servers>
|
|
||||||
|
|
||||||
<!-- If element has 'incl' attribute, then for it's value will be used corresponding substitution from another file.
|
<!-- If element has 'incl' attribute, then for it's value will be used corresponding substitution from another file.
|
||||||
By default, path to file with substitutions is /etc/metrika.xml. It could be changed in config in 'include_from' element.
|
By default, path to file with substitutions is /etc/metrika.xml. It could be changed in config in 'include_from' element.
|
||||||
Values for substitutions are specified in /yandex/name_of_substitution elements in that file.
|
Values for substitutions are specified in /yandex/name_of_substitution elements in that file.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<zookeeper>
|
<zookeeper incl="clickhouse_zookeeper_servers" optional="true" />
|
||||||
<node index="1">
|
|
||||||
<host>zoo1</host>
|
|
||||||
<port>2181</port>
|
|
||||||
</node>
|
|
||||||
<node index="2">
|
|
||||||
<host>zoo2</host>
|
|
||||||
<port>2181</port>
|
|
||||||
</node>
|
|
||||||
</zookeeper>
|
|
||||||
|
|
||||||
<!-- Substitutions for parameters of replicated tables.
|
<!-- Substitutions for parameters of replicated tables.
|
||||||
Optional. If you don't use replicated tables, you could omit that.
|
Optional. If you don't use replicated tables, you could omit that.
|
||||||
@@ -163,10 +129,12 @@
|
|||||||
See https://clickhouse.yandex/reference_en.html#Creating%20replicated%20tables
|
See https://clickhouse.yandex/reference_en.html#Creating%20replicated%20tables
|
||||||
-->
|
-->
|
||||||
<macros>
|
<macros>
|
||||||
<shard>01</shard>
|
<shard>shard_01</shard>
|
||||||
<replica>02</replica>
|
<replica>replica_02</replica>
|
||||||
</macros>
|
</macros>
|
||||||
|
|
||||||
|
<include_from>/etc/clickhouse-server/metrika.xml</include_from>
|
||||||
|
|
||||||
<!-- Reloading interval for embedded dictionaries, in seconds. Default: 3600. -->
|
<!-- Reloading interval for embedded dictionaries, in seconds. Default: 3600. -->
|
||||||
<builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval>
|
<builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval>
|
||||||
|
|
||||||
|
|||||||
+8
-40
@@ -47,7 +47,7 @@
|
|||||||
<tcp_port>9000</tcp_port>
|
<tcp_port>9000</tcp_port>
|
||||||
|
|
||||||
<!-- Port for communication between replicas. Used for data exchange. -->
|
<!-- Port for communication between replicas. Used for data exchange. -->
|
||||||
<interserver_http_port>9011</interserver_http_port>
|
<interserver_http_port>9010</interserver_http_port>
|
||||||
|
|
||||||
<!-- Hostname that is used by other replicas to request this server.
|
<!-- Hostname that is used by other replicas to request this server.
|
||||||
If not specified, than it is determined analoguous to 'hostname -f' command.
|
If not specified, than it is determined analoguous to 'hostname -f' command.
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
|
|
||||||
<!-- Listen specified host. use :: (wildcard IPv6 address), if you want to accept connections both with IPv4 and IPv6 from everywhere. -->
|
<!-- Listen specified host. use :: (wildcard IPv6 address), if you want to accept connections both with IPv4 and IPv6 from everywhere. -->
|
||||||
<listen_host>::</listen_host>
|
<listen_host>::</listen_host>
|
||||||
<!--<listen_host>::1</listen_host>-->
|
<!--<listen_host>::</listen_host>-->
|
||||||
<listen_host>127.0.0.1</listen_host>
|
<listen_host>127.0.0.1</listen_host>
|
||||||
|
|
||||||
<max_connections>4096</max_connections>
|
<max_connections>4096</max_connections>
|
||||||
@@ -114,48 +114,14 @@
|
|||||||
<!-- Configuration of clusters that could be used in Distributed tables.
|
<!-- Configuration of clusters that could be used in Distributed tables.
|
||||||
https://clickhouse.yandex/reference_en.html#Distributed
|
https://clickhouse.yandex/reference_en.html#Distributed
|
||||||
-->
|
-->
|
||||||
<remote_servers>
|
<remote_servers incl="clickhouse_remote_servers" />
|
||||||
<ck_cluster>
|
|
||||||
<shard>
|
|
||||||
<internal_replication>true</internal_replication>
|
|
||||||
<replica>
|
|
||||||
<host>clickhouse1</host>
|
|
||||||
<port>9000</port>
|
|
||||||
</replica>
|
|
||||||
<replica>
|
|
||||||
<host>clickhouse2</host>
|
|
||||||
<port>9000</port>
|
|
||||||
</replica>
|
|
||||||
</shard>
|
|
||||||
<shard>
|
|
||||||
<internal_replication>true</internal_replication>
|
|
||||||
<replica>
|
|
||||||
<host>clickhouse3</host>
|
|
||||||
<port>9000</port>
|
|
||||||
</replica>
|
|
||||||
<replica>
|
|
||||||
<host>clickhouse4</host>
|
|
||||||
<port>9000</port>
|
|
||||||
</replica>
|
|
||||||
</shard>
|
|
||||||
</ck_cluster>
|
|
||||||
</remote_servers>
|
|
||||||
|
|
||||||
<!-- If element has 'incl' attribute, then for it's value will be used corresponding substitution from another file.
|
<!-- If element has 'incl' attribute, then for it's value will be used corresponding substitution from another file.
|
||||||
By default, path to file with substitutions is /etc/metrika.xml. It could be changed in config in 'include_from' element.
|
By default, path to file with substitutions is /etc/metrika.xml. It could be changed in config in 'include_from' element.
|
||||||
Values for substitutions are specified in /yandex/name_of_substitution elements in that file.
|
Values for substitutions are specified in /yandex/name_of_substitution elements in that file.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<zookeeper>
|
<zookeeper incl="clickhouse_zookeeper_servers" optional="true" />
|
||||||
<node index="1">
|
|
||||||
<host>zoo1</host>
|
|
||||||
<port>2181</port>
|
|
||||||
</node>
|
|
||||||
<node index="2">
|
|
||||||
<host>zoo2</host>
|
|
||||||
<port>2181</port>
|
|
||||||
</node>
|
|
||||||
</zookeeper>
|
|
||||||
|
|
||||||
<!-- Substitutions for parameters of replicated tables.
|
<!-- Substitutions for parameters of replicated tables.
|
||||||
Optional. If you don't use replicated tables, you could omit that.
|
Optional. If you don't use replicated tables, you could omit that.
|
||||||
@@ -163,10 +129,12 @@
|
|||||||
See https://clickhouse.yandex/reference_en.html#Creating%20replicated%20tables
|
See https://clickhouse.yandex/reference_en.html#Creating%20replicated%20tables
|
||||||
-->
|
-->
|
||||||
<macros>
|
<macros>
|
||||||
<shard>02</shard>
|
<shard>shard_02</shard>
|
||||||
<replica>01</replica>
|
<replica>replica_01</replica>
|
||||||
</macros>
|
</macros>
|
||||||
|
|
||||||
|
<include_from>/etc/clickhouse-server/metrika.xml</include_from>
|
||||||
|
|
||||||
<!-- Reloading interval for embedded dictionaries, in seconds. Default: 3600. -->
|
<!-- Reloading interval for embedded dictionaries, in seconds. Default: 3600. -->
|
||||||
<builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval>
|
<builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval>
|
||||||
|
|
||||||
|
|||||||
+8
-40
@@ -47,7 +47,7 @@
|
|||||||
<tcp_port>9000</tcp_port>
|
<tcp_port>9000</tcp_port>
|
||||||
|
|
||||||
<!-- Port for communication between replicas. Used for data exchange. -->
|
<!-- Port for communication between replicas. Used for data exchange. -->
|
||||||
<interserver_http_port>9011</interserver_http_port>
|
<interserver_http_port>9010</interserver_http_port>
|
||||||
|
|
||||||
<!-- Hostname that is used by other replicas to request this server.
|
<!-- Hostname that is used by other replicas to request this server.
|
||||||
If not specified, than it is determined analoguous to 'hostname -f' command.
|
If not specified, than it is determined analoguous to 'hostname -f' command.
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
|
|
||||||
<!-- Listen specified host. use :: (wildcard IPv6 address), if you want to accept connections both with IPv4 and IPv6 from everywhere. -->
|
<!-- Listen specified host. use :: (wildcard IPv6 address), if you want to accept connections both with IPv4 and IPv6 from everywhere. -->
|
||||||
<listen_host>::</listen_host>
|
<listen_host>::</listen_host>
|
||||||
<!--<listen_host>::1</listen_host>-->
|
<!--<listen_host>::</listen_host>-->
|
||||||
<listen_host>127.0.0.1</listen_host>
|
<listen_host>127.0.0.1</listen_host>
|
||||||
|
|
||||||
<max_connections>4096</max_connections>
|
<max_connections>4096</max_connections>
|
||||||
@@ -114,48 +114,14 @@
|
|||||||
<!-- Configuration of clusters that could be used in Distributed tables.
|
<!-- Configuration of clusters that could be used in Distributed tables.
|
||||||
https://clickhouse.yandex/reference_en.html#Distributed
|
https://clickhouse.yandex/reference_en.html#Distributed
|
||||||
-->
|
-->
|
||||||
<remote_servers>
|
<remote_servers incl="clickhouse_remote_servers" />
|
||||||
<ck_cluster>
|
|
||||||
<shard>
|
|
||||||
<internal_replication>true</internal_replication>
|
|
||||||
<replica>
|
|
||||||
<host>clickhouse1</host>
|
|
||||||
<port>9000</port>
|
|
||||||
</replica>
|
|
||||||
<replica>
|
|
||||||
<host>clickhouse2</host>
|
|
||||||
<port>9000</port>
|
|
||||||
</replica>
|
|
||||||
</shard>
|
|
||||||
<shard>
|
|
||||||
<internal_replication>true</internal_replication>
|
|
||||||
<replica>
|
|
||||||
<host>clickhouse3</host>
|
|
||||||
<port>9000</port>
|
|
||||||
</replica>
|
|
||||||
<replica>
|
|
||||||
<host>clickhouse4</host>
|
|
||||||
<port>9000</port>
|
|
||||||
</replica>
|
|
||||||
</shard>
|
|
||||||
</ck_cluster>
|
|
||||||
</remote_servers>
|
|
||||||
|
|
||||||
<!-- If element has 'incl' attribute, then for it's value will be used corresponding substitution from another file.
|
<!-- If element has 'incl' attribute, then for it's value will be used corresponding substitution from another file.
|
||||||
By default, path to file with substitutions is /etc/metrika.xml. It could be changed in config in 'include_from' element.
|
By default, path to file with substitutions is /etc/metrika.xml. It could be changed in config in 'include_from' element.
|
||||||
Values for substitutions are specified in /yandex/name_of_substitution elements in that file.
|
Values for substitutions are specified in /yandex/name_of_substitution elements in that file.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<zookeeper>
|
<zookeeper incl="clickhouse_zookeeper_servers" optional="true" />
|
||||||
<node index="1">
|
|
||||||
<host>zoo1</host>
|
|
||||||
<port>2181</port>
|
|
||||||
</node>
|
|
||||||
<node index="2">
|
|
||||||
<host>zoo2</host>
|
|
||||||
<port>2181</port>
|
|
||||||
</node>
|
|
||||||
</zookeeper>
|
|
||||||
|
|
||||||
<!-- Substitutions for parameters of replicated tables.
|
<!-- Substitutions for parameters of replicated tables.
|
||||||
Optional. If you don't use replicated tables, you could omit that.
|
Optional. If you don't use replicated tables, you could omit that.
|
||||||
@@ -163,10 +129,12 @@
|
|||||||
See https://clickhouse.yandex/reference_en.html#Creating%20replicated%20tables
|
See https://clickhouse.yandex/reference_en.html#Creating%20replicated%20tables
|
||||||
-->
|
-->
|
||||||
<macros>
|
<macros>
|
||||||
<shard>02</shard>
|
<shard>shard_02</shard>
|
||||||
<replica>02</replica>
|
<replica>replica_02</replica>
|
||||||
</macros>
|
</macros>
|
||||||
|
|
||||||
|
<include_from>/etc/clickhouse-server/metrika.xml</include_from>
|
||||||
|
|
||||||
<!-- Reloading interval for embedded dictionaries, in seconds. Default: 3600. -->
|
<!-- Reloading interval for embedded dictionaries, in seconds. Default: 3600. -->
|
||||||
<builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval>
|
<builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval>
|
||||||
|
|
||||||
|
|||||||
+24
-23
@@ -1,12 +1,5 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
networks:
|
|
||||||
ck_cluster:
|
|
||||||
driver: bridge
|
|
||||||
ipam:
|
|
||||||
config:
|
|
||||||
- subnet: 172.50.0.0/24
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
haproxy:
|
haproxy:
|
||||||
image: haproxy:latest
|
image: haproxy:latest
|
||||||
@@ -14,8 +7,6 @@ services:
|
|||||||
- "9001:9000"
|
- "9001:9000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
|
- ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg
|
||||||
networks:
|
|
||||||
- ck_cluster
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- clickhouse1
|
- clickhouse1
|
||||||
- clickhouse2
|
- clickhouse2
|
||||||
@@ -30,9 +21,7 @@ services:
|
|||||||
- "3888"
|
- "3888"
|
||||||
environment:
|
environment:
|
||||||
ZOO_MY_ID: "1"
|
ZOO_MY_ID: "1"
|
||||||
ZOO_SERVERS: server.1=0.0.0.0:2888:3888;2181 server.2=zoo2:2888:3888;2181
|
ZOO_SERVERS: server.1=0.0.0.0:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=zoo3:2888:3888;2181
|
||||||
networks:
|
|
||||||
- ck_cluster
|
|
||||||
|
|
||||||
zoo2:
|
zoo2:
|
||||||
image: zookeeper:latest
|
image: zookeeper:latest
|
||||||
@@ -42,21 +31,30 @@ services:
|
|||||||
- "3888"
|
- "3888"
|
||||||
environment:
|
environment:
|
||||||
ZOO_MY_ID: "2"
|
ZOO_MY_ID: "2"
|
||||||
ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=0.0.0.0:2888:3888;2181
|
ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=0.0.0.0:2888:3888;2181 server.3=zoo3:2888:3888;2181
|
||||||
networks:
|
|
||||||
- ck_cluster
|
zoo3:
|
||||||
|
image: zookeeper:latest
|
||||||
|
expose:
|
||||||
|
- "2181"
|
||||||
|
- "2888"
|
||||||
|
- "3888"
|
||||||
|
environment:
|
||||||
|
ZOO_MY_ID: "3"
|
||||||
|
ZOO_SERVERS: server.1=zoo1:2888:3888;2181 server.2=zoo2:2888:3888;2181 server.3=0.0.0.0:2888:3888;2181
|
||||||
|
|
||||||
clickhouse1:
|
clickhouse1:
|
||||||
image: yandex/clickhouse-server:19.15.3.6
|
image: yandex/clickhouse-server:19.15.3.6
|
||||||
|
hostname: clickhouse1
|
||||||
expose:
|
expose:
|
||||||
- "9000"
|
- "9000"
|
||||||
depends_on:
|
depends_on:
|
||||||
- zoo1
|
- zoo1
|
||||||
- zoo2
|
- zoo2
|
||||||
|
- zoo3
|
||||||
volumes:
|
volumes:
|
||||||
- ./config_1.xml:/etc/clickhouse-server/config.xml
|
- ./config_1.xml:/etc/clickhouse-server/config.xml
|
||||||
networks:
|
- ./metrika.xml:/etc/clickhouse-server/metrika.xml
|
||||||
- ck_cluster
|
|
||||||
ulimits:
|
ulimits:
|
||||||
nofile:
|
nofile:
|
||||||
soft: 262144
|
soft: 262144
|
||||||
@@ -64,15 +62,16 @@ services:
|
|||||||
|
|
||||||
clickhouse2:
|
clickhouse2:
|
||||||
image: yandex/clickhouse-server:19.15.3.6
|
image: yandex/clickhouse-server:19.15.3.6
|
||||||
|
hostname: clickhouse2
|
||||||
expose:
|
expose:
|
||||||
- "9000"
|
- "9000"
|
||||||
depends_on:
|
depends_on:
|
||||||
- zoo1
|
- zoo1
|
||||||
- zoo2
|
- zoo2
|
||||||
|
- zoo3
|
||||||
volumes:
|
volumes:
|
||||||
- ./config_2.xml:/etc/clickhouse-server/config.xml
|
- ./config_2.xml:/etc/clickhouse-server/config.xml
|
||||||
networks:
|
- ./metrika.xml:/etc/clickhouse-server/metrika.xml
|
||||||
- ck_cluster
|
|
||||||
ulimits:
|
ulimits:
|
||||||
nofile:
|
nofile:
|
||||||
soft: 262144
|
soft: 262144
|
||||||
@@ -80,15 +79,16 @@ services:
|
|||||||
|
|
||||||
clickhouse3:
|
clickhouse3:
|
||||||
image: yandex/clickhouse-server:19.15.3.6
|
image: yandex/clickhouse-server:19.15.3.6
|
||||||
|
hostname: clickhouse3
|
||||||
expose:
|
expose:
|
||||||
- "9000"
|
- "9000"
|
||||||
depends_on:
|
depends_on:
|
||||||
- zoo1
|
- zoo1
|
||||||
- zoo2
|
- zoo2
|
||||||
|
- zoo3
|
||||||
volumes:
|
volumes:
|
||||||
- ./config_3.xml:/etc/clickhouse-server/config.xml
|
- ./config_3.xml:/etc/clickhouse-server/config.xml
|
||||||
networks:
|
- ./metrika.xml:/etc/clickhouse-server/metrika.xml
|
||||||
- ck_cluster
|
|
||||||
ulimits:
|
ulimits:
|
||||||
nofile:
|
nofile:
|
||||||
soft: 262144
|
soft: 262144
|
||||||
@@ -96,15 +96,16 @@ services:
|
|||||||
|
|
||||||
clickhouse4:
|
clickhouse4:
|
||||||
image: yandex/clickhouse-server:19.15.3.6
|
image: yandex/clickhouse-server:19.15.3.6
|
||||||
|
hostname: clickhouse4
|
||||||
expose:
|
expose:
|
||||||
- "9000"
|
- "9000"
|
||||||
depends_on:
|
depends_on:
|
||||||
- zoo1
|
- zoo1
|
||||||
- zoo2
|
- zoo2
|
||||||
|
- zoo3
|
||||||
volumes:
|
volumes:
|
||||||
- ./config_4.xml:/etc/clickhouse-server/config.xml
|
- ./config_4.xml:/etc/clickhouse-server/config.xml
|
||||||
networks:
|
- ./metrika.xml:/etc/clickhouse-server/metrika.xml
|
||||||
- ck_cluster
|
|
||||||
ulimits:
|
ulimits:
|
||||||
nofile:
|
nofile:
|
||||||
soft: 262144
|
soft: 262144
|
||||||
|
|||||||
+43
@@ -0,0 +1,43 @@
|
|||||||
|
<yandex>
|
||||||
|
<clickhouse_remote_servers>
|
||||||
|
<ck_cluster>
|
||||||
|
<shard>
|
||||||
|
<internal_replication>true</internal_replication>
|
||||||
|
<replica>
|
||||||
|
<host>clickhouse1</host>
|
||||||
|
<port>9000</port>
|
||||||
|
</replica>
|
||||||
|
<replica>
|
||||||
|
<host>clickhouse2</host>
|
||||||
|
<port>9000</port>
|
||||||
|
</replica>
|
||||||
|
</shard>
|
||||||
|
<shard>
|
||||||
|
<internal_replication>true</internal_replication>
|
||||||
|
<replica>
|
||||||
|
<host>clickhouse3</host>
|
||||||
|
<port>9000</port>
|
||||||
|
</replica>
|
||||||
|
<replica>
|
||||||
|
<host>clickhouse4</host>
|
||||||
|
<port>9000</port>
|
||||||
|
</replica>
|
||||||
|
</shard>
|
||||||
|
</ck_cluster>
|
||||||
|
</clickhouse_remote_servers>
|
||||||
|
|
||||||
|
<clickhouse_zookeeper_servers>
|
||||||
|
<node index="1">
|
||||||
|
<host>zoo1</host>
|
||||||
|
<port>2181</port>
|
||||||
|
</node>
|
||||||
|
<node index="2">
|
||||||
|
<host>zoo2</host>
|
||||||
|
<port>2181</port>
|
||||||
|
</node>
|
||||||
|
<node index="3">
|
||||||
|
<host>zoo3</host>
|
||||||
|
<port>2181</port>
|
||||||
|
</node>
|
||||||
|
</clickhouse_zookeeper_servers>
|
||||||
|
</yandex>
|
||||||
Reference in New Issue
Block a user