I have a riak cluster that is running on multiple virtual machines scattered about. I am now experimenting with docker and would like to add nodes to the cluster that are running within docker containers.
How do I configure the networking components in this scenario? My containers can see the non-container instances and can join the cluster but the non-containerized instances can't initiate communications with the containerized instances.
Let's say I have two VMs running riak with IP addresses of 192.168.1.1 and .2. My docker host has an IP address of 192.168.1.3. Three riak containers are assigned IP addresses of 172.17.0.1, .2, and .3. I joined each container instance to the cluster.
riak-admin member-status on any node shows something like so:
Status Ring Pending Node ------------------------------------------ valid 0.0% 32.8% 'email@example.com' valid 0.0% 0.0% 'firstname.lastname@example.org' valid 0.0% 0.0% 'email@example.com' valid 50.0% 32.8% 'firstname.lastname@example.org' valid 50.0% 32.8% 'email@example.com'
The cluster can't balance itself because the VMs can't initiate comms with the containers.
I know how to expose ports in my container and publish those on the docker host but I'm not sure how I would then join a containerized riak node to the cluster using the docker hosts IP address and published port...