38 lines
1.3 KiB
Django/Jinja
38 lines
1.3 KiB
Django/Jinja
{%- from "clickhouse/map.jinja" import clickhouse with context -%}
|
|
<clickhouse>
|
|
<zookeeper>
|
|
{%- for nodename, settings in clickhouse.clusters[clickhouse.cluster].nodes.items() %}
|
|
<node>
|
|
<host>{{ nodename }}</host>
|
|
<port>9281</port>
|
|
</node>
|
|
{%- endfor %}
|
|
</zookeeper>
|
|
<keeper_server>
|
|
<tcp_port>9281</tcp_port>
|
|
<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>
|
|
<enable_reconfiguration>false</enable_reconfiguration>
|
|
|
|
<coordination_settings>
|
|
<operation_timeout_ms>10000</operation_timeout_ms>
|
|
<session_timeout_ms>30000</session_timeout_ms>
|
|
<raft_logs_level>trace</raft_logs_level>
|
|
</coordination_settings>
|
|
|
|
<raft_configuration>
|
|
<secure>false</secure>
|
|
{%- for nodename, settings in clickhouse.clusters[clickhouse.cluster].nodes.items() %}
|
|
{%- if settings.keeper|default(false) %}
|
|
<server>
|
|
<id>{{ settings.id }}</id>
|
|
<hostname>{{ nodename }}</hostname>
|
|
<port>9444</port>
|
|
</server>
|
|
{%- endif %}
|
|
{%- endfor %}
|
|
</raft_configuration>
|
|
</keeper_server>
|
|
</clickhouse>
|