csaandra cluster with multi-host docker

in server 192.168.112.101 to run a cassandra seed node, where in cassandra.yaml, listen_address ,broadcast_address and rpc_address is 192.168.112.101

docker run –net=host -d –name cass1 -p 9042:9042 -p 7001:7001 -p 7000:7000 -p 7199:7199 -p 9160:9160 _YOUR_DOCKER_IMAGE_

in server 192.168.112.102 to run a cassandra node, where in cassandra.yaml, listen_address ,broadcast_address, rpc_address and seeds parameter is 192.168.112.102.

- class_name: org.apache.cassandra.locator.SimpleSeedProvider
parameters: - seeds: "192.168.112.101"

docker run --net=host -d --name cass2 _YOUR_DOCKER_IMAGE_

192.168.112.102 and 192.168.112.101 should see ports 7000,7001,9042 and 7199 of each other.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s