Skip to content

Commit

Permalink
Merge branch 'master' into jtimberman/cook-11
Browse files Browse the repository at this point in the history
  • Loading branch information
adamhjk committed Feb 28, 2009
2 parents fd49a30 + 4ad8941 commit 55cdc4f
Show file tree
Hide file tree
Showing 25 changed files with 1,837 additions and 12 deletions.
1 change: 0 additions & 1 deletion NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ Contributors and Copyright holders:
* Copyright 2008-2009, Adam Jacob <[email protected]>
* Copyright 2008-2009, Joshua Timberman <[email protected]>
* Copyright 2009, Joe Williams <[email protected]>

6 changes: 3 additions & 3 deletions mysql/recipes/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@
not_if do FileTest.directory?(node[:mysql_ec2_path]) end
end

link node[:mysql_ec2_path] do
target_file mysql_server_path
link mysql_server_path do
to node[:mysql_ec2_path]
end

service "mysql" do
supports :status => true, :restart => true, :reload => true
action :start
end

end
end
43 changes: 43 additions & 0 deletions php/definitions/pear.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#
# Author:: Joshua Timberman (<[email protected]>)
# Cookbook Name:: php
# Recipe:: pear
#
# Copyright 2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

define :pear_module, :module => nil, :enable => true do

include_recipe "php::pear"

if params[:enable]
execute "/usr/bin/pear install -a #{params[:module]}" do
only_if "/bin/sh -c '! /usr/bin/pear info #{params[:module]} 2>&1 1>/dev/null"
end
end

end

define :pear_channel, :channel => nil, :enable => true do

include_recipe "php::pear"

if params[:enable]
execute "/usr/bin/pear channel-discover #{params[:channel]}" do
only_if "/bin/sh -c '! /usr/bin/pear/channel-info #{params[:channel]} 2>&1 1>/dev/null"
end
end

end
31 changes: 31 additions & 0 deletions php/definitions/pear_channel.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#
# Author:: Joshua Timberman (<[email protected]>)
# Cookbook Name:: php
# Recipe:: pear_channel
#
# Copyright 2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

define :pear_channel, :channel => nil, :enable => true do

include_recipe "php::pear"

if params[:enable]
execute "/usr/bin/pear channel-discover #{params[:channel]}" do
only_if "/bin/sh -c '! /usr/bin/pear/channel-info #{params[:channel]} 2>&1 1>/dev/null"
end
end

end
31 changes: 31 additions & 0 deletions php/definitions/pear_module.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#
# Author:: Joshua Timberman (<[email protected]>)
# Cookbook Name:: php
# Recipe:: pear_module
#
# Copyright 2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

define :pear_module, :module => nil, :enable => true do

include_recipe "php::pear"

if params[:enable]
execute "/usr/bin/pear install -a #{params[:module]}" do
only_if "/bin/sh -c '! /usr/bin/pear info #{params[:module]} 2>&1 1>/dev/null"
end
end

end
41 changes: 41 additions & 0 deletions php/definitions/php_app.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#
# Author:: Joshua Timberman (<[email protected]>)
# Cookbook Name:: php
# Recipe:: php_app
#
# Copyright 2009, Opscode, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

define :php_app, :docroot => nil, :canonical_hostname => nil, :template => "php/php.conf.erb" do

application_name = params[:name]

include_recipe "apache2"
include_recipe "apache2::mod_rewrite"
include_recipe "apache2::mod_deflate"
include_recipe "apache2::mod_headers"

template "/etc/apache2/sites-available/#{params[:name]}.conf" do
source "#{params[:template]}"
variables :docroot => params[:docroot], :canonical_hostname => params[:canonical_hostname]
owner "root"
group "root"
mode 0644
notifies :reload, resources("service[apache2]"), :delayed
end

apache_site "#{params[:name]}.conf"

end
Loading

0 comments on commit 55cdc4f

Please sign in to comment.