- SSD disk for CrateDB storage.
- Add
vm.max_map_count=262144
to/etc/sysctl.d/crate.conf
and load it withsudo sysctl -p
.
You can use the released version from https://cdn.crate.io/downloads/releases/ or the latest nightly from https://cdn.crate.io/downloads/releases/nightly.
wget wget https://cdn.crate.io/downloads/releases/nightly/crate-3.1.0-201807170203-95f4290.tar.gz
tar -xzf crate-3.1.0-201807170203-95f4290.tar.gz
ln -s crate-3.1.0-201807170203-95f4290 crate
- Please change the
user
in the[email protected]
file accordingly! - Please change the
-Cpath.data
setting to a folder on an SSD disk! - Add a file named
sysconfig
in the home directory of the user and set the heap size, e.g.CRATE_HEAP_SIZE=12g
. This file will be read as environment for the unit.
Then run:
sudo systemctl link $(pwd)/[email protected]
sudo systemctl daemon-reload
Since the service file points to the same configuration path for each named
unit you start, you can edit the crate.yml
and it will affect all units.
The only setting that is unique to the units is the node.name
setting, which
is set in the service file itself (%i
... the part after the @
when
starting the servive).
For the tests, this should be good enough, as all nodes are configured equally.
sudo systemctl {start|stop|restart} crate@{c01,c02,c03}
On start, the service file creates the necessary folders for data and logs.
sudo systemctl -u crate@{c01,c02,c03}