Make a Cassandra cluster

Hi Guys,

I’m trying to configure a cassandra cluster in Rancer, if I set the network to managed I can’t get the nodes to start because the ip is not resolving in the container, if I use bridge connection all linked containers that have cassandra won’t be able to resolve the naming.

Can you help me out abit?

Thank you.

If you need the internal 10.42.x.y IP of a container you can get it with this, there’s both a way that works today and a better way that will be in the next release there.

The particular problem here is that Cassandra needs to broadcast the 10.42.x.y address for it’s RPC connection. By default it’s discovery the containers 172… address instead.

I’ve worked around this by forcing the container IP with:


and then passing CASSANDRA_BROADCAST_ADDRESS: as an envvar to the container. Obviously this wont’ work for a multinode cluster though.

@vincent I see that the recommend solution here is to use the metadata API to get the IP, however, this wont’ work without creating a new Cassandra container that can perform this action before starting.
Is there anyway that I can configure a label that tells Rancher to expose the IP address as a provided environment variable name?