Skip to content

Instantly share code, notes, and snippets.

@matschaffer
Created October 27, 2010 19:42
Show Gist options
  • Save matschaffer/649794 to your computer and use it in GitHub Desktop.
Save matschaffer/649794 to your computer and use it in GitHub Desktop.
def new_app_instance():
"Makes a new app instance with an EBS volume"
# ... snip ...
prepare_app_instance(instance.dns_name)
return instance.id
def prepare_app_instance(hostname):
"Prepares the given hostname to run chef"
env.hosts = [hostname]
env.user = "root"
env.key_filename = config.key
run("yum install -y make gcc rsync sudo openssl-devel rubygems ruby-devel ruby-shadow")
run("gem install chef --no-ri --no-rdoc --source http://gems.opscode.com --source http://gems.rubyforge.org")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment