Permalink
Browse files

Merge branch 'master' into 08alpha_bootstrap

  • Loading branch information...
2 parents d9c2738 + 229a07b commit 85feb0ca86d770dd0d55a34e269b07ceda8ecb07 @jtimberman jtimberman committed Feb 26, 2010
Showing with 22 additions and 5 deletions.
  1. +10 −3 wordpress/README.rdoc
  2. +11 −1 wordpress/metadata.rb
  3. +1 −1 wordpress/recipes/default.rb
View
@@ -19,10 +19,12 @@ Opscode cookbooks, http://github.com/opscode/cookbooks/tree/master:
== Libraries:
-The openssl library is required for the openssl cookbook.
+The openssl library is required from the openssl cookbook to generate secure passwords.
= ATTRIBUTES:
+* wordpress[:version] - Set the version to download.
+* wordpress[:checksum] - sha256sum of the tarball, make sure this matches for the version!
* wordpress[:dir] - Set the location to place wordpress files. Default is /var/www.
* wordpress[:db][:database] - Wordpress will use this MySQL database to store its data.
* wordpress[:db][:user] - Wordpress will connect to MySQL using this user.
@@ -39,13 +41,18 @@ The random generation is handled with the secure_password method in the openssl
= USAGE:
-Add the "wordpress" recipe to your node's run list or role:
-include_recipe "wordpress"
+If a different version than the default is desired, download that version and get the SHA256 checksum (sha256sum on Linux systems), and set the version and checksum attributes.
+
+Add the "wordpress" recipe to your node's run list or role, or include the recipe in another cookbook.
Chef will install and configure mysql, php, and apache2 according to the instructions at http://codex.wordpress.org/Installing_WordPress. Does not set up a wordpress blog. You will need to do this manually by going to http://hostname/wp-admin/install.php (this URL may be different if you change the attribute values).
The mysql::server recipe needs to come first, and contain an execute resource to install mysql privileges from the grants.sql template in this cookbook.
+== Note about MySQL:
+
+This cookbook will decouple the mysql::server and be smart about detecting whether to use a local database or find a database server in the environment in a later version.
+
= LICENSE and AUTHOR:
Author:: Barry Steinglass (barry@opscode.com>)
View
@@ -3,7 +3,7 @@
license "Apache 2.0"
description "Installs/Configures wordpress"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
-version "0.3"
+version "0.4"
depends "php"
depends "apache2"
depends "mysql"
@@ -13,6 +13,16 @@
supports os
end
+attribute "wordpress/version",
+ :display_name => "Wordpress download version",
+ :description => "Version of Wordpress to download from the Wordpress site.",
+ :default => "2.9.2"
+
+attribute "wordpress/checksum",
+ :display_name => "Wordpress tarball checksum",
+ :description => "Checksum of the tarball for the version specified.",
+ :default => "7342627f4a3dca44886c5aca6834cc88671dbd3aa2760182d2fcb9a330807"
+
attribute "wordpress/dir",
:display_name => "Wordpress installation directory",
:description => "Location to place wordpress files.",
@@ -21,7 +21,7 @@
remote_file "#{Chef::Config[:file_cache_path]}/wordpress-#{node[:wordpress][:version]}.tar.gz" do
checksum node[:wordpress][:checksum]
- source "wordpress-#{node[:wordpress][:version]}.tar.gz"
+ source "http://wordpress.org/wordpress-#{node[:wordpress][:version]}.tar.gz"
mode "0644"
end

0 comments on commit 85feb0c

Please sign in to comment.