/docker-cassandra

Apache Cassandra docker image for development and testing purposes.

Primary LanguageShellApache License 2.0Apache-2.0

docker-cassandra

Apache Cassandra docker image for development and testing purposes.

What's inside

ubuntu:14.04
 |
 |--- zhicwu/java:8
       |
       |--- zhicwu/cassandra:3.5

How to use

  • Pull the image
# docker pull zhicwu/cassandra:latest
  • Setup scripts
# wget https://raw.githubusercontent.com/zhicwu/docker-cassandra/master/start_node.sh
# chmod +x *.sh
  • Start Cassandra
# ./start_node.sh
# docker logs -f my-cassandra
...
# docker exec -it my-cassandra bash
$ cqlsh -u cassandra -p cassandra

You can now use cassandra/cassandra to access the node.

Tips:

  1. Edit cluster-env.sh to customize cluster environment, which should be same for all nodes in a data center or whole cluster
  2. Edit node-env.sh to customize node environment
  3. Edit start_node.sh to customize docker start options
  4. To enable Jolokia, make changes in node-env.sh like the following, restart Cassandra and connect using tools like hawtio
JMX_REMOTE="yes"
JOLOKIA_ENABLED="yes"
JMX_USERNAME="ffa"
JMX_PASSWORD="ffa"