I'm trying to deploy Cassandra on AWS ECS as docker containers. Single nodes are easily done, but now I'm trying to make a cluster for it.
Cassandra needs fixed ip addresses, at least for the seed nodes, which needs to be passed to all nodes in a cluster. Cassandra cannot work with ELB addresses, because the ELB name resolves to a different ip as the docker host itself.
So basically I need to be able to force AWS to deploy an image to a specific instance/host/ip. In that way I can pass the correct configuration while running the docker image.
Could I use the RunTask api and pass it PlacementConstraint giving a constraint to limit the hosts to a single one, based on IP? Is PrivateIp an attribute of an EC2 instance in this interface?
Do you have any other good ideas how I can achieve that?
Thanks!
With Amazon Keyspaces, you can run your Cassandra workloads on AWS using the same Cassandra application code and developer tools that you use today. You don't have to provision, patch, or manage servers, and you don't have to install, maintain, or operate software.
Apache Cassandra is an open-source, NoSQL database designed to store data for applications that require fast read and write performance. For example, you can use Cassandra to store user profile information for online video games, device metadata for internet of things (IoT) applications, or records for events.
You can use hostnames in the seeds list. Just make sure that your seeds will use those names. Also, if a seed stops and resolves to another IP you'll need to replace it (but that's true for any node that changes its IP)
If seed ecs containers are added using awsvpc network mode then each task get their own eni. After you launch seed nodes you can use 'aws describe-tasks' API to get their ip address and update your Cassandra.yml accordingly
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With