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

40 lines
1.3 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() %}
{%- 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>
{%- 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-07-11 10:04:38 +02:00
<enable_reconfiguration>True</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>