orchestrator/clickhouse: remove init.sh endpoint

Instead, just map configuration files inside the container. As we don't
have to push the schema anymore, pushing some arbitrary configuration
does not seem to be our job.
This commit is contained in:
Vincent Bernat
2024-06-18 18:50:34 +02:00
parent 8ae23f9ae3
commit c70f3b74bf
16 changed files with 52 additions and 155 deletions

View File

@@ -0,0 +1,28 @@
<clickhouse>
<!-- Don't keep logs forever -->
<asynchronous_metric_log>
<ttl>event_date + INTERVAL 30 DAY DELETE</ttl>
</asynchronous_metric_log>
<metric_log>
<ttl>event_date + INTERVAL 30 DAY DELETE</ttl>
</metric_log>
<part_log>
<ttl>event_date + INTERVAL 30 DAY DELETE</ttl>
</part_log>
<query_log>
<ttl>event_date + INTERVAL 30 DAY DELETE</ttl>
</query_log>
<query_thread_log>
<ttl>event_date + INTERVAL 30 DAY DELETE</ttl>
</query_thread_log>
<trace_log>
<ttl>event_date + INTERVAL 30 DAY DELETE</ttl>
</trace_log>
<!-- Enable Prometheus endpoint -->
<prometheus>
<endpoint>/metrics</endpoint>
<metrics>true</metrics>
<events>true</events>
<asynchronous_metrics>true</asynchronous_metrics>
</prometheus>
</clickhouse>

View File

@@ -0,0 +1,6 @@
<clickhouse>
<macros>
<shard>01</shard>
<replica>01</replica>
</macros>
</clickhouse>

View File

@@ -0,0 +1,6 @@
<clickhouse>
<macros>
<shard>01</shard>
<replica>02</replica>
</macros>
</clickhouse>

View File

@@ -0,0 +1,6 @@
<clickhouse>
<macros>
<shard>02</shard>
<replica>01</replica>
</macros>
</clickhouse>

View File

@@ -0,0 +1,6 @@
<clickhouse>
<macros>
<shard>02</shard>
<replica>02</replica>
</macros>
</clickhouse>

View File

@@ -0,0 +1,39 @@
<clickhouse>
<remote_servers replace="true">
<akvorado>
<!-- Cluster with two shards, each having two replicas. On a real setup,
you should use more shards to balance the additional complexity
introduced by using a cluster. -->
<shard>
<internal_replication>true</internal_replication>
<replica>
<host>clickhouse</host>
<port>9000</port>
</replica>
<replica>
<host>clickhouse-2</host>
<port>9000</port>
</replica>
</shard>
<shard>
<internal_replication>true</internal_replication>
<replica>
<host>clickhouse-3</host>
<port>9000</port>
</replica>
<replica>
<host>clickhouse-4</host>
<port>9000</port>
</replica>
</shard>
</akvorado>
</remote_servers>
<zookeeper>
<node>
<host>zookeeper</host>
<port>2181</port>
</node>
</zookeeper>
<!-- For testing, ensure tables are dropped quickly -->
<database_atomic_delay_before_drop_table_sec>0</database_atomic_delay_before_drop_table_sec>
</clickhouse>