paulbsd-salt/states/clickhouse/templates/keeper.xml.j2
Paul 6d6f06a317
All checks were successful
continuous-integration/drone/push Build is passing
updated clickhouse state
2024-07-11 10:04:38 +02:00

40 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() %}
{%- if settings.active|default(true) %}
<node>
<host>{{ nodename }}</host>
<port>9281</port>
</node>
{%- endif %}
{%- 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>True</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>