Public | Automated Build

Last pushed: 3 years ago
Short Description
Short description is empty for this repo.
Full Description

Cassandra 2.1.2 as a Docker container. For development use only.


Single Node

Without arguments, the container starts the C* server:

docker run -d --name cass mcreations/openwrt-cassandra

You can also use the container for the client tools (cqlsh etc.) by
passing the tool and its arguments to the docker run command:

docker run -it --link cass:cass mcreations/openwrt-cassandra cqlsh cass

docker run -it --link cass:cass mcreations/openwrt-cassandra nodetool -h cass

Configuration Details

Cassandra server is started with the following settings which can also be passed with docker run -e:

  • CLUSTER_NAME the name of the cluster, default is 'testcluster'
  • SEEDS is set to the IP of the running container
  • DC data center used by GossipingPropertyFileSnitch, default is 'dc1'
  • RACK rack, default is 'r1'
  • OPS_IP optional address of OpsCenter
  • CASS_PASS password of the user 'cassandra'; default value is 'cassandra' (specify this only on the first seed node, when creating a cluster)
  • data directory is /data

This is a sample command line with custom parameters:

docker run -d --name cass1 -v /data/cass1:/data -e CASS_PASS=ffPufPPVD4U4V9sZ \
           -e MAX_HEAP_SIZE=600m -e HEAP_NEWSIZE=40m \
           -e CLUSTER_NAME=mycluster -e OPS_IP= \

For the complete details of the configuration, please see

Multiple Nodes

Follow the single node setup to get the first node running and keep
track of its IP. Run the following to launch the other nodes in the

SEED_IP=$(docker inspect -f '{{ .NetworkSettings.IPAddress }}' cass1)
for name in cass{2..5}; do
  echo "Starting node $name"
  docker run -d --name $name -v /data/$name:/data -e MAX_HEAP_SIZE=600m -e HEAP_NEWSIZE=100m -e CLUSTER_NAME=testcluster -e OPS_IP= -e SEEDS=$SEED_IP mcreations/openwrt-cassandra
  sleep 30

Once all the nodes are up, check cluster status using:

nodetool --host $SEED_IP status
Docker Pull Command
Source Repository