Public Repository

Last pushed: 6 months ago
Short Description
Short description is empty for this repo.
Full Description

This image is built upon cassandra 3.9

To start a cassandra node that sends imx-metrics on port 7199 you need to:

Docker run - e LOCAL_JMX=no -e JVM_OPTS=-Djava.rmi.server.hostname=YOUR_LOCAL_IP_HERE imx-cassandra

to connect a monitorer use test as username and 123 as password

to connect to a cluster with host net and mounter volume use:

docker run -d --name $n --net=host -e CASSANDRA_BROADCAST_ADDRESS=$ip -e CASSANDRA_SEEDS=$seed_ip(s) -e CASSANDRA_LISTEN_ADDRESS=$ip -e CASSANDRA_RPC_ADDRESS=$ip -e CASSANDRA_ENDPOINT_SNITCH=GossipingPropertyFileSnitch -e LOCAL_JMX=no -e JVM_OPTS=-Djava.rmi.server.hostname=$ip -v ~/doc-cassandra:/var/lib/cassandra laban/jmx-cassandra:1

Docker Pull Command
Owner
laban

Comments (1)
misterp
6 months ago

In order to get your own IP-address :
my_ip=$(ifconfig eth0 | grep 'inet addr' | cut -d: -f2 | awk '{print $1}')

Running first container with those options will use servers disk space and run on a host bridge:
docker run --name $(hostname)-docker -d --net=host -p 7000:7000 -p 9042:9042 \
-e CASSANDRA_BROADCAST_ADDRESS=$my_ip -e CASSANDRA_LISTEN_ADDRESS=$my_ip -e \
CASSANDRA_RPC_ADDRESS=$my_ip -e CASSANDRA_ENDPOINT_SNITCH=GossipingPropertyFileSnitch \
-e LOCAL_JMX=no -e JVM_OPTS=-Djava.rmi.server.hostname=$my_ip -v ~/doc-cassandra:/var/lib/cassandra \
jmx-cassandra:1

The IP-address of the first node is then used in every other node that comes in the cluster. You can see that address by running ifconfig eth0 on the first node. In the command below variable $first_ip should be changed to the ip address of your first node.

docker run --name $(hostname)-docker -d --net=host -p 7000:7000 -p 9042:9042 \
-e CASSANDRA_BROADCAST_ADDRESS=$my_ip -e CASSANDRA_SEEDS=$first_ip \
-e CASSANDRA_LISTEN_ADDRESS=$my_ip -e CASSANDRA_RPC_ADDRESS=$my_ip \
-e CASSANDRA_ENDPOINT_SNITCH=GossipingPropertyFileSnitch -e LOCAL_JMX=no \
-e JVM_OPTS=-Djava.rmi.server.hostname=$my_ip -v ~/doc-cassandra:/var/lib/cassandra \
jmx-cassandra:1