Is it correct that often the same thing can be achieved using either a
pp plugins or a chef recipe? (Like setting up apache2.) What's the
preferred way?
Based on the file examples/fairchild.rb in the poolparty git repo i
created the following clouds.rb file. (btw i had to fix a syntax error
in the has_git_repos declaration.) The folder ~/cookbooks/ was git
cloned from the opscode cookbook git repo. I can start the cloud, but
it seems apache is not running:
root@ip-10-251-74-150:~# curl http://localhost
curl: (7) couldn't connect to host
#cloud.rb:
pool :mypool do
keypair "~/.ec2/testpair"
cloud :mycloud do
instances 1
has_directory "/var/www"
has_git_repos "paparazzi",
:source => "git://github.com/auser/paparazzi.git",
:at => "/var/www"
chef do
# include_recipes "~/cookbooks/*"
recipe "#{File.dirname(__FILE__)}/examples/fairchild_chef.rb"
end
end
end
#examples/fairchild_chef.rb:
include_recipe "apache2"
include_recipe "passenger"
include_recipe "rails"
include_recipe "git"
include_recipe "ec2"
include_recipe "sqlite"
web_app "paparazzi" do
docroot "/var/www/paparazzi/public"
template "paparazzi.conf.erb"
server_name "www.paparazzi.com"
server_aliases [node[:hostname], node[:fqdn], "paparazzi.com"]
rails_env "production"
end