Run config script on next/first boot?

view full story

http://serverfault.com – I'm wearing the devops hat for my company. All our infrastructure is manually configured in AWS and I would like to start using Chef for configuration. First step: Make it easy to bootstrap an environment and reach out to the chef server! Here is my thoughts on how to approach it. Start a fresh Ubuntu AMI Add a script that runs at startup the bootstraps an enviro (ruby, ruby gems, etc.) and registers with Chef. Squirrel away this as a custom AMI so I can start many of these. So, my question is: What is the best way to go about running a script just once on the next startup? (HowTos)