Skip to content

Instantly share code, notes, and snippets.

@botchagalupe
Created November 30, 2010 23:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save botchagalupe/722604 to your computer and use it in GitHub Desktop.
Save botchagalupe/722604 to your computer and use it in GitHub Desktop.
Wordpress Demo

Setup a Single Server Wordpress Demo

Demo Part One (Download the Wordpress Cookbook)

knife cookbook site vendor wordpress -d

Demonstration the different parts of the cookbook.

metadata.rb - Show the dependencies and explain how the -d worked.

default.rb - Show how this recipe installs wordpress and includes all the other cookbooks.

Create a new wordpress.rb role file in ../chef-repo/roles__

name "wordpress"
description "simple blog app"
run_list(
  "recipe[wordpress]"
)

Load the new wordpress.rb role up to the Chef server__

knife role from file wordpress.rb 

Load the all the cookbooks to the server Chef server__

for i in wordpress php apache2 mysql openssl
do 
  knife cookbook upload $i
done

Command version

for i in wordpress php apache2 mysql openssl; do knife cookbook upload $i; done

###Launch the Wordpress Blog

knife ec2 server create "role[wordpress]" -f m1.small -i ami-480df921 -G default,wordpress -S botchagalupe -x ubuntu -I ~/chef-repo/.chef/botchaglupe.pem 

or

knife bootstrap PUBLICHOSTNAME -i ~/chef-repo/.chef/botchagalupe.pem -x ubuntu --sudo -r 'role[wordpress]' 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment