Giter Site home page Giter Site logo

m-creations / docker-openwrt-cassandra Goto Github PK

View Code? Open in Web Editor NEW

This project forked from abh1nav/docker-cassandra

0.0 9.0 3.0 493 KB

Cassandra 2.1.0 Docker image based on OpenWrt

Home Page: https://registry.hub.docker.com/u/mcreations/openwrt-cassandra/

License: Other

Shell 100.00%

docker-openwrt-cassandra's Introduction

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

Quickstart

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:

  • MAX_HEAP_SIZE 1 GB
  • HEAP_NEWSIZE 100 MB
  • 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=192.168.1.1 \
           mcreations/openwrt-cassandra

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 cluster:

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=192.168.1.1 -e SEEDS=$SEED_IP mcreations/openwrt-cassandra
  sleep 30
done

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

nodetool --host $SEED_IP status

docker-openwrt-cassandra's People

Contributors

abh1nav avatar darabi avatar irmann avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

darabi irmann alanma

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.