diff --git a/sysadm/data-silos/cassandra/index.rst b/sysadm/data-silos/cassandra/index.rst --- a/sysadm/data-silos/cassandra/index.rst +++ b/sysadm/data-silos/cassandra/index.rst @@ -5,3 +5,6 @@ .. todo:: This page is a work in progress. + +.. toctree:: + installation diff --git a/sysadm/data-silos/cassandra/installation.rst b/sysadm/data-silos/cassandra/installation.rst new file mode 100644 --- /dev/null +++ b/sysadm/data-silos/cassandra/installation.rst @@ -0,0 +1,68 @@ +.. _cassandra_installation: + +How to install a cassandra node +=============================== + +.. admonition:: Intended audience + :class: important + + sysadm staff members + + +This page document the actions to configure a cassandra node and the associated instances + +.. - Prepare the puppet configuration + +Puppet configuration +-------------------- + +Implicit configuration +^^^^^^^^^^^^^^^^^^^^^^ + +By default, each cassandra instance is isolated in its own repositories: + +- `/etc/cassandra/`: the instance configuration +- `cassandra@`: the systemd service (configured with a template and a drop-in + directory `/etc/systemd/system/cassandra@.d`) +- `/var/log/cassandra/`: the log directory (the logs are also sent to the journal) +- `/srv/cassandra//commitlog`: the commitlog directory. It should be configured on a + different zfs pool than the data directory +- `/srv/cassandra//data`: the base data dir. The data, hints, system tables are stored + in this directory. + +Declare the node +^^^^^^^^^^^^^^^^ + +In the `common/cassandra.yaml` file, declare the node configuration: + +- Declare the node fqdn in the `cassandra::nodes` hash +- List all the instances that need to be installed on the node and their eventual overrides +- If the node is for a new cluster, also declare the cluster in the `cassandra::clusters` property + +System installation +------------------- + +- Install the node with a debian bullseye distributions +- Install zfs and configure the pools according to the instances that will run on the node. + Based on the usual cassandra server swh uses: + + - one pool for the commitlogs using a fast write intensive disk + - one or several pool with the mixeduse disks + +- If the server name starts with `cassandra[0-9]+`, puppet will install all the necessary + packages and the configured instances. + +.. warning:: The services are just enabled, aka puppet doesn't force the service start. It's done + in purpose to let the system administrator control the restarts of the instances + +- Check the configuration looks correct and start the instance(s) with `systemctl start cassandra@` + +Monitoring +^^^^^^^^^^ + +TODO + +Metric +^^^^^^ + +TODO