title: Modify datastax cassandra ami startup script
body: <p>I am exploring the possibility of modifying <a href="https://github.com/riptano/ComboAMI" rel="nofollow">https://github.com/riptano/ComboAMI</a> to support Ec2MultiRegionSnitch. </p>
  
  <p>In that:</p>
  
  <ol>
  <li>Add option --snitch Ec2MultiRegionSnitch -> modify cassandra.yaml to write snitch as multi region</li>
  <li>Add option --broadcast_address_as_public_ip yes -> modify cassandra.yaml to write broadcast_address: public_ip</li>
  <li>Add option --seeds 100.222.111.222, so as the newly created instances can join an existing cassandra, e.g. 100.222.111.222.</li>
  </ol>
  
  <p>Tested the settings and worked.</p>
  
  <p>The restrictions</p>
  
  <ol>
  <li>I can't copy the datastax ami to be my own ami.  </li>
  <li>I can't snapshot an existing datastax cassandra instance into an AMI, such that I modify the script locally to get it launched.  </li>
  </ol>
  
  <p>The question:</p>
  
  <ol>
  <li>How to modify the script and test it out.</li>
  <li>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 <em>after</em> 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.</li>
  </ol>
  
  <p>Thanks!</p>