I am exploring the possibility of modifying https://github.com/riptano/ComboAMI to support Ec2MultiRegionSnitch.
In that:
- Add option --snitch Ec2MultiRegionSnitch -> modify cassandra.yaml to write snitch as multi region
- Add option --broadcast_address_as_public_ip yes -> modify cassandra.yaml to write broadcast_address: public_ip
- Add option --seeds 100.222.111.222, so as the newly created instances can join an existing cassandra, e.g. 100.222.111.222.
Tested the settings and worked.
The restrictions
- I can't copy the datastax ami to be my own ami.
- I can't snapshot an existing datastax cassandra instance into an AMI, such that I modify the script locally to get it launched.
The question:
- How to modify the script and test it out.
- Should I use AutoScalingGroup with a Launchconfiguration to point to this AMI, then use sed to modify the cassandra.yaml, service restart cassandra instead? It is not obvious to me how to run a script after the AWS launch configuration has completed launching the instance, especially I can't get the AWS::Instances::GetAtt PublicIP for the broadcast address. Ideally speaking the changes should have been done during cassandra.yaml construction in the script, not after.
Thanks!