A Cassandra Cluster using Vagrant and Ansible

I’ve started a new project to create a Cassandra Cluster for development purposes. It’s available on my github and uses Vagrant, Ansible, and VirtualBox.

Assuming everything is installed it’s quite easy to get started;

git clone https://github.com/rhysmeister/CassandraCluster.git
cd CassandraCluster
vagrant up

Check the status of the machines;

vagrant status;
Current machine states:

cnode1                    running (virtualbox)
cnode2                    running (virtualbox)
cnode3                    running (virtualbox)
cnode4                    running (virtualbox)
cnode5                    running (virtualbox)

To access a node via ssh;

vagrant ssh cnode1;

One inside the host we can view the status of the Cassandra Cluster with nodetool;

[vagrant@cnode1 ~]$ nodetool status
Datacenter: datacenter1
|/ State=Normal/Leaving/Joining/Moving
--  Address         Load       Tokens       Owns (effective)  Host ID                               Rack
UN  106.51 KiB  256          40.0%             b191d49f-822c-40d3-bde4-926c4494a707  rack1
UN  84.39 KiB  256          39.4%             2b7d5381-7121-46f4-8800-dad9fadc4c85  rack1
UN  104.06 KiB  256          39.2%             cd6d8ed2-d0c0-4c90-90a1-bda096b422e1  rack1
UN  69.98 KiB  256          41.4%             303c762c-351d-43a6-a910-9a2afa3ec2be  rack1
UN  109.04 KiB  256          40.1%             0023da19-7b3f-420b-a6b8-ace8b5118b0d  rack1

The Administrator credentials for Cassandra are set in the cassandra.yml file and can be modified.

See the following variables;


Leave a Reply