2023-12-04 22:35:54 +01:00
|
|
|
{%- from "clickhouse/map.jinja" import clickhouse with context -%}
|
|
|
|
<clickhouse>
|
|
|
|
<zookeeper>
|
|
|
|
{%- for nodename, settings in clickhouse.clusters[clickhouse.cluster].nodes.items() %}
|
2024-03-04 13:56:00 +01:00
|
|
|
{%- if settings.active|default(true) %}
|
2023-12-04 22:35:54 +01:00
|
|
|
<node>
|
|
|
|
<host>{{ nodename }}</host>
|
2023-12-12 16:12:00 +01:00
|
|
|
<port>9281</port>
|
2023-12-04 22:35:54 +01:00
|
|
|
</node>
|
2024-03-04 13:56:00 +01:00
|
|
|
{%- endif %}
|
2023-12-04 22:35:54 +01:00
|
|
|
{%- endfor %}
|
|
|
|
</zookeeper>
|
|
|
|
<keeper_server>
|
2024-03-01 17:40:19 +01:00
|
|
|
<tcp_port>9281</tcp_port>
|
2023-12-04 22:35:54 +01:00
|
|
|
<server_id>{{ clickhouse.clusters[clickhouse.cluster].nodes[salt['grains.get']('fqdn')].id }}</server_id>
|
|
|
|
<log_storage_path>/var/lib/clickhouse/coordination/log</log_storage_path>
|
|
|
|
<snapshot_storage_path>/var/lib/clickhouse/coordination/snapshots</snapshot_storage_path>
|
2024-03-01 17:40:19 +01:00
|
|
|
<enable_reconfiguration>false</enable_reconfiguration>
|
2023-12-04 22:35:54 +01:00
|
|
|
|
|
|
|
<coordination_settings>
|
|
|
|
<operation_timeout_ms>10000</operation_timeout_ms>
|
|
|
|
<session_timeout_ms>30000</session_timeout_ms>
|
2024-03-01 17:40:19 +01:00
|
|
|
<raft_logs_level>trace</raft_logs_level>
|
2023-12-04 22:35:54 +01:00
|
|
|
</coordination_settings>
|
|
|
|
|
|
|
|
<raft_configuration>
|
2024-03-01 17:40:19 +01:00
|
|
|
<secure>false</secure>
|
2023-12-04 22:35:54 +01:00
|
|
|
{%- for nodename, settings in clickhouse.clusters[clickhouse.cluster].nodes.items() %}
|
2024-03-01 17:40:19 +01:00
|
|
|
{%- if settings.keeper|default(false) %}
|
2023-12-04 22:35:54 +01:00
|
|
|
<server>
|
|
|
|
<id>{{ settings.id }}</id>
|
|
|
|
<hostname>{{ nodename }}</hostname>
|
2023-12-12 16:12:00 +01:00
|
|
|
<port>9444</port>
|
2023-12-04 22:35:54 +01:00
|
|
|
</server>
|
2024-03-01 17:40:19 +01:00
|
|
|
{%- endif %}
|
2023-12-04 22:35:54 +01:00
|
|
|
{%- endfor %}
|
|
|
|
</raft_configuration>
|
|
|
|
</keeper_server>
|
|
|
|
</clickhouse>
|