-
Notifications
You must be signed in to change notification settings - Fork 96
Deploy Cherami as a cluster
[draft, work in progress]
This article describes the procedure to deploy Cherami as a cluster.
Cherami is designed to run as a cluster, because messages are replicated 3 times (configurable) across different machines to protect against hardware failures. You should use dedicated hardware to run Cherami, as it will be resource consuming. Additionally, Cherami depends on Cassandra to store its metadata. If you don't already have an available Cassandra cluster to use, you need to plan for it as well.
A recommended small scale cluster should have at least 5 different machines, if your replication factor is 3. We don't recommend having equal number of machines than the replication factor, because message publishing will not work if the system cannot find enough machines to satisfy the replication factor.
Cherami itself consists of multiple roles: frontend, input, storage, output, controller, which can be instantiated on each machine using the same cherami-server
executable. For a small cluster, it should be OK to run all roles in each machine, e.g. ./cherami-server start all
.
In a small scale cluster it maybe OK to colocate the Cassandra cluster with Cherami, as we don't expect the amount of data and IO on Cassandra to affect the operations of Cherami in this scale.
For a large scale deployment, you need to plan the number of instances and the placement of each role:
- You will need fewer number of controllers (probably 3-5).
- The metadata Cassandra deployment should run on dedicated machines.
- You may want to separate out input and output roles, as they may contend on memory, CPU and network resources (in that order)
Preparation: edit config/cluster.yaml to modify some values:
ringhost IPs:... cassandra IPs: UUIDs storage directories
Setup Cassandra schema (for new cassandra deployment only. To upgrade schema, use cherami-cassandra-tool
):
-
run clients/metadata/schema/metadata_keyspace.cql against your cassandra using cqlsh. You may want to adjust the replication factor.
cqlsh $ip -f clients/metadata/schema/metadata_keyspace.cql
-
run clients/metadata/schema/metadata.cql against your cassandra using cqlsh.
cqlsh $ip -k cherami -f clients/metadata/schema/metadata.cql
For each host:
CHERAMI_ENVIRONMENT=cluster ./cherami-server start all