This repository was archived by the owner on Feb 6, 2024. It is now read-only.
This repository was archived by the owner on Feb 6, 2024. It is now read-only.
Ability to have multiple shards per cluster #60
Open
Description
It seems to me there is some confusion around cluster and shards.
When looking at the example config:
clickhouse_shards: (to me this seems it should been "clickhouse_clusters")
your_shard_name: (this should have been the cluster name)
- { host: "db_host_1", port: 9000 } (this is a replica)
The current variable structure seems to be missing a level of abstraction.
It shold have three levels:
clusters:
shards:
replicas:
but currently on has two:
shards:
replicas:
The configuration structure for remote_servers / clusters looks like this:
<remote_servers>
<cluster1> <-- this is a cluster, not a named shard. Currently the role is calling this level shards.
</shard> <-- this is a shard and it has no name (variable says shard_name)
<replica>... <host>, <port> ..</replica>
<replica>... <host>, <port> ..</replica>
</shard>
</shard>
<replica>... <host>, <port> ..</replica>
<replica>... <host>, <port> ..</replica>
</shard>
</cluster1>
<cluster2>
...
</cluster2>
</remote_servers>
I've looked through the remote_servers.j2 template and it actually seems to be impossible to create this configuration from the current structure of the variables - unless I'm missing something. I'm not exactly an ansible wizard yet :)
Metadata
Metadata
Assignees
Labels
No labels