Created
March 7, 2011 19:44
-
-
Save abyx/859076 to your computer and use it in GitHub Desktop.
Chef EC2 tutorial post http://bit.ly/avivby-chef-ec2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name "appserver" | |
description "An application server" | |
run_list(%w{ | |
recipe[apache2] | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone git://github.com/opscode/chef-repo.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cp USERNAME.pem ORGANIZATION-validator.pem knife.rb .chef |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
knife ec2 server create "role[appserver]" --image ami-f0e20899 \ | |
--groups chef --ssh-user ubuntu --ssh-key my-key |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
knife cookbook site vendor apache2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem install chef net-ssh net-ssh-multi fog highline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
knife[:aws_access_key_id] = "Your AWS Access Key" | |
knife[:aws_secret_access_key] = "Your AWS Secret Access Key" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
knife cookbook upload apache2 | |
knife role from file roles/appserver.rb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment