updated clickhouse state
This commit is contained in:
parent
6d996049ac
commit
d18a73ecc0
@ -1,5 +1,9 @@
|
|||||||
{%- from "clickhouse/map.jinja" import clickhouse with context -%}
|
{%- from "clickhouse/map.jinja" import clickhouse with context -%}
|
||||||
---
|
---
|
||||||
|
clickhouse-config-folder:
|
||||||
|
file.directory:
|
||||||
|
- name: /etc/clickhouse-server/config.d
|
||||||
|
|
||||||
clickhouse-config-file-settings:
|
clickhouse-config-file-settings:
|
||||||
file.managed:
|
file.managed:
|
||||||
- name: /etc/clickhouse-server/config.d/settings.xml
|
- name: /etc/clickhouse-server/config.d/settings.xml
|
||||||
|
@ -5,30 +5,32 @@
|
|||||||
<node>
|
<node>
|
||||||
<host>{{ nodename }}</host>
|
<host>{{ nodename }}</host>
|
||||||
<port>9281</port>
|
<port>9281</port>
|
||||||
<secure>1</secure>
|
|
||||||
</node>
|
</node>
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
</zookeeper>
|
</zookeeper>
|
||||||
<keeper_server>
|
<keeper_server>
|
||||||
<tcp_port_secure>9281</tcp_port_secure>
|
<tcp_port>9281</tcp_port>
|
||||||
<server_id>{{ clickhouse.clusters[clickhouse.cluster].nodes[salt['grains.get']('fqdn')].id }}</server_id>
|
<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>
|
<log_storage_path>/var/lib/clickhouse/coordination/log</log_storage_path>
|
||||||
<snapshot_storage_path>/var/lib/clickhouse/coordination/snapshots</snapshot_storage_path>
|
<snapshot_storage_path>/var/lib/clickhouse/coordination/snapshots</snapshot_storage_path>
|
||||||
|
<enable_reconfiguration>false</enable_reconfiguration>
|
||||||
|
|
||||||
<coordination_settings>
|
<coordination_settings>
|
||||||
<operation_timeout_ms>10000</operation_timeout_ms>
|
<operation_timeout_ms>10000</operation_timeout_ms>
|
||||||
<session_timeout_ms>30000</session_timeout_ms>
|
<session_timeout_ms>30000</session_timeout_ms>
|
||||||
<raft_logs_level>fatal</raft_logs_level>
|
<raft_logs_level>trace</raft_logs_level>
|
||||||
</coordination_settings>
|
</coordination_settings>
|
||||||
|
|
||||||
<raft_configuration>
|
<raft_configuration>
|
||||||
<secure>true</secure>
|
<secure>false</secure>
|
||||||
{%- for nodename, settings in clickhouse.clusters[clickhouse.cluster].nodes.items() %}
|
{%- for nodename, settings in clickhouse.clusters[clickhouse.cluster].nodes.items() %}
|
||||||
|
{%- if settings.keeper|default(false) %}
|
||||||
<server>
|
<server>
|
||||||
<id>{{ settings.id }}</id>
|
<id>{{ settings.id }}</id>
|
||||||
<hostname>{{ nodename }}</hostname>
|
<hostname>{{ nodename }}</hostname>
|
||||||
<port>9444</port>
|
<port>9444</port>
|
||||||
</server>
|
</server>
|
||||||
|
{%- endif %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
</raft_configuration>
|
</raft_configuration>
|
||||||
</keeper_server>
|
</keeper_server>
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
<shard>
|
<shard>
|
||||||
<internal_replication>false</internal_replication>
|
<internal_replication>false</internal_replication>
|
||||||
{% for nodename, settings in clickhouse.clusters[clickhouse.cluster].nodes.items() %}
|
{% for nodename, settings in clickhouse.clusters[clickhouse.cluster].nodes.items() %}
|
||||||
|
{%- if settings.replica|default(false) %}
|
||||||
<replica>
|
<replica>
|
||||||
<host>{{ nodename }}</host>
|
<host>{{ nodename }}</host>
|
||||||
<port>9440</port>
|
<port>9440</port>
|
||||||
@ -12,6 +13,7 @@
|
|||||||
<password></password>
|
<password></password>
|
||||||
<secure>1</secure>
|
<secure>1</secure>
|
||||||
</replica>
|
</replica>
|
||||||
|
{%- endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</shard>
|
</shard>
|
||||||
</{{ clickhouse.cluster }}>
|
</{{ clickhouse.cluster }}>
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
<default_replica_path>/clickhouse/{cluster}/tables/{uuid}/{database}/{table}-{shard}</default_replica_path>
|
<default_replica_path>/clickhouse/{cluster}/tables/{uuid}/{database}/{table}-{shard}</default_replica_path>
|
||||||
<logger>
|
<logger>
|
||||||
<level>warning</level>
|
<level>warning</level>
|
||||||
<log>/var/log/clickhouse-server/clickhouse-server-%F-%T.log</log>
|
<log>/var/log/clickhouse-server/clickhouse-server.log</log>
|
||||||
<errorlog>/var/log/clickhouse-server/clickhouse-server-%F-%T.err.log</errorlog>
|
<errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog>
|
||||||
<count>10</count>
|
<count>10</count>
|
||||||
<size>100M</size>
|
<size>100M</size>
|
||||||
<stream_compress>1</stream_compress>
|
<stream_compress>1</stream_compress>
|
||||||
|
@ -2,11 +2,13 @@
|
|||||||
<clickhouse>
|
<clickhouse>
|
||||||
<users>
|
<users>
|
||||||
<{{ name }}>
|
<{{ name }}>
|
||||||
|
{%- if params.networks|default(None) %}
|
||||||
<networks>
|
<networks>
|
||||||
{%- for network in params.networks|default(["127.0.0.1/8"]) %}
|
{%- for network in params.networks|default(["127.0.0.1/8"]) %}
|
||||||
<ip>{{ network }}</ip>
|
<ip>{{ network }}</ip>
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
</networks>
|
</networks>
|
||||||
|
{%- endif %}
|
||||||
<profile>{{ params.profile|default("default") }}</profile>
|
<profile>{{ params.profile|default("default") }}</profile>
|
||||||
<quota>{{ params.quota|default("default") }}</quota>
|
<quota>{{ params.quota|default("default") }}</quota>
|
||||||
<default_database>{{ params.default_database|default("default") }}</default_database>
|
<default_database>{{ params.default_database|default("default") }}</default_database>
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
---
|
---
|
||||||
{%- from "clickhouse/map.jinja" import clickhouse with context %}
|
{%- from "clickhouse/map.jinja" import clickhouse with context %}
|
||||||
|
clickhouse-users-folder:
|
||||||
|
file.directory:
|
||||||
|
- name: /etc/clickhouse-server/users.d
|
||||||
|
|
||||||
{% for user, params in clickhouse.users.items() %}
|
{% for user, params in clickhouse.users.items() %}
|
||||||
clickhouse-user-{{ user }}:
|
clickhouse-user-{{ user }}:
|
||||||
file.managed:
|
file.managed:
|
||||||
|
Loading…
Reference in New Issue
Block a user