DataStax 3-Node Cluster Setup
Setup
Server | IP Address | Seed Node |
---|---|---|
cassandra-1 | 192.168.50.37 | seed node |
cassandra-2 | 192.168.50.38 | |
cassandra-3 | 192.168.50.39 |
Package | Version | Install Location |
---|---|---|
DataStax | 6.8.15 | /opt/dse-6.8.15 |
Java | jdk1.8.0_241 | /opt/jdk1.8.0_241 |
Python | python-2.7.5-76.el7.x86_64 | /usr/bin/python |
Prerequisites
Follow the steps in below document to complete DSE install on all three nodes. Do not start the DSE services yet.
How to Install DSE Software
Cluster Configuration
- Update the cassandra configuration file for setting up 3-node cluster
- Update the cassandra rack properties file to use custom datacenter name
# vi /opt/dse-6.8.15/resources/cassandra/conf/cassandra.yaml
Node-1 Configuration
cluster_name: 'LTS Cluster'
num_tokens: 256
seeds: "192.168.50.37"
listen_address: 192.168.50.37
endpoint_snitch: GossipingPropertyFileSnitch
Node-2 Configuration
cluster_name: 'LTS Cluster'
num_tokens: 256
seeds: "192.168.50.37"
listen_address: 192.168.50.38
endpoint_snitch: GossipingPropertyFileSnitch
Node-3 Configuration
cluster_name: 'LTS Cluster'
num_tokens: 256
seeds: "192.168.50.37"
listen_address: 192.168.50.39
endpoint_snitch: GossipingPropertyFileSnitch
Use the same parameters on all three nodes
# vi /opt/dse-6.8.15/resources/cassandra/conf/cassandra-topology.properties
192.168.50.37=DC-Transactional:RAC1
192.168.50.38=DC-Transactional:RAC1
192.168.50.39=DC-Transactional:RAC1
Start DSE Service
- Login as cassandra user
- Start DSE service on first node
- Once DSE service is up then start DSE service on remaining two nodes
# /opt/dse-6.8.15/bin/dse cassandra
DSE Service Status
- Check status of DSE using nodetool command
# /opt/dse-6.8.15/bin/nodetool status
# Datacenter: dc1
===============
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving/Stopped
-- Address Load Tokens Owns (effective) Host ID Rack
UN 192.168.50.37 411.85 KiB 256 67.2% ddaf06c5-669d-4179-9863-6ec43a7323fa rack1
UN 192.168.50.38 428.47 KiB 256 65.8% df37112e-49c5-48e1-9088-00bfc639f98c rack1
UN 192.168.50.39 546.04 KiB 256 67.0% e1c6454d-ac77-42a4-b72b-07468dccdc1e rack1