Browse files

First commit

  • Loading branch information...
0 parents commit 35df416a00c272c86191a371431dfefdf9720aba @revans committed Feb 11, 2011
Showing with 11,405 additions and 0 deletions.
  1. +2 −0 .gitignore
  2. +201 −0 LICENSE
  3. +15 −0 NOTICE
  4. +46 −0 Rakefile
  5. +39 −0 activemq/README.rdoc
  6. +21 −0 activemq/attributes/activemq.rb
  7. +51 −0 activemq/metadata.json
  8. +14 −0 activemq/metadata.rb
  9. +42 −0 activemq/recipes/default.rb
  10. +2 −0 activemq/templates/default/sv-activemq-log-run.erb
  11. +3 −0 activemq/templates/default/sv-activemq-run.erb
  12. +78 −0 apache2/README.rdoc
  13. +77 −0 apache2/attributes/apache.rb
  14. +25 −0 apache2/definitions/apache_conf.rb
  15. +43 −0 apache2/definitions/apache_module.rb
  16. +40 −0 apache2/definitions/apache_site.rb
  17. +49 −0 apache2/definitions/web_app.rb
  18. +41 −0 apache2/files/default/apache2_module_conf_generate.pl
  19. +523 −0 apache2/metadata.json
  20. +197 −0 apache2/metadata.rb
  21. +191 −0 apache2/recipes/default.rb
  22. +33 −0 apache2/recipes/god_monitor.rb
  23. +22 −0 apache2/recipes/mod_alias.rb
  24. +20 −0 apache2/recipes/mod_auth_basic.rb
  25. +20 −0 apache2/recipes/mod_auth_digest.rb
  26. +59 −0 apache2/recipes/mod_auth_openid.rb
  27. +20 −0 apache2/recipes/mod_authn_file.rb
  28. +20 −0 apache2/recipes/mod_authnz_ldap.rb
  29. +20 −0 apache2/recipes/mod_authz_default.rb
  30. +20 −0 apache2/recipes/mod_authz_groupfile.rb
  31. +20 −0 apache2/recipes/mod_authz_host.rb
  32. +20 −0 apache2/recipes/mod_authz_user.rb
  33. +22 −0 apache2/recipes/mod_autoindex.rb
  34. +20 −0 apache2/recipes/mod_cgi.rb
  35. +20 −0 apache2/recipes/mod_dav.rb
  36. +22 −0 apache2/recipes/mod_dav_svn.rb
  37. +22 −0 apache2/recipes/mod_deflate.rb
  38. +22 −0 apache2/recipes/mod_dir.rb
  39. +20 −0 apache2/recipes/mod_env.rb
  40. +20 −0 apache2/recipes/mod_expires.rb
  41. +46 −0 apache2/recipes/mod_fcgid.rb
  42. +20 −0 apache2/recipes/mod_headers.rb
  43. +20 −0 apache2/recipes/mod_ldap.rb
  44. +24 −0 apache2/recipes/mod_log_config.rb
  45. +22 −0 apache2/recipes/mod_mime.rb
  46. +22 −0 apache2/recipes/mod_negotiation.rb
  47. +32 −0 apache2/recipes/mod_php5.rb
  48. +22 −0 apache2/recipes/mod_proxy.rb
  49. +20 −0 apache2/recipes/mod_proxy_ajp.rb
  50. +20 −0 apache2/recipes/mod_proxy_balancer.rb
  51. +20 −0 apache2/recipes/mod_proxy_connect.rb
  52. +20 −0 apache2/recipes/mod_proxy_http.rb
  53. +22 −0 apache2/recipes/mod_python.rb
  54. +20 −0 apache2/recipes/mod_rewrite.rb
  55. +22 −0 apache2/recipes/mod_setenvif.rb
  56. +42 −0 apache2/recipes/mod_ssl.rb
  57. +22 −0 apache2/recipes/mod_status.rb
  58. +22 −0 apache2/templates/default/a2dismod.erb
  59. +29 −0 apache2/templates/default/a2dissite.erb
  60. +37 −0 apache2/templates/default/a2enmod.erb
  61. +38 −0 apache2/templates/default/a2ensite.erb
  62. +230 −0 apache2/templates/default/apache2.conf.erb
  63. +19 −0 apache2/templates/default/apache2.god.erb
  64. +6 −0 apache2/templates/default/charset.erb
  65. +57 −0 apache2/templates/default/default-site.erb
  66. +12 −0 apache2/templates/default/mod_auth_openid.rb.erb
  67. +2 −0 apache2/templates/default/mods/README
  68. +24 −0 apache2/templates/default/mods/alias.conf.erb
  69. +1 −0 apache2/templates/default/mods/authopenid.load.erb
  70. +101 −0 apache2/templates/default/mods/autoindex.conf.erb
  71. +16 −0 apache2/templates/default/mods/deflate.conf.erb
  72. +5 −0 apache2/templates/default/mods/dir.conf.erb
  73. +10 −0 apache2/templates/default/mods/fcgid.conf.erb
  74. +191 −0 apache2/templates/default/mods/mime.conf.erb
  75. +18 −0 apache2/templates/default/mods/negotiation.conf.erb
  76. +19 −0 apache2/templates/default/mods/proxy.conf.erb
  77. +28 −0 apache2/templates/default/mods/setenvif.conf.erb
  78. +72 −0 apache2/templates/default/mods/ssl.conf.erb
  79. +16 −0 apache2/templates/default/mods/status.conf.erb
  80. +2 −0 apache2/templates/default/port_apache.erb
  81. +6 −0 apache2/templates/default/ports.conf.erb
  82. +50 −0 apache2/templates/default/security.erb
  83. +43 −0 apache2/templates/default/web_app.conf.erb
  84. +40 −0 apparmor/metadata.json
  85. +6 −0 apparmor/metadata.rb
  86. +26 −0 apparmor/recipes/default.rb
  87. +9 −0 apt/files/default/apt-cacher
  88. +144 −0 apt/files/default/apt-cacher.conf
  89. +50 −0 apt/files/default/apt-proxy-v2.conf
  90. +51 −0 apt/metadata.json
  91. +11 −0 apt/metadata.rb
  92. +42 −0 apt/recipes/cacher.rb
  93. +33 −0 apt/recipes/default.rb
  94. +34 −0 apt/recipes/proxy.rb
  95. +56 −0 aws/libraries/ec2.rb
  96. +222 −0 aws/providers/ebs_volume.rb
  97. +83 −0 aws/providers/elastic_ip.rb
  98. +27 −0 aws/recipes/default.rb
  99. +11 −0 aws/resources/ebs_volume.rb
  100. +6 −0 aws/resources/elastic_ip.rb
  101. +4 −0 bluepill/attributes/bluepill.rb
  102. +21 −0 bluepill/definitions/bluepill_monitor.rb
  103. +47 −0 bluepill/metadata.json
  104. +5 −0 bluepill/metadata.rb
  105. +27 −0 bluepill/recipes/default.rb
  106. +35 −0 bluepill/templates/default/init.sh.erb
  107. +33 −0 boost/README.rdoc
  108. +40 −0 boost/metadata.json
  109. +8 −0 boost/metadata.rb
  110. +19 −0 boost/recipes/default.rb
  111. +165 −0 bootstrap/README.rdoc
  112. +50 −0 bootstrap/attributes/bootstrap.rb
  113. +77 −0 bootstrap/metadata.json
  114. +14 −0 bootstrap/metadata.rb
  115. +87 −0 bootstrap/recipes/client.rb
  116. +18 −0 bootstrap/recipes/default.rb
  117. +120 −0 bootstrap/recipes/server.rb
  118. +30 −0 bootstrap/templates/default/client.rb.erb
  119. +34 −0 bootstrap/templates/default/server.rb.erb
  120. +2 −0 bootstrap/templates/default/sv-chef-client-log-run.erb
  121. +4 −0 bootstrap/templates/default/sv-chef-client-run.erb
  122. +2 −0 bootstrap/templates/default/sv-chef-indexer-log-run.erb
  123. +4 −0 bootstrap/templates/default/sv-chef-indexer-run.erb
  124. +2 −0 bootstrap/templates/default/sv-chef-server-log-run.erb
  125. +4 −0 bootstrap/templates/default/sv-chef-server-run.erb
  126. +46 −0 build-essential/metadata.json
  127. +9 −0 build-essential/metadata.rb
  128. +43 −0 build-essential/recipes/default.rb
  129. +2 −0 build/attributes/build.rb
  130. +38 −0 build/metadata.json
  131. +4 −0 build/metadata.rb
  132. +41 −0 build/recipes/default.rb
  133. +46 −0 capistrano/definitions/cap_setup.rb
  134. +59 −0 capistrano/metadata.json
  135. +9 −0 capistrano/metadata.rb
  136. +20 −0 capistrano/recipes/default.rb
  137. +221 −0 chef/README.rdoc
  138. +61 −0 chef/attributes/chef.rb
  139. +23 −0 chef/attributes/server_proxy.rb
  140. +276 −0 chef/metadata.json
  141. +87 −0 chef/metadata.rb
  142. +64 −0 chef/recipes/client.rb
  143. 0 chef/recipes/default.rb
  144. +75 −0 chef/recipes/server.rb
  145. +61 −0 chef/recipes/server_proxy.rb
  146. +65 −0 chef/templates/default/chef_server.conf.erb
  147. +30 −0 chef/templates/default/client.rb.erb
  148. +34 −0 chef/templates/default/server.rb.erb
  149. +22 −0 collectd/attributes/collectd.rb
  150. +6 −0 collectd/libraries/default.rb
  151. +38 −0 collectd/metadata.json
  152. +4 −0 collectd/metadata.rb
  153. +16 −0 collectd/recipes/default.rb
  154. +40 −0 collectd/templates/default/collectd.conf.erb
  155. +3 −0 collectd/templates/default/collection.conf.erb
  156. +38 −0 collectd/templates/default/thresholds.conf.erb
  157. +58 −0 couchdb/metadata.json
  158. +21 −0 couchdb/metadata.rb
  159. +47 −0 couchdb/recipes/default.rb
  160. +2 −0 couchdb/templates/default/port_couchdb.erb
  161. +1 −0 cron/attributes/cron.rb
  162. +38 −0 cron/metadata.json
  163. +4 −0 cron/metadata.rb
  164. +9 −0 cron/recipes/default.rb
  165. +38 −0 ddclient/metadata.json
  166. +4 −0 ddclient/metadata.rb
  167. +24 −0 ddclient/recipes/default.rb
  168. +7 −0 ddclient/templates/default/ddclient.conf.erb
  169. +2 −0 ddclient/templates/default/ddclient.default.erb
  170. +42 −0 django/README.rdoc
  171. +48 −0 django/metadata.json
  172. +14 −0 django/metadata.rb
  173. +29 −0 django/recipes/default.rb
  174. +45 −0 djbdns/attributes/djbdns.rb
  175. +149 −0 djbdns/metadata.json
  176. +55 −0 djbdns/metadata.rb
  177. +40 −0 djbdns/recipes/axfr.rb
  178. +43 −0 djbdns/recipes/cache.rb
  179. +101 −0 djbdns/recipes/default.rb
  180. +38 −0 djbdns/recipes/internal_server.rb
  181. +38 −0 djbdns/recipes/server.rb
  182. +1 −0 djbdns/templates/default/dnscache-servers.erb
  183. +2 −0 djbdns/templates/default/sv-axfrdns-log-run.erb
  184. +4 −0 djbdns/templates/default/sv-axfrdns-run.erb
  185. +2 −0 djbdns/templates/default/sv-public-dnscache-log-run.erb
  186. +6 −0 djbdns/templates/default/sv-public-dnscache-run.erb
  187. +2 −0 djbdns/templates/default/sv-tinydns-internal-log-run.erb
  188. +3 −0 djbdns/templates/default/sv-tinydns-internal-run.erb
  189. +2 −0 djbdns/templates/default/sv-tinydns-log-run.erb
  190. +3 −0 djbdns/templates/default/sv-tinydns-run.erb
  191. +4 −0 djbdns/templates/default/tinydns-data.erb
  192. +5 −0 djbdns/templates/default/tinydns-internal-data.erb
  193. +42 −0 dns/metadata.json
  194. +4 −0 dns/metadata.rb
  195. +7 −0 dns/recipes/client.rb
  196. 0 dns/recipes/default.rb
  197. +4 −0 dns/templates/default/resolv.conf.erb
  198. +45 −0 drbd/metadata.json
  199. +10 −0 drbd/metadata.rb
  200. +35 −0 drbd/recipes/default.rb
  201. +52 −0 dynomite/README.rdoc
  202. +31 −0 dynomite/attributes/dynomite.rb
  203. +51 −0 dynomite/metadata.json
  204. +12 −0 dynomite/metadata.rb
  205. +58 −0 dynomite/recipes/default.rb
  206. +2 −0 dynomite/templates/default/sv-dynomite-log-run.erb
  207. +9 −0 dynomite/templates/default/sv-dynomite-run.erb
  208. +28 −0 ec2/attributes/ec2_recipe_options.rb
  209. +13 −0 ec2/metadata.rb
  210. +19 −0 ec2/recipes/default.rb
  211. +38 −0 ejabberd/metadata.json
  212. +4 −0 ejabberd/metadata.rb
  213. +20 −0 ejabberd/recipes/default.rb
  214. +197 −0 ejabberd/templates/default/ejabberd.cfg.erb
  215. +49 −0 emacs/metadata.json
  216. +9 −0 emacs/metadata.rb
  217. +21 −0 emacs/recipes/default.rb
  218. +1 −0 erlang/attributes/erlang.rb
  219. +43 −0 erlang/metadata.json
  220. +9 −0 erlang/metadata.rb
  221. +29 −0 erlang/recipes/default.rb
  222. +43 −0 fail2ban/metadata.json
  223. +9 −0 fail2ban/metadata.rb
  224. +35 −0 fail2ban/recipes/default.rb
  225. +34 −0 fail2ban/templates/default/fail2ban.conf.erb
  226. +202 −0 fail2ban/templates/default/jail.conf.erb
  227. +5 −0 ganglia/attributes/ganglia.rb
  228. +5 −0 ganglia/metadata.rb
  229. +22 −0 ganglia/recipes/client.rb
  230. +8 −0 ganglia/recipes/default.rb
  231. +38 −0 ganglia/recipes/server.rb
  232. +6 −0 ganglia/templates/default/ganglia-vhost.conf.erb
  233. +117 −0 ganglia/templates/default/gmetad.conf.erb
  234. +336 −0 ganglia/templates/default/gmond.conf.erb
  235. +31 −0 gems/README.rdoc
  236. +1 −0 gems/attributes/gems.rb
  237. +40 −0 gems/metadata.json
  238. +7 −0 gems/metadata.rb
  239. +29 −0 gems/recipes/default.rb
  240. +37 −0 git/README.rdoc
  241. +52 −0 git/metadata.json
  242. +15 −0 git/metadata.rb
  243. +26 −0 git/recipes/default.rb
  244. +28 −0 git/recipes/server.rb
  245. +2 −0 git/templates/default/sv-git-daemon-log-run.erb
  246. +3 −0 git/templates/default/sv-git-daemon-run.erb
  247. +102 −0 gitosis/files/default/access.py
  248. +207 −0 gitosis/files/default/serve.py
  249. +38 −0 gitosis/metadata.json
  250. +4 −0 gitosis/metadata.rb
  251. +20 −0 gitosis/recipes/default.rb
  252. +1 −0 gitweb/attributes/gitweb.rb
  253. +43 −0 gitweb/metadata.json
  254. +6 −0 gitweb/metadata.rb
  255. +18 −0 gitweb/recipes/default.rb
  256. +32 −0 gitweb/templates/default/apache-vhost.conf.erb
  257. +32 −0 gitweb/templates/default/apache.conf.erb
  258. +26 −0 gitweb/templates/default/gitweb.conf.erb
  259. +4 −0 gitweb/templates/default/projects.conf.erb
  260. +8 −0 glassfish/README.rdoc
  261. +82 −0 glassfish/attributes/glassfish.rb
  262. +50 −0 glassfish/metadata.json
  263. +11 −0 glassfish/metadata.rb
  264. +73 −0 glassfish/recipes/default.rb
  265. +27 −0 glassfish/templates/default/answer_file.erb
  266. +44 −0 glassfish/templates/default/glassfish-init.d-script.erb
  267. +38 −0 gnupg/metadata.json
  268. +4 −0 gnupg/metadata.rb
  269. +1 −0 gnupg/recipes/default.rb
  270. +49 −0 god/README.rdoc
  271. +38 −0 god/definitions/god_monitor.rb
  272. +48 −0 god/metadata.json
  273. +14 −0 god/metadata.rb
  274. +41 −0 god/recipes/default.rb
  275. +20 −0 god/templates/default/master.god.erb
  276. +40 −0 god/templates/default/mongrel.god.erb
  277. +2 −0 god/templates/default/sv-god-log-run.erb
  278. +6 −0 god/templates/default/sv-god-run.erb
  279. +63 −0 hadoop/README.rdoc
  280. +61 −0 hadoop/metadata.json
  281. +11 −0 hadoop/metadata.rb
  282. +29 −0 hadoop/recipes/conf_pseudo.rb
  283. +38 −0 hadoop/recipes/default.rb
  284. +22 −0 hadoop/recipes/doc.rb
  285. +22 −0 hadoop/recipes/hive.rb
  286. +22 −0 hadoop/recipes/pig.rb
  287. +2 −0 hadoop/templates/default/cloudera.list.erb
  288. +37 −0 haproxy/README.rdoc
  289. +43 −0 haproxy/metadata.json
  290. +10 −0 haproxy/metadata.rb
  291. +42 −0 haproxy/recipes/default.rb
  292. +4 −0 haproxy/templates/default/haproxy-default.erb
  293. +27 −0 haproxy/templates/default/haproxy.cfg.erb
  294. +45 −0 heartbeat/metadata.json
  295. +10 −0 heartbeat/metadata.rb
  296. +39 −0 heartbeat/recipes/default.rb
  297. +1 −0 hosts/attributes/hosts.rb
  298. +38 −0 hosts/metadata.json
  299. +4 −0 hosts/metadata.rb
  300. +6 −0 hosts/recipes/default.rb
Sorry, we could not display the entire diff because too many files (929) changed.
2 .gitignore
@@ -0,0 +1,2 @@
+tmp/*
+.rake_test_cache
201 LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+Copyright [yyyy] [name of copyright owner]
+
+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.
15 NOTICE
@@ -0,0 +1,15 @@
+=========================
+Opscode Cookbooks Notices
+=========================
+
+Developed at Opscode (http://www.opscode.com).
+
+Contributors and Copyright holders:
+
+ * Copyright 2008-2009, Opscode <legal@opscode.com>
+ * Copyright 2008-2009, Adam Jacob <adam@opscode.com>
+ * Copyright 2008-2009, Joshua Timberman <joshua@opscode.com>
+ * Copyright 2009, Joe Williams <joe@joetify.com>
+ * Copyright 2009, Joshua Sierles <joshua@37signals.com>
+ * Copyright 2009, Matthew Kent <mkent@magoazul.com>
+
46 Rakefile
@@ -0,0 +1,46 @@
+require 'rubygems'
+require 'chef'
+require 'json'
+
+
+TOPDIR = File.expand_path(File.join(File.dirname(__FILE__), ".."))
+TEST_CACHE = File.expand_path(File.join(TOPDIR, ".rake_test_cache"))
+COMPANY_NAME = "Opscode, Inc."
+SSL_EMAIL_ADDRESS = "cookbooks@opscode.com"
+NEW_COOKBOOK_LICENSE = :apachev2
+
+load 'chef/tasks/chef_repo.rake'
+task :default => [ :test ]
+
+desc "Build a bootstrap.tar.gz"
+task :build_bootstrap do
+ bootstrap_files = Rake::FileList.new
+ %w(apache2 runit couchdb stompserver chef passenger ruby packages).each do |cookbook|
+ bootstrap_files.include "#{cookbook}/**/*"
+ end
+
+ tmp_dir = "tmp"
+ cookbooks_dir = File.join(tmp_dir, "cookbooks")
+ rm_rf tmp_dir
+ mkdir_p cookbooks_dir
+ bootstrap_files.each do |fn|
+ f = File.join(cookbooks_dir, fn)
+ fdir = File.dirname(f)
+ mkdir_p(fdir) if !File.exist?(fdir)
+ if File.directory?(fn)
+ mkdir_p(f)
+ else
+ rm_f f
+ safe_ln(fn, f)
+ end
+ end
+
+ chdir(tmp_dir) do
+ sh %{tar zcvf bootstrap.tar.gz cookbooks}
+ end
+end
+
+# remove unnecessary tasks
+%w{update install roles ssl_cert}.each do |t|
+ Rake.application.instance_variable_get('@tasks').delete(t.to_s)
+end
39 activemq/README.rdoc
@@ -0,0 +1,39 @@
+= DESCRIPTION:
+
+Installs activemq and sets up a runit service.
+
+= REQUIREMENTS:
+
+Tested on Ubuntu 9.04.
+
+Opscode cookbooks:
+
+* java
+* runit
+
+= ATTRIBUTES:
+
+* activemq[:mirror] - download URL up to the apache/activemq/apache-activemq directory.
+* activemq[:version] - version to install.
+
+= USAGE:
+
+Include the default recipe on systems where you want to run activemq. At this time the cookbook doesn't use any custom configuration for activemq.
+
+= LICENSE AND 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.
21 activemq/attributes/activemq.rb
@@ -0,0 +1,21 @@
+#
+# Cookbook Name:: activemq
+# Attributes:: activemq
+#
+# 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.
+#
+
+set_unless[:activemq][:mirror] = "http://mirrors.ibiblio.org/pub/mirrors"
+set_unless[:activemq][:version] = "5.3.0"
51 activemq/metadata.json
@@ -0,0 +1,51 @@
+{
+ "dependencies": {
+ "java": [
+
+ ],
+ "runit": [
+
+ ]
+ },
+ "maintainer_email": "cookbooks@opscode.com",
+ "conflicting": {
+
+ },
+ "description": "Installs activemq and sets it up as a runit service",
+ "recipes": {
+ "activemq": ""
+ },
+ "providing": {
+ "activemq": [
+
+ ]
+ },
+ "platforms": {
+ "ubuntu": [
+
+ ],
+ "debian": [
+
+ ]
+ },
+ "version": "0.2.0",
+ "name": "activemq",
+ "replacing": {
+
+ },
+ "groupings": {
+
+ },
+ "long_description": "= DESCRIPTION:\n\nInstalls activemq and sets up a runit service.\n\n= REQUIREMENTS:\n\nTested on Ubuntu 9.04.\n\nOpscode cookbooks:\n\n* java\n* runit\n\n= ATTRIBUTES:\n\n* activemq[:mirror] - download URL up to the apache/activemq/apache-activemq directory.\n* activemq[:version] - version to install.\n\n= USAGE:\n\nInclude the default recipe on systems where you want to run activemq. At this time the cookbook doesn't use any custom configuration for activemq.\n\n= LICENSE AND AUTHOR:\n\nAuthor:: Joshua Timberman (<joshua@opscode.com>)\n\nCopyright:: 2009, Opscode, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
+ "attributes": {
+
+ },
+ "recommendations": {
+
+ },
+ "license": "Apache 2.0",
+ "maintainer": "Opscode, Inc.",
+ "suggestions": {
+
+ }
+}
14 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 a runit service"
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.rdoc'))
+version "0.2"
+
+%w{ubuntu debian}.each do |os|
+ supports os
+end
+
+%w{java runit}.each do |cb|
+ depends cb
+end
42 activemq/recipes/default.rb
@@ -0,0 +1,42 @@
+#
+# 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"
+
+version = node[:activemq][:version]
+mirror = node[:activemq][:mirror]
+
+unless File.exists?("/opt/apache-activemq-#{version}/bin/activemq")
+ remote_file "/tmp/apache-activemq-#{version}-bin.tar.gz" do
+ source "#{mirror}/apache/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 "/opt/apache-activemq-#{version}/bin/activemq" do
+ owner "root"
+ group "root"
+ mode "0755"
+end
+
+runit_service "activemq"
2 activemq/templates/default/sv-activemq-log-run.erb
@@ -0,0 +1,2 @@
+#!/bin/sh
+exec svlogd -tt ./main
3 activemq/templates/default/sv-activemq-run.erb
@@ -0,0 +1,3 @@
+#!/bin/sh
+exec 2>&1
+exec /opt/apache-activemq-<%= @node[:activemq][:version] %>/bin/activemq
78 apache2/README.rdoc
@@ -0,0 +1,78 @@
+= DESCRIPTION:
+
+Complete Debian/Ubuntu style Apache2 configuration.
+
+= REQUIREMENTS:
+
+Debian or Ubuntu preferred.
+
+Red Hat/CentOS and Fedora 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] 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.
77 apache2/attributes/apache.rb
@@ -0,0 +1,77 @@
+#
+# 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/"
+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"
+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"
+end
+
+###
+# These settings need the unless, since we want them to be tunable,
+# and we don't want to override the tunings.
+###
+
+# General settings
+set_unless[:apache][:listen_ports] = [ "80","443" ]
+set_unless[:apache][:contact] = "ops@example.com"
+set_unless[:apache][:timeout] = 300
+set_unless[:apache][:keepalive] = "On"
+set_unless[:apache][:keepaliverequests] = 100
+set_unless[:apache][:keepalivetimeout] = 5
+
+# Security
+set_unless[:apache][:servertokens] = "Prod"
+set_unless[:apache][:serversignature] = "On"
+set_unless[:apache][:traceenable] = "On"
+
+# mod_auth_openids
+set_unless[:apache][:allowed_openids] = Array.new
+
+# Prefork Attributes
+set_unless[:apache][:prefork][:startservers] = 16
+set_unless[:apache][:prefork][:minspareservers] = 16
+set_unless[:apache][:prefork][:maxspareservers] = 32
+set_unless[:apache][:prefork][:serverlimit] = 400
+set_unless[:apache][:prefork][:maxclients] = 400
+set_unless[:apache][:prefork][:maxrequestsperchild] = 10000
+
+# Worker Attributes
+set_unless[:apache][:worker][:startservers] = 4
+set_unless[:apache][:worker][:maxclients] = 1024
+set_unless[:apache][:worker][:minsparethreads] = 64
+set_unless[:apache][:worker][:maxsparethreads] = 192
+set_unless[:apache][:worker][:threadsperchild] = 64
+set_unless[:apache][:worker][:maxrequestsperchild] = 0
25 apache2/definitions/apache_conf.rb
@@ -0,0 +1,25 @@
+#
+# 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")
+ end
+end
43 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
40 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
49 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
41 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;
+
523 apache2/metadata.json
@@ -0,0 +1,523 @@
+{
+ "maintainer": "Opscode, Inc.",
+ "description": "Installs and configures all aspects of apache2 using Debian style symlinks with helper definitions",
+ "recommendations": {
+
+ },
+ "maintainer_email": "cookbooks@opscode.com",
+ "recipes": {
+ "apache2::mod_python": "Apache module 'python'",
+ "apache2::mod_authn_file": "Apache module 'authn_file'",
+ "apache2::mod_dir": "Apache module 'dir' with config file",
+ "apache2::mod_php5": "Apache module 'php5'",
+ "apache2::mod_proxy_balancer": "Apache module 'proxy_balancer'",
+ "apache2::mod_dav": "Apache module 'dav'",
+ "apache2::mod_authz_groupfile": "Apache module 'authz_groupfile'",
+ "apache2::mod_auth_basic": "Apache module 'auth_basic'",
+ "apache2::mod_setenvif": "Apache module 'setenvif' with config file",
+ "apache2::mod_authz_user": "Apache module 'authz_user'",
+ "apache2::mod_deflate": "Apache module 'deflate' with config file",
+ "apache2::mod_ssl": "Apache module 'ssl' with config file, adds port 443 to listen_ports",
+ "apache2::mod_negotiation": "Apache module 'negotiation' with config file",
+ "apache2::mod_dav_svn": "Apache module 'dav_svn'",
+ "apache2::mod_authz_host": "Apache module 'authz_host'",
+ "apache2::mod_rewrite": "Apache module 'rewrite'",
+ "apache2::mod_cgi": "Apache module 'cgi'",
+ "apache2::mod_fcgid": "Apache module 'fcgid', package on ubuntu\/debian, rhel\/centos, compile source on suse; with config file",
+ "apache2::mod_auth_digest": "Apache module 'auth_digest'",
+ "apache2::mod_env": "Apache module 'env'",
+ "apache2::mod_headers": "Apache module 'headers'",
+ "apache2::mod_autoindex": "Apache module 'autoindex' with config file",
+ "apache2::mod_authnz_ldap": "Apache module 'authnz_ldap'",
+ "apache2::mod_proxy_connect": "Apache module 'proxy_connect'",
+ "apache2::mod_proxy": "Apache module 'proxy' with config file",
+ "apache2": "Main Apache configuration",
+ "apache2::mod_alias": "Apache module 'alias' with config file",
+ "apache2::mod_status": "Apache module 'status' with config file",
+ "apache2::mod_ldap": "Apache module 'ldap'",
+ "apache2::mod_authz_default": "Apache module 'authz_default'",
+ "apache2::mod_log_config": "Apache module 'log_config'",
+ "apache2::mod_expires": "Apache module 'expires'",
+ "apache2::god_monitor": "",
+ "apache2::mod_proxy_http": "Apache module 'proxy_http'",
+ "apache2::mod_auth_openid": "Apache module 'authopenid'",
+ "apache2::mod_mime": "Apache module 'mime' with config file",
+ "apache2::mod_proxy_ajp": "Apache module 'proxy_ajp'",
+ "apache2": ""
+ },
+ "suggestions": {
+
+ },
+ "platforms": {
+ "ubuntu": [
+
+ ],
+ "centos": [
+
+ ],
+ "debian": [
+
+ ],
+ "redhat": [
+
+ ]
+ },
+ "version": "0.10.0",
+ "name": "apache2",
+ "conflicting": {
+
+ },
+ "attributes": {
+ "apache\/traceenable": {
+ "default": "On",
+ "type": "string",
+ "multiple_values": false,
+ "description": "Determine behavior of TRACE requests",
+ "display_name": "Apache Trace Enable",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/timeout": {
+ "default": "300",
+ "type": "string",
+ "multiple_values": false,
+ "description": "Connection timeout value",
+ "display_name": "Apache Timeout",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/icondir": {
+ "default": "\/usr\/share\/apache2\/icons",
+ "type": "string",
+ "multiple_values": false,
+ "description": "Directory location for icons",
+ "display_name": "Apache Icondir",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/user": {
+ "default": "www-data",
+ "type": "string",
+ "multiple_values": false,
+ "description": "User Apache runs as",
+ "display_name": "Apache User",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/worker\/threadsperchild": {
+ "default": "64",
+ "type": "string",
+ "multiple_values": false,
+ "description": "Constant number of worker threads in each server process",
+ "display_name": "Apache Worker MPM ThreadsPerChild",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/worker\/maxclients": {
+ "default": "1024",
+ "type": "string",
+ "multiple_values": false,
+ "description": "Maximum number of simultaneous connections",
+ "display_name": "Apache Worker MPM MaxClients",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/worker": {
+ "type": "hash",
+ "multiple_values": false,
+ "description": "Hash of Apache prefork tuning attributes.",
+ "display_name": "Apache Worker",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/contact": {
+ "default": "ops@example.com",
+ "type": "string",
+ "multiple_values": false,
+ "description": "Email address of webmaster",
+ "display_name": "Apache Contact",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/prefork\/startservers": {
+ "default": "16",
+ "type": "string",
+ "multiple_values": false,
+ "description": "Number of MPM servers to start",
+ "display_name": "Apache Prefork MPM StartServers",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/prefork\/minspareservers": {
+ "default": "16",
+ "type": "string",
+ "multiple_values": false,
+ "description": "Minimum number of spare server processes",
+ "display_name": "Apache Prefork MPM MinSpareServers",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/allowed_openids": {
+ "default": "",
+ "type": "string",
+ "multiple_values": false,
+ "description": "Array of OpenIDs allowed to authenticate",
+ "display_name": "Apache Allowed OpenIDs",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/keepalivetimeout": {
+ "default": "5",
+ "type": "string",
+ "multiple_values": false,
+ "description": "Time to wait for requests on persistent connection",
+ "display_name": "Apache Keepalive Timeout",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/keepaliverequests": {
+ "default": "100",
+ "type": "string",
+ "multiple_values": false,
+ "description": "Number of requests allowed on a persistent connection",
+ "display_name": "Apache Keepalive Requests",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/worker\/maxrequestsperchild": {
+ "default": "0",
+ "type": "string",
+ "multiple_values": false,
+ "description": "Maximum number of request a child process will handle",
+ "display_name": "Apache Worker MPM MaxRequestsPerChild",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/listen_ports": {
+ "default": [
+ "80",
+ "443"
+ ],
+ "type": "array",
+ "multiple_values": false,
+ "description": "Ports that Apache should listen on",
+ "display_name": "Apache Listen Ports",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/dir": {
+ "default": "\/etc\/apache2",
+ "type": "string",
+ "multiple_values": false,
+ "description": "Location for Apache configuration",
+ "display_name": "Apache Directory",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/worker\/maxsparethreads": {
+ "default": "192",
+ "type": "string",
+ "multiple_values": false,
+ "description": "Maximum number of spare worker threads",
+ "display_name": "Apache Worker MPM MaxSpareThreads",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/prefork\/maxrequestsperchild": {
+ "default": "10000",
+ "type": "string",
+ "multiple_values": false,
+ "description": "Maximum number of request a child process will handle",
+ "display_name": "Apache Prefork MPM MaxRequestsPerChild",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/prefork\/serverlimit": {
+ "default": "400",
+ "type": "string",
+ "multiple_values": false,
+ "description": "Upper limit on configurable server processes",
+ "display_name": "Apache Prefork MPM ServerLimit",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/binary": {
+ "default": "\/usr\/sbin\/apache2",
+ "type": "string",
+ "multiple_values": false,
+ "description": "Apache server daemon program",
+ "display_name": "Apache Binary",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/prefork\/maxspareservers": {
+ "default": "32",
+ "type": "string",
+ "multiple_values": false,
+ "description": "Maximum number of spare server processes",
+ "display_name": "Apache Prefork MPM MaxSpareServers",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/keepalive": {
+ "default": "On",
+ "type": "string",
+ "multiple_values": false,
+ "description": "HTTP persistent connections",
+ "display_name": "Apache Keepalive",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache": {
+ "type": "hash",
+ "multiple_values": false,
+ "description": "Hash of Apache attributes",
+ "display_name": "Apache Hash",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/worker\/startservers": {
+ "default": "4",
+ "type": "string",
+ "multiple_values": false,
+ "description": "Initial number of server processes to start",
+ "display_name": "Apache Worker MPM StartServers",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/prefork\/maxclients": {
+ "default": "400",
+ "type": "string",
+ "multiple_values": false,
+ "description": "Maximum number of simultaneous connections",
+ "display_name": "Apache Prefork MPM MaxClients",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/prefork": {
+ "type": "hash",
+ "multiple_values": false,
+ "description": "Hash of Apache prefork tuning attributes.",
+ "display_name": "Apache Prefork",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/servertokens": {
+ "default": "Prod",
+ "type": "string",
+ "multiple_values": false,
+ "description": "Server response header",
+ "display_name": "Apache Server Tokens",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/worker\/minsparethreads": {
+ "default": "64",
+ "type": "string",
+ "multiple_values": false,
+ "description": "Minimum number of spare worker threads",
+ "display_name": "Apache Worker MPM MinSpareThreads",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/serversignature": {
+ "default": "On",
+ "type": "string",
+ "multiple_values": false,
+ "description": "Configure footer on server-generated documents",
+ "display_name": "Apache Server Signature",
+ "recipes": [
+
+ ],
+ "required": false
+ },
+ "apache\/log_dir": {
+ "default": "\/etc\/apache2",
+ "type": "string",
+ "multiple_values": false,
+ "description": "Location for Apache logs",
+ "display_name": "Apache Log Directory",
+ "recipes": [
+
+ ],
+ "required": false
+ }
+ },
+ "providing": {
+ "apache2::mod_python": [
+
+ ],
+ "apache2::mod_authn_file": [
+
+ ],
+ "apache2::mod_dir": [
+
+ ],
+ "apache2::mod_php5": [
+
+ ],
+ "apache2::mod_proxy_balancer": [
+
+ ],
+ "apache2::mod_dav": [
+
+ ],
+ "apache2::mod_authz_groupfile": [
+
+ ],
+ "apache2::mod_auth_basic": [
+
+ ],
+ "apache2::mod_setenvif": [
+
+ ],
+ "apache2::mod_authz_user": [
+
+ ],
+ "apache2::mod_deflate": [
+
+ ],
+ "apache2::mod_ssl": [
+
+ ],
+ "apache2::mod_negotiation": [
+
+ ],
+ "apache2::mod_dav_svn": [
+
+ ],
+ "apache2::mod_authz_host": [
+
+ ],
+ "apache2::mod_rewrite": [
+
+ ],
+ "apache2::mod_cgi": [
+
+ ],
+ "apache2::mod_fcgid": [
+
+ ],
+ "apache2::mod_auth_digest": [
+
+ ],
+ "apache2::mod_env": [
+
+ ],
+ "apache2::mod_headers": [
+
+ ],
+ "apache2::mod_autoindex": [
+
+ ],
+ "apache2::mod_authnz_ldap": [
+
+ ],
+ "apache2::mod_proxy_connect": [
+
+ ],
+ "apache2::mod_proxy": [
+
+ ],
+ "apache2::mod_alias": [
+
+ ],
+ "apache2::mod_status": [
+
+ ],
+ "apache2::mod_ldap": [
+
+ ],
+ "apache2::mod_authz_default": [
+
+ ],
+ "apache2::mod_log_config": [
+
+ ],
+ "apache2": [
+
+ ],
+ "apache2::mod_expires": [
+
+ ],
+ "apache2::god_monitor": [
+
+ ],
+ "apache2::mod_proxy_http": [
+
+ ],
+ "apache2::mod_auth_openid": [
+
+ ],
+ "apache2::mod_mime": [
+
+ ],
+ "apache2::mod_proxy_ajp": [
+
+ ]
+ },
+ "license": "Apache 2.0",
+ "long_description": "= DESCRIPTION:\n\nComplete Debian\/Ubuntu style Apache2 configuration.\n\n= REQUIREMENTS:\n\nDebian or Ubuntu preferred.\n\nRed Hat\/CentOS and Fedora can be used but will be converted to a Debian\/Ubuntu style Apache as it's far easier to manage with chef. \n\n= ATTRIBUTES:\n\nThe file attributes\/apache.rb contains the following attribute types:\n\n* platform specific locations and settings.\n* general settings\n* prefork attributes\n* worker attributes\n\nGeneral settings and prefork\/worker attributes are tunable.\n\n= USAGE:\n\nInclude the apache2 recipe to install Apache2 and get 'sane' default settings. Configuration is modularized through Apache vhost sites a la Debian style configuration.\n\nFor 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.\n\n== Defines:\n\n* apache_module: sets up an Apache module.\n* apache_conf: sets up a config file for an apache module.\n* apache_site: sets up a vhost site. The conf file must be available.\n* web_app: copies the template for a web app and enables it as a site via apache_site.\n\n== Web Apps:\n\nVarious 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.\n\nWe 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.\n\n* docroot\n* server_name\n* server_aliases\n\nThese are available as @params[:docroot], @params[:server_name], @params[:server_aliases] within the template. \n\nIf '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.\n\n== God Monitor:\n\nThere'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.\n\n== OpenID Auth\n\nInstalls 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:\n\n AuthOpenIDEnabled On\n AuthOpenIDDBLocation \/var\/cache\/apache2\/mod_auth_openid.db\n AuthOpenIDUserProgram \/usr\/local\/bin\/mod_auth_openid.rb\n\nChange 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.\n\n= LICENSE & AUTHOR:\n\nAuthor:: Joshua Timberman (<joshua@opscode.com>)\nCopyright:: 2009, Opscode, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http:\/\/www.apache.org\/licenses\/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
+ "replacing": {
+
+ },
+ "dependencies": {
+
+ }
+}
197 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.10.0"
+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}.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"
191 apache2/recipes/default.rb
@@ -0,0 +1,191 @@
+#
+# 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"
+ 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"
+ 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 ] },
+ "default" => { "default" => [:restart, :reload ] }
+ )
+ action :enable
+end
+
+if platform?("centos", "redhat", "fedora", "suse")
+ directory node[:apache][:log_dir] do
+ mode 0755
+ action :create
+ end
+
+ remote_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 = "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
+
+template "apache2.conf" do
+ case node[:platform]
+ when "centos","redhat","fedora"
+ path "#{node[:apache][:dir]}/conf/httpd.conf"
+ when "debian","ubuntu"
+ path "#{node[:apache][:dir]}/apache2.conf"
+ end
+ source "apache2.conf.erb"
+ owner "root"