Skip to content
Browse files

Adding chef support

  • Loading branch information...
1 parent 355face commit ef017e4ce8423d1be74305f1ec6f076ca711cc23 @chewbranca chewbranca committed
Showing with 9,735 additions and 0 deletions.
  1. +23 −0 all_everything_else.erb
  2. +12 −0 config/chef/NEWSCLOUD_README.md
  3. +43 −0 config/chef/cookbooks/activemq/README.md
  4. +24 −0 config/chef/cookbooks/activemq/attributes/default.rb
  5. +14 −0 config/chef/cookbooks/activemq/metadata.rb
  6. +72 −0 config/chef/cookbooks/activemq/recipes/default.rb
  7. +139 −0 config/chef/cookbooks/activemq/templates/default/wrapper.conf.erb
  8. +51 −0 config/chef/cookbooks/ant/README.md
  9. +14 −0 config/chef/cookbooks/ant/metadata.rb
  10. +41 −0 config/chef/cookbooks/ant/recipes/default.rb
  11. +78 −0 config/chef/cookbooks/apache2/README.rdoc
  12. +87 −0 config/chef/cookbooks/apache2/attributes/default.rb
  13. +26 −0 config/chef/cookbooks/apache2/definitions/apache_conf.rb
  14. +43 −0 config/chef/cookbooks/apache2/definitions/apache_module.rb
  15. +40 −0 config/chef/cookbooks/apache2/definitions/apache_site.rb
  16. +49 −0 config/chef/cookbooks/apache2/definitions/web_app.rb
  17. +41 −0 config/chef/cookbooks/apache2/files/default/apache2_module_conf_generate.pl
  18. +197 −0 config/chef/cookbooks/apache2/metadata.rb
  19. +209 −0 config/chef/cookbooks/apache2/recipes/default.rb
  20. +33 −0 config/chef/cookbooks/apache2/recipes/god_monitor.rb
  21. +22 −0 config/chef/cookbooks/apache2/recipes/mod_alias.rb
  22. +20 −0 config/chef/cookbooks/apache2/recipes/mod_auth_basic.rb
  23. +20 −0 config/chef/cookbooks/apache2/recipes/mod_auth_digest.rb
  24. +83 −0 config/chef/cookbooks/apache2/recipes/mod_auth_openid.rb
  25. +20 −0 config/chef/cookbooks/apache2/recipes/mod_authn_file.rb
  26. +20 −0 config/chef/cookbooks/apache2/recipes/mod_authnz_ldap.rb
  27. +20 −0 config/chef/cookbooks/apache2/recipes/mod_authz_default.rb
  28. +20 −0 config/chef/cookbooks/apache2/recipes/mod_authz_groupfile.rb
  29. +20 −0 config/chef/cookbooks/apache2/recipes/mod_authz_host.rb
  30. +20 −0 config/chef/cookbooks/apache2/recipes/mod_authz_user.rb
  31. +22 −0 config/chef/cookbooks/apache2/recipes/mod_autoindex.rb
  32. +20 −0 config/chef/cookbooks/apache2/recipes/mod_cgi.rb
  33. +20 −0 config/chef/cookbooks/apache2/recipes/mod_dav.rb
  34. +22 −0 config/chef/cookbooks/apache2/recipes/mod_dav_svn.rb
  35. +22 −0 config/chef/cookbooks/apache2/recipes/mod_deflate.rb
  36. +22 −0 config/chef/cookbooks/apache2/recipes/mod_dir.rb
  37. +20 −0 config/chef/cookbooks/apache2/recipes/mod_env.rb
  38. +20 −0 config/chef/cookbooks/apache2/recipes/mod_expires.rb
  39. +46 −0 config/chef/cookbooks/apache2/recipes/mod_fcgid.rb
  40. +20 −0 config/chef/cookbooks/apache2/recipes/mod_headers.rb
  41. +20 −0 config/chef/cookbooks/apache2/recipes/mod_ldap.rb
  42. +24 −0 config/chef/cookbooks/apache2/recipes/mod_log_config.rb
  43. +22 −0 config/chef/cookbooks/apache2/recipes/mod_mime.rb
  44. +22 −0 config/chef/cookbooks/apache2/recipes/mod_negotiation.rb
  45. +37 −0 config/chef/cookbooks/apache2/recipes/mod_php5.rb
  46. +22 −0 config/chef/cookbooks/apache2/recipes/mod_proxy.rb
  47. +20 −0 config/chef/cookbooks/apache2/recipes/mod_proxy_ajp.rb
  48. +20 −0 config/chef/cookbooks/apache2/recipes/mod_proxy_balancer.rb
  49. +20 −0 config/chef/cookbooks/apache2/recipes/mod_proxy_connect.rb
  50. +20 −0 config/chef/cookbooks/apache2/recipes/mod_proxy_http.rb
  51. +32 −0 config/chef/cookbooks/apache2/recipes/mod_python.rb
  52. +20 −0 config/chef/cookbooks/apache2/recipes/mod_rewrite.rb
  53. +22 −0 config/chef/cookbooks/apache2/recipes/mod_setenvif.rb
  54. +43 −0 config/chef/cookbooks/apache2/recipes/mod_ssl.rb
  55. +22 −0 config/chef/cookbooks/apache2/recipes/mod_status.rb
  56. +27 −0 config/chef/cookbooks/apache2/recipes/mod_wsgi.rb
  57. +22 −0 config/chef/cookbooks/apache2/templates/default/a2dismod.erb
  58. +29 −0 config/chef/cookbooks/apache2/templates/default/a2dissite.erb
  59. +37 −0 config/chef/cookbooks/apache2/templates/default/a2enmod.erb
  60. +38 −0 config/chef/cookbooks/apache2/templates/default/a2ensite.erb
  61. +232 −0 config/chef/cookbooks/apache2/templates/default/apache2.conf.erb
  62. +19 −0 config/chef/cookbooks/apache2/templates/default/apache2.god.erb
  63. +6 −0 config/chef/cookbooks/apache2/templates/default/charset.erb
  64. +57 −0 config/chef/cookbooks/apache2/templates/default/default-site.erb
  65. +12 −0 config/chef/cookbooks/apache2/templates/default/mod_auth_openid.rb.erb
  66. +2 −0 config/chef/cookbooks/apache2/templates/default/mods/README
  67. +24 −0 config/chef/cookbooks/apache2/templates/default/mods/alias.conf.erb
  68. +6 −0 config/chef/cookbooks/apache2/templates/default/mods/authopenid.load.erb
  69. +101 −0 config/chef/cookbooks/apache2/templates/default/mods/autoindex.conf.erb
  70. +16 −0 config/chef/cookbooks/apache2/templates/default/mods/deflate.conf.erb
  71. +5 −0 config/chef/cookbooks/apache2/templates/default/mods/dir.conf.erb
  72. +10 −0 config/chef/cookbooks/apache2/templates/default/mods/fcgid.conf.erb
  73. +196 −0 config/chef/cookbooks/apache2/templates/default/mods/mime.conf.erb
  74. +18 −0 config/chef/cookbooks/apache2/templates/default/mods/negotiation.conf.erb
  75. +19 −0 config/chef/cookbooks/apache2/templates/default/mods/proxy.conf.erb
  76. +28 −0 config/chef/cookbooks/apache2/templates/default/mods/setenvif.conf.erb
  77. +72 −0 config/chef/cookbooks/apache2/templates/default/mods/ssl.conf.erb
  78. +16 −0 config/chef/cookbooks/apache2/templates/default/mods/status.conf.erb
  79. +2 −0 config/chef/cookbooks/apache2/templates/default/port_apache.erb
  80. +6 −0 config/chef/cookbooks/apache2/templates/default/ports.conf.erb
  81. +50 −0 config/chef/cookbooks/apache2/templates/default/security.erb
  82. +43 −0 config/chef/cookbooks/apache2/templates/default/web_app.conf.erb
  83. +81 −0 config/chef/cookbooks/bluepill/README.md
  84. +29 −0 config/chef/cookbooks/bluepill/attributes/default.rb
  85. +7 −0 config/chef/cookbooks/bluepill/metadata.rb
  86. +88 −0 config/chef/cookbooks/bluepill/providers/service.rb
  87. +32 −0 config/chef/cookbooks/bluepill/recipes/default.rb
  88. +26 −0 config/chef/cookbooks/bluepill/resources/service.rb
  89. +11 −0 config/chef/cookbooks/emacs/metadata.rb
  90. +21 −0 config/chef/cookbooks/emacs/recipes/default.rb
  91. +1 −0 config/chef/cookbooks/erlang/attributes/default.rb
  92. +11 −0 config/chef/cookbooks/erlang/metadata.rb
  93. +27 −0 config/chef/cookbooks/erlang/recipes/default.rb
  94. +11 −0 config/chef/cookbooks/fail2ban/metadata.rb
  95. +36 −0 config/chef/cookbooks/fail2ban/recipes/default.rb
  96. +34 −0 config/chef/cookbooks/fail2ban/templates/default/fail2ban.conf.erb
  97. +202 −0 config/chef/cookbooks/fail2ban/templates/default/jail.conf.erb
  98. +44 −0 config/chef/cookbooks/gnu_parallel/README.md
  99. +30 −0 config/chef/cookbooks/gnu_parallel/attributes/default.rb
  100. +9 −0 config/chef/cookbooks/gnu_parallel/metadata.rb
  101. +20 −0 config/chef/cookbooks/gnu_parallel/recipes/default.rb
  102. +26 −0 config/chef/cookbooks/gnu_parallel/recipes/homebrew.rb
  103. +20 −0 config/chef/cookbooks/gnu_parallel/recipes/package.rb
  104. +38 −0 config/chef/cookbooks/gnu_parallel/recipes/source.rb
  105. +63 −0 config/chef/cookbooks/hadoop/README.rdoc
  106. +17 −0 config/chef/cookbooks/hadoop/metadata.rb
  107. +29 −0 config/chef/cookbooks/hadoop/recipes/conf_pseudo.rb
  108. +38 −0 config/chef/cookbooks/hadoop/recipes/default.rb
  109. +22 −0 config/chef/cookbooks/hadoop/recipes/doc.rb
  110. +22 −0 config/chef/cookbooks/hadoop/recipes/hive.rb
  111. +22 −0 config/chef/cookbooks/hadoop/recipes/pig.rb
  112. +2 −0 config/chef/cookbooks/hadoop/templates/default/cloudera.list.erb
  113. +2 −0 config/chef/cookbooks/iptables/recipes/default.rb
  114. +3 −0 config/chef/cookbooks/iptables/templates/default/all_http_s.erb
  115. +2 −0 config/chef/cookbooks/iptables/templates/default/all_ssh.erb
  116. +102 −0 config/chef/cookbooks/java/README.md
  117. +29 −0 config/chef/cookbooks/java/attributes/default.rb
  118. +11 −0 config/chef/cookbooks/java/files/default/java.seed
  119. +16 −0 config/chef/cookbooks/java/metadata.rb
  120. +21 −0 config/chef/cookbooks/java/recipes/default.rb
  121. +39 −0 config/chef/cookbooks/java/recipes/openjdk.rb
  122. +93 −0 config/chef/cookbooks/java/recipes/sun.rb
  123. +54 −0 config/chef/cookbooks/jetty/README.md
  124. +53 −0 config/chef/cookbooks/jetty/attributes/default.rb
  125. +16 −0 config/chef/cookbooks/jetty/metadata.rb
  126. +59 −0 config/chef/cookbooks/jetty/recipes/default.rb
  127. +57 −0 config/chef/cookbooks/jetty/templates/default/default_jetty.erb
  128. +29 −0 config/chef/cookbooks/jira/attributes/default.rb
  129. +323 −0 config/chef/cookbooks/jira/files/default/catalina.sh
  130. +48 −0 config/chef/cookbooks/jira/files/default/startup.sh
  131. +66 −0 config/chef/cookbooks/jira/metadata.rb
  132. +99 −0 config/chef/cookbooks/jira/recipes/default.rb
  133. +32 −0 config/chef/cookbooks/jira/templates/default/apache.conf.erb
  134. +114 −0 config/chef/cookbooks/jira/templates/default/entityengine.xml.erb
  135. +90 −0 config/chef/cookbooks/jira/templates/default/server.xml.erb
  136. +3 −0 config/chef/cookbooks/jira/templates/default/sv-jira-log-run.erb
  137. +5 −0 config/chef/cookbooks/jira/templates/default/sv-jira-run.erb
  138. +50 −0 config/chef/cookbooks/jpackage/README.md
  139. +20 −0 config/chef/cookbooks/jpackage/attributes/default.rb
  140. +14 −0 config/chef/cookbooks/jpackage/metadata.rb
  141. +58 −0 config/chef/cookbooks/jpackage/recipes/default.rb
  142. +49 −0 config/chef/cookbooks/jpackage/templates/default/jpackage.repo.erb
  143. +49 −0 config/chef/cookbooks/jpackage/templates/fedora/jpackage.repo.erb
  144. +29 −0 config/chef/cookbooks/libxml/README.md
  145. +14 −0 config/chef/cookbooks/libxml/metadata.rb
  146. +30 −0 config/chef/cookbooks/libxml/recipes/default.rb
  147. +50 −0 config/chef/cookbooks/maven/README.md
  148. +14 −0 config/chef/cookbooks/maven/metadata.rb
  149. +29 −0 config/chef/cookbooks/maven/recipes/default.rb
  150. +52 −0 config/chef/cookbooks/memcached/README.rdoc
  151. +4 −0 config/chef/cookbooks/memcached/attributes/default.rb
  152. +32 −0 config/chef/cookbooks/memcached/definitions/memcached_instance.rb
  153. +33 −0 config/chef/cookbooks/memcached/metadata.rb
  154. +56 −0 config/chef/cookbooks/memcached/recipes/default.rb
  155. +50 −0 config/chef/cookbooks/memcached/templates/default/memcached.conf.erb
  156. +2 −0 config/chef/cookbooks/memcached/templates/default/memcached.default.erb
  157. +2 −0 config/chef/cookbooks/memcached/templates/default/sv-memcached-log-run.erb
  158. +3 −0 config/chef/cookbooks/memcached/templates/default/sv-memcached-run.erb
  159. +298 −0 config/chef/cookbooks/nagios/README.md
  160. +53 −0 config/chef/cookbooks/nagios/attributes/client.rb
  161. +24 −0 config/chef/cookbooks/nagios/attributes/default.rb
  162. +73 −0 config/chef/cookbooks/nagios/attributes/server.rb
  163. +37 −0 config/chef/cookbooks/nagios/definitions/nagios_conf.rb
  164. BIN config/chef/cookbooks/nagios/files/default/icons/centos.gd2
  165. BIN config/chef/cookbooks/nagios/files/default/icons/centos.gif
  166. BIN config/chef/cookbooks/nagios/files/default/icons/centos.jpg
  167. BIN config/chef/cookbooks/nagios/files/default/icons/centos.png
  168. BIN config/chef/cookbooks/nagios/files/default/icons/munin-head.gif
  169. BIN config/chef/cookbooks/nagios/files/default/icons/ubuntu.gd2
  170. BIN config/chef/cookbooks/nagios/files/default/icons/ubuntu.gif
  171. BIN config/chef/cookbooks/nagios/files/default/icons/ubuntu.jpg
  172. BIN config/chef/cookbooks/nagios/files/default/icons/ubuntu.png
  173. +158 −0 config/chef/cookbooks/nagios/files/default/plugins/check-mysql-slave.pl
  174. +98 −0 config/chef/cookbooks/nagios/files/default/plugins/check_mem.sh
  175. +159 −0 config/chef/cookbooks/nagios/files/default/plugins/check_mysqlhealth.pl
  176. +117 −0 config/chef/cookbooks/nagios/files/default/plugins/check_solr.rb
  177. +96 −0 config/chef/cookbooks/nagios/files/default/plugins/db_queues.rb
  178. +84 −0 config/chef/cookbooks/nagios/files/default/plugins/file_queues.rb
  179. +26 −0 config/chef/cookbooks/nagios/files/default/plugins/nagios_helper.rb
  180. +34 −0 config/chef/cookbooks/nagios/libraries/default.rb
  181. +18 −0 config/chef/cookbooks/nagios/metadata.rb
  182. +57 −0 config/chef/cookbooks/nagios/recipes/client.rb
  183. +28 −0 config/chef/cookbooks/nagios/recipes/client_package.rb
  184. +104 −0 config/chef/cookbooks/nagios/recipes/client_source.rb
  185. +23 −0 config/chef/cookbooks/nagios/recipes/default.rb
  186. +151 −0 config/chef/cookbooks/nagios/recipes/server.rb
  187. +27 −0 config/chef/cookbooks/nagios/recipes/server_package.rb
  188. +124 −0 config/chef/cookbooks/nagios/recipes/server_source.rb
  189. +35 −0 config/chef/cookbooks/nagios/templates/default/apache2.conf.erb
  190. +231 −0 config/chef/cookbooks/nagios/templates/default/cgi.cfg.erb
  191. +335 −0 config/chef/cookbooks/nagios/templates/default/commands.cfg.erb
  192. +32 −0 config/chef/cookbooks/nagios/templates/default/contacts.cfg.erb
  193. +16 −0 config/chef/cookbooks/nagios/templates/default/hostgroups.cfg.erb
  194. +16 −0 config/chef/cookbooks/nagios/templates/default/hosts.cfg.erb
  195. +4 −0 config/chef/cookbooks/nagios/templates/default/htpasswd.users.erb
  196. +65 −0 config/chef/cookbooks/nagios/templates/default/nagios-nrpe-server.erb
  197. +156 −0 config/chef/cookbooks/nagios/templates/default/nagios.cfg.erb
  198. +29 −0 config/chef/cookbooks/nagios/templates/default/nrpe.cfg.erb
  199. +128 −0 config/chef/cookbooks/nagios/templates/default/services.cfg.erb
  200. +78 −0 config/chef/cookbooks/nagios/templates/default/templates.cfg.erb
  201. +14 −0 config/chef/cookbooks/nagios/templates/default/timeperiods.cfg.erb
  202. +31 −0 config/chef/cookbooks/newscloud_database/README.rdoc
  203. +6 −0 config/chef/cookbooks/newscloud_database/metadata.rb
  204. +55 −0 config/chef/cookbooks/newscloud_database/recipes/default.rb
  205. +3 −0 config/chef/cookbooks/newscloud_database/templates/default/grants.sql.erb
  206. +35 −0 config/chef/cookbooks/newscloud_deps/README.md
  207. +13 −0 config/chef/cookbooks/newscloud_deps/metadata.rb
  208. +35 −0 config/chef/cookbooks/newscloud_deps/recipes/default.rb
  209. +155 −0 config/chef/cookbooks/openvpn/README.md
  210. +40 −0 config/chef/cookbooks/openvpn/attributes/default.rb
  211. +39 −0 config/chef/cookbooks/openvpn/metadata.rb
  212. +122 −0 config/chef/cookbooks/openvpn/recipes/default.rb
  213. +54 −0 config/chef/cookbooks/openvpn/recipes/users.rb
Sorry, we could not display the entire diff because too many files (943) changed.
View
23 all_everything_else.erb
@@ -0,0 +1,23 @@
+# Borrowed from: http://articles.slicehost.com/assets/2007/9/4/iptables.txt
+
+
+# Allows all loopback (lo0) traffic and drop all traffic to 127/8 that doesn't use lo0
+-A INPUT -i lo -j ACCEPT
+-A INPUT ! -i lo -d 127.0.0.0/8 -j REJECT
+
+
+# Allows all outbound traffic
+# You can modify this to only allow certain traffic
+-A OUTPUT -j ACCEPT
+
+
+# Allows HTTP and HTTPS connections from anywhere (the normal ports for websites)
+-A INPUT -p tcp --dport 80 -j ACCEPT
+-A INPUT -p tcp --dport 443 -j ACCEPT
+
+
+# Allows SSH connections
+#
+# THE -dport NUMBER IS THE SAME ONE YOU SET UP IN THE SSHD_CONFIG FILE
+#
+-A INPUT -p tcp -m state --state NEW --dport 22 -j ACCEPT
View
12 config/chef/NEWSCLOUD_README.md
@@ -0,0 +1,12 @@
+Newscloud Cookbooks
+===================
+
+This cookbooks directory is primarily a fork of the base opcode cookbook repo.
+Nearly everything in here is vanilaa, aside from a few exceptions:
+
+ * Deleted openldap because it was causing issues
+ * Forked the xml cookbook to libxml as it was not adequate for nokogiri.
+ * Custom redis2 cookbook for redis 2.x from source instead of ubuntu 1.x
+ * updated iptables recipe
+ * newscloud_deps cookbook for curl and ssl
+ * newscloud_database for creating a rails database
View
43 config/chef/cookbooks/activemq/README.md
@@ -0,0 +1,43 @@
+# DESCRIPTION:
+
+Installs activemq and sets up a service using the init script that comes with it.
+
+# REQUIREMENTS:
+
+Platform:
+
+Tested on Ubuntu 10.04 and CentOS 5.5. Should work on any Debian or Red Hat family distributions.
+
+Opscode cookbooks:
+
+* java
+
+# ATTRIBUTES:
+
+* `activemq[:mirror]` - download URL up to the activemq/apache-activemq directory.
+* `activemq[:version]` - version to install.
+* `activemq[:deploy]` - directory to deploy to (/opt by default)
+
+# USAGE:
+
+Simply add `recipe[activemq]` to a run list.
+
+This cookbook doesn't use any custom configuration for activemq.
+
+# LICENSE AND AUTHOR:
+
+Author:: Joshua Timberman (<joshua@opscode.com>)
+
+Copyright:: 2009-2011, 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.
View
24 config/chef/cookbooks/activemq/attributes/default.rb
@@ -0,0 +1,24 @@
+#
+# Cookbook Name:: activemq
+# Attributes:: default
+#
+# Copyright 2009-2011, 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.
+#
+
+default['activemq']['mirror'] = "http://apache.mirrors.tds.net"
+default['activemq']['version'] = "5.5.0"
+default['activemq']['home'] = "/opt"
+default['activemq']['wrapper']['max_memory'] = "512"
+default['activemq']['wrapper']['useDedicatedTaskRunner'] = "true"
View
14 config/chef/cookbooks/activemq/metadata.rb
@@ -0,0 +1,14 @@
+maintainer "Opscode, Inc."
+maintainer_email "cookbooks@opscode.com"
+license "Apache 2.0"
+description "Installs activemq and sets it up as service"
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
+version "1.0.0"
+
+%w{ubuntu debian redhat centos}.each do |os|
+ supports os
+end
+
+%w{java}.each do |cb|
+ depends cb
+end
View
72 config/chef/cookbooks/activemq/recipes/default.rb
@@ -0,0 +1,72 @@
+#
+# Cookbook Name:: activemq
+# Recipe:: default
+#
+# 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.
+#
+
+include_recipe "java"
+
+tmp = Chef::Config[:file_cache_path]
+version = node['activemq']['version']
+mirror = node['activemq']['mirror']
+activemq_home = "#{node['activemq']['home']}/apache-activemq-#{version}"
+
+unless File.exists?("#{activemq_home}/bin/activemq")
+ remote_file "#{tmp}/apache-activemq-#{version}-bin.tar.gz" do
+ source "#{mirror}/activemq/apache-activemq/#{version}/apache-activemq-#{version}-bin.tar.gz"
+ mode "0644"
+ end
+
+ execute "tar zxf #{tmp}/apache-activemq-#{version}-bin.tar.gz" do
+ cwd "/opt"
+ end
+end
+
+file "#{activemq_home}/bin/activemq" do
+ owner "root"
+ group "root"
+ mode "0755"
+end
+
+# TODO: make this more robust
+arch = (node['kernel']['machine'] == "x86_64") ? "x86-64" : "x86-32"
+
+link "/etc/init.d/activemq" do
+ to "#{activemq_home}/bin/linux-#{arch}/activemq"
+end
+
+service "activemq" do
+ supports :restart => true, :status => true
+ action [:enable, :start]
+end
+
+# symlink so the default wrapper.conf can find the native wrapper library
+link "#{activemq_home}/bin/linux" do
+ to "#{activemq_home}/bin/linux-#{arch}"
+end
+
+# symlink the wrapper's pidfile location into /var/run
+link "/var/run/activemq.pid" do
+ to "#{activemq_home}/bin/linux/ActiveMQ.pid"
+ not_if "test -f /var/run/activemq.pid"
+end
+
+template "#{activemq_home}/bin/linux/wrapper.conf" do
+ source "wrapper.conf.erb"
+ mode 0644
+ variables(:pidfile => "/var/run/activemq.pid")
+ notifies :restart, 'service[activemq]'
+end
View
139 config/chef/cookbooks/activemq/templates/default/wrapper.conf.erb
@@ -0,0 +1,139 @@
+# ------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+# ------------------------------------------------------------------------
+
+#********************************************************************
+# Wrapper Properties
+#********************************************************************
+
+#wrapper.debug=TRUE
+set.default.ACTIVEMQ_HOME=../..
+set.default.ACTIVEMQ_BASE=../..
+wrapper.working.dir=.
+
+# Java Application
+wrapper.java.command=java
+
+# Java Main class. This class must implement the WrapperListener interface
+# or guarantee that the WrapperManager class is initialized. Helper
+# classes are provided to do this for you. See the Integration section
+# of the documentation for details.
+wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
+
+# Java Classpath (include wrapper.jar) Add class path elements as
+# needed starting from 1
+wrapper.java.classpath.1=%ACTIVEMQ_HOME%/bin/wrapper.jar
+wrapper.java.classpath.2=%ACTIVEMQ_HOME%/bin/run.jar
+
+# Java Library Path (location of Wrapper.DLL or libwrapper.so)
+wrapper.java.library.path.1=%ACTIVEMQ_HOME%/bin/linux/
+
+# Java Additional Parameters
+# note that n is the parameter number starting from 1.
+wrapper.java.additional.1=-Dactivemq.home=%ACTIVEMQ_HOME%
+wrapper.java.additional.2=-Dactivemq.base=%ACTIVEMQ_BASE%
+wrapper.java.additional.3=-Djavax.net.ssl.keyStorePassword=password
+wrapper.java.additional.4=-Djavax.net.ssl.trustStorePassword=password
+wrapper.java.additional.5=-Djavax.net.ssl.keyStore=%ACTIVEMQ_BASE%/conf/broker.ks
+wrapper.java.additional.6=-Djavax.net.ssl.trustStore=%ACTIVEMQ_BASE%/conf/broker.ts
+wrapper.java.additional.7=-Dcom.sun.management.jmxremote
+wrapper.java.additional.8=-Dorg.apache.activemq.UseDedicatedTaskRunner=<%= @node[:activemq][:wrapper][:useDedicatedTaskRunner] %>
+wrapper.java.additional.9=-Djava.util.logging.config.file=logging.properties
+
+# Uncomment to enable jmx
+#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616
+#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.authenticate=false
+#wrapper.java.additional.n=-Dcom.sun.management.jmxremote.ssl=false
+
+# Uncomment to enable YourKit profiling
+#wrapper.java.additional.n=-Xrunyjpagent
+
+# Uncomment to enable remote debugging
+#wrapper.java.additional.n=-Xdebug -Xnoagent -Djava.compiler=NONE
+#wrapper.java.additional.n=-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
+
+# Initial Java Heap Size (in MB)
+#wrapper.java.initmemory=3
+
+# Maximum Java Heap Size (in MB)
+wrapper.java.maxmemory=<%= @node[:activemq][:wrapper][:max_memory] %>
+
+# Application parameters. Add parameters as needed starting from 1
+wrapper.app.parameter.1=org.apache.activemq.console.Main
+wrapper.app.parameter.2=start
+
+#********************************************************************
+# Wrapper Logging Properties
+#********************************************************************
+# Format of output for the console. (See docs for formats)
+wrapper.console.format=PM
+
+# Log Level for console output. (See docs for log levels)
+wrapper.console.loglevel=INFO
+
+# Log file to use for wrapper output logging.
+wrapper.logfile=%ACTIVEMQ_BASE%/data/wrapper.log
+
+# Format of output for the log file. (See docs for formats)
+wrapper.logfile.format=LPTM
+
+# Log Level for log file output. (See docs for log levels)
+wrapper.logfile.loglevel=INFO
+
+# Maximum size that the log file will be allowed to grow to before
+# the log is rolled. Size is specified in bytes. The default value
+# of 0, disables log rolling. May abbreviate with the 'k' (kb) or
+# 'm' (mb) suffix. For example: 10m = 10 megabytes.
+wrapper.logfile.maxsize=0
+
+# Maximum number of rolled log files which will be allowed before old
+# files are deleted. The default value of 0 implies no limit.
+wrapper.logfile.maxfiles=0
+
+# Log Level for sys/event log output. (See docs for log levels)
+wrapper.syslog.loglevel=NONE
+
+#********************************************************************
+# Wrapper Windows Properties
+#********************************************************************
+# Title to use when running as a console
+wrapper.console.title=ActiveMQ
+
+#********************************************************************
+# Wrapper Windows NT/2000/XP Service Properties
+#********************************************************************
+# WARNING - Do not modify any of these properties when an application
+# using this configuration file has been installed as a service.
+# Please uninstall the service before modifying this section. The
+# service can then be reinstalled.
+
+# Name of the service
+wrapper.ntservice.name=ActiveMQ
+
+# Display name of the service
+wrapper.ntservice.displayname=ActiveMQ
+
+# Description of the service
+wrapper.ntservice.description=ActiveMQ Broker
+
+# Service dependencies. Add dependencies as needed starting from 1
+wrapper.ntservice.dependency.1=
+
+# Mode in which the service is installed. AUTO_START or DEMAND_START
+wrapper.ntservice.starttype=AUTO_START
+
+# Allow the service to interact with the desktop.
+wrapper.ntservice.interactive=false
View
51 config/chef/cookbooks/ant/README.md
@@ -0,0 +1,51 @@
+Description
+===========
+
+Installs and configures Apache Ant & Ivy
+
+Requirements
+============
+
+Platform:
+
+* Debian, Ubuntu, CentOS, Red Hat, Fedora
+
+The following Opscode cookbooks are dependencies:
+
+* java
+* jpackage
+
+Attributes
+==========
+
+Usage
+=====
+
+Simply include the recipe where you want Apache Ant & Ivy installed.
+
+TODO
+====
+
+* plugin support
+* global config template - /etc/ant/ant.conf
+
+License and Author
+==================
+
+Author:: Seth Chisamore (<schisamo@opscode.com>)
+
+Copyright 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.
+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.
+
+
View
14 config/chef/cookbooks/ant/metadata.rb
@@ -0,0 +1,14 @@
+maintainer "Opscode, Inc."
+maintainer_email "cookbooks@opscode.com"
+license "Apache 2.0"
+description "Installs/Configures ant"
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
+version "0.10.1"
+%w{ java jpackage }.each do |cb|
+ depends cb
+end
+%w{ debian ubuntu centos redhat fedora }.each do |os|
+ supports os
+end
+
+recipe "ant::default", "Installs and configures Ant"
View
41 config/chef/cookbooks/ant/recipes/default.rb
@@ -0,0 +1,41 @@
+#
+# Cookbook Name:: ant
+# Recipe:: default
+#
+# Copyright 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.
+# 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.
+#
+
+include_recipe "java"
+
+case node.platform
+when "centos","redhat","fedora"
+ include_recipe "jpackage"
+end
+
+ant_pkgs = value_for_platform(
+ ["debian","ubuntu",] => {
+ "default" => ["ant","ant-contrib","ivy"]
+ },
+ ["centos","redhat","fedora" ] => {
+ "default" => ["ant","ant-contrib","ivy"]
+ },
+ "default" => ["ant","ant-contrib","ivy"]
+)
+
+ant_pkgs.each do |pkg|
+ package pkg do
+ action :install
+ end
+end
View
78 config/chef/cookbooks/apache2/README.rdoc
@@ -0,0 +1,78 @@
+= DESCRIPTION:
+
+Complete Debian/Ubuntu style Apache2 configuration.
+
+= REQUIREMENTS:
+
+Debian or Ubuntu preferred.
+
+Red Hat, CentOS, Fedora and ArchLinux can be used but will be converted to a Debian/Ubuntu style Apache as it's far easier to manage with Chef.
+
+= ATTRIBUTES:
+
+The file attributes/apache.rb contains the following attribute types:
+
+* platform specific locations and settings.
+* general settings
+* prefork attributes
+* worker attributes
+
+General settings and prefork/worker attributes are tunable.
+
+= USAGE:
+
+Include the apache2 recipe to install Apache2 and get 'sane' default settings. Configuration is modularized through Apache vhost sites a la Debian style configuration.
+
+For Red Hat, CentOS and Fedora you should first disable selinux as it's not supported (yet), then remove the stock httpd and all it's dependencies prior to attempting to use this recipe. Many packages in these distributions drop conflicting configs into conf.d, all of which haven't been accounted for yet. Starting from scratch will also make it far easier to debug.
+
+== Defines:
+
+* +apache_module+: sets up an Apache module.
+* +apache_conf+: sets up a config file for an apache module.
+* +apache_site+: sets up a vhost site. The conf file must be available.
+* +web_app+: copies the template for a web app and enables it as a site via +apache_site+.
+
+== Web Apps:
+
+Various applications that can be set up with Apache as the front end, such as PHP, Django, Rails and others can use the web_app define to set up the template and the Apache site. The define is kind of dumb, so the template needs have the application implementation settings, since we don't know what your app is or what is needed from Apache.
+
+We only prototype one parameter for the +web_app+ define, "template". This is used to specify the name of the template to use in the current cookbook. When you use +web_app+, you can set up any parameters you want to use in your template. They will get passed to the template through the params hash. For example, the sample +web_app.conf.erb+ template in this cookbook makes use of these.
+
+* +docroot+
+* +server_name+
+* +server_aliases+
+
+These are available as +params[:docroot]+, +params[:server_name]+, +params[:server_aliases]+ prefixed with an @ within the template.
+
+If 'cookbook' and 'template' are not specified, the current cookbook's +templates/default/web_app.conf.erb+ will be used. If this template is not suitable for your application, copy it to your cookbook and customize as needed.
+
+== God Monitor:
+
+There's a new recipe, +apache2::god_monitor+. You will need to make sure to include the 'god' recipe before using the +apache2::god_monitor+ recipe in your cookbook.
+
+== OpenID Auth
+
+Installs the +mod_auth_openid+ module from source. Specify an array of OpenIDs that are allowed to authenticate with the attribute +apache[:allowed_openids]+. Use the following in a vhost to protect with OpenID authentication:
+
+ AuthOpenIDEnabled On
+ AuthOpenIDDBLocation /var/cache/apache2/mod_auth_openid.db
+ AuthOpenIDUserProgram /usr/local/bin/mod_auth_openid.rb
+
+Change the DBLocation as appropriate for your platform. You'll need to change the file in the recipe to match. The UserProgram is optional if you don't want to limit access by certain OpenIDs.
+
+= LICENSE & AUTHOR:
+
+Author:: Joshua Timberman (<joshua@opscode.com>)
+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.
View
87 config/chef/cookbooks/apache2/attributes/default.rb
@@ -0,0 +1,87 @@
+#
+# Cookbook Name:: apache2
+# Attributes:: apache
+#
+# Copyright 2008-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.
+#
+
+# Where the various parts of apache are
+case platform
+when "redhat","centos","fedora","suse"
+ set[:apache][:dir] = "/etc/httpd"
+ set[:apache][:log_dir] = "/var/log/httpd"
+ set[:apache][:user] = "apache"
+ set[:apache][:binary] = "/usr/sbin/httpd"
+ set[:apache][:icondir] = "/var/www/icons/"
+ set[:apache][:cache_dir] = "/var/cache/httpd"
+when "debian","ubuntu"
+ set[:apache][:dir] = "/etc/apache2"
+ set[:apache][:log_dir] = "/var/log/apache2"
+ set[:apache][:user] = "www-data"
+ set[:apache][:binary] = "/usr/sbin/apache2"
+ set[:apache][:icondir] = "/usr/share/apache2/icons"
+ set[:apache][:cache_dir] = "/var/cache/apache2"
+when "arch"
+ set[:apache][:dir] = "/etc/httpd"
+ set[:apache][:log_dir] = "/var/log/httpd"
+ set[:apache][:user] = "http"
+ set[:apache][:binary] = "/usr/sbin/httpd"
+ set[:apache][:icondir] = "/usr/share/httpd/icons"
+ set[:apache][:cache_dir] = "/var/cache/httpd"
+else
+ set[:apache][:dir] = "/etc/apache2"
+ set[:apache][:log_dir] = "/var/log/apache2"
+ set[:apache][:user] = "www-data"
+ set[:apache][:binary] = "/usr/sbin/apache2"
+ set[:apache][:icondir] = "/usr/share/apache2/icons"
+ set[:apache][:cache_dir] = "/var/cache/apache2"
+end
+
+###
+# These settings need the unless, since we want them to be tunable,
+# and we don't want to override the tunings.
+###
+
+# General settings
+default[:apache][:listen_ports] = [ "80","443" ]
+default[:apache][:contact] = "ops@example.com"
+default[:apache][:timeout] = 300
+default[:apache][:keepalive] = "On"
+default[:apache][:keepaliverequests] = 100
+default[:apache][:keepalivetimeout] = 5
+
+# Security
+default[:apache][:servertokens] = "Prod"
+default[:apache][:serversignature] = "On"
+default[:apache][:traceenable] = "On"
+
+# mod_auth_openids
+default[:apache][:allowed_openids] = Array.new
+
+# Prefork Attributes
+default[:apache][:prefork][:startservers] = 16
+default[:apache][:prefork][:minspareservers] = 16
+default[:apache][:prefork][:maxspareservers] = 32
+default[:apache][:prefork][:serverlimit] = 400
+default[:apache][:prefork][:maxclients] = 400
+default[:apache][:prefork][:maxrequestsperchild] = 10000
+
+# Worker Attributes
+default[:apache][:worker][:startservers] = 4
+default[:apache][:worker][:maxclients] = 1024
+default[:apache][:worker][:minsparethreads] = 64
+default[:apache][:worker][:maxsparethreads] = 192
+default[:apache][:worker][:threadsperchild] = 64
+default[:apache][:worker][:maxrequestsperchild] = 0
View
26 config/chef/cookbooks/apache2/definitions/apache_conf.rb
@@ -0,0 +1,26 @@
+#
+# Cookbook Name:: apache2
+# Definition:: apache_conf
+#
+# Copyright 2008-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 :apache_conf do
+ template "#{node[:apache][:dir]}/mods-available/#{params[:name]}.conf" do
+ source "mods/#{params[:name]}.conf.erb"
+ notifies :restart, resources(:service => "apache2")
+ mode 0644
+ end
+end
View
43 config/chef/cookbooks/apache2/definitions/apache_module.rb
@@ -0,0 +1,43 @@
+#
+# Cookbook Name:: apache2
+# Definition:: apache_module
+#
+# Copyright 2008-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 :apache_module, :enable => true, :conf => false do
+ include_recipe "apache2"
+
+ if params[:conf]
+ apache_conf params[:name]
+ end
+
+ if params[:enable]
+ execute "a2enmod #{params[:name]}" do
+ command "/usr/sbin/a2enmod #{params[:name]}"
+ notifies :restart, resources(:service => "apache2")
+ not_if do (File.symlink?("#{node[:apache][:dir]}/mods-enabled/#{params[:name]}.load") and
+ ((File.exists?("#{node[:apache][:dir]}/mods-available/#{params[:name]}.conf"))?
+ (File.symlink?("#{node[:apache][:dir]}/mods-enabled/#{params[:name]}.conf")):(true)))
+ end
+ end
+ else
+ execute "a2dismod #{params[:name]}" do
+ command "/usr/sbin/a2dismod #{params[:name]}"
+ notifies :restart, resources(:service => "apache2")
+ only_if do ::File.symlink?("#{node[:apache][:dir]}/mods-enabled/#{params[:name]}.load") end
+ end
+ end
+end
View
40 config/chef/cookbooks/apache2/definitions/apache_site.rb
@@ -0,0 +1,40 @@
+#
+# Cookbook Name:: apache2
+# Definition:: apache_site
+#
+# Copyright 2008-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 :apache_site, :enable => true do
+ include_recipe "apache2"
+
+ if params[:enable]
+ execute "a2ensite #{params[:name]}" do
+ command "/usr/sbin/a2ensite #{params[:name]}"
+ notifies :restart, resources(:service => "apache2")
+ not_if do
+ ::File.symlink?("#{node[:apache][:dir]}/sites-enabled/#{params[:name]}") or
+ ::File.symlink?("#{node[:apache][:dir]}/sites-enabled/000-#{params[:name]}")
+ end
+ only_if do ::File.exists?("#{node[:apache][:dir]}/sites-available/#{params[:name]}") end
+ end
+ else
+ execute "a2dissite #{params[:name]}" do
+ command "/usr/sbin/a2dissite #{params[:name]}"
+ notifies :restart, resources(:service => "apache2")
+ only_if do ::File.symlink?("#{node[:apache][:dir]}/sites-enabled/#{params[:name]}") end
+ end
+ end
+end
View
49 config/chef/cookbooks/apache2/definitions/web_app.rb
@@ -0,0 +1,49 @@
+#
+# Cookbook Name:: apache2
+# Definition:: web_app
+#
+# Copyright 2008-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 :web_app, :template => "web_app.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 "#{node[:apache][:dir]}/sites-available/#{application_name}.conf" do
+ source params[:template]
+ owner "root"
+ group "root"
+ mode 0644
+ if params[:cookbook]
+ cookbook params[:cookbook]
+ end
+ variables(
+ :application_name => application_name,
+ :params => params
+ )
+ if ::File.exists?("#{node[:apache][:dir]}/sites-enabled/#{application_name}.conf")
+ notifies :reload, resources(:service => "apache2"), :delayed
+ end
+ end
+
+ apache_site "#{params[:name]}.conf" do
+ enable enable_setting
+ end
+end
View
41 config/chef/cookbooks/apache2/files/default/apache2_module_conf_generate.pl
@@ -0,0 +1,41 @@
+#!/usr/bin/perl
+
+=begin
+
+Generates Ubuntu style module.load files.
+
+./apache2_module_conf_generate.pl /usr/lib64/httpd/modules /etc/httpd/mods-available
+
+ARGV[0] is the apache modules directory, ARGV[1] is where you want 'em.
+
+=cut
+
+use File::Find;
+
+use strict;
+use warnings;
+
+die "Must have '/path/to/modules' and '/path/to/modules.load'"
+ unless $ARGV[0] && $ARGV[1];
+
+find(
+ {
+ wanted => sub {
+ return 1 if $File::Find::name !~ /\.so$/;
+ my $modfile = $_;
+ $modfile =~ /(lib|mod_)(.+)\.so$/;
+ my $modname = $2;
+ my $filename = "$ARGV[1]/$modname.load";
+ unless ( -f $filename ) {
+ open( FILE, ">", $filename ) or die "Cannot open $filename";
+ print FILE "LoadModule " . $modname . "_module $File::Find::name\n";
+ close(FILE);
+ }
+ },
+ follow => 1,
+ },
+ $ARGV[0]
+);
+
+exit 0;
+
View
197 config/chef/cookbooks/apache2/metadata.rb
@@ -0,0 +1,197 @@
+maintainer "Opscode, Inc."
+maintainer_email "cookbooks@opscode.com"
+license "Apache 2.0"
+description "Installs and configures all aspects of apache2 using Debian style symlinks with helper definitions"
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
+version "0.99.4"
+recipe "apache2", "Main Apache configuration"
+recipe "apache2::mod_alias", "Apache module 'alias' with config file"
+recipe "apache2::mod_auth_basic", "Apache module 'auth_basic'"
+recipe "apache2::mod_auth_digest", "Apache module 'auth_digest'"
+recipe "apache2::mod_auth_openid", "Apache module 'authopenid'"
+recipe "apache2::mod_authn_file", "Apache module 'authn_file'"
+recipe "apache2::mod_authnz_ldap", "Apache module 'authnz_ldap'"
+recipe "apache2::mod_authz_default", "Apache module 'authz_default'"
+recipe "apache2::mod_authz_groupfile", "Apache module 'authz_groupfile'"
+recipe "apache2::mod_authz_host", "Apache module 'authz_host'"
+recipe "apache2::mod_authz_user", "Apache module 'authz_user'"
+recipe "apache2::mod_autoindex", "Apache module 'autoindex' with config file"
+recipe "apache2::mod_cgi", "Apache module 'cgi'"
+recipe "apache2::mod_dav", "Apache module 'dav'"
+recipe "apache2::mod_dav_svn", "Apache module 'dav_svn'"
+recipe "apache2::mod_deflate", "Apache module 'deflate' with config file"
+recipe "apache2::mod_dir", "Apache module 'dir' with config file"
+recipe "apache2::mod_env", "Apache module 'env'"
+recipe "apache2::mod_expires", "Apache module 'expires'"
+recipe "apache2::mod_fcgid", "Apache module 'fcgid', package on ubuntu/debian, rhel/centos, compile source on suse; with config file"
+recipe "apache2::mod_headers", "Apache module 'headers'"
+recipe "apache2::mod_ldap", "Apache module 'ldap'"
+recipe "apache2::mod_log_config", "Apache module 'log_config'"
+recipe "apache2::mod_mime", "Apache module 'mime' with config file"
+recipe "apache2::mod_negotiation", "Apache module 'negotiation' with config file"
+recipe "apache2::mod_php5", "Apache module 'php5'"
+recipe "apache2::mod_proxy", "Apache module 'proxy' with config file"
+recipe "apache2::mod_proxy_ajp", "Apache module 'proxy_ajp'"
+recipe "apache2::mod_proxy_balancer", "Apache module 'proxy_balancer'"
+recipe "apache2::mod_proxy_connect", "Apache module 'proxy_connect'"
+recipe "apache2::mod_proxy_http", "Apache module 'proxy_http'"
+recipe "apache2::mod_python", "Apache module 'python'"
+recipe "apache2::mod_rewrite", "Apache module 'rewrite'"
+recipe "apache2::mod_setenvif", "Apache module 'setenvif' with config file"
+recipe "apache2::mod_ssl", "Apache module 'ssl' with config file, adds port 443 to listen_ports"
+recipe "apache2::mod_status", "Apache module 'status' with config file"
+
+%w{redhat centos debian ubuntu arch}.each do |os|
+ supports os
+end
+
+attribute "apache",
+ :display_name => "Apache Hash",
+ :description => "Hash of Apache attributes",
+ :type => "hash"
+
+attribute "apache/dir",
+ :display_name => "Apache Directory",
+ :description => "Location for Apache configuration",
+ :default => "/etc/apache2"
+
+attribute "apache/log_dir",
+ :display_name => "Apache Log Directory",
+ :description => "Location for Apache logs",
+ :default => "/etc/apache2"
+
+attribute "apache/user",
+ :display_name => "Apache User",
+ :description => "User Apache runs as",
+ :default => "www-data"
+
+attribute "apache/binary",
+ :display_name => "Apache Binary",
+ :description => "Apache server daemon program",
+ :default => "/usr/sbin/apache2"
+
+attribute "apache/icondir",
+ :display_name => "Apache Icondir",
+ :description => "Directory location for icons",
+ :default => "/usr/share/apache2/icons"
+
+attribute "apache/listen_ports",
+ :display_name => "Apache Listen Ports",
+ :description => "Ports that Apache should listen on",
+ :type => "array",
+ :default => [ "80", "443" ]
+
+attribute "apache/contact",
+ :display_name => "Apache Contact",
+ :description => "Email address of webmaster",
+ :default => "ops@example.com"
+
+attribute "apache/timeout",
+ :display_name => "Apache Timeout",
+ :description => "Connection timeout value",
+ :default => "300"
+
+attribute "apache/keepalive",
+ :display_name => "Apache Keepalive",
+ :description => "HTTP persistent connections",
+ :default => "On"
+
+attribute "apache/keepaliverequests",
+ :display_name => "Apache Keepalive Requests",
+ :description => "Number of requests allowed on a persistent connection",
+ :default => "100"
+
+attribute "apache/keepalivetimeout",
+ :display_name => "Apache Keepalive Timeout",
+ :description => "Time to wait for requests on persistent connection",
+ :default => "5"
+
+attribute "apache/servertokens",
+ :display_name => "Apache Server Tokens",
+ :description => "Server response header",
+ :default => "Prod"
+
+attribute "apache/serversignature",
+ :display_name => "Apache Server Signature",
+ :description => "Configure footer on server-generated documents",
+ :default => "On"
+
+attribute "apache/traceenable",
+ :display_name => "Apache Trace Enable",
+ :description => "Determine behavior of TRACE requests",
+ :default => "On"
+
+attribute "apache/allowed_openids",
+ :display_name => "Apache Allowed OpenIDs",
+ :description => "Array of OpenIDs allowed to authenticate",
+ :default => ""
+
+attribute "apache/prefork",
+ :display_name => "Apache Prefork",
+ :description => "Hash of Apache prefork tuning attributes.",
+ :type => "hash"
+
+attribute "apache/prefork/startservers",
+ :display_name => "Apache Prefork MPM StartServers",
+ :description => "Number of MPM servers to start",
+ :default => "16"
+
+attribute "apache/prefork/minspareservers",
+ :display_name => "Apache Prefork MPM MinSpareServers",
+ :description => "Minimum number of spare server processes",
+ :default => "16"
+
+attribute "apache/prefork/maxspareservers",
+ :display_name => "Apache Prefork MPM MaxSpareServers",
+ :description => "Maximum number of spare server processes",
+ :default => "32"
+
+attribute "apache/prefork/serverlimit",
+ :display_name => "Apache Prefork MPM ServerLimit",
+ :description => "Upper limit on configurable server processes",
+ :default => "400"
+
+attribute "apache/prefork/maxclients",
+ :display_name => "Apache Prefork MPM MaxClients",
+ :description => "Maximum number of simultaneous connections",
+ :default => "400"
+
+attribute "apache/prefork/maxrequestsperchild",
+ :display_name => "Apache Prefork MPM MaxRequestsPerChild",
+ :description => "Maximum number of request a child process will handle",
+ :default => "10000"
+
+attribute "apache/worker",
+ :display_name => "Apache Worker",
+ :description => "Hash of Apache prefork tuning attributes.",
+ :type => "hash"
+
+attribute "apache/worker/startservers",
+ :display_name => "Apache Worker MPM StartServers",
+ :description => "Initial number of server processes to start",
+ :default => "4"
+
+attribute "apache/worker/maxclients",
+ :display_name => "Apache Worker MPM MaxClients",
+ :description => "Maximum number of simultaneous connections",
+ :default => "1024"
+
+attribute "apache/worker/minsparethreads",
+ :display_name => "Apache Worker MPM MinSpareThreads",
+ :description => "Minimum number of spare worker threads",
+ :default => "64"
+
+attribute "apache/worker/maxsparethreads",
+ :display_name => "Apache Worker MPM MaxSpareThreads",
+ :description => "Maximum number of spare worker threads",
+ :default => "192"
+
+attribute "apache/worker/threadsperchild",
+ :display_name => "Apache Worker MPM ThreadsPerChild",
+ :description => "Constant number of worker threads in each server process",
+ :default => "64"
+
+attribute "apache/worker/maxrequestsperchild",
+ :display_name => "Apache Worker MPM MaxRequestsPerChild",
+ :description => "Maximum number of request a child process will handle",
+ :default => "0"
View
209 config/chef/cookbooks/apache2/recipes/default.rb
@@ -0,0 +1,209 @@
+#
+# Cookbook Name:: apache2
+# Recipe:: default
+#
+# Copyright 2008-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.
+#
+
+package "apache2" do
+ case node[:platform]
+ when "centos","redhat","fedora","suse"
+ package_name "httpd"
+ when "debian","ubuntu"
+ package_name "apache2"
+ when "arch"
+ package_name "apache"
+ end
+ action :install
+end
+
+service "apache2" do
+ case node[:platform]
+ when "centos","redhat","fedora","suse"
+ service_name "httpd"
+ # If restarted/reloaded too quickly httpd has a habit of failing.
+ # This may happen with multiple recipes notifying apache to restart - like
+ # during the initial bootstrap.
+ restart_command "/sbin/service httpd restart && sleep 1"
+ reload_command "/sbin/service httpd reload && sleep 1"
+ when "debian","ubuntu"
+ service_name "apache2"
+ restart_command "/usr/sbin/invoke-rc.d apache2 restart && sleep 1"
+ reload_command "/usr/sbin/invoke-rc.d apache2 reload && sleep 1"
+ when "arch"
+ service_name "httpd"
+ end
+ supports value_for_platform(
+ "debian" => { "4.0" => [ :restart, :reload ], "default" => [ :restart, :reload, :status ] },
+ "ubuntu" => { "default" => [ :restart, :reload, :status ] },
+ "centos" => { "default" => [ :restart, :reload, :status ] },
+ "redhat" => { "default" => [ :restart, :reload, :status ] },
+ "fedora" => { "default" => [ :restart, :reload, :status ] },
+ "arch" => { "default" => [ :restart, :reload, :status ] },
+ "default" => { "default" => [:restart, :reload ] }
+ )
+ action :enable
+end
+
+if platform?("centos", "redhat", "fedora", "suse", "arch")
+ directory node[:apache][:log_dir] do
+ mode 0755
+ action :create
+ end
+
+ cookbook_file "/usr/local/bin/apache2_module_conf_generate.pl" do
+ source "apache2_module_conf_generate.pl"
+ mode 0755
+ owner "root"
+ group "root"
+ end
+
+ %w{sites-available sites-enabled mods-available mods-enabled}.each do |dir|
+ directory "#{node[:apache][:dir]}/#{dir}" do
+ mode 0755
+ owner "root"
+ group "root"
+ action :create
+ end
+ end
+
+ execute "generate-module-list" do
+ if node[:kernel][:machine] == "x86_64"
+ libdir = value_for_platform("arch" => { "default" => "lib" }, "default" => "lib64")
+ else
+ libdir = "lib"
+ end
+ command "/usr/local/bin/apache2_module_conf_generate.pl /usr/#{libdir}/httpd/modules /etc/httpd/mods-available"
+ action :run
+ end
+
+ %w{a2ensite a2dissite a2enmod a2dismod}.each do |modscript|
+ template "/usr/sbin/#{modscript}" do
+ source "#{modscript}.erb"
+ mode 0755
+ owner "root"
+ group "root"
+ end
+ end
+
+ # installed by default on centos/rhel, remove in favour of mods-enabled
+ file "#{node[:apache][:dir]}/conf.d/proxy_ajp.conf" do
+ action :delete
+ backup false
+ end
+ file "#{node[:apache][:dir]}/conf.d/README" do
+ action :delete
+ backup false
+ end
+
+ # welcome page moved to the default-site.rb temlate
+ file "#{node[:apache][:dir]}/conf.d/welcome.conf" do
+ action :delete
+ backup false
+ end
+end
+
+directory "#{node[:apache][:dir]}/ssl" do
+ action :create
+ mode 0755
+ owner "root"
+ group "root"
+end
+
+directory "#{node[:apache][:dir]}/conf.d" do
+ action :create
+ mode 0755
+ owner "root"
+ group "root"
+end
+
+directory node[:apache][:cache_dir] do
+ action :create
+ mode 0755
+ owner node[:apache][:user]
+end
+
+template "apache2.conf" do
+ case node[:platform]
+ when "centos","redhat","fedora","arch"
+ path "#{node[:apache][:dir]}/conf/httpd.conf"
+ when "debian","ubuntu"
+ path "#{node[:apache][:dir]}/apache2.conf"
+ end
+ source "apache2.conf.erb"
+ owner "root"
+ group "root"
+ mode 0644
+ notifies :restart, resources(:service => "apache2")
+end
+
+template "security" do
+ path "#{node[:apache][:dir]}/conf.d/security"
+ source "security.erb"
+ owner "root"
+ group "root"
+ mode 0644
+ backup false
+ notifies :restart, resources(:service => "apache2")
+end
+
+template "charset" do
+ path "#{node[:apache][:dir]}/conf.d/charset"
+ source "charset.erb"
+ owner "root"
+ group "root"
+ mode 0644
+ backup false
+ notifies :restart, resources(:service => "apache2")
+end
+
+template "#{node[:apache][:dir]}/ports.conf" do
+ source "ports.conf.erb"
+ group "root"
+ owner "root"
+ variables :apache_listen_ports => node[:apache][:listen_ports]
+ mode 0644
+ notifies :restart, resources(:service => "apache2")
+end
+
+template "#{node[:apache][:dir]}/sites-available/default" do
+ source "default-site.erb"
+ owner "root"
+ group "root"
+ mode 0644
+ notifies :restart, resources(:service => "apache2")
+end
+
+include_recipe "apache2::mod_status"
+include_recipe "apache2::mod_alias"
+include_recipe "apache2::mod_auth_basic"
+include_recipe "apache2::mod_authn_file"
+include_recipe "apache2::mod_authz_default"
+include_recipe "apache2::mod_authz_groupfile"
+include_recipe "apache2::mod_authz_host"
+include_recipe "apache2::mod_authz_user"
+include_recipe "apache2::mod_autoindex"
+include_recipe "apache2::mod_dir"
+include_recipe "apache2::mod_env"
+include_recipe "apache2::mod_mime"
+include_recipe "apache2::mod_negotiation"
+include_recipe "apache2::mod_setenvif"
+include_recipe "apache2::mod_log_config" if platform?("centos", "redhat", "fedora", "suse", "arch")
+
+apache_site "default" if platform?("centos", "redhat", "fedora")
+
+service "apache2" do
+ action :start
+end
View
33 config/chef/cookbooks/apache2/recipes/god_monitor.rb
@@ -0,0 +1,33 @@
+#
+# Cookbook Name:: apache2
+# Recipe:: god_monitor
+#
+# Copyright 2008-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.
+#
+
+apache_service = service "apache2" do
+ action :nothing
+end
+
+start_command = apache_service.start_command
+stop_command = apache_service.stop_command
+restart_command = apache_service.restart_command
+
+god_monitor "apache2" do
+ config "apache2.god.erb"
+ start (start_command)?start_command : "/etc/init.d/#{apache_service.service_name} start"
+ restart (restart_command)?restart_command : "/etc/init.d/#{apache_service.service_name} restart"
+ stop (stop_command)?stop_command : "/etc/init.d/#{apache_service.service_name} stop"
+end
View
22 config/chef/cookbooks/apache2/recipes/mod_alias.rb
@@ -0,0 +1,22 @@
+#
+# Cookbook Name:: apache2
+# Recipe:: alias
+#
+# Copyright 2008-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.
+#
+
+apache_module "alias" do
+ conf true
+end
View
20 config/chef/cookbooks/apache2/recipes/mod_auth_basic.rb
@@ -0,0 +1,20 @@
+#
+# Cookbook Name:: apache2
+# Recipe:: auth_basic
+#
+# Copyright 2008-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.
+#
+
+apache_module "auth_basic"
View
20 config/chef/cookbooks/apache2/recipes/mod_auth_digest.rb
@@ -0,0 +1,20 @@
+#
+# Cookbook Name:: apache2
+# Recipe:: auth_digest
+#
+# Copyright 2008-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.
+#
+
+apache_module "auth_digest"
View
83 config/chef/cookbooks/apache2/recipes/mod_auth_openid.rb
@@ -0,0 +1,83 @@
+#
+# Cookbook Name:: apache2
+# Recipe:: mod_auth_openid
+#
+# Copyright 2008-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.
+#
+
+openid_dev_pkgs = value_for_platform(
+ "ubuntu" => { "default" => %w{ apache2-prefork-dev libopkele-dev libopkele3 } },
+ "debian" => { "default" => %w{ apache2-prefork-dev libopkele-dev libopkele3 } },
+ "arch" => { "default" => ["libopkele"] }
+)
+
+case node[:platform]
+when "arch"
+ include_recipe "pacman"
+ package "tidyhtml"
+end
+
+openid_dev_pkgs.each do |pkg|
+ case node[:platform]
+ when "arch"
+ pacman_aur pkg do
+ action [:build, :install]
+ end
+ else
+ package pkg
+ end
+end
+
+remote_file "#{Chef::Config[:file_cache_path]}/mod_auth_openid-0.4.tar.gz" do
+ source "http://butterfat.net/releases/mod_auth_openid/mod_auth_openid-0.4.tar.gz"
+ mode 0644
+end
+
+bash "install mod_auth_openid" do
+ cwd Chef::Config[:file_cache_path]
+ code <<-EOH
+ tar zxvf mod_auth_openid-0.4.tar.gz
+ cd mod_auth_openid-0.4 && ./configure
+ perl -pi -e "s/-i -a -n 'authopenid'/-i -n 'authopenid'/g" Makefile
+ make && make install
+ EOH
+ case node[:platform]
+ when "arch"
+ not_if { ::File.exists?("/usr/lib/httpd/modules/mod_auth_openid.so") }
+ else
+ not_if { ::File.exists?("/usr/lib/apache2/modules/mod_auth_openid.so") }
+ end
+end
+
+file "#{node[:apache][:cache_dir]}/mod_auth_openid.db" do
+ owner node[:apache][:user]
+ mode 0640
+end
+
+template "#{node[:apache][:dir]}/mods-available/authopenid.load" do
+ source "mods/authopenid.load.erb"
+ owner "root"
+ group "root"
+ mode 0644
+end
+
+apache_module "authopenid"
+
+template "/usr/local/bin/mod_auth_openid.rb" do
+ source "mod_auth_openid.rb.erb"
+ owner node[:apache][:user]
+ group node[:apache][:user]
+ mode 0750
+end
View
20 config/chef/cookbooks/apache2/recipes/mod_authn_file.rb
@@ -0,0 +1,20 @@
+#
+# Cookbook Name:: apache2
+# Recipe:: authn_file
+#
+# Copyright 2008-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.
+#
+
+apache_module "authn_file"
View
20 config/chef/cookbooks/apache2/recipes/mod_authnz_ldap.rb
@@ -0,0 +1,20 @@
+#
+# Cookbook Name:: apache2
+# Recipe:: authnz_ldap
+#
+# Copyright 2008-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.
+#
+
+apache_module "authnz_ldap"
View
20 config/chef/cookbooks/apache2/recipes/mod_authz_default.rb
@@ -0,0 +1,20 @@
+#
+# Cookbook Name:: apache2
+# Recipe:: authz_default
+#
+# Copyright 2008-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.
+#
+
+apache_module "authz_default"
View
20 config/chef/cookbooks/apache2/recipes/mod_authz_groupfile.rb
@@ -0,0 +1,20 @@
+#
+# Cookbook Name:: apache2
+# Recipe:: authz_groupfile
+#
+# Copyright 2008-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.
+#
+
+apache_module "authz_groupfile"
View
20 config/chef/cookbooks/apache2/recipes/mod_authz_host.rb
@@ -0,0 +1,20 @@
+#
+# Cookbook Name:: apache2
+# Recipe:: authz_host
+#
+# Copyright 2008-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.
+#
+
+apache_module "authz_host"
View
20 config/chef/cookbooks/apache2/recipes/mod_authz_user.rb
@@ -0,0 +1,20 @@
+#
+# Cookbook Name:: apache2
+# Recipe:: authz_user
+#
+# Copyright 2008-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.
+#
+
+apache_module "authz_user"
View
22 config/chef/cookbooks/apache2/recipes/mod_autoindex.rb
@@ -0,0 +1,22 @@
+#
+# Cookbook Name:: apache2
+# Recipe:: autoindex
+#
+# Copyright 2008-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.
+#
+
+apache_module "autoindex" do
+ conf true
+end
View
20 config/chef/cookbooks/apache2/recipes/mod_cgi.rb
@@ -0,0 +1,20 @@
+#
+# Cookbook Name:: apache2
+# Recipe:: cgi
+#
+# Copyright 2008-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.
+#
+
+apache_module "cgi"
View
20 config/chef/cookbooks/apache2/recipes/mod_dav.rb
@@ -0,0 +1,20 @@
+#
+# Cookbook Name:: apache2
+# Recipe:: dav
+#
+# Copyright 2008-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.
+#
+
+apache_module "dav"
View
22 config/chef/cookbooks/apache2/recipes/mod_dav_svn.rb
@@ -0,0 +1,22 @@
+#
+# Cookbook Name:: apache2
+# Recipe:: dav_svn
+#
+# Copyright 2008-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.
+#
+
+package "libapache2-svn"
+
+apache_module "dav_svn"
View
22 config/chef/cookbooks/apache2/recipes/mod_deflate.rb
@@ -0,0 +1,22 @@
+#
+# Cookbook Name:: apache2
+# Recipe:: deflate
+#
+# Copyright 2008-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.
+#
+
+apache_module "deflate" do
+ conf true
+end
View
22 config/chef/cookbooks/apache2/recipes/mod_dir.rb
@@ -0,0 +1,22 @@
+#
+# Cookbook Name:: apache2
+# Recipe:: dir
+#
+# Copyright 2008-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.
+#
+
+apache_module "dir" do
+ conf true
+end
View
20 config/chef/cookbooks/apache2/recipes/mod_env.rb
@@ -0,0 +1,20 @@
+#
+# Cookbook Name:: apache2
+# Recipe:: env
+#
+# Copyright 2008-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.
+#
+
+apache_module "env"
View
20 config/chef/cookbooks/apache2/recipes/mod_expires.rb
@@ -0,0 +1,20 @@
+#
+# Cookbook Name:: apache2
+# Recipe:: expires
+#
+# Copyright 2008-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.
+#
+
+apache_module "expires"
View
46 config/chef/cookbooks/apache2/recipes/mod_fcgid.rb
@@ -0,0 +1,46 @@
+#
+# Cookbook Name:: apache2
+# Recipe:: fcgid
+#
+# Copyright 2008-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.
+#
+
+if platform?("debian", "ubuntu")
+ package "libapache2-mod-fcgid"
+elsif platform?("centos", "redhat", "fedora", "arch")
+ package "mod_fcgid" do
+ notifies :run, resources(:execute => "generate-module-list"), :immediately
+ end
+
+ file "#{node[:apache][:dir]}/conf.d/fcgid.conf" do
+ action :delete
+ backup false
+ end
+elsif platform?("suse")
+ apache_lib_path = node[:architecture] == "i386" ? "/usr/lib/httpd" : "/usr/lib64/httpd"
+ package "httpd-devel"
+ bash "install-fcgid" do
+ code <<-EOH
+(cd #{Chef::Config[:file_cache_path]}; wget http://superb-east.dl.sourceforge.net/sourceforge/mod-fcgid/mod_fcgid.2.2.tgz)
+(cd #{Chef::Config[:file_cache_path]}; tar zxvf mod_fcgid.2.2.tgz)
+(cd #{Chef::Config[:file_cache_path]}; perl -pi -e 's!/usr/local/apache2!#{apache_lib_path}!g' ./mod_fcgid.2.2/Makefile)
+(cd #{Chef::Config[:file_cache_path]}/mod_fcgid.2.2; make install)
+EOH
+ end
+end
+
+apache_module "fcgid" do
+ conf true
+end
View
20 config/chef/cookbooks/apache2/recipes/mod_headers.rb
@@ -0,0 +1,20 @@
+#
+# Cookbook Name:: apache2
+# Recipe:: headers
+#
+# Copyright 2008-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.
+#
+
+apache_module "headers"
View
20 config/chef/cookbooks/apache2/recipes/mod_ldap.rb
@@ -0,0 +1,20 @@
+#
+# Cookbook Name:: apache2
+# Recipe:: ldap
+#
+# Copyright 2008-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.