Examples:
Create three Clickhouse clusters. Replicated - one shard with two replicas, segmented - two shards without replicas, segmented_replicated - two shards, each having two replicas.
clickhouse::server::remote_servers { 'remote_servers.xml':
remote_servers_file => '/etc/clickhouse-server/conf.d',
remote_servers => {
replicated => {
shard => {
weight => 1,
internal_replication => true,
replica => ['host1.local:9000', 'host2.local:9000'],
}
},
segmented => {
shard1 => {
internal_replication => true,
replica => ['host1.local:9000'],
},
shard2 => {
internal_replication => true,
replica => ['host2.local:9000'],
}
},
segmented_replicated => {
shard1 => {
internal_replication => true,
replica => ['host1.local:9000', 'host2.local:9000'],
},
shard2 => {
internal_replication => true,
replica => ['host3.local:9000', 'host4.local:9000'],
}
},
},
}