This section describes how to set up the three-node cluster, which will be used throughout this course. This isn’t a stand-alone lesson, and some other lessons use the procedure below.
Before we proceed with the ScyllaDB installation, please ensure that your environment meets the following prerequisites:
- Docker for Mac, Windows, or Unix. Please note that running ScyllaDB in Docker is recommended for testing and evaluation. Use caution when doing this in a production environment.
- This Git repository.
- 3GB of RAM or greater for Docker.
- If you are using Linux, you will need docker-compose.
Now let’s proceed and get a three-node cluster up and running in Docker.
If you haven’t done so yet, download the example from git:
git clone https://github.com/scylladb/scylla-code-samples.git
Setting up a Cluster
Before starting the cluster, make sure the aio-max-nr value is high enough (10485760 or more).
This parameter determines the maximum number of allowable Asynchronous non-blocking I/O (AIO) concurrent requests by the Linux Kernel, and it helps ScyllaDB perform in a heavy I/O workload environment.
Check the value:
If it needs to be changed:
echo "fs.aio-max-nr = 1048576" >> /etc/sysctl.conf
sysctl -p /etc/sysctl.conf
If you have already set up a cluster in previous lessons, stop and remove it by stopping all the containers.
Note: the following stops and removes all containers in the system. Make sure that you don’t delete other non-ScyllaDB related containers!
docker stop $(docker ps -aq)
docker rm $(docker ps -aq)
Now, use docker-compose to set up the cluster:
docker-compose up -d
After a minute or so, the MMS should be up and running. Let’s verify this:
docker exec -it scylla-node1 nodetool status
Using nodetool, we can see that all three nodes are up and running in the cluster.