Skip to content

Commit

Permalink
Merge branch 'master' into 08alpha_bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
jtimberman committed Feb 26, 2010
2 parents c85e9cf + 3cca712 commit d9c2738
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
4 changes: 3 additions & 1 deletion wordpress/attributes/wordpress.rb
Expand Up @@ -3,7 +3,7 @@
# Cookbook Name:: wordpress
# Attributes:: wordpress
#
# Copyright 2009, Opscode, Inc.
# Copyright 2009-2010, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -19,6 +19,8 @@
#

# General settings
set_unless[:wordpress][:version] = "2.9.2"
set_unless[:wordpress][:checksum] = "7342627f4a3dca44886c5aca6834cc88671dbd3aa2760182d2fcb9a330807ce1"
set_unless[:wordpress][:dir] = "/var/www/wordpress"
set_unless[:wordpress][:db][:database] = "wordpressdb"
set_unless[:wordpress][:db][:user] = "wordpressuser"
Expand Down
Binary file removed wordpress/files/default/wordpress-2.8.4.tar.gz
Binary file not shown.
Binary file added wordpress/files/default/wordpress-2.9.2.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion wordpress/metadata.rb
Expand Up @@ -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.2"
version "0.3"
depends "php"
depends "apache2"
depends "mysql"
Expand Down
17 changes: 11 additions & 6 deletions wordpress/recipes/default.rb
Expand Up @@ -2,7 +2,7 @@
# Cookbook Name:: wordpress
# Recipe:: default
#
# Copyright 2010, Opscode, Inc.
# Copyright 2009-2010, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -19,9 +19,9 @@

include_recipe "apache2"

remote_file "#{Chef::Config[:file_cache_path]}/wordpress-2.8.4.tar.gz" do
checksum "5b08259749facb38a2209008e227f66c85e178fd502b7fdd5f39c2676d14ab6b"
source "wordpress-2.8.4.tar.gz"
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"
mode "0644"
end

Expand All @@ -34,7 +34,7 @@

execute "untar-wordpress" do
cwd node[:wordpress][:dir]
command "tar --strip-components 1 -xzf /tmp/wordpress-2.8.4.tar.gz"
command "tar --strip-components 1 -xzf #{Chef::Config[:file_cache_path]}/wordpress-#{node[:wordpress][:version]}.tar.gz"
creates "#{node[:wordpress][:dir]}/wp-settings.php"
end

Expand All @@ -47,7 +47,7 @@
Gem.clear_paths
require 'mysql'

template "/etc/mysql/grants.sql" do
template "/etc/mysql/wp-grants.sql" do
path "/etc/mysql/wp-grants.sql"
source "grants.sql.erb"
owner "root"
Expand Down Expand Up @@ -77,6 +77,10 @@
action :create
end

log "Navigate to 'http://#{node.fqdn}/wp-admin/install.php' to complete wordpress installation" do
action :nothing
end

template "#{node[:wordpress][:dir]}/wp-config.php" do
source "wp-config.php.erb"
owner "root"
Expand All @@ -91,6 +95,7 @@
:logged_in_key => node[:wordpress][:keys][:logged_in],
:nonce_key => node[:wordpress][:keys][:nonce]
)
notifies :write, resources(:log => "Navigate to 'http://#{node.fqdn}/wp-admin/install.php' to complete installation")
end

include_recipe %w{php::php5 php::module_mysql}
Expand Down

0 comments on commit d9c2738

Please sign in to comment.