This is a demonstration of using Chef to provision EC2 servers to run a fragile python app. It is intended to show an interesting example of what is possible with Chef, but is not an example of how to use Chef. I've intentionally taken many shortcuts to simply this example, which is not appropriate for production use.
Timebomb is a fragile python app with a significant bug: sending a POST request to /boom
will blow up the app server.
spiceweasel --parallel timebomb_spice.yml | bash
open http://`knife search node 'role:load_balancer' -a ec2.public_hostname |grep ec2.public_hostname | cut -f4 -d" "`:22002/
knife ssh 'role:load_balancer' -a ec2.public_hostname -x ubuntu 'sudo chef-client'
curl http://`knife search node 'role:load_balancer' -a ec2.public_hostname |grep ec2.public_hostname | cut -f4 -d" "`
curl -X POST http://`knife search node 'role:load_balancer' -a ec2.public_hostname |grep ec2.public_hostname | cut -f4 -d" "`/boom
spiceweasel timebomb_spice.yml | grep create | grep app | uniq | bash
spiceweasel -d timebomb_spice.yml | bash
knife client bulk delete i-.\*
Mike Fiedler has a much more elaborate chef example available at: Full Stack.