I have recently been recently using Amazon's CloudFormation to launch instances of EC2 Ubuntu machines running MongoDB.
When it comes to deleting the stack it often fails I guess due to not being able to dismount the ebs raid 10 drives Mongo is using.
I would like to something in that template (currently has bash script in user data) or machine to intercept that message, shutdown Mongo and dismount the drives so the delete can happen cleanly rather than having to be performed twice. Is there a simple way to augment CloudFormation to handle stack deletes more cleanly?
I realise there are alternatives (OWS running Chef 9 still / Chef installed on one of our machines in AWS / Juju / Puppet / etc / etc ) but right here and now I just want to get this working cleanly first if at all possible.