paulbsd-salt/states/clickhouse/templates/keeper.xml.j2

36 lines
1.2 KiB
Plaintext
Raw Normal View History

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() %}
<node>
<host>{{ nodename }}</host>
2023-12-12 16:12:00 +01:00
<port>9281</port>
2023-12-04 22:35:54 +01:00
<secure>1</secure>
</node>
{%- endfor %}
</zookeeper>
<keeper_server>
2023-12-12 16:12:00 +01:00
<tcp_port_secure>9281</tcp_port_secure>
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>
<coordination_settings>
<operation_timeout_ms>10000</operation_timeout_ms>
<session_timeout_ms>30000</session_timeout_ms>
<raft_logs_level>fatal</raft_logs_level>
</coordination_settings>
<raft_configuration>
<secure>true</secure>
{%- for nodename, settings in clickhouse.clusters[clickhouse.cluster].nodes.items() %}
<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>
{%- endfor %}
</raft_configuration>
</keeper_server>
</clickhouse>