Make sure that all the ports are open.
Obtain the IP addresses of all nodes which have been created for the cluster.
Select a unique name as cluster_name
for the cluster (identical for all the nodes in the cluster).
Decide which nodes will be the seed nodes (It is recommended to define more than one node as a seed node).
Choose which snitch to use (identical for all the nodes in the cluster). For a production system, it is recommended to use a DC-aware snitch, which can support a NetworkTopologyStrategy
replication-strategy for your Keyspaces.
These steps need to be done for each of the nodes in the new cluster.
1. Install Scylla on a node. See Getting Started for further instructions.
Follow the Scylla install procedure up to scylla.yaml
configuration phase.
In case that the node starts during the process follow these instructions
2. In the scylla.yaml
file, edit the parameters listed below.
The file can be found under /etc/scylla/
cluster_name - Set the selected cluster_name
seeds - Set the first node, and only the first node, as a seed node. We will add more seeds later in the process.
listen_address - IP address that Scylla used to connect to other Scylla nodes in the cluster
auto_bootstrap - By default, this parameter is set to true, it allows new nodes to migrate data to themselves automatically.
endpoint_snitch - Set the selected snitch
rpc_address - Address for client connection (Thrift, CQL)
3. This step needs to be done only if you are using the GossipingPropertyFileSnitch. If not, skip this step.
In the cassandra-rackdc.properties
file, edit the parameters listed below.
The file can be found under /etc/scylla/
dc - Set the datacenter name
rack - Set the rack name
For example:
# cassandra-rackdc.properties
#
# The lines may include white spaces at the beginning and the end.
# The rack and data center names may also include white spaces.
# All trailing and leading white spaces will be trimmed.
#
dc=thedatacentername
rack=therackname
# prefer_local=<false | true>
# dc_suffix=<Data Center name suffix, used by EC2SnitchXXX snitches>
After Scylla has been installed and configured, edit scylla.yaml
file on all the nodes, using the first node as the seed node. Start the seed node, and once it is in UN state, repeat for all the other nodes, each after the previous is in UN state.
sudo systemctl start scylla-server
sudo service scylla-server start
docker exec -it some-scylla supervisorctl start scylla
(with some-scylla container already running)
5. Verify that the node has been added to the cluster using
nodetool status
Once the cluster is up and running (all nodes are UN state), update the seeds in each scylla.yaml
file to include at least one more seed node.
This example shows how to install and configure a three nodes cluster, using two seed nodes, and using GossipingPropertyFileSnitch as the endpoint_snitch, each node on a different rack.
Installing Three Scylla nodes, the IP’s are:
192.168.1.201 (seed)
192.168.1.202
192.168.1.203
In each Scylla node, edit the scylla.yaml
file
192.168.1.201
cluster_name: 'Scylla_cluster_demo'
seeds: "192.168.1.201"
endpoint_snitch: GossipingPropertyFileSnitch
rpc_address: "192.168.1.201"
listen_address: "192.168.1.201"
192.168.1.202
cluster_name: 'Scylla_cluster_demo'
seeds: "192.168.1.201"
endpoint_snitch: GossipingPropertyFileSnitch
rpc_address: "192.168.1.202"
listen_address: "192.168.1.202"
192.168.1.203
cluster_name: 'Scylla_cluster_demo'
seeds: "192.168.1.201"
endpoint_snitch: GossipingPropertyFileSnitch
rpc_address: "192.168.1.203"
listen_address: "192.168.1.203"
3. This step needs to be done only if using GossipingPropertyFileSnitch.
In each Scylla node, edit the cassandra-rackdc.properties
file
192.168.1.201
# cassandra-rackdc.properties
#
# The lines may include white spaces at the beginning and the end.
# The rack and data center names may also include white spaces.
# All trailing and leading white spaces will be trimmed.
#
dc=datacenter1
rack=rack43
# prefer_local=<false | true>
# dc_suffix=<Data Center name suffix, used by EC2SnitchXXX snitches>
192.168.1.202
# cassandra-rackdc.properties
#
# The lines may include white spaces at the beginning and the end.
# The rack and data center names may also include white spaces.
# All trailing and leading white spaces will be trimmed.
#
dc=datacenter1
rack=rack44
# prefer_local=<false | true>
# dc_suffix=<Data Center name suffix, used by EC2SnitchXXX snitches>
192.168.1.203
# cassandra-rackdc.properties
#
# The lines may include white spaces at the beginning and the end.
# The rack and data center names may also include white spaces.
# All trailing and leading white spaces will be trimmed.
#
dc=datacenter1
rack=rack45
# prefer_local=<false | true>
# dc_suffix=<Data Center name suffix, used by EC2SnitchXXX snitches>
Starting Scylla nodes, since our seed node is 192.168.1.201
we will start it first, wait until it is in a UN state, and repeat for the other nodes.
sudo systemctl start scylla-server
sudo service scylla-server start
docker exec -it some-scylla supervisorctl start scylla
(with some-scylla container already running)
Verify that the node has been added to the cluster by using the nodetool status
command
Datacenter: datacenter1
Status=Up/Down
State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns (effective) Host ID Rack
UN 192.168.1.201 112.82 KB 256 32.7% 8d5ed9f4-7764-4dbd-bad8-43fddce94b7c 43
UN 192.168.1.202 91.11 KB 256 32.9% 125ed9f4-7777-1dbn-mac8-43fddce9123e 44
UN 192.168.1.203 124.42 KB 256 32.6% 675ed9f4-6564-6dbd-can8-43fddce952gy 45
Add another seed node to the scylla.yaml file of each node in your cluster. For example:
seeds: "192.168.1.201,192.168.1.202"
There is no need to restart the nodes after the change.