Created
March 26, 2015 18:23
-
-
Save miketheman/a8dd328906c76294068a to your computer and use it in GitHub Desktop.
opscode-cookbooks commit numero uno, for historical purposes. Link: https://github.com/chef/cookbooks/commit/1f10b2519b3f215ef0ec550913612436bf417eb3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| From 1f10b2519b3f215ef0ec550913612436bf417eb3 Mon Sep 17 00:00:00 2001 | |
| From: Adam Jacob <adam@hjksolutions.com> | |
| Date: Sat, 17 Jan 2009 16:45:51 -0800 | |
| Subject: [PATCH] Adding opscode cookbooks | |
| --- | |
| LICENSE | 201 +++++++ | |
| NOTICE | 12 + | |
| apache2/attributes/apache.rb | 72 +++ | |
| apache2/definitions/apache_module.rb | 36 ++ | |
| apache2/definitions/apache_site.rb | 36 ++ | |
| .../files/default/apache2_module_conf_generate.pl | 41 ++ | |
| apache2/recipes/default.rb | 141 +++++ | |
| apache2/recipes/mod_alias.rb | 20 + | |
| apache2/recipes/mod_auth_basic.rb | 20 + | |
| apache2/recipes/mod_auth_digest.rb | 20 + | |
| apache2/recipes/mod_authn_file.rb | 20 + | |
| apache2/recipes/mod_authnz_ldap.rb | 20 + | |
| apache2/recipes/mod_authz_default.rb | 20 + | |
| apache2/recipes/mod_authz_groupfile.rb | 20 + | |
| apache2/recipes/mod_authz_host.rb | 20 + | |
| apache2/recipes/mod_authz_user.rb | 20 + | |
| apache2/recipes/mod_autoindex.rb | 20 + | |
| apache2/recipes/mod_cgi.rb | 20 + | |
| apache2/recipes/mod_dav.rb | 20 + | |
| apache2/recipes/mod_dav_svn.rb | 20 + | |
| apache2/recipes/mod_deflate.rb | 20 + | |
| apache2/recipes/mod_dir.rb | 20 + | |
| apache2/recipes/mod_env.rb | 20 + | |
| apache2/recipes/mod_expires.rb | 20 + | |
| apache2/recipes/mod_fcgid.rb | 35 ++ | |
| apache2/recipes/mod_headers.rb | 20 + | |
| apache2/recipes/mod_ldap.rb | 20 + | |
| apache2/recipes/mod_log_config.rb | 20 + | |
| apache2/recipes/mod_mime.rb | 20 + | |
| apache2/recipes/mod_negotiation.rb | 20 + | |
| apache2/recipes/mod_php5.rb | 20 + | |
| apache2/recipes/mod_proxy.rb | 20 + | |
| apache2/recipes/mod_proxy_http.rb | 20 + | |
| apache2/recipes/mod_python.rb | 22 + | |
| apache2/recipes/mod_rewrite.rb | 20 + | |
| apache2/recipes/mod_setenvif.rb | 20 + | |
| apache2/recipes/mod_ssl.rb | 20 + | |
| apache2/recipes/mod_status.rb | 20 + | |
| apache2/templates/default/a2dismod.erb | 22 + | |
| apache2/templates/default/a2dissite.erb | 29 + | |
| apache2/templates/default/a2enmod.erb | 37 ++ | |
| apache2/templates/default/a2ensite.erb | 38 ++ | |
| apache2/templates/default/apache2.conf.erb | 630 +++++++++++++++++++++ | |
| apache2/templates/default/default-site.erb | 45 ++ | |
| apache2/templates/default/port_apache.erb | 2 + | |
| apache2/templates/default/ports.conf.erb | 6 + | |
| apt/recipes/default.rb | 31 + | |
| build-essential/recipes/default.rb | 43 ++ | |
| chef/recipes/default.rb | 0 | |
| chef/recipes/server.rb | 40 ++ | |
| chef/templates/default/port_chef.erb | 2 + | |
| chef/templates/default/port_couchdb.erb | 2 + | |
| chef/templates/default/sv-chef-indexer-log-run.erb | 3 + | |
| chef/templates/default/sv-chef-indexer-run.erb | 3 + | |
| chef/templates/default/sv-chef-server-log-run.erb | 3 + | |
| chef/templates/default/sv-chef-server-run.erb | 3 + | |
| chef/templates/default/sv-stompserver-log-run.erb | 3 + | |
| chef/templates/default/sv-stompserver-run.erb | 3 + | |
| ec2/attributes/ec2_metadata.rb | 44 ++ | |
| ec2/attributes/ec2_recipe_options.rb | 38 ++ | |
| ec2/recipes/default.rb | 19 + | |
| git/recipes/default.rb | 28 + | |
| iptables/definitions/iptables_rule.rb | 34 ++ | |
| iptables/files/default/rebuild-iptables | 282 +++++++++ | |
| iptables/recipes/default.rb | 37 ++ | |
| iptables/templates/default/all_established.erb | 2 + | |
| iptables/templates/default/all_icmp.erb | 2 + | |
| java/files/default/java.seed | 11 + | |
| java/recipes/default.rb | 47 ++ | |
| jira/attributes/jira.rb | 11 + | |
| jira/files/default/catalina.sh | 323 +++++++++++ | |
| jira/files/default/startup.sh | 48 ++ | |
| jira/recipes/default.rb | 98 ++++ | |
| jira/templates/default/entityengine.xml.erb | 114 ++++ | |
| jira/templates/default/server.xml.erb | 90 +++ | |
| jira/templates/default/sv-jira-run.erb | 5 + | |
| man/recipes/default.rb | 23 + | |
| munin/recipes/default.rb | 41 ++ | |
| munin/templates/default/munin-node.conf.erb | 41 ++ | |
| munin/templates/default/port_munin.erb | 2 + | |
| mysql/attributes/mysql_ec2.rb | 1 + | |
| mysql/recipes/client.rb | 34 ++ | |
| mysql/recipes/default.rb | 20 + | |
| mysql/recipes/server.rb | 64 +++ | |
| mysql/templates/default/port_mysql.erb | 3 + | |
| nginx/attributes/nginx_locations.rb | 12 + | |
| nginx/attributes/nginx_settings.rb | 12 + | |
| nginx/definitions/nginx_site.rb | 37 ++ | |
| nginx/recipes/default.rb | 56 ++ | |
| nginx/templates/default/default-site.erb | 11 + | |
| nginx/templates/default/nginx.conf.erb | 37 ++ | |
| nginx/templates/default/nxdissite.erb | 29 + | |
| nginx/templates/default/nxensite.erb | 38 ++ | |
| openssh/recipes/default.rb | 45 ++ | |
| openssh/templates/default/port_ssh.erb | 2 + | |
| quick_start/attributes/quick_start.rb | 1 + | |
| quick_start/recipes/default.rb | 24 + | |
| quick_start/templates/default/deep_thought.txt.erb | 1 + | |
| redmine/attributes/redmine_settings.rb | 0 | |
| redmine/recipes/default.rb | 27 + | |
| redmine/templates/default/database.yml.erb | 47 ++ | |
| redmine/templates/default/port_redmine.erb | 2 + | |
| redmine/templates/default/settings.yml.erb | 142 +++++ | |
| redmine/templates/default/sv-redmine-log-run.erb | 2 + | |
| redmine/templates/default/sv-redmine-run.erb | 3 + | |
| rsync/recipes/default.rb | 20 + | |
| ruby/recipes/default.rb | 50 ++ | |
| runit/attributes/sv_bin.rb | 27 + | |
| runit/definitions/runit_service.rb | 72 +++ | |
| runit/files/Ubuntu-6.10/runsvdir | 6 + | |
| runit/files/Ubuntu-7.04/runsvdir | 7 + | |
| runit/files/Ubuntu-7.10/runsvdir | 7 + | |
| runit/recipes/default.rb | 45 ++ | |
| screen/recipes/default.rb | 22 + | |
| subversion/recipes/default.rb | 39 ++ | |
| sudo/attributes/sudoers.rb | 30 + | |
| sudo/recipes/default.rb | 33 ++ | |
| sudo/templates/default/sudoers.erb | 22 + | |
| teamspeak/recipes/default.rb | 25 + | |
| teamspeak/templates/default/port_teamspeak.erb | 4 + | |
| ubuntu/recipes/default.rb | 26 + | |
| ubuntu/templates/default/sources.list.erb | 15 + | |
| zsh/recipes/default.rb | 29 + | |
| 123 files changed, 4590 insertions(+) | |
| create mode 100644 LICENSE | |
| create mode 100644 NOTICE | |
| create mode 100644 apache2/attributes/apache.rb | |
| create mode 100644 apache2/definitions/apache_module.rb | |
| create mode 100644 apache2/definitions/apache_site.rb | |
| create mode 100644 apache2/files/default/apache2_module_conf_generate.pl | |
| create mode 100644 apache2/recipes/default.rb | |
| create mode 100644 apache2/recipes/mod_alias.rb | |
| create mode 100644 apache2/recipes/mod_auth_basic.rb | |
| create mode 100644 apache2/recipes/mod_auth_digest.rb | |
| create mode 100644 apache2/recipes/mod_authn_file.rb | |
| create mode 100644 apache2/recipes/mod_authnz_ldap.rb | |
| create mode 100644 apache2/recipes/mod_authz_default.rb | |
| create mode 100644 apache2/recipes/mod_authz_groupfile.rb | |
| create mode 100644 apache2/recipes/mod_authz_host.rb | |
| create mode 100644 apache2/recipes/mod_authz_user.rb | |
| create mode 100644 apache2/recipes/mod_autoindex.rb | |
| create mode 100644 apache2/recipes/mod_cgi.rb | |
| create mode 100644 apache2/recipes/mod_dav.rb | |
| create mode 100644 apache2/recipes/mod_dav_svn.rb | |
| create mode 100644 apache2/recipes/mod_deflate.rb | |
| create mode 100644 apache2/recipes/mod_dir.rb | |
| create mode 100644 apache2/recipes/mod_env.rb | |
| create mode 100644 apache2/recipes/mod_expires.rb | |
| create mode 100644 apache2/recipes/mod_fcgid.rb | |
| create mode 100644 apache2/recipes/mod_headers.rb | |
| create mode 100644 apache2/recipes/mod_ldap.rb | |
| create mode 100644 apache2/recipes/mod_log_config.rb | |
| create mode 100644 apache2/recipes/mod_mime.rb | |
| create mode 100644 apache2/recipes/mod_negotiation.rb | |
| create mode 100644 apache2/recipes/mod_php5.rb | |
| create mode 100644 apache2/recipes/mod_proxy.rb | |
| create mode 100644 apache2/recipes/mod_proxy_http.rb | |
| create mode 100644 apache2/recipes/mod_python.rb | |
| create mode 100644 apache2/recipes/mod_rewrite.rb | |
| create mode 100644 apache2/recipes/mod_setenvif.rb | |
| create mode 100644 apache2/recipes/mod_ssl.rb | |
| create mode 100644 apache2/recipes/mod_status.rb | |
| create mode 100644 apache2/templates/default/a2dismod.erb | |
| create mode 100644 apache2/templates/default/a2dissite.erb | |
| create mode 100644 apache2/templates/default/a2enmod.erb | |
| create mode 100644 apache2/templates/default/a2ensite.erb | |
| create mode 100644 apache2/templates/default/apache2.conf.erb | |
| create mode 100644 apache2/templates/default/default-site.erb | |
| create mode 100644 apache2/templates/default/port_apache.erb | |
| create mode 100644 apache2/templates/default/ports.conf.erb | |
| create mode 100644 apt/recipes/default.rb | |
| create mode 100644 build-essential/recipes/default.rb | |
| create mode 100644 chef/recipes/default.rb | |
| create mode 100644 chef/recipes/server.rb | |
| create mode 100644 chef/templates/default/port_chef.erb | |
| create mode 100644 chef/templates/default/port_couchdb.erb | |
| create mode 100644 chef/templates/default/sv-chef-indexer-log-run.erb | |
| create mode 100644 chef/templates/default/sv-chef-indexer-run.erb | |
| create mode 100644 chef/templates/default/sv-chef-server-log-run.erb | |
| create mode 100644 chef/templates/default/sv-chef-server-run.erb | |
| create mode 100644 chef/templates/default/sv-stompserver-log-run.erb | |
| create mode 100644 chef/templates/default/sv-stompserver-run.erb | |
| create mode 100644 ec2/attributes/ec2_metadata.rb | |
| create mode 100644 ec2/attributes/ec2_recipe_options.rb | |
| create mode 100644 ec2/recipes/default.rb | |
| create mode 100644 git/recipes/default.rb | |
| create mode 100644 iptables/definitions/iptables_rule.rb | |
| create mode 100644 iptables/files/default/rebuild-iptables | |
| create mode 100644 iptables/recipes/default.rb | |
| create mode 100644 iptables/templates/default/all_established.erb | |
| create mode 100644 iptables/templates/default/all_icmp.erb | |
| create mode 100644 java/files/default/java.seed | |
| create mode 100644 java/recipes/default.rb | |
| create mode 100644 jira/attributes/jira.rb | |
| create mode 100644 jira/files/default/catalina.sh | |
| create mode 100644 jira/files/default/startup.sh | |
| create mode 100644 jira/recipes/default.rb | |
| create mode 100644 jira/templates/default/entityengine.xml.erb | |
| create mode 100644 jira/templates/default/server.xml.erb | |
| create mode 100644 jira/templates/default/sv-jira-run.erb | |
| create mode 100644 man/recipes/default.rb | |
| create mode 100644 munin/recipes/default.rb | |
| create mode 100644 munin/templates/default/munin-node.conf.erb | |
| create mode 100644 munin/templates/default/port_munin.erb | |
| create mode 100644 mysql/attributes/mysql_ec2.rb | |
| create mode 100644 mysql/recipes/client.rb | |
| create mode 100644 mysql/recipes/default.rb | |
| create mode 100644 mysql/recipes/server.rb | |
| create mode 100644 mysql/templates/default/port_mysql.erb | |
| create mode 100644 nginx/attributes/nginx_locations.rb | |
| create mode 100644 nginx/attributes/nginx_settings.rb | |
| create mode 100644 nginx/definitions/nginx_site.rb | |
| create mode 100644 nginx/recipes/default.rb | |
| create mode 100644 nginx/templates/default/default-site.erb | |
| create mode 100644 nginx/templates/default/nginx.conf.erb | |
| create mode 100644 nginx/templates/default/nxdissite.erb | |
| create mode 100644 nginx/templates/default/nxensite.erb | |
| create mode 100644 openssh/recipes/default.rb | |
| create mode 100644 openssh/templates/default/port_ssh.erb | |
| create mode 100644 quick_start/attributes/quick_start.rb | |
| create mode 100644 quick_start/recipes/default.rb | |
| create mode 100644 quick_start/templates/default/deep_thought.txt.erb | |
| create mode 100644 redmine/attributes/redmine_settings.rb | |
| create mode 100644 redmine/recipes/default.rb | |
| create mode 100644 redmine/templates/default/database.yml.erb | |
| create mode 100644 redmine/templates/default/port_redmine.erb | |
| create mode 100644 redmine/templates/default/settings.yml.erb | |
| create mode 100644 redmine/templates/default/sv-redmine-log-run.erb | |
| create mode 100644 redmine/templates/default/sv-redmine-run.erb | |
| create mode 100644 rsync/recipes/default.rb | |
| create mode 100644 ruby/recipes/default.rb | |
| create mode 100644 runit/attributes/sv_bin.rb | |
| create mode 100644 runit/definitions/runit_service.rb | |
| create mode 100644 runit/files/Ubuntu-6.10/runsvdir | |
| create mode 100644 runit/files/Ubuntu-7.04/runsvdir | |
| create mode 100644 runit/files/Ubuntu-7.10/runsvdir | |
| create mode 100644 runit/recipes/default.rb | |
| create mode 100644 screen/recipes/default.rb | |
| create mode 100644 subversion/recipes/default.rb | |
| create mode 100644 sudo/attributes/sudoers.rb | |
| create mode 100644 sudo/recipes/default.rb | |
| create mode 100644 sudo/templates/default/sudoers.erb | |
| create mode 100644 teamspeak/recipes/default.rb | |
| create mode 100644 teamspeak/templates/default/port_teamspeak.erb | |
| create mode 100644 ubuntu/recipes/default.rb | |
| create mode 100644 ubuntu/templates/default/sources.list.erb | |
| create mode 100644 zsh/recipes/default.rb | |
| diff --git a/LICENSE b/LICENSE | |
| new file mode 100644 | |
| index 0000000..11069ed | |
| --- /dev/null | |
| +++ b/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. | |
| diff --git a/NOTICE b/NOTICE | |
| new file mode 100644 | |
| index 0000000..466b468 | |
| --- /dev/null | |
| +++ b/NOTICE | |
| @@ -0,0 +1,12 @@ | |
| +========================= | |
| +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> | |
| + | |
| diff --git a/apache2/attributes/apache.rb b/apache2/attributes/apache.rb | |
| new file mode 100644 | |
| index 0000000..76cef37 | |
| --- /dev/null | |
| +++ b/apache2/attributes/apache.rb | |
| @@ -0,0 +1,72 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Attributes:: apache | |
| +# | |
| +# Copyright 2008, 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 Mash.new unless attribute?("apache") | |
| + | |
| +# Where the various parts of apache are | |
| +case platform | |
| +when "redhat","centos","fedora","suse" | |
| + apache[:dir] = "/etc/httpd" | |
| + apache[:log_dir] = "/var/log/httpd" | |
| + apache[:user] = "apache" | |
| + apache[:binary] = "/usr/sbin/httpd" | |
| + apache[:icondir] = "/var/www/icons" | |
| +when "debian","ubuntu" | |
| + apache[:dir] = "/etc/apache2" | |
| + apache[:log_dir] = "/var/log/apache2" | |
| + apache[:user] = "www-data" | |
| + apache[:binary] = "/usr/sbin/apache2" | |
| + apache[:icondir] = "/usr/share/apache2/icons" | |
| +else | |
| + apache[:dir] = "/etc/apache2" | |
| + apache[:log_dir] = "/var/log/apache2" | |
| + apache[:user] = "www-data" | |
| + apache[:binary] = "/usr/sbin/apache2" | |
| + 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 | |
| +apache[:listen_ports] = [ "80" ] unless apache.has_key?(:listen_ports) | |
| +apache[:contact] = "ops@example.com" unless apache.has_key?(:contact) | |
| +apache[:timeout] = 300 unless apache.has_key?(:timeout) | |
| +apache[:keepalive] = "On" unless apache.has_key?(:keepalive) | |
| +apache[:keepaliverequests] = 100 unless apache.has_key?(:keepaliverequests) | |
| +apache[:keepalivetimeout] = 5 unless apache.has_key?(:keepalivetimeout) | |
| + | |
| +# Prefork Attributes | |
| +apache[:prefork] = Mash.new unless apache.has_key?(:prefork) | |
| +apache[:prefork][:startservers] = 16 unless apache[:prefork].has_key?(:prefork_startservers) | |
| +apache[:prefork][:minspareservers] = 16 unless apache[:prefork].has_key?(:prefork_minspareservers) | |
| +apache[:prefork][:maxspareservers] = 32 unless apache[:prefork].has_key?(:prefork_maxspareservers) | |
| +apache[:prefork][:maxclients] = 400 unless apache[:prefork].has_key?(:prefork_maxclients) | |
| +apache[:prefork][:maxrequestsperchild] = 10000 unless apache[:prefork].has_key?(:prefork_maxrequestsperchild) | |
| + | |
| +# Worker Attributes | |
| +apache[:worker] = Mash.new unless apache.has_key?(:worker) | |
| +apache[:worker][:startservers] = 4 unless apache[:worker].has_key?(:startservers) | |
| +apache[:worker][:maxclients] = 1024 unless apache[:worker].has_key?(:maxclients) | |
| +apache[:worker][:minsparethreads] = 64 unless apache[:worker].has_key?(:minsparethreads) | |
| +apache[:worker][:maxsparethreads] = 192 unless apache[:worker].has_key?(:maxsparethreads) | |
| +apache[:worker][:threadsperchild] = 64 unless apache[:worker].has_key?(:threadsperchild) | |
| +apache[:worker][:maxrequestsperchild] = 0 unless apache[:worker].has_key?(:maxrequestsperchild) | |
| \ No newline at end of file | |
| diff --git a/apache2/definitions/apache_module.rb b/apache2/definitions/apache_module.rb | |
| new file mode 100644 | |
| index 0000000..98c0e73 | |
| --- /dev/null | |
| +++ b/apache2/definitions/apache_module.rb | |
| @@ -0,0 +1,36 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Definition:: apache_module | |
| +# | |
| +# Copyright 2008, 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 do | |
| + include_recipe "apache2" | |
| + | |
| + 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") 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 | |
| diff --git a/apache2/definitions/apache_site.rb b/apache2/definitions/apache_site.rb | |
| new file mode 100644 | |
| index 0000000..776cd2f | |
| --- /dev/null | |
| +++ b/apache2/definitions/apache_site.rb | |
| @@ -0,0 +1,36 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Definition:: apache_site | |
| +# | |
| +# Copyright 2008, 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]}") 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 | |
| diff --git a/apache2/files/default/apache2_module_conf_generate.pl b/apache2/files/default/apache2_module_conf_generate.pl | |
| new file mode 100644 | |
| index 0000000..3268a2f | |
| --- /dev/null | |
| +++ b/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_genereate.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 =~ /mod_(.+)\.so$/; | |
| + my $modname = $1; | |
| + 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; | |
| + | |
| diff --git a/apache2/recipes/default.rb b/apache2/recipes/default.rb | |
| new file mode 100644 | |
| index 0000000..343d8de | |
| --- /dev/null | |
| +++ b/apache2/recipes/default.rb | |
| @@ -0,0 +1,141 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: default | |
| +# | |
| +# Copyright 2008, 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 "iptables" | |
| + | |
| +package "apache2" do | |
| + case node[:platform] | |
| + when "CentOS","RedHat","Fedora","SuSE" | |
| + name "httpd" | |
| + when "Debian","Ubuntu" | |
| + name "apache2" | |
| + end | |
| + action :install | |
| +end | |
| + | |
| +service "apache2" do | |
| + case node[:platform] | |
| + when "CentOS","RedHat","Fedora","SuSE" | |
| + name "httpd" | |
| + when "Debian","Ubuntu" | |
| + name "apache2" | |
| + end | |
| + supports :restart => true | |
| + 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 | |
| + command "/usr/local/bin/apache2_module_conf_generate.pl /usr/#{node[:architecture]}/httpd/modules /etc/httpd/mods-available" | |
| + action :run | |
| + end | |
| + | |
| + %w{a2ensite a2dissite s2enmod s2dismod}.each do |modscript| | |
| + template "/usr/sbin/#{modscript}" do | |
| + source "#{modscript}.erb" | |
| + mode 0755 | |
| + owner "root" | |
| + group "root" | |
| + end | |
| + 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" | |
| + group "root" | |
| + mode 0644 | |
| +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 | |
| +end | |
| + | |
| +node[:apache][:listen_ports].each do |port| | |
| + iptables_rule "port_#{port}" do | |
| + source "port_apache.erb" | |
| + variables :port => port | |
| + end | |
| +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", "SuSE") | |
| + | |
| +service "apache2" do | |
| + action :start | |
| +end | |
| \ No newline at end of file | |
| diff --git a/apache2/recipes/mod_alias.rb b/apache2/recipes/mod_alias.rb | |
| new file mode 100644 | |
| index 0000000..5a80b77 | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_alias.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: alias | |
| +# | |
| +# Copyright 2008, 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" | |
| diff --git a/apache2/recipes/mod_auth_basic.rb b/apache2/recipes/mod_auth_basic.rb | |
| new file mode 100644 | |
| index 0000000..0af588e | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_auth_basic.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: auth_basic | |
| +# | |
| +# Copyright 2008, 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" | |
| diff --git a/apache2/recipes/mod_auth_digest.rb b/apache2/recipes/mod_auth_digest.rb | |
| new file mode 100644 | |
| index 0000000..e2fcb3d | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_auth_digest.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: auth_digest | |
| +# | |
| +# Copyright 2008, 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" | |
| diff --git a/apache2/recipes/mod_authn_file.rb b/apache2/recipes/mod_authn_file.rb | |
| new file mode 100644 | |
| index 0000000..8e2e144 | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_authn_file.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: authn_file | |
| +# | |
| +# Copyright 2008, 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" | |
| diff --git a/apache2/recipes/mod_authnz_ldap.rb b/apache2/recipes/mod_authnz_ldap.rb | |
| new file mode 100644 | |
| index 0000000..79cf9e0 | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_authnz_ldap.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: authnz_ldap | |
| +# | |
| +# Copyright 2008, 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" | |
| diff --git a/apache2/recipes/mod_authz_default.rb b/apache2/recipes/mod_authz_default.rb | |
| new file mode 100644 | |
| index 0000000..5f427fe | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_authz_default.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: authz_default | |
| +# | |
| +# Copyright 2008, 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" | |
| diff --git a/apache2/recipes/mod_authz_groupfile.rb b/apache2/recipes/mod_authz_groupfile.rb | |
| new file mode 100644 | |
| index 0000000..d49a48b | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_authz_groupfile.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: authz_groupfile | |
| +# | |
| +# Copyright 2008, 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" | |
| diff --git a/apache2/recipes/mod_authz_host.rb b/apache2/recipes/mod_authz_host.rb | |
| new file mode 100644 | |
| index 0000000..5e28194 | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_authz_host.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: authz_host | |
| +# | |
| +# Copyright 2008, 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" | |
| diff --git a/apache2/recipes/mod_authz_user.rb b/apache2/recipes/mod_authz_user.rb | |
| new file mode 100644 | |
| index 0000000..695b9ee | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_authz_user.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: authz_user | |
| +# | |
| +# Copyright 2008, 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" | |
| diff --git a/apache2/recipes/mod_autoindex.rb b/apache2/recipes/mod_autoindex.rb | |
| new file mode 100644 | |
| index 0000000..80c938f | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_autoindex.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: autoindex | |
| +# | |
| +# Copyright 2008, 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" | |
| diff --git a/apache2/recipes/mod_cgi.rb b/apache2/recipes/mod_cgi.rb | |
| new file mode 100644 | |
| index 0000000..e03b4c5 | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_cgi.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: cgi | |
| +# | |
| +# Copyright 2008, 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" | |
| diff --git a/apache2/recipes/mod_dav.rb b/apache2/recipes/mod_dav.rb | |
| new file mode 100644 | |
| index 0000000..3a6e155 | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_dav.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: dav | |
| +# | |
| +# Copyright 2008, 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" | |
| diff --git a/apache2/recipes/mod_dav_svn.rb b/apache2/recipes/mod_dav_svn.rb | |
| new file mode 100644 | |
| index 0000000..e7b1bf7 | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_dav_svn.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: dav_svn | |
| +# | |
| +# Copyright 2008, 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_svn" | |
| diff --git a/apache2/recipes/mod_deflate.rb b/apache2/recipes/mod_deflate.rb | |
| new file mode 100644 | |
| index 0000000..7f44633 | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_deflate.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: deflate | |
| +# | |
| +# Copyright 2008, 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" | |
| diff --git a/apache2/recipes/mod_dir.rb b/apache2/recipes/mod_dir.rb | |
| new file mode 100644 | |
| index 0000000..c1cd9e0 | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_dir.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: dir | |
| +# | |
| +# Copyright 2008, 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" | |
| diff --git a/apache2/recipes/mod_env.rb b/apache2/recipes/mod_env.rb | |
| new file mode 100644 | |
| index 0000000..f81be6a | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_env.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: env | |
| +# | |
| +# Copyright 2008, 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" | |
| diff --git a/apache2/recipes/mod_expires.rb b/apache2/recipes/mod_expires.rb | |
| new file mode 100644 | |
| index 0000000..66d1e23 | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_expires.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: expires | |
| +# | |
| +# Copyright 2008, 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" | |
| diff --git a/apache2/recipes/mod_fcgid.rb b/apache2/recipes/mod_fcgid.rb | |
| new file mode 100644 | |
| index 0000000..6adefe8 | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_fcgid.rb | |
| @@ -0,0 +1,35 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: fcgid | |
| +# | |
| +# Copyright 2008, 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", "SuSE") | |
| + apache_lib_path = node[:architecture] == "i386" ? "/usr/lib/httpd" : "/usr/lib64/httpd" | |
| + package "httpd-devel" | |
| + bash "install-fcgid" do | |
| + code <<-EOH | |
| +(cd /tmp; wget http://superb-east.dl.sourceforge.net/sourceforge/mod-fcgid/mod_fcgid.2.2.tgz) | |
| +(cd /tmp; tar zxvf mod_fcgid.2.2.tgz) | |
| +(cd /tmp; perl -pi -e 's!/usr/local/apache2!#{apache_lib_path}!g' ./mod_fcgid.2.2/Makefile) | |
| +(cd /tmp/mod_fcgid.2.2; make install) | |
| +EOH | |
| + end | |
| +end | |
| + | |
| +apache_module "fcgid" | |
| diff --git a/apache2/recipes/mod_headers.rb b/apache2/recipes/mod_headers.rb | |
| new file mode 100644 | |
| index 0000000..41374ae | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_headers.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: headers | |
| +# | |
| +# Copyright 2008, 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" | |
| diff --git a/apache2/recipes/mod_ldap.rb b/apache2/recipes/mod_ldap.rb | |
| new file mode 100644 | |
| index 0000000..14e6a8d | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_ldap.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: ldap | |
| +# | |
| +# Copyright 2008, 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 "ldap" | |
| diff --git a/apache2/recipes/mod_log_config.rb b/apache2/recipes/mod_log_config.rb | |
| new file mode 100644 | |
| index 0000000..b425587 | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_log_config.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: log_config | |
| +# | |
| +# Copyright 2008, 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 "log_config" | |
| diff --git a/apache2/recipes/mod_mime.rb b/apache2/recipes/mod_mime.rb | |
| new file mode 100644 | |
| index 0000000..e366648 | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_mime.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: mime | |
| +# | |
| +# Copyright 2008, 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 "mime" | |
| diff --git a/apache2/recipes/mod_negotiation.rb b/apache2/recipes/mod_negotiation.rb | |
| new file mode 100644 | |
| index 0000000..453ba68 | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_negotiation.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: negotiation | |
| +# | |
| +# Copyright 2008, 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 "negotiation" | |
| diff --git a/apache2/recipes/mod_php5.rb b/apache2/recipes/mod_php5.rb | |
| new file mode 100644 | |
| index 0000000..d814188 | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_php5.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: php5 | |
| +# | |
| +# Copyright 2008, 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 "php5" | |
| diff --git a/apache2/recipes/mod_proxy.rb b/apache2/recipes/mod_proxy.rb | |
| new file mode 100644 | |
| index 0000000..29364a5 | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_proxy.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: proxy | |
| +# | |
| +# Copyright 2008, 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 "proxy" | |
| diff --git a/apache2/recipes/mod_proxy_http.rb b/apache2/recipes/mod_proxy_http.rb | |
| new file mode 100644 | |
| index 0000000..e1b64f3 | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_proxy_http.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: proxy_http | |
| +# | |
| +# Copyright 2008, 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 "proxy_http" | |
| diff --git a/apache2/recipes/mod_python.rb b/apache2/recipes/mod_python.rb | |
| new file mode 100644 | |
| index 0000000..82b996f | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_python.rb | |
| @@ -0,0 +1,22 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: python | |
| +# | |
| +# Copyright 2008, 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-mod-python" | |
| + | |
| +apache_module "python" | |
| diff --git a/apache2/recipes/mod_rewrite.rb b/apache2/recipes/mod_rewrite.rb | |
| new file mode 100644 | |
| index 0000000..501538e | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_rewrite.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: rewrite | |
| +# | |
| +# Copyright 2008, 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 "rewrite" | |
| diff --git a/apache2/recipes/mod_setenvif.rb b/apache2/recipes/mod_setenvif.rb | |
| new file mode 100644 | |
| index 0000000..a53d297 | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_setenvif.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: setenvif | |
| +# | |
| +# Copyright 2008, 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 "setenvif" | |
| diff --git a/apache2/recipes/mod_ssl.rb b/apache2/recipes/mod_ssl.rb | |
| new file mode 100644 | |
| index 0000000..1e55fa2 | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_ssl.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: ssl | |
| +# | |
| +# Copyright 2008, 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 "ssl" | |
| diff --git a/apache2/recipes/mod_status.rb b/apache2/recipes/mod_status.rb | |
| new file mode 100644 | |
| index 0000000..79b2257 | |
| --- /dev/null | |
| +++ b/apache2/recipes/mod_status.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: apache2 | |
| +# Recipe:: status | |
| +# | |
| +# Copyright 2008, 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 "status" | |
| diff --git a/apache2/templates/default/a2dismod.erb b/apache2/templates/default/a2dismod.erb | |
| new file mode 100644 | |
| index 0000000..bcb73bf | |
| --- /dev/null | |
| +++ b/apache2/templates/default/a2dismod.erb | |
| @@ -0,0 +1,22 @@ | |
| +#!/bin/sh -e | |
| + | |
| +SYSCONFDIR='<%= @node[:apache][:dir] %>' | |
| + | |
| +if [ -z $1 ]; then | |
| + echo "Which module would you like to disable?" | |
| + echo -n "Your choices are: " | |
| + ls $SYSCONFDIR/mods-enabled/*.load | \ | |
| + sed -e "s,$SYSCONFDIR/mods-enabled/,,g" | sed -e 's/\.load$//g;' | xargs echo | |
| + echo -n "Module name? " | |
| + read MODNAME | |
| +else | |
| + MODNAME=$1 | |
| +fi | |
| + | |
| +if ! [ -e $SYSCONFDIR/mods-enabled/$MODNAME.load ]; then | |
| + echo "This module is already disabled, or does not exist!" | |
| + exit 1 | |
| +fi | |
| + | |
| +rm -f $SYSCONFDIR/mods-enabled/$MODNAME.* | |
| +echo "Module $MODNAME disabled; reload apache to fully disable." | |
| \ No newline at end of file | |
| diff --git a/apache2/templates/default/a2dissite.erb b/apache2/templates/default/a2dissite.erb | |
| new file mode 100644 | |
| index 0000000..7bcd80e | |
| --- /dev/null | |
| +++ b/apache2/templates/default/a2dissite.erb | |
| @@ -0,0 +1,29 @@ | |
| +#!/bin/sh -e | |
| + | |
| +SYSCONFDIR='<%= @node[:apache][:dir] %>' | |
| + | |
| +if [ -z $1 ]; then | |
| + echo "Which site would you like to disable?" | |
| + echo -n "Your choices are: " | |
| + ls $@node[:apache][:dir]/sites-enabled/* | \ | |
| + sed -e "s,$SYSCONFDIR/sites-enabled/,,g" | xargs echo | |
| + echo -n "Site name? " | |
| + read SITENAME | |
| +else | |
| + SITENAME=$1 | |
| +fi | |
| + | |
| +if [ $SITENAME = "default" ]; then | |
| + PRIORITY="000" | |
| +fi | |
| + | |
| +if ! [ -e $SYSCONFDIR/sites-enabled/$SITENAME -o \ | |
| + -e $SYSCONFDIR/sites-enabled/"$PRIORITY"-"$SITENAME" ]; then | |
| + echo "This site is already disabled, or does not exist!" | |
| + exit 1 | |
| +fi | |
| + | |
| +if ! rm $SYSCONFDIR/sites-enabled/$SITENAME 2>/dev/null; then | |
| + rm -f $SYSCONFDIR/sites-enabled/"$PRIORITY"-"$SITENAME" | |
| +fi | |
| +echo "Site $SITENAME disabled; reload apache to disable." | |
| \ No newline at end of file | |
| diff --git a/apache2/templates/default/a2enmod.erb b/apache2/templates/default/a2enmod.erb | |
| new file mode 100644 | |
| index 0000000..d5d09d8 | |
| --- /dev/null | |
| +++ b/apache2/templates/default/a2enmod.erb | |
| @@ -0,0 +1,37 @@ | |
| +#!/bin/sh -e | |
| + | |
| +SYSCONFDIR='<%= @node[:apache][:dir] %>' | |
| + | |
| +if [ -z $1 ]; then | |
| + echo "Which module would you like to enable?" | |
| + echo -n "Your choices are: " | |
| + ls $SYSCONFDIR/mods-available/*.load | \ | |
| + sed -e "s,$SYSCONFDIR/mods-available/,,g" | sed -e 's/\.load$//g;' | xargs echo | |
| + echo -n "Module name? " | |
| + read MODNAME | |
| +else | |
| + MODNAME=$1 | |
| +fi | |
| + | |
| +#figure out if we're on a prefork or threaded mpm | |
| +if [ -x /usr/sbin/apache2 ]; then | |
| + PREFORK=`/usr/sbin/apache2 -l | grep prefork || true` | |
| +fi | |
| + | |
| +if [ -e $SYSCONFDIR/mods-enabled/$MODNAME.load ]; then | |
| + echo "This module is already enabled!" | |
| + exit 0 | |
| +fi | |
| + | |
| +if ! [ -e $SYSCONFDIR/mods-available/$MODNAME.load ]; then | |
| + echo "This module does not exist!" | |
| + exit 1 | |
| +fi | |
| + | |
| +for i in conf load; do | |
| + if [ -e $SYSCONFDIR/mods-available/$MODNAME.$i -a ! -e $SYSCONFDIR/mods-enabled/$MODNAME.$i ]; then | |
| + ln -sf $SYSCONFDIR/mods-available/$MODNAME.$i $SYSCONFDIR/mods-enabled/$MODNAME.$i; | |
| + fi | |
| +done | |
| + | |
| +echo "Module $MODNAME installed; reload apache to enable." | |
| \ No newline at end of file | |
| diff --git a/apache2/templates/default/a2ensite.erb b/apache2/templates/default/a2ensite.erb | |
| new file mode 100644 | |
| index 0000000..68b3a15 | |
| --- /dev/null | |
| +++ b/apache2/templates/default/a2ensite.erb | |
| @@ -0,0 +1,38 @@ | |
| +#!/bin/sh -e | |
| + | |
| +SYSCONFDIR='<%= @node[:apache][:dir] %>' | |
| + | |
| +if [ -z $1 ]; then | |
| + echo "Which site would you like to enable?" | |
| + echo -n "Your choices are: " | |
| + ls $SYSCONFDIR/sites-available/* | \ | |
| + sed -e "s,$SYSCONFDIR/sites-available/,,g" | xargs echo | |
| + echo -n "Site name? " | |
| + read SITENAME | |
| +else | |
| + SITENAME=$1 | |
| +fi | |
| + | |
| +if [ $SITENAME = "default" ]; then | |
| + PRIORITY="000" | |
| +fi | |
| + | |
| +if [ -e $SYSCONFDIR/sites-enabled/$SITENAME -o \ | |
| + -e $SYSCONFDIR/sites-enabled/"$PRIORITY"-"$SITENAME" ]; then | |
| + echo "This site is already enabled!" | |
| + exit 0 | |
| +fi | |
| + | |
| +if ! [ -e $SYSCONFDIR/sites-available/$SITENAME ]; then | |
| + echo "This site does not exist!" | |
| + exit 1 | |
| +fi | |
| + | |
| +if [ $SITENAME = "default" ]; then | |
| + ln -sf $SYSCONFDIR/sites-available/$SITENAME \ | |
| + $SYSCONFDIR/sites-enabled/"$PRIORITY"-"$SITENAME" | |
| +else | |
| + ln -sf $SYSCONFDIR/sites-available/$SITENAME $SYSCONFDIR/sites-enabled/$SITENAME | |
| +fi | |
| + | |
| +echo "Site $SITENAME installed; reload apache to enable." | |
| \ No newline at end of file | |
| diff --git a/apache2/templates/default/apache2.conf.erb b/apache2/templates/default/apache2.conf.erb | |
| new file mode 100644 | |
| index 0000000..78e2685 | |
| --- /dev/null | |
| +++ b/apache2/templates/default/apache2.conf.erb | |
| @@ -0,0 +1,630 @@ | |
| +# | |
| +# Generated by Puppet | |
| +# | |
| +# Based on the Ubuntu apache2.conf | |
| + | |
| +ServerRoot "<%= @node[:apache][:dir] %>" | |
| + | |
| +# | |
| +# The accept serialization lock file MUST BE STORED ON A LOCAL DISK. | |
| +# | |
| +<% if @node[:platform] == "debian" || @node[:platform] == "ubuntu" -%> | |
| +LockFile /var/lock/apache2/accept.lock | |
| +<% else %> | |
| +LockFile logs/accept.lock | |
| +<% end -%> | |
| + | |
| +# | |
| +# PidFile: The file in which the server should record its process | |
| +# identification number when it starts. | |
| +# | |
| +<% if @node[:platform] == "debian" || @node[:platform] == "ubuntu" -%> | |
| +PidFile /var/run/apache2.pid | |
| +<% else -%> | |
| +PidFile logs/httpd.pid | |
| +<% end -%> | |
| + | |
| +# | |
| +# Timeout: The number of seconds before receives and sends time out. | |
| +# | |
| +Timeout <%= @node[:apache][:timeout] %> | |
| + | |
| +# | |
| +# KeepAlive: Whether or not to allow persistent connections (more than | |
| +# one request per connection). Set to "Off" to deactivate. | |
| +# | |
| +KeepAlive <%= @node[:apache][:keepalive] %> | |
| + | |
| +# | |
| +# MaxKeepAliveRequests: The maximum number of requests to allow | |
| +# during a persistent connection. Set to 0 to allow an unlimited amount. | |
| +# We recommend you leave this number high, for maximum performance. | |
| +# | |
| +MaxKeepAliveRequests <%= @node[:apache][:keepaliverequests] %> | |
| + | |
| +# | |
| +# KeepAliveTimeout: Number of seconds to wait for the next request from the | |
| +# same client on the same connection. | |
| +# | |
| +KeepAliveTimeout <%= @node[:apache][:keepalivetimeout] %> | |
| + | |
| +## | |
| +## Server-Pool Size Regulation (MPM specific) | |
| +## | |
| + | |
| +# prefork MPM | |
| +# StartServers: number of server processes to start | |
| +# MinSpareServers: minimum number of server processes which are kept spare | |
| +# MaxSpareServers: maximum number of server processes which are kept spare | |
| +# MaxClients: maximum number of server processes allowed to start | |
| +# MaxRequestsPerChild: maximum number of requests a server process serves | |
| +<IfModule mpm_prefork_module> | |
| + StartServers <%= @node[:apache][:prefork][:startservers] %> | |
| + MinSpareServers <%= @node[:apache][:prefork][:minspareservers] %> | |
| + MaxSpareServers <%= @node[:apache][:prefork][:maxspareservers] %> | |
| + MaxClients <%= @node[:apache][:prefork][:maxclients] %> | |
| + MaxRequestsPerChild <%= @node[:apache][:prefork][:maxrequestsperchild] %> | |
| +</IfModule> | |
| + | |
| +# worker MPM | |
| +# StartServers: initial number of server processes to start | |
| +# MaxClients: maximum number of simultaneous client connections | |
| +# MinSpareThreads: minimum number of worker threads which are kept spare | |
| +# MaxSpareThreads: maximum number of worker threads which are kept spare | |
| +# ThreadsPerChild: constant number of worker threads in each server process | |
| +# MaxRequestsPerChild: maximum number of requests a server process serves | |
| +<IfModule mpm_worker_module> | |
| + StartServers <%= @node[:apache][:worker][:startservers] %> | |
| + MaxClients <%= @node[:apache][:worker][:maxclients] %> | |
| + MinSpareThreads <%= @node[:apache][:worker][:minsparethreads] %> | |
| + MaxSpareThreads <%= @node[:apache][:worker][:maxsparethreads] %> | |
| + ThreadsPerChild <%= @node[:apache][:worker][:threadsperchild] %> | |
| + MaxRequestsPerChild <%= @node[:apache][:worker][:maxrequestsperchild] %> | |
| +</IfModule> | |
| + | |
| +User <%= @node[:apache][:user] %> | |
| +Group <%= @node[:apache][:user] %> | |
| + | |
| +# | |
| +# AccessFileName: The name of the file to look for in each directory | |
| +# for additional configuration directives. See also the AllowOverride | |
| +# directive. | |
| +# | |
| + | |
| +AccessFileName .htaccess | |
| + | |
| +# | |
| +# The following lines prevent .htaccess and .htpasswd files from being | |
| +# viewed by Web clients. | |
| +# | |
| +<Files ~ "^\.ht"> | |
| + Order allow,deny | |
| + Deny from all | |
| +</Files> | |
| + | |
| +TypesConfig /etc/mime.types | |
| + | |
| +# | |
| +# DefaultType is the default MIME type the server will use for a document | |
| +# if it cannot otherwise determine one, such as from filename extensions. | |
| +# If your server contains mostly text or HTML documents, "text/plain" is | |
| +# a good value. If most of your content is binary, such as applications | |
| +# or images, you may want to use "application/octet-stream" instead to | |
| +# keep browsers from trying to display binary files as though they are | |
| +# text. | |
| +# | |
| +DefaultType text/plain | |
| + | |
| + | |
| +# | |
| +# HostnameLookups: Log the names of clients or just their IP addresses | |
| +# e.g., www.apache.org (on) or 204.62.129.132 (off). | |
| +# The default is off because it'd be overall better for the net if people | |
| +# had to knowingly turn this feature on, since enabling it means that | |
| +# each client request will result in AT LEAST one lookup request to the | |
| +# nameserver. | |
| +# | |
| +HostnameLookups Off | |
| + | |
| +# ErrorLog: The location of the error log file. | |
| +# If you do not specify an ErrorLog directive within a <VirtualHost> | |
| +# container, error messages relating to that virtual host will be | |
| +# logged here. If you *do* define an error logfile for a <VirtualHost> | |
| +# container, that host's errors will be logged there and not here. | |
| +# | |
| +ErrorLog <%= @node[:apache][:log_dir] %>/error.log | |
| + | |
| +# | |
| +# LogLevel: Control the number of messages logged to the error_log. | |
| +# Possible values include: debug, info, notice, warn, error, crit, | |
| +# alert, emerg. | |
| +# | |
| +LogLevel warn | |
| + | |
| +# Include module configuration: | |
| +Include <%= @node[:apache][:dir] %>/mods-enabled/*.load | |
| +Include <%= @node[:apache][:dir] %>/mods-enabled/*.conf | |
| + | |
| +# Include ports listing | |
| +Include <%= @node[:apache][:dir] %>/ports.conf | |
| + | |
| +# Include generic snippets of statements | |
| +Include <%= @node[:apache][:dir] %>/conf.d/*.conf | |
| + | |
| +# | |
| +# The following directives define some format nicknames for use with | |
| +# a CustomLog directive (see below). | |
| +# | |
| +LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined | |
| +LogFormat "%h %l %u %t \"%r\" %>s %b" common | |
| +LogFormat "%{Referer}i -> %U" referer | |
| +LogFormat "%{User-agent}i" agent | |
| + | |
| +# | |
| +# ServerTokens | |
| +# This directive configures what you return as the Server HTTP response | |
| +# Header. The default is 'Full' which sends information about the OS-Type | |
| +# and compiled in modules. | |
| +# Set to one of: Full | OS | Minor | Minimal | Major | Prod | |
| +# where Full conveys the most information, and Prod the least. | |
| +# | |
| +ServerTokens Full | |
| + | |
| +# | |
| +# Optionally add a line containing the server version and virtual host | |
| +# name to server-generated pages (internal error documents, FTP directory | |
| +# listings, mod_status and mod_info output etc., but not CGI generated | |
| +# documents or custom error documents). | |
| +# Set to "EMail" to also include a mailto: link to the ServerAdmin. | |
| +# Set to one of: On | Off | EMail | |
| +# | |
| +ServerSignature On | |
| + | |
| +<IfModule alias_module> | |
| + # | |
| + # Aliases: Add here as many aliases as you need (with no limit). The format is | |
| + # Alias fakename realname | |
| + # | |
| + # Note that if you include a trailing / on fakename then the server will | |
| + # require it to be present in the URL. So "/icons" isn't aliased in this | |
| + # example, only "/icons/". If the fakename is slash-terminated, then the | |
| + # realname must also be slash terminated, and if the fakename omits the | |
| + # trailing slash, the realname must also omit it. | |
| + # | |
| + # We include the /icons/ alias for FancyIndexed directory listings. If | |
| + # you do not use FancyIndexing, you may comment this out. | |
| + Alias /icons/ "<%= @node[:apache][:icondir] %>" | |
| + | |
| + <Directory "<%= @node[:apache][:icondir] %>"> | |
| + Options Indexes MultiViews | |
| + AllowOverride None | |
| + Order allow,deny | |
| + Allow from all | |
| + </Directory> | |
| + | |
| +</IfModule> | |
| + | |
| +# | |
| +# Directives controlling the display of server-generated directory listings. | |
| +# | |
| +<IfModule mod_autoindex.c> | |
| + | |
| + # | |
| + # IndexOptions: Controls the appearance of server-generated directory | |
| + # listings. | |
| + # | |
| + IndexOptions FancyIndexing VersionSort HTMLTable NameWidth=* | |
| + | |
| + # | |
| + # AddIcon* directives tell the server which icon to show for different | |
| + # files or filename extensions. These are only displayed for | |
| + # FancyIndexed directories. | |
| + # | |
| + AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip | |
| + | |
| + AddIconByType (TXT,/icons/text.gif) text/* | |
| + AddIconByType (IMG,/icons/image2.gif) image/* | |
| + AddIconByType (SND,/icons/sound2.gif) audio/* | |
| + AddIconByType (VID,/icons/movie.gif) video/* | |
| + | |
| + AddIcon /icons/binary.gif .bin .exe | |
| + AddIcon /icons/binhex.gif .hqx | |
| + AddIcon /icons/tar.gif .tar | |
| + AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv | |
| + AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip | |
| + AddIcon /icons/a.gif .ps .ai .eps | |
| + AddIcon /icons/layout.gif .html .shtml .htm .pdf | |
| + AddIcon /icons/text.gif .txt | |
| + AddIcon /icons/c.gif .c | |
| + AddIcon /icons/p.gif .pl .py | |
| + AddIcon /icons/f.gif .for | |
| + AddIcon /icons/dvi.gif .dvi | |
| + AddIcon /icons/uuencoded.gif .uu | |
| + AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl | |
| + AddIcon /icons/tex.gif .tex | |
| + AddIcon /icons/bomb.gif core | |
| + | |
| + AddIcon /icons/back.gif .. | |
| + AddIcon /icons/hand.right.gif README | |
| + AddIcon /icons/folder.gif ^^DIRECTORY^^ | |
| + AddIcon /icons/blank.gif ^^BLANKICON^^ | |
| + | |
| + # | |
| + # DefaultIcon is which icon to show for files which do not have an icon | |
| + # explicitly set. | |
| + # | |
| + DefaultIcon /icons/unknown.gif | |
| + | |
| + # | |
| + # AddDescription allows you to place a short description after a file in | |
| + # server-generated indexes. These are only displayed for FancyIndexed | |
| + # directories. | |
| + # Format: AddDescription "description" filename | |
| + # | |
| + #AddDescription "GZIP compressed document" .gz | |
| + #AddDescription "tar archive" .tar | |
| + #AddDescription "GZIP compressed tar archive" .tgz | |
| + | |
| + # | |
| + # ReadmeName is the name of the README file the server will look for by | |
| + # default, and append to directory listings. | |
| + # | |
| + # HeaderName is the name of a file which should be prepended to | |
| + # directory indexes. | |
| + ReadmeName README.html | |
| + HeaderName HEADER.html | |
| + | |
| + # | |
| + # IndexIgnore is a set of filenames which directory indexing should ignore | |
| + # and not include in the listing. Shell-style wildcarding is permitted. | |
| + # | |
| + IndexIgnore .??* *~ *# RCS CVS *,v *,t | |
| +</IfModule> | |
| + | |
| +<IfModule mod_mime.c> | |
| + | |
| + # | |
| + # AddType allows you to add to or override the MIME configuration | |
| + # file mime.types for specific file types. | |
| + # | |
| + #AddType application/x-gzip .tgz | |
| + # | |
| + # AddEncoding allows you to have certain browsers uncompress | |
| + # information on the fly. Note: Not all browsers support this. | |
| + # Despite the name similarity, the following Add* directives have | |
| + # nothing to do with the FancyIndexing customization directives above. | |
| + # | |
| + #AddEncoding x-compress .Z | |
| + #AddEncoding x-gzip .gz .tgz | |
| + # | |
| + # If the AddEncoding directives above are commented-out, then you | |
| + # probably should define those extensions to indicate media types: | |
| + # | |
| + AddType application/x-compress .Z | |
| + AddType application/x-gzip .gz .tgz | |
| + | |
| + # | |
| + # DefaultLanguage and AddLanguage allows you to specify the language of | |
| + # a document. You can then use content negotiation to give a browser a | |
| + # file in a language the user can understand. | |
| + # | |
| + # Specify a default language. This means that all data | |
| + # going out without a specific language tag (see below) will | |
| + # be marked with this one. You probably do NOT want to set | |
| + # this unless you are sure it is correct for all cases. | |
| + # | |
| + # * It is generally better to not mark a page as | |
| + # * being a certain language than marking it with the wrong | |
| + # * language! | |
| + # | |
| + # DefaultLanguage nl | |
| + # | |
| + # Note 1: The suffix does not have to be the same as the language | |
| + # keyword --- those with documents in Polish (whose net-standard | |
| + # language code is pl) may wish to use "AddLanguage pl .po" to | |
| + # avoid the ambiguity with the common suffix for perl scripts. | |
| + # | |
| + # Note 2: The example entries below illustrate that in some cases | |
| + # the two character 'Language' abbreviation is not identical to | |
| + # the two character 'Country' code for its country, | |
| + # E.g. 'Danmark/dk' versus 'Danish/da'. | |
| + # | |
| + # Note 3: In the case of 'ltz' we violate the RFC by using a three char | |
| + # specifier. There is 'work in progress' to fix this and get | |
| + # the reference data for rfc1766 cleaned up. | |
| + # | |
| + # Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl) | |
| + # English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de) | |
| + # Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja) | |
| + # Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn) | |
| + # Norwegian (no) - Polish (pl) - Portugese (pt) | |
| + # Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv) | |
| + # Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW) | |
| + # | |
| + AddLanguage ca .ca | |
| + AddLanguage cs .cz .cs | |
| + AddLanguage da .dk | |
| + AddLanguage de .de | |
| + AddLanguage el .el | |
| + AddLanguage en .en | |
| + AddLanguage eo .eo | |
| + AddLanguage es .es | |
| + AddLanguage et .et | |
| + AddLanguage fr .fr | |
| + AddLanguage he .he | |
| + AddLanguage hr .hr | |
| + AddLanguage it .it | |
| + AddLanguage ja .ja | |
| + AddLanguage ko .ko | |
| + AddLanguage ltz .ltz | |
| + AddLanguage nl .nl | |
| + AddLanguage nn .nn | |
| + AddLanguage no .no | |
| + AddLanguage pl .po | |
| + AddLanguage pt .pt | |
| + AddLanguage pt-BR .pt-br | |
| + AddLanguage ru .ru | |
| + AddLanguage sv .sv | |
| + AddLanguage zh-CN .zh-cn | |
| + AddLanguage zh-TW .zh-tw | |
| +</IfModule> | |
| + | |
| +<IfModule mod_negotiation.c> | |
| + # | |
| + # LanguagePriority allows you to give precedence to some languages | |
| + # in case of a tie during content negotiation. | |
| + # | |
| + # Just list the languages in decreasing order of preference. We have | |
| + # more or less alphabetized them here. You probably want to change this. | |
| + # | |
| + LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW | |
| + | |
| + # | |
| + # ForceLanguagePriority allows you to serve a result page rather than | |
| + # MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback) | |
| + # [in case no accepted languages matched the available variants] | |
| + # | |
| + ForceLanguagePriority Prefer Fallback | |
| + | |
| +</IfModule> | |
| + | |
| +<IfModule mod_mime.c> | |
| + # | |
| + # Specify a default charset for all pages sent out. This is | |
| + # always a good idea and opens the door for future internationalisation | |
| + # of your web site, should you ever want it. Specifying it as | |
| + # a default does little harm; as the standard dictates that a page | |
| + # is in iso-8859-1 (latin1) unless specified otherwise i.e. you | |
| + # are merely stating the obvious. There are also some security | |
| + # reasons in browsers, related to javascript and URL parsing | |
| + # which encourage you to always set a default char set. | |
| + # | |
| + #AddDefaultCharset ISO-8859-1 | |
| + | |
| + # | |
| + # Commonly used filename extensions to character sets. You probably | |
| + # want to avoid clashes with the language extensions, unless you | |
| + # are good at carefully testing your setup after each change. | |
| + # See http://www.iana.org/assignments/character-sets for the | |
| + # official list of charset names and their respective RFCs. | |
| + # | |
| + AddCharset us-ascii .ascii .us-ascii | |
| + AddCharset ISO-8859-1 .iso8859-1 .latin1 | |
| + AddCharset ISO-8859-2 .iso8859-2 .latin2 .cen | |
| + AddCharset ISO-8859-3 .iso8859-3 .latin3 | |
| + AddCharset ISO-8859-4 .iso8859-4 .latin4 | |
| + AddCharset ISO-8859-5 .iso8859-5 .cyr .iso-ru | |
| + AddCharset ISO-8859-6 .iso8859-6 .arb .arabic | |
| + AddCharset ISO-8859-7 .iso8859-7 .grk .greek | |
| + AddCharset ISO-8859-8 .iso8859-8 .heb .hebrew | |
| + AddCharset ISO-8859-9 .iso8859-9 .latin5 .trk | |
| + AddCharset ISO-8859-10 .iso8859-10 .latin6 | |
| + AddCharset ISO-8859-13 .iso8859-13 | |
| + AddCharset ISO-8859-14 .iso8859-14 .latin8 | |
| + AddCharset ISO-8859-15 .iso8859-15 .latin9 | |
| + AddCharset ISO-8859-16 .iso8859-16 .latin10 | |
| + AddCharset ISO-2022-JP .iso2022-jp .jis | |
| + AddCharset ISO-2022-KR .iso2022-kr .kis | |
| + AddCharset ISO-2022-CN .iso2022-cn .cis | |
| + AddCharset Big5 .Big5 .big5 .b5 | |
| + AddCharset cn-Big5 .cn-big5 | |
| + # For russian, more than one charset is used (depends on client, mostly): | |
| + AddCharset WINDOWS-1251 .cp-1251 .win-1251 | |
| + AddCharset CP866 .cp866 | |
| + AddCharset KOI8 .koi8 | |
| + AddCharset KOI8-E .koi8-e | |
| + AddCharset KOI8-r .koi8-r .koi8-ru | |
| + AddCharset KOI8-U .koi8-u | |
| + AddCharset KOI8-ru .koi8-uk .ua | |
| + AddCharset ISO-10646-UCS-2 .ucs2 | |
| + AddCharset ISO-10646-UCS-4 .ucs4 | |
| + AddCharset UTF-7 .utf7 | |
| + AddCharset UTF-8 .utf8 | |
| + AddCharset UTF-16 .utf16 | |
| + AddCharset UTF-16BE .utf16be | |
| + AddCharset UTF-16LE .utf16le | |
| + AddCharset UTF-32 .utf32 | |
| + AddCharset UTF-32BE .utf32be | |
| + AddCharset UTF-32LE .utf32le | |
| + AddCharset euc-cn .euc-cn | |
| + AddCharset euc-gb .euc-gb | |
| + AddCharset euc-jp .euc-jp | |
| + AddCharset euc-kr .euc-kr | |
| + #Not sure how euc-tw got in - IANA doesn't list it??? | |
| + AddCharset EUC-TW .euc-tw | |
| + AddCharset gb2312 .gb2312 .gb | |
| + AddCharset iso-10646-ucs-2 .ucs-2 .iso-10646-ucs-2 | |
| + AddCharset iso-10646-ucs-4 .ucs-4 .iso-10646-ucs-4 | |
| + AddCharset shift_jis .shift_jis .sjis | |
| + | |
| + # | |
| + # AddHandler allows you to map certain file extensions to "handlers": | |
| + # actions unrelated to filetype. These can be either built into the server | |
| + # or added with the Action directive (see below) | |
| + # | |
| + # To use CGI scripts outside of ScriptAliased directories: | |
| + # (You will also need to add "ExecCGI" to the "Options" directive.) | |
| + # | |
| + #AddHandler cgi-script .cgi | |
| + | |
| + # | |
| + # For files that include their own HTTP headers: | |
| + # | |
| + #AddHandler send-as-is asis | |
| + | |
| + # | |
| + # For server-parsed imagemap files: | |
| + # | |
| + #AddHandler imap-file map | |
| + | |
| + # | |
| + # For type maps (negotiated resources): | |
| + # (This is enabled by default to allow the Apache "It Worked" page | |
| + # to be distributed in multiple languages.) | |
| + # | |
| + AddHandler type-map var | |
| + | |
| + # | |
| + # Filters allow you to process content before it is sent to the client. | |
| + # | |
| + # To parse .shtml files for server-side includes (SSI): | |
| + # (You will also need to add "Includes" to the "Options" directive.) | |
| + # | |
| + AddType text/html .shtml | |
| + AddOutputFilter INCLUDES .shtml | |
| +</IfModule> | |
| + | |
| +<IfModule mod_fcgid.c> | |
| + SharememPath /var/run/fcgid_shm | |
| + SocketPath /tmp/fcgidsock | |
| +</IfModule> | |
| + | |
| + | |
| +# | |
| +# Action lets you define media types that will execute a script whenever | |
| +# a matching file is called. This eliminates the need for repeated URL | |
| +# pathnames for oft-used CGI file processors. | |
| +# Format: Action media/type /cgi-script/location | |
| +# Format: Action handler-name /cgi-script/location | |
| +# | |
| + | |
| +# | |
| +# Customizable error responses come in three flavors: | |
| +# 1) plain text 2) local redirects 3) external redirects | |
| +# | |
| +# Some examples: | |
| +#ErrorDocument 500 "The server made a boo boo." | |
| +#ErrorDocument 404 /missing.html | |
| +#ErrorDocument 404 "/cgi-bin/missing_handler.pl" | |
| +#ErrorDocument 402 http://www.example.com/subscription_info.html | |
| +# | |
| + | |
| +# | |
| +# Putting this all together, we can internationalize error responses. | |
| +# | |
| +# We use Alias to redirect any /error/HTTP_<error>.html.var response to | |
| +# our collection of by-error message multi-language collections. We use | |
| +# includes to substitute the appropriate text. | |
| +# | |
| +# You can modify the messages' appearance without changing any of the | |
| +# default HTTP_<error>.html.var files by adding the line: | |
| +# | |
| +# Alias /error/include/ "/your/include/path/" | |
| +# | |
| +# which allows you to create your own set of files by starting with the | |
| +# /usr/share/apache2/error/include/ files and copying them to /your/include/path/, | |
| +# even on a per-VirtualHost basis. The default include files will display | |
| +# your Apache version number and your ServerAdmin email address regardless | |
| +# of the setting of ServerSignature. | |
| +# | |
| +# The internationalized error documents require mod_alias, mod_include | |
| +# and mod_negotiation. To activate them, uncomment the following 30 lines. | |
| + | |
| +# Alias /error/ "/usr/share/apache2/error/" | |
| +# | |
| +# <Directory "/usr/share/apache2/error"> | |
| +# AllowOverride None | |
| +# Options IncludesNoExec | |
| +# AddOutputFilter Includes html | |
| +# AddHandler type-map var | |
| +# Order allow,deny | |
| +# Allow from all | |
| +# LanguagePriority en cs de es fr it nl sv pt-br ro | |
| +# ForceLanguagePriority Prefer Fallback | |
| +# </Directory> | |
| +# | |
| +# ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var | |
| +# ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var | |
| +# ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var | |
| +# ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var | |
| +# ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var | |
| +# ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var | |
| +# ErrorDocument 410 /error/HTTP_GONE.html.var | |
| +# ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var | |
| +# ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var | |
| +# ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var | |
| +# ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var | |
| +# ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var | |
| +# ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var | |
| +# ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var | |
| +# ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var | |
| +# ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var | |
| +# ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var | |
| + | |
| +<IfModule mod_setenvif.c> | |
| + # | |
| + # The following directives modify normal HTTP response behavior to | |
| + # handle known problems with browser implementations. | |
| + # | |
| + BrowserMatch "Mozilla/2" nokeepalive | |
| + BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 | |
| + BrowserMatch "RealPlayer 4\.0" force-response-1.0 | |
| + BrowserMatch "Java/1\.0" force-response-1.0 | |
| + BrowserMatch "JDK/1\.0" force-response-1.0 | |
| + | |
| + # | |
| + # The following directive disables redirects on non-GET requests for | |
| + # a directory that does not include the trailing slash. This fixes a | |
| + # problem with Microsoft WebFolders which does not appropriately handle | |
| + # redirects for folders with DAV methods. | |
| + # Same deal with Apple's DAV filesystem and Gnome VFS support for DAV. | |
| + # | |
| + BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully | |
| + BrowserMatch "MS FrontPage" redirect-carefully | |
| + BrowserMatch "^WebDrive" redirect-carefully | |
| + BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully | |
| + BrowserMatch "^gnome-vfs/1.0" redirect-carefully | |
| + BrowserMatch "^XML Spy" redirect-carefully | |
| + BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully | |
| +</IfModule> | |
| + | |
| +#<IfModule mod_status.c> | |
| + # | |
| + # Allow server status reports generated by mod_status, | |
| + # with the URL of http://servername/server-status | |
| + # Change the ".example.com" to match your domain to enable. | |
| + # | |
| + #<Location /server-status> | |
| + # SetHandler server-status | |
| + # Order deny,allow | |
| + # Deny from all | |
| + # Allow from .example.com | |
| + #</Location> | |
| +#</IfModule> | |
| + | |
| +#<IfModule mod_info.c> | |
| + # | |
| + # Allow remote server configuration reports, with the URL of | |
| + # http://servername/server-info (requires that mod_info.c be loaded). | |
| + # Change the ".example.com" to match your domain to enable. | |
| + # | |
| + #<Location /server-info> | |
| + # SetHandler server-info | |
| + # Order deny,allow | |
| + # Deny from all | |
| + # Allow from .example.com | |
| + #</Location> | |
| +#</IfModule> | |
| + | |
| +# Include the virtual host configurations: | |
| +Include <%= @node[:apache][:dir] %>/sites-enabled/ | |
| diff --git a/apache2/templates/default/default-site.erb b/apache2/templates/default/default-site.erb | |
| new file mode 100644 | |
| index 0000000..8d73410 | |
| --- /dev/null | |
| +++ b/apache2/templates/default/default-site.erb | |
| @@ -0,0 +1,45 @@ | |
| +<VirtualHost *:80> | |
| + ServerAdmin <%= @node[:apache][:contact] %> | |
| + | |
| + DocumentRoot /var/www/ | |
| + <Directory /> | |
| + Options FollowSymLinks | |
| + AllowOverride None | |
| + </Directory> | |
| + <Directory /var/www/> | |
| + Options Indexes FollowSymLinks MultiViews | |
| + AllowOverride None | |
| + Order allow,deny | |
| + allow from all | |
| + # This directive allows us to have apache2's default start page | |
| + # in /apache2-default/, but still have / go to the right place | |
| + #RedirectMatch ^/$ /apache2-default/ | |
| + </Directory> | |
| + | |
| + ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ | |
| + <Directory "/usr/lib/cgi-bin"> | |
| + AllowOverride None | |
| + Options ExecCGI -MultiViews +SymLinksIfOwnerMatch | |
| + Order allow,deny | |
| + Allow from all | |
| + </Directory> | |
| + | |
| + ErrorLog /var/log/apache2/error.log | |
| + | |
| + # Possible values include: debug, info, notice, warn, error, crit, | |
| + # alert, emerg. | |
| + LogLevel warn | |
| + | |
| + CustomLog /var/log/apache2/access.log combined | |
| + ServerSignature On | |
| + | |
| + Alias /doc/ "/usr/share/doc/" | |
| + <Directory "/usr/share/doc/"> | |
| + Options Indexes MultiViews FollowSymLinks | |
| + AllowOverride None | |
| + Order deny,allow | |
| + Deny from all | |
| + Allow from 127.0.0.0/255.0.0.0 ::1/128 | |
| + </Directory> | |
| + | |
| +</VirtualHost> | |
| diff --git a/apache2/templates/default/port_apache.erb b/apache2/templates/default/port_apache.erb | |
| new file mode 100644 | |
| index 0000000..f6078dd | |
| --- /dev/null | |
| +++ b/apache2/templates/default/port_apache.erb | |
| @@ -0,0 +1,2 @@ | |
| +# Port <%= @port %> | |
| +-A FWR -p tcp -m tcp --dport <%= @port %> -j ACCEPT | |
| \ No newline at end of file | |
| diff --git a/apache2/templates/default/ports.conf.erb b/apache2/templates/default/ports.conf.erb | |
| new file mode 100644 | |
| index 0000000..cc3631e | |
| --- /dev/null | |
| +++ b/apache2/templates/default/ports.conf.erb | |
| @@ -0,0 +1,6 @@ | |
| +#This file generated via template by Chef. | |
| +<% @apache_listen_ports.each do |port| -%> | |
| +Listen <%= port %> | |
| +NameVirtualHost *:<%= port %> | |
| + | |
| +<% end -%> | |
| diff --git a/apt/recipes/default.rb b/apt/recipes/default.rb | |
| new file mode 100644 | |
| index 0000000..bc2c5fa | |
| --- /dev/null | |
| +++ b/apt/recipes/default.rb | |
| @@ -0,0 +1,31 @@ | |
| +# | |
| +# Cookbook Name:: apt | |
| +# Recipe:: default | |
| +# | |
| +# Copyright 2008, 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. | |
| +# | |
| + | |
| +execute "apt-get-update" do | |
| + command "apt-get update" | |
| +end | |
| + | |
| +%w{/var/cache/local /var/cache/local/preseeding}.each do |dirname| | |
| + directory dirname do | |
| + owner "root" | |
| + group "root" | |
| + mode 0644 | |
| + action :create | |
| + end | |
| +end | |
| \ No newline at end of file | |
| diff --git a/build-essential/recipes/default.rb b/build-essential/recipes/default.rb | |
| new file mode 100644 | |
| index 0000000..3e6dc44 | |
| --- /dev/null | |
| +++ b/build-essential/recipes/default.rb | |
| @@ -0,0 +1,43 @@ | |
| +# | |
| +# Cookbook Name:: build-essential | |
| +# Recipe:: default | |
| +# | |
| +# Copyright 2008, 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. | |
| +# | |
| + | |
| +case node[:platform] | |
| +when "Ubuntu","Debian" | |
| + %w{build-essential binutils-doc}.each do |pkg| | |
| + package pkg do | |
| + action :install | |
| + end | |
| + end | |
| +when "CentOS" | |
| + package "gcc" do | |
| + action :install | |
| + end | |
| +end | |
| + | |
| +package "autoconf" do | |
| + action :install | |
| +end | |
| + | |
| +package "flex" do | |
| + action :install | |
| +end | |
| + | |
| +package "bison" do | |
| + action :install | |
| +end | |
| \ No newline at end of file | |
| diff --git a/chef/recipes/default.rb b/chef/recipes/default.rb | |
| new file mode 100644 | |
| index 0000000..e69de29 | |
| diff --git a/chef/recipes/server.rb b/chef/recipes/server.rb | |
| new file mode 100644 | |
| index 0000000..111fba2 | |
| --- /dev/null | |
| +++ b/chef/recipes/server.rb | |
| @@ -0,0 +1,40 @@ | |
| +# | |
| +# Author:: Joshua Timberman <joshua@opscode.com> | |
| +# Cookbook Name:: chef | |
| +# Recipe:: server | |
| +# | |
| +# Copyright 2008, 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. | |
| + | |
| +runit_service "stompserver" | |
| + | |
| +package "couchdb" | |
| + | |
| +directory "/var/lib/couchdb" do | |
| + owner "couchdb" | |
| + group "couchdb" | |
| + recursive true | |
| +end | |
| + | |
| +service "couchdb" do | |
| + supports :restart => true, :status => true | |
| + action :enable | |
| +end | |
| + | |
| +runit_service "chef-indexer" | |
| +runit_service "chef-server" | |
| + | |
| +["couchdb", "chef"].each do |port| | |
| + iptables_rule "port_#{port}" | |
| +end | |
| \ No newline at end of file | |
| diff --git a/chef/templates/default/port_chef.erb b/chef/templates/default/port_chef.erb | |
| new file mode 100644 | |
| index 0000000..da90134 | |
| --- /dev/null | |
| +++ b/chef/templates/default/port_chef.erb | |
| @@ -0,0 +1,2 @@ | |
| +# Chef-server | |
| +-A FWR -p tcp -m tcp --dport 4000:4001 -j ACCEPT | |
| \ No newline at end of file | |
| diff --git a/chef/templates/default/port_couchdb.erb b/chef/templates/default/port_couchdb.erb | |
| new file mode 100644 | |
| index 0000000..a11f8aa | |
| --- /dev/null | |
| +++ b/chef/templates/default/port_couchdb.erb | |
| @@ -0,0 +1,2 @@ | |
| +# CouchDB | |
| +-A FWR -p tcp -m tcp --dport 5984 -j ACCEPT | |
| \ No newline at end of file | |
| diff --git a/chef/templates/default/sv-chef-indexer-log-run.erb b/chef/templates/default/sv-chef-indexer-log-run.erb | |
| new file mode 100644 | |
| index 0000000..9ec4380 | |
| --- /dev/null | |
| +++ b/chef/templates/default/sv-chef-indexer-log-run.erb | |
| @@ -0,0 +1,3 @@ | |
| +#!/bin/sh | |
| +exec svlogd -tt ./main | |
| + | |
| diff --git a/chef/templates/default/sv-chef-indexer-run.erb b/chef/templates/default/sv-chef-indexer-run.erb | |
| new file mode 100644 | |
| index 0000000..9708247 | |
| --- /dev/null | |
| +++ b/chef/templates/default/sv-chef-indexer-run.erb | |
| @@ -0,0 +1,3 @@ | |
| +#!/bin/sh | |
| +exec 2>&1 | |
| +exec /usr/bin/chef-indexer -l debug | |
| diff --git a/chef/templates/default/sv-chef-server-log-run.erb b/chef/templates/default/sv-chef-server-log-run.erb | |
| new file mode 100644 | |
| index 0000000..9ec4380 | |
| --- /dev/null | |
| +++ b/chef/templates/default/sv-chef-server-log-run.erb | |
| @@ -0,0 +1,3 @@ | |
| +#!/bin/sh | |
| +exec svlogd -tt ./main | |
| + | |
| diff --git a/chef/templates/default/sv-chef-server-run.erb b/chef/templates/default/sv-chef-server-run.erb | |
| new file mode 100644 | |
| index 0000000..d297a2c | |
| --- /dev/null | |
| +++ b/chef/templates/default/sv-chef-server-run.erb | |
| @@ -0,0 +1,3 @@ | |
| +#!/bin/sh | |
| +exec 2>&1 | |
| +exec /usr/bin/chef-server -c 2 -N | |
| diff --git a/chef/templates/default/sv-stompserver-log-run.erb b/chef/templates/default/sv-stompserver-log-run.erb | |
| new file mode 100644 | |
| index 0000000..9ec4380 | |
| --- /dev/null | |
| +++ b/chef/templates/default/sv-stompserver-log-run.erb | |
| @@ -0,0 +1,3 @@ | |
| +#!/bin/sh | |
| +exec svlogd -tt ./main | |
| + | |
| diff --git a/chef/templates/default/sv-stompserver-run.erb b/chef/templates/default/sv-stompserver-run.erb | |
| new file mode 100644 | |
| index 0000000..d494490 | |
| --- /dev/null | |
| +++ b/chef/templates/default/sv-stompserver-run.erb | |
| @@ -0,0 +1,3 @@ | |
| +#!/bin/sh | |
| +exec 2>&1 | |
| +exec /usr/bin/stompserver | |
| diff --git a/ec2/attributes/ec2_metadata.rb b/ec2/attributes/ec2_metadata.rb | |
| new file mode 100644 | |
| index 0000000..9f47e38 | |
| --- /dev/null | |
| +++ b/ec2/attributes/ec2_metadata.rb | |
| @@ -0,0 +1,44 @@ | |
| +# | |
| +# Cookbook Name:: ec2 | |
| +# Attribute File:: ec2_metadata.rb | |
| +# | |
| +# Copyright 2008, 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. | |
| +# | |
| + | |
| +require 'net/http' | |
| + | |
| +def get_from_ec2(thing="/") | |
| + base_url = "http://169.254.169.254/latest/meta-data" + thing | |
| + url = URI.parse(base_url) | |
| + req = Net::HTTP::Get.new(url.path) | |
| + res = Net::HTTP.start(url.host, url.port) {|http| | |
| + http.request(req) | |
| + } | |
| + res.body | |
| +end | |
| + | |
| +if @attribute["domain"] =~ /\.amazonaws.com$/ || @attribute["domain"] == "ec2.internal" | |
| + ec2 true | |
| + get_from_ec2.split("\n").each do |key| | |
| + if key =~ /\/$/ | |
| + get_from_ec2("/#{key}").split("\n").each do |extra_key| | |
| + attr_name = "ec2-#{key}-#{extra_key}" | |
| + attr_name.gsub!("/", "") | |
| + @attribute[attr_name] = get_from_ec2("/#{key}/#{extra_key}") | |
| + end | |
| + end | |
| + @attribute["ec2-#{key}"] = get_from_ec2("/#{key}") | |
| + end | |
| +end | |
| diff --git a/ec2/attributes/ec2_recipe_options.rb b/ec2/attributes/ec2_recipe_options.rb | |
| new file mode 100644 | |
| index 0000000..1aae68c | |
| --- /dev/null | |
| +++ b/ec2/attributes/ec2_recipe_options.rb | |
| @@ -0,0 +1,38 @@ | |
| +# | |
| +# Cookbook Name:: ec2 | |
| +# Attribute File:: ec2_recipe_options.rb | |
| +# | |
| +# Copyright 2008, 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. | |
| +# | |
| + | |
| +# Whether to use LVM for Ephemeral storage | |
| +ec2_use_lvm_ephemeral true unless attribute?("ec2_lvm_ephemeral") | |
| + | |
| +# Where to mount the LVM Ephemeral Storage | |
| +ec2_lvm_ephemeral_mountpoint "/mnt" unless attribute?("ec2_lvm_ephemeral_mountpoint") | |
| + | |
| +# What to name the LVM volume group | |
| +ec2_lvm_ephemeral_volume_group "ephemeral" unless attribute?("ec2_lvm_ephemeral_volume_group") | |
| + | |
| +# What to name the LVM logical volume | |
| +ec2_lvm_ephemeral_logical_volume "store" unless attribute?("ec2_lvm_ephemeral_logical_volume") | |
| + | |
| +# Which devices to use for LVM Ephemeral Storage | |
| +ec2_ephemeral_devices({ | |
| + "m1.small" => [ "/dev/sda2" ], | |
| + "m1.large" => [ "/dev/sdb", "/dev/sdc" ], | |
| + "m1.xlarge" => [ "/dev/sdb", "/dev/sdc", "/dev/sdd", "/dev/sde" ], | |
| +}) unless attribute?("ec2_ephemeral_devices") | |
| + | |
| diff --git a/ec2/recipes/default.rb b/ec2/recipes/default.rb | |
| new file mode 100644 | |
| index 0000000..d82792f | |
| --- /dev/null | |
| +++ b/ec2/recipes/default.rb | |
| @@ -0,0 +1,19 @@ | |
| +# | |
| +# Cookbook Name:: ec2 | |
| +# Recipe:: default | |
| +# | |
| +# Copyright 2008, 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. | |
| +# | |
| + | |
| diff --git a/git/recipes/default.rb b/git/recipes/default.rb | |
| new file mode 100644 | |
| index 0000000..4cdbafa | |
| --- /dev/null | |
| +++ b/git/recipes/default.rb | |
| @@ -0,0 +1,28 @@ | |
| +# | |
| +# Cookbook Name:: git | |
| +# Recipe:: default | |
| +# | |
| +# Copyright 2008, OpsCode | |
| +# | |
| +# 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. | |
| + | |
| +case node[:platform] | |
| +when "Debian", "Ubuntu" | |
| + package "git-core" | |
| +else | |
| + package "git" | |
| +end | |
| + | |
| +package "gitk" | |
| +package "git-svn" | |
| +package "git-email" | |
| diff --git a/iptables/definitions/iptables_rule.rb b/iptables/definitions/iptables_rule.rb | |
| new file mode 100644 | |
| index 0000000..e94d520 | |
| --- /dev/null | |
| +++ b/iptables/definitions/iptables_rule.rb | |
| @@ -0,0 +1,34 @@ | |
| +# | |
| +# Cookbook Name:: iptables | |
| +# Definition:: iptables_rule | |
| +# | |
| +# Copyright 2008, 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 :iptables_rule, :enable => true, :source => nil, :variables => {} do | |
| + template_source = params[:source] ? params[:source] : "#{params[:name]}.erb" | |
| + | |
| + template "/etc/iptables.d/#{params[:name]}" do | |
| + source template_source | |
| + mode 0644 | |
| + variables params[:variables] | |
| + notifies :run, resources(:execute => "rebuild-iptables") | |
| + if params[:enable] | |
| + action :create | |
| + else | |
| + action :delete | |
| + end | |
| + end | |
| +end | |
| diff --git a/iptables/files/default/rebuild-iptables b/iptables/files/default/rebuild-iptables | |
| new file mode 100644 | |
| index 0000000..b9cbfe7 | |
| --- /dev/null | |
| +++ b/iptables/files/default/rebuild-iptables | |
| @@ -0,0 +1,282 @@ | |
| +#!/usr/bin/perl -w | |
| +our $ID = q$Id: rebuild-iptables 344 2006-10-04 02:48:30Z digant $; | |
| + | |
| +# | |
| +# rebuild-iptables -- Construct an iptables rules file from fragments. | |
| +# | |
| +# Written by Russ Allbery <rra@stanford.edu> | |
| +# Adapted by Digant C Kasundra <digant@stanford.edu> | |
| +# Copyright 2005, 2006 Board of Trustees, Leland Stanford Jr. University | |
| +# | |
| +# Constructs an iptables rules file from the prefix, standard, and suffix | |
| +# files in the iptables configuration area, adding any additional modules | |
| +# specified in the command line, and prints the resulting iptables rules to | |
| +# standard output (suitable for saving into /var/lib/iptables or some other | |
| +# appropriate location on the system). | |
| + | |
| +############################################################################## | |
| +# Modules and declarations | |
| +############################################################################## | |
| + | |
| +require 5.006; | |
| +use strict; | |
| + | |
| +use Getopt::Long qw(GetOptions); | |
| + | |
| +# Path to the iptables template area. | |
| +our $TEMPLATE = '/etc/iptables.d'; | |
| + | |
| +############################################################################## | |
| +# Installation | |
| +############################################################################## | |
| + | |
| +# Return the prefix | |
| +sub prefix { | |
| + my $data; | |
| + ( $data = <<'END_OF_PREFIX' ) =~ s/^\s+//gm; | |
| + *filter | |
| + :INPUT ACCEPT | |
| + :FORWARD ACCEPT | |
| + :OUTPUT ACCEPT | |
| + :FWR - | |
| + -A INPUT -j FWR | |
| + -A FWR -i lo -j ACCEPT | |
| +END_OF_PREFIX | |
| + | |
| + return $data; | |
| +} | |
| + | |
| +# Return the suffix | |
| +sub suffix { | |
| + my $data; | |
| + ( $data = <<'END_OF_SUFFIX' ) =~ s/^\s+//gm; | |
| + # Rejects all remaining connections with port-unreachable errors. | |
| + | |
| + -A FWR -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -j REJECT --reject-with icmp-port-unreachable | |
| + -A FWR -p udp -j REJECT --reject-with icmp-port-unreachable | |
| + COMMIT | |
| +END_OF_SUFFIX | |
| + | |
| + return $data; | |
| +} | |
| + | |
| +sub snat { | |
| + my $data = ""; | |
| + if ( -f "/etc/iptables.snat" ) { | |
| + open( SNAT, "<", "/etc/iptables.snat" ) | |
| + or die "$0: cannot open /etc/iptables.snat: $!\n"; | |
| + while (<SNAT>) { | |
| + $data = $data . $_; | |
| + } | |
| + close(SNAT); | |
| + } | |
| + return $data; | |
| +} | |
| + | |
| +# Read in a file, processing includes as required. Returns the contents of | |
| +# the file as an array. | |
| +sub read_iptables { | |
| + my ($file) = @_; | |
| + my @data; | |
| + $file = $TEMPLATE . '/' . $file unless $file =~ m%^\.?/%; | |
| + local *MODULE; | |
| + open( MODULE, '<', $file ) or die "$0: cannot open $file: $!\n"; | |
| + local $_; | |
| + while (<MODULE>) { | |
| + if (/^\s*include\s+(\S+)$/) { | |
| + my $included = $1; | |
| + $included = $TEMPLATE . '/' . $included | |
| + unless $included =~ m%^\.?/%; | |
| + if ( $file eq $included ) { | |
| + die "$0: include loop in $file, line $.\n"; | |
| + } | |
| + push( @data, "\n" ); | |
| + push( @data, read_iptables($included) ); | |
| + push( @data, "\n" ); | |
| + } elsif (/^\s*include\s/) { | |
| + die "$0: malformed include line in $file, line $.\n"; | |
| + } else { | |
| + push( @data, $_ ); | |
| + } | |
| + } | |
| + close MODULE; | |
| + return @data; | |
| +} | |
| + | |
| +# Write a file carefully. | |
| +sub write_iptables { | |
| + my ( $file, @data ) = @_; | |
| + open( NEW, "> $file.new" ) or die "$0: cannot create $file.new: $!\n"; | |
| + print NEW @data or die "$0: cannot write to $file.new: $!\n"; | |
| + close NEW or die "$0: cannot flush $file.new: $!\n"; | |
| + rename( "$file.new", $file ) | |
| + or die "$0: cannot install new $file: $!\n"; | |
| +} | |
| + | |
| +# Install iptables on a Red Hat system. Takes the array containing the new | |
| +# iptables data. | |
| +sub install_redhat { | |
| + my (@data) = @_; | |
| + write_iptables( '/etc/sysconfig/iptables', @data ); | |
| + system( "/sbin/service", "iptables", "restart" ); | |
| +} | |
| + | |
| +# Install iptables on a Debian system. Take the array containing the new | |
| +# iptables data. | |
| +sub install_debian { | |
| + my (@data) = @_; | |
| + unless ( -d '/etc/iptables' ) { | |
| + mkdir( '/etc/iptables', 0755 ) | |
| + or die "$0: cannot mkdir /etc/iptables: $!\n"; | |
| + } | |
| + write_iptables( "/etc/iptables/general", @data ); | |
| + system("/sbin/iptables-restore < /etc/iptables/general"); | |
| +} | |
| + | |
| +############################################################################## | |
| +# Main routine | |
| +############################################################################## | |
| + | |
| +# Fix things up for error reporting. | |
| +$| = 1; | |
| +my $fullpath = $0; | |
| +$0 =~ s%.*/%%; | |
| + | |
| +# Parse command-line options. | |
| +my ( $help, $version ); | |
| +Getopt::Long::config( 'bundling', 'no_ignore_case' ); | |
| +GetOptions( | |
| + 'h|help' => \$help, | |
| + 'v|version' => \$version | |
| +) or exit 1; | |
| +if ($help) { | |
| + print "Feeding myself to perldoc, please wait....\n"; | |
| + exec( 'perldoc', '-t', $fullpath ); | |
| +} elsif ($version) { | |
| + my $version = join( ' ', ( split( ' ', $ID ) )[ 1 .. 3 ] ); | |
| + $version =~ s/,v\b//; | |
| + $version =~ s/(\S+)$/($1)/; | |
| + $version =~ tr%/%-%; | |
| + print $version, "\n"; | |
| + exit; | |
| +} | |
| +my @modules; | |
| + | |
| +if ( -d '/etc/iptables.d' ) { | |
| + @modules = </etc/iptables.d/*>; | |
| +} | |
| + | |
| +# Concatenate everything together. | |
| +my @data; | |
| +push( @data, prefix() ); | |
| +push( @data, "\n" ); | |
| +for my $module (@modules) { | |
| + push( @data, read_iptables($module) ); | |
| + push( @data, "\n" ); | |
| +} | |
| +push( @data, suffix() ); | |
| +push( @data, snat() ); | |
| + | |
| +if ( -f '/etc/debian_version' ) { | |
| + install_debian(@data); | |
| +} elsif ( -f '/etc/redhat-release' ) { | |
| + install_redhat(@data); | |
| +} else { | |
| + die "$0: cannot figure out whether this is Red Hat or Debian\n"; | |
| +} | |
| + | |
| +exit 0; | |
| +__END__ | |
| + | |
| +############################################################################## | |
| +# Documentation | |
| +############################################################################## | |
| + | |
| +=head1 NAME | |
| + | |
| +rebuild-iptables - Construct an iptables rules file from fragments | |
| + | |
| +=head1 SYNOPSIS | |
| + | |
| +rebuild-iptables [B<-hv>] | |
| + | |
| +=head1 DESCRIPTION | |
| + | |
| +B<rebuild-iptables> constructs an iptables configuration file by concatenating | |
| +various modules found in F</etc/iptables.d>. The resulting iptables | |
| +configuration file is written to the appropriate file for either Red Hat or | |
| +Debian (determined automatically) and iptables is restarted. | |
| + | |
| +Each module is just a text file located in the directory mentioned above that | |
| +contains one or more iptables configuration lines (basically the arguments to | |
| +an B<iptables> invocation), possibly including comments. | |
| + | |
| +Along with the modules in the directory specified, a standard prefix and suffix | |
| +is added. | |
| + | |
| +Normally, the contents of each module are read in verbatim, but a module may | |
| +also contain the directive: | |
| + | |
| + include <module> | |
| + | |
| +on a separate line, where <module> is the path to another module to include, | |
| +specified the same way as modules given on the command line (hence, either a | |
| +file name relative to F</afs/ir/service/jumpstart/data/iptables> or an | |
| +absolute path). Such a line will be replaced with the contents of the named | |
| +file. Be careful when using this directive to not create loops; files | |
| +including themselves will be detected, but more complex loops will not and | |
| +will result in infinite output. | |
| + | |
| +=head1 OPTIONS | |
| + | |
| +=over 4 | |
| + | |
| +=item B<-h>, B<--help> | |
| + | |
| +Print out this documentation (which is done simply by feeding the script to | |
| +C<perldoc -t>). | |
| + | |
| +=item B<-v>, B<--version> | |
| + | |
| +Print out the version of B<rebuild-iptables> and exit. | |
| + | |
| +=back | |
| + | |
| +=head1 FILES | |
| + | |
| +=over 4 | |
| + | |
| +=item F</etc/iptables.d> | |
| + | |
| +The default module location. | |
| + | |
| +=item F</etc/debian_version> | |
| + | |
| +If this file exists, the system is assumed to be a Debian system for | |
| +determining the installation location when B<-i> is used. | |
| + | |
| +=item F</etc/iptables/general> | |
| + | |
| +The install location of the generated configuration file on Debian. | |
| + | |
| +=item F</etc/redhat-release> | |
| + | |
| +If this file exists, the system is assumed to be a Red Hat system for | |
| +determining the installation location when B<-i> is used. | |
| + | |
| +=item F</etc/sysconfig/iptables> | |
| + | |
| +The install location of the generated configuration file on Red Hat. | |
| + | |
| +=back | |
| + | |
| +=head1 AUTHOR | |
| + | |
| +Russ Allbery <rra@stanford.edu> | |
| +Digant C Kasundra <digant@stanford.edu> | |
| + | |
| +=head1 SEE ALSO | |
| + | |
| +iptables(8) | |
| + | |
| +=cut | |
| diff --git a/iptables/recipes/default.rb b/iptables/recipes/default.rb | |
| new file mode 100644 | |
| index 0000000..65c3a3a | |
| --- /dev/null | |
| +++ b/iptables/recipes/default.rb | |
| @@ -0,0 +1,37 @@ | |
| +# | |
| +# Cookbook Name:: iptables | |
| +# Recipe:: default | |
| +# | |
| +# Copyright 2008, 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 "iptables" | |
| + | |
| +execute "rebuild-iptables" do | |
| + command "/usr/sbin/rebuild-iptables" | |
| + action :nothing | |
| +end | |
| + | |
| +directory "/etc/iptables.d" do | |
| + action :create | |
| +end | |
| + | |
| +remote_file "/usr/sbin/rebuild-iptables" do | |
| + source "rebuild-iptables" | |
| + mode 0755 | |
| +end | |
| + | |
| +iptables_rule "all_established" | |
| +iptables_rule "all_icmp" | |
| \ No newline at end of file | |
| diff --git a/iptables/templates/default/all_established.erb b/iptables/templates/default/all_established.erb | |
| new file mode 100644 | |
| index 0000000..c309b11 | |
| --- /dev/null | |
| +++ b/iptables/templates/default/all_established.erb | |
| @@ -0,0 +1,2 @@ | |
| +# Any established connection is money | |
| +-A FWR -m state --state RELATED,ESTABLISHED -j ACCEPT | |
| diff --git a/iptables/templates/default/all_icmp.erb b/iptables/templates/default/all_icmp.erb | |
| new file mode 100644 | |
| index 0000000..e73aa49 | |
| --- /dev/null | |
| +++ b/iptables/templates/default/all_icmp.erb | |
| @@ -0,0 +1,2 @@ | |
| +# ICMP | |
| +-A FWR -p icmp -j ACCEPT | |
| \ No newline at end of file | |
| diff --git a/java/files/default/java.seed b/java/files/default/java.seed | |
| new file mode 100644 | |
| index 0000000..bf44093 | |
| --- /dev/null | |
| +++ b/java/files/default/java.seed | |
| @@ -0,0 +1,11 @@ | |
| +sun-java6-bin shared/accepted-sun-dlj-v1-1 boolean true | |
| +sun-java6-jdk shared/accepted-sun-dlj-v1-1 boolean true | |
| +sun-java6-jre shared/accepted-sun-dlj-v1-1 boolean true | |
| +sun-java6-jre sun-java6-jre/stopthread boolean true | |
| +sun-java6-jre sun-java6-jre/jcepolicy note | |
| +sun-java6-bin shared/error-sun-dlj-v1-1 error | |
| +sun-java6-jdk shared/error-sun-dlj-v1-1 error | |
| +sun-java6-jre shared/error-sun-dlj-v1-1 error | |
| +sun-java6-bin shared/present-sun-dlj-v1-1 note | |
| +sun-java6-jdk shared/present-sun-dlj-v1-1 note | |
| +sun-java6-jre shared/present-sun-dlj-v1-1 note | |
| \ No newline at end of file | |
| diff --git a/java/recipes/default.rb b/java/recipes/default.rb | |
| new file mode 100644 | |
| index 0000000..3182a2f | |
| --- /dev/null | |
| +++ b/java/recipes/default.rb | |
| @@ -0,0 +1,47 @@ | |
| +# | |
| +# Cookbook Name:: java | |
| +# Recipe:: default | |
| +# | |
| +# Copyright 2008, 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. | |
| +# | |
| + | |
| +java_pkg = value_for_platform( | |
| + "Ubuntu" => { | |
| + "default" => "sun-java6-jdk" | |
| + }, | |
| + "Debian" => { | |
| + "default" => "sun-java6-jdk" | |
| + }, | |
| + "default" => "sun-java6-jdk" | |
| +) | |
| + | |
| +execute "update-java-alternatives" do | |
| + command "update-java-alternatives -s java-6-sun" | |
| + only_if do platform?("Ubuntu", "Debian") end | |
| + ignore_failure true | |
| + returns 1 | |
| + action :nothing | |
| +end | |
| + | |
| +package java_pkg do | |
| + response_file "java.seed" | |
| + action :install | |
| + notifies :run, resources(:execute => "update-java-alternatives"), :immediately | |
| +end | |
| + | |
| +package "ant" | |
| + | |
| + | |
| + | |
| diff --git a/jira/attributes/jira.rb b/jira/attributes/jira.rb | |
| new file mode 100644 | |
| index 0000000..380d52c | |
| --- /dev/null | |
| +++ b/jira/attributes/jira.rb | |
| @@ -0,0 +1,11 @@ | |
| + | |
| +jira_virtual_host_name "jira.#{domain}" unless attribute?("jira_virtual_host_name") | |
| +jira_virtual_host_alias "jira.#{domain}" unless attribute?("jira_virtual_host_alias") | |
| +# type-version-standalone | |
| +jira_version "enterprise-3.13.1" unless attribute?("jira_version") | |
| +jira_install_path "/srv/jira" unless attribute?("jira_install_path") | |
| +jira_database "mysql" unless attribute?("jira_database") | |
| +jira_database_host "localhost" unless attribute?("jira_database_host") | |
| +jira_database_user "jira" unless attribute?("jira_database_user") | |
| +jira_database_password "change_me" unless attribute?("jira_database_password") | |
| +jira_run_user "www-data" unless attribute?("jira_run_user") | |
| \ No newline at end of file | |
| diff --git a/jira/files/default/catalina.sh b/jira/files/default/catalina.sh | |
| new file mode 100644 | |
| index 0000000..c8ff1e6 | |
| --- /dev/null | |
| +++ b/jira/files/default/catalina.sh | |
| @@ -0,0 +1,323 @@ | |
| +#!/bin/sh | |
| +# ----------------------------------------------------------------------------- | |
| +# Start/Stop Script for the CATALINA Server | |
| +# | |
| +# Environment Variable Prequisites | |
| +# | |
| +# CATALINA_HOME May point at your Catalina "build" directory. | |
| +# | |
| +# CATALINA_BASE (Optional) Base directory for resolving dynamic portions | |
| +# of a Catalina installation. If not present, resolves to | |
| +# the same directory that CATALINA_HOME points to. | |
| +# | |
| +# CATALINA_OPTS (Optional) Java runtime options used when the "start", | |
| +# "stop", or "run" command is executed. | |
| +# | |
| +# CATALINA_TMPDIR (Optional) Directory path location of temporary directory | |
| +# the JVM should use (java.io.tmpdir). Defaults to | |
| +# $CATALINA_BASE/temp. | |
| +# | |
| +# JAVA_HOME Must point at your Java Development Kit installation. | |
| +# Required to run the with the "debug" or "javac" argument. | |
| +# | |
| +# JRE_HOME Must point at your Java Development Kit installation. | |
| +# Defaults to JAVA_HOME if empty. | |
| +# | |
| +# JAVA_OPTS (Optional) Java runtime options used when the "start", | |
| +# "stop", or "run" command is executed. | |
| +# | |
| +# JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start" | |
| +# command is executed. The default is "dt_socket". | |
| +# | |
| +# JPDA_ADDRESS (Optional) Java runtime options used when the "jpda start" | |
| +# command is executed. The default is 8000. | |
| +# | |
| +# JSSE_HOME (Optional) May point at your Java Secure Sockets Extension | |
| +# (JSSE) installation, whose JAR files will be added to the | |
| +# system class path used to start Tomcat. | |
| +# | |
| +# CATALINA_PID (Optional) Path of the file which should contains the pid | |
| +# of catalina startup java process, when start (fork) is used | |
| +# | |
| +# $Id: catalina.sh 394120 2006-04-14 15:25:07Z yoavs $ | |
| +# ----------------------------------------------------------------------------- | |
| + | |
| +# OS specific support. $var _must_ be set to either true or false. | |
| +cygwin=false | |
| +os400=false | |
| +darwin=false | |
| +case "`uname`" in | |
| +CYGWIN*) cygwin=true;; | |
| +OS400*) os400=true;; | |
| +Darwin*) darwin=true;; | |
| +esac | |
| + | |
| +# resolve links - $0 may be a softlink | |
| +PRG="$0" | |
| + | |
| +while [ -h "$PRG" ]; do | |
| + ls=`ls -ld "$PRG"` | |
| + link=`expr "$ls" : '.*-> \(.*\)$'` | |
| + if expr "$link" : '/.*' > /dev/null; then | |
| + PRG="$link" | |
| + else | |
| + PRG=`dirname "$PRG"`/"$link" | |
| + fi | |
| +done | |
| + | |
| +# Get standard environment variables | |
| +PRGDIR=`dirname "$PRG"` | |
| + | |
| +# Only set CATALINA_HOME if not already set | |
| +[ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." ; pwd` | |
| + | |
| +if [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then | |
| + . "$CATALINA_HOME"/bin/setenv.sh | |
| +fi | |
| + | |
| +# For Cygwin, ensure paths are in UNIX format before anything is touched | |
| +if $cygwin; then | |
| + [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` | |
| + [ -n "$JRE_HOME" ] && JRE_HOME=`cygpath --unix "$JRE_HOME"` | |
| + [ -n "$CATALINA_HOME" ] && CATALINA_HOME=`cygpath --unix "$CATALINA_HOME"` | |
| + [ -n "$CATALINA_BASE" ] && CATALINA_BASE=`cygpath --unix "$CATALINA_BASE"` | |
| + [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"` | |
| + [ -n "$JSSE_HOME" ] && JSSE_HOME=`cygpath --absolute --unix "$JSSE_HOME"` | |
| +fi | |
| + | |
| +# For OS400 | |
| +if $os400; then | |
| + # Set job priority to standard for interactive (interactive - 6) by using | |
| + # the interactive priority - 6, the helper threads that respond to requests | |
| + # will be running at the same priority as interactive jobs. | |
| + COMMAND='chgjob job('$JOBNAME') runpty(6)' | |
| + system $COMMAND | |
| + | |
| + # Enable multi threading | |
| + export QIBM_MULTI_THREADED=Y | |
| +fi | |
| + | |
| +# Get standard Java environment variables | |
| +if $os400; then | |
| + # -r will Only work on the os400 if the files are: | |
| + # 1. owned by the user | |
| + # 2. owned by the PRIMARY group of the user | |
| + # this will not work if the user belongs in secondary groups | |
| + BASEDIR="$CATALINA_HOME" | |
| + . "$CATALINA_HOME"/bin/setclasspath.sh | |
| +else | |
| + if [ -r "$CATALINA_HOME"/bin/setclasspath.sh ]; then | |
| + BASEDIR="$CATALINA_HOME" | |
| + . "$CATALINA_HOME"/bin/setclasspath.sh | |
| + else | |
| + echo "Cannot find $CATALINA_HOME/bin/setclasspath.sh" | |
| + echo "This file is needed to run this program" | |
| + exit 1 | |
| + fi | |
| +fi | |
| + | |
| +# Add on extra jar files to CLASSPATH | |
| +if [ -n "$JSSE_HOME" ]; then | |
| + CLASSPATH="$CLASSPATH":"$JSSE_HOME"/lib/jcert.jar:"$JSSE_HOME"/lib/jnet.jar:"$JSSE_HOME"/lib/jsse.jar | |
| +fi | |
| +CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar:"$CATALINA_HOME"/bin/commons-logging-api.jar | |
| + | |
| +if [ -z "$CATALINA_BASE" ] ; then | |
| + CATALINA_BASE="$CATALINA_HOME" | |
| +fi | |
| + | |
| +if [ -z "$CATALINA_TMPDIR" ] ; then | |
| + # Define the java.io.tmpdir to use for Catalina | |
| + CATALINA_TMPDIR="$CATALINA_BASE"/temp | |
| +fi | |
| + | |
| +# Bugzilla 37848: When no TTY is available, don't output to console | |
| +have_tty=0 | |
| +if [ "`tty`" != "not a tty" ]; then | |
| + have_tty=1 | |
| +fi | |
| + | |
| +# For Cygwin, switch paths to Windows format before running java | |
| +if $cygwin; then | |
| + JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"` | |
| + JRE_HOME=`cygpath --absolute --windows "$JRE_HOME"` | |
| + CATALINA_HOME=`cygpath --absolute --windows "$CATALINA_HOME"` | |
| + CATALINA_BASE=`cygpath --absolute --windows "$CATALINA_BASE"` | |
| + CATALINA_TMPDIR=`cygpath --absolute --windows "$CATALINA_TMPDIR"` | |
| + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` | |
| + [ -n "$JSSE_HOME" ] && JSSE_HOME=`cygpath --absolute --windows "$JSSE_HOME"` | |
| + JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"` | |
| +fi | |
| + | |
| +# Set juli LogManager if it is present | |
| +if [ -r "$CATALINA_HOME"/bin/tomcat-juli.jar ]; then | |
| + JAVA_OPTS="$JAVA_OPTS "-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" "-Djava.util.logging.config.file="$CATALINA_BASE/conf/logging.properties" | |
| +fi | |
| + | |
| +# ----- Execute The Requested Command ----------------------------------------- | |
| + | |
| +# Bugzilla 37848: only output this if we have a TTY | |
| +if [ $have_tty -eq 1 ]; then | |
| + echo "Using CATALINA_BASE: $CATALINA_BASE" | |
| + echo "Using CATALINA_HOME: $CATALINA_HOME" | |
| + echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR" | |
| + if [ "$1" = "debug" -o "$1" = "javac" ] ; then | |
| + echo "Using JAVA_HOME: $JAVA_HOME" | |
| + else | |
| + echo "Using JRE_HOME: $JRE_HOME" | |
| + fi | |
| +fi | |
| + | |
| +if [ "$1" = "jpda" ] ; then | |
| + if [ -z "$JPDA_TRANSPORT" ]; then | |
| + JPDA_TRANSPORT="dt_socket" | |
| + fi | |
| + if [ -z "$JPDA_ADDRESS" ]; then | |
| + JPDA_ADDRESS="8000" | |
| + fi | |
| + if [ -z "$JPDA_OPTS" ]; then | |
| + JPDA_OPTS="-Xdebug -Xrunjdwp:transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=n" | |
| + fi | |
| + CATALINA_OPTS="$CATALINA_OPTS $JPDA_OPTS" | |
| + shift | |
| +fi | |
| + | |
| +if [ "$1" = "debug" ] ; then | |
| + if $os400; then | |
| + echo "Debug command not available on OS400" | |
| + exit 1 | |
| + else | |
| + shift | |
| + if [ "$1" = "-security" ] ; then | |
| + echo "Using Security Manager" | |
| + shift | |
| + exec "$_RUNJDB" $JAVA_OPTS $CATALINA_OPTS \ | |
| + -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \ | |
| + -sourcepath "$CATALINA_HOME"/../../jakarta-tomcat-catalina/catalina/src/share \ | |
| + -Djava.security.manager \ | |
| + -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \ | |
| + -Dcatalina.base="$CATALINA_BASE" \ | |
| + -Dcatalina.home="$CATALINA_HOME" \ | |
| + -Djava.io.tmpdir="$CATALINA_TMPDIR" \ | |
| + org.apache.catalina.startup.Bootstrap "$@" start | |
| + else | |
| + exec "$_RUNJDB" $JAVA_OPTS $CATALINA_OPTS \ | |
| + -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \ | |
| + -sourcepath "$CATALINA_HOME"/../../jakarta-tomcat-catalina/catalina/src/share \ | |
| + -Dcatalina.base="$CATALINA_BASE" \ | |
| + -Dcatalina.home="$CATALINA_HOME" \ | |
| + -Djava.io.tmpdir="$CATALINA_TMPDIR" \ | |
| + org.apache.catalina.startup.Bootstrap "$@" start | |
| + fi | |
| + fi | |
| + | |
| +elif [ "$1" = "run" ]; then | |
| + | |
| + shift | |
| + if [ "$1" = "-security" ] ; then | |
| + echo "Using Security Manager" | |
| + shift | |
| + exec "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \ | |
| + -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \ | |
| + -Djava.security.manager \ | |
| + -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \ | |
| + -Dcatalina.base="$CATALINA_BASE" \ | |
| + -Dcatalina.home="$CATALINA_HOME" \ | |
| + -Djava.io.tmpdir="$CATALINA_TMPDIR" \ | |
| + org.apache.catalina.startup.Bootstrap "$@" start | |
| + else | |
| + exec "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \ | |
| + -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \ | |
| + -Dcatalina.base="$CATALINA_BASE" \ | |
| + -Dcatalina.home="$CATALINA_HOME" \ | |
| + -Djava.io.tmpdir="$CATALINA_TMPDIR" \ | |
| + org.apache.catalina.startup.Bootstrap "$@" start | |
| + fi | |
| + | |
| +elif [ "$1" = "start" ] ; then | |
| + | |
| + shift | |
| + touch "$CATALINA_BASE"/logs/catalina.out | |
| + if [ "$1" = "-security" ] ; then | |
| + echo "Using Security Manager" | |
| + shift | |
| + "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \ | |
| + -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \ | |
| + -Djava.security.manager \ | |
| + -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \ | |
| + -Dcatalina.base="$CATALINA_BASE" \ | |
| + -Dcatalina.home="$CATALINA_HOME" \ | |
| + -Djava.io.tmpdir="$CATALINA_TMPDIR" \ | |
| + org.apache.catalina.startup.Bootstrap "$@" start \ | |
| + >> "$CATALINA_BASE"/logs/catalina.out 2>&1 & | |
| + | |
| + if [ ! -z "$CATALINA_PID" ]; then | |
| + echo $! > $CATALINA_PID | |
| + fi | |
| + else | |
| + "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \ | |
| + -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \ | |
| + -Dcatalina.base="$CATALINA_BASE" \ | |
| + -Dcatalina.home="$CATALINA_HOME" \ | |
| + -Djava.io.tmpdir="$CATALINA_TMPDIR" \ | |
| + org.apache.catalina.startup.Bootstrap "$@" start \ | |
| + >> "$CATALINA_BASE"/logs/catalina.out 2>&1 & | |
| + | |
| + if [ ! -z "$CATALINA_PID" ]; then | |
| + echo $! > $CATALINA_PID | |
| + fi | |
| + fi | |
| + | |
| +elif [ "$1" = "stop" ] ; then | |
| + | |
| + shift | |
| + FORCE=0 | |
| + if [ "$1" = "-force" ]; then | |
| + shift | |
| + FORCE=1 | |
| + fi | |
| + | |
| + "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \ | |
| + -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \ | |
| + -Dcatalina.base="$CATALINA_BASE" \ | |
| + -Dcatalina.home="$CATALINA_HOME" \ | |
| + -Djava.io.tmpdir="$CATALINA_TMPDIR" \ | |
| + org.apache.catalina.startup.Bootstrap "$@" stop | |
| + | |
| + if [ $FORCE -eq 1 ]; then | |
| + if [ ! -z "$CATALINA_PID" ]; then | |
| + echo "Killing: `cat $CATALINA_PID`" | |
| + kill -9 `cat $CATALINA_PID` | |
| + else | |
| + echo "Kill failed: \$CATALINA_PID not set" | |
| + fi | |
| + fi | |
| + | |
| +elif [ "$1" = "version" ] ; then | |
| + | |
| + "$_RUNJAVA" \ | |
| + -classpath "$CATALINA_HOME/server/lib/catalina.jar" \ | |
| + org.apache.catalina.util.ServerInfo | |
| + | |
| +else | |
| + | |
| + echo "Usage: catalina.sh ( commands ... )" | |
| + echo "commands:" | |
| + if $os400; then | |
| + echo " debug Start Catalina in a debugger (not available on OS400)" | |
| + echo " debug -security Debug Catalina with a security manager (not available on OS400)" | |
| + else | |
| + echo " debug Start Catalina in a debugger" | |
| + echo " debug -security Debug Catalina with a security manager" | |
| + fi | |
| + echo " jpda start Start Catalina under JPDA debugger" | |
| + echo " run Start Catalina in the current window" | |
| + echo " run -security Start in the current window with security manager" | |
| + echo " start Start Catalina in a separate window" | |
| + echo " start -security Start in a separate window with security manager" | |
| + echo " stop Stop Catalina" | |
| + echo " stop -force Stop Catalina (followed by kill -KILL)" | |
| + echo " version What version of tomcat are you running?" | |
| + exit 1 | |
| + | |
| +fi | |
| diff --git a/jira/files/default/startup.sh b/jira/files/default/startup.sh | |
| new file mode 100644 | |
| index 0000000..d2f2819 | |
| --- /dev/null | |
| +++ b/jira/files/default/startup.sh | |
| @@ -0,0 +1,48 @@ | |
| +#!/bin/sh | |
| +# ----------------------------------------------------------------------------- | |
| +# Start Script for the CATALINA Server | |
| +# | |
| +# $Id: startup.sh 385888 2006-03-14 21:04:40Z keith $ | |
| +# ----------------------------------------------------------------------------- | |
| + | |
| +# Better OS/400 detection: see Bugzilla 31132 | |
| +os400=false | |
| +darwin=false | |
| +case "`uname`" in | |
| +CYGWIN*) cygwin=true;; | |
| +OS400*) os400=true;; | |
| +Darwin*) darwin=true;; | |
| +esac | |
| + | |
| +# resolve links - $0 may be a softlink | |
| +PRG="$0" | |
| + | |
| +while [ -h "$PRG" ] ; do | |
| + ls=`ls -ld "$PRG"` | |
| + link=`expr "$ls" : '.*-> \(.*\)$'` | |
| + if expr "$link" : '/.*' > /dev/null; then | |
| + PRG="$link" | |
| + else | |
| + PRG=`dirname "$PRG"`/"$link" | |
| + fi | |
| +done | |
| + | |
| +PRGDIR=`dirname "$PRG"` | |
| +EXECUTABLE=catalina.sh | |
| + | |
| +# Check that target executable exists | |
| +if $os400; then | |
| + # -x will Only work on the os400 if the files are: | |
| + # 1. owned by the user | |
| + # 2. owned by the PRIMARY group of the user | |
| + # this will not work if the user belongs in secondary groups | |
| + eval | |
| +else | |
| + if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then | |
| + echo "Cannot find $PRGDIR/$EXECUTABLE" | |
| + echo "This file is needed to run this program" | |
| + exit 1 | |
| + fi | |
| +fi | |
| + | |
| +exec "$PRGDIR"/"$EXECUTABLE" run "$@" | |
| diff --git a/jira/recipes/default.rb b/jira/recipes/default.rb | |
| new file mode 100644 | |
| index 0000000..400ff7e | |
| --- /dev/null | |
| +++ b/jira/recipes/default.rb | |
| @@ -0,0 +1,98 @@ | |
| +# | |
| +# Cookbook Name:: jira | |
| +# Recipe:: default | |
| +# | |
| +# Copyright 2008, 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. | |
| +# | |
| + | |
| +# | |
| +# Manual Steps! | |
| +# | |
| +# MySQL: | |
| +# | |
| +# create database jiradb character set utf8; | |
| +# grant all privileges on jiradb.* to '$jira_user'@'localhost' identified by '$jira_password'; | |
| +# flush privileges; | |
| + | |
| +include_recipe "runit" | |
| +include_recipe "java" | |
| +include_recipe "apache2" | |
| +include_recipe "apache2::mod_proxy" | |
| +include_recipe "apache2::mod_proxy_http" | |
| +include_recipe "apacheA2::mod_ssl" | |
| + | |
| +unless FileTest.exists?(node[:jira_install_path]) | |
| + remote_file "jira" do | |
| + path "/tmp/jira.tar.gz" | |
| + source "http://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-#{node[:jira_version]}-standalone.tar.gz" | |
| + end | |
| + | |
| + bash "untar-jira" do | |
| + code "(cd /tmp; tar zxvf /tmp/jira.tar.gz)" | |
| + end | |
| + | |
| + bash "install-jira" do | |
| + code "mv /tmp/atlassian-jira-#{node[:jira_version]}-standalone #{node[:jira_install_path]}" | |
| + end | |
| + | |
| + if node[:jira_database] == "mysql" | |
| + remote_file "mysql-connector" do | |
| + path "/tmp/mysql-connector.tar.gz" | |
| + source "http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.6.tar.gz/from/http://mysql.osuosl.org/" | |
| + end | |
| + | |
| + bash "untar-mysql-connector" do | |
| + code "(cd /tmp; tar zxvf /tmp/mysql-connector.tar.gz)" | |
| + end | |
| + | |
| + bash "install-mysql-connector" do | |
| + code "cp /tmp/mysql-connector-java-5.1.6/mysql-connector-java-5.1.6-bin.jar #{node[:jira_install_path]}/common/lib" | |
| + end | |
| + end | |
| +end | |
| + | |
| +remote_file "#{node[:jira_install_path]}/bin/startup.sh" do | |
| + source "startup.sh" | |
| + owner "root" | |
| + mode 0755 | |
| +end | |
| + | |
| +remote_file "#{node[:jira_install_path]}/bin/catalina.sh" do | |
| + source "catalina.sh" | |
| + owner "root" | |
| + mode 0755 | |
| +end | |
| + | |
| +template "#{node[:jira_install_path]}/conf/server.xml" do | |
| + source "server.xml.erb" | |
| + owner "root" | |
| + mode 0755 | |
| +end | |
| + | |
| +template "#{node[:jira_install_path]}/atlassian-jira/WEB-INF/classes/entityengine.xml" do | |
| + source "entityengine.xml.erb" | |
| + owner "root" | |
| + mode 0755 | |
| +end | |
| + | |
| +runit_service "jira" | |
| + | |
| +template "#{node[:apache_dir]}/sites-available/jira.conf" do | |
| + source "apache.conf.erb" | |
| + owner "root" | |
| + mode 0644 | |
| +end | |
| + | |
| +apache_site "jira.conf" | |
| diff --git a/jira/templates/default/entityengine.xml.erb b/jira/templates/default/entityengine.xml.erb | |
| new file mode 100644 | |
| index 0000000..3be0e2e | |
| --- /dev/null | |
| +++ b/jira/templates/default/entityengine.xml.erb | |
| @@ -0,0 +1,114 @@ | |
| +<?xml version="1.0" encoding="UTF-8" ?> | |
| +<!DOCTYPE entity-config PUBLIC "-//OFBiz//DTD Entity Engine Config//EN" "http://www.ofbiz.org/dtds/entity-config.dtd"> | |
| +<!-- | |
| +This file configures the OFBiz Entity Engine which JIRA uses to store persist data in a datasource. | |
| + | |
| +For detailed configuration help see: | |
| + | |
| + http://www.atlassian.com/software/jira/docs/latest/entityengine.html | |
| + | |
| +Or our server specific setup guides (these take you through the setup process for each server): | |
| + | |
| + http://www.atlassian.com/software/jira/docs/latest/servers/ | |
| + | |
| +Normally, you will only need to edit the 'field-type-name' attribute of the <datasource> tag, near the bottom of this | |
| +file. | |
| + | |
| +Less commonly, you may wish to change then JNDI lookup paths for: | |
| + - the Transaction Manager (<transaction-factory> element) | |
| + - Database connection (<jndi-jdbc> element). | |
| + | |
| +If you not using the 12 preconfigured DBs, you may also need to add your own field type definition | |
| +--> | |
| +<entity-config> | |
| + <resource-loader name="maincp" class="org.ofbiz.core.config.ClasspathLoader"/> | |
| + | |
| + <!-- TRANSACTION FACTORY - This configures how JIRA finds the application server's transaction management. | |
| + The default ('java:comp/UserTransaction') is fine except for Tomcat 5.5 ('java:comp/env/UserTransaction'), JBoss and | |
| + Resin. | |
| + - see: | |
| + http://www.atlassian.com/software/jira/docs/latest/entityengine.html#transactionfactory | |
| + --> | |
| + <transaction-factory class="org.ofbiz.core.entity.transaction.JNDIFactory"> | |
| + <user-transaction-jndi jndi-server-name="default" jndi-name="java:comp/env/UserTransaction"/> | |
| + <transaction-manager-jndi jndi-server-name="default" jndi-name="java:comp/env/UserTransaction"/> | |
| + </transaction-factory> | |
| + | |
| + <delegator name="default" entity-model-reader="main" entity-group-reader="main"> | |
| + <group-map group-name="default" datasource-name="defaultDS"/> | |
| + </delegator> | |
| + | |
| + <entity-model-reader name="main"> | |
| + <resource loader="maincp" location="entitydefs/entitymodel.xml"/> | |
| + </entity-model-reader> | |
| + | |
| + <entity-group-reader name="main" loader="maincp" location="entitydefs/entitygroup.xml"/> | |
| + | |
| + <field-type name="cloudscape" loader="maincp" location="entitydefs/fieldtype-cloudscape.xml"/> | |
| + <field-type name="firebird" loader="maincp" location="entitydefs/fieldtype-firebird.xml"/> | |
| + <field-type name="hsql" loader="maincp" location="entitydefs/fieldtype-hsql18.xml"/> | |
| + <field-type name="mckoidb" loader="maincp" location="entitydefs/fieldtype-mckoidb.xml"/> | |
| + <field-type name="mysql" loader="maincp" location="entitydefs/fieldtype-mysql.xml"/> | |
| + <field-type name="mssql" loader="maincp" location="entitydefs/fieldtype-mssql.xml"/> | |
| + <!-- | |
| + This field type is deprecated, and should ONLY be used with Oracle 8i. | |
| + If you are using Oracle 9i or 10g please use Oracle 10g JDBC drivers and the 'oracle10g' field type, which is specified below | |
| + --> | |
| + <field-type name="oracle" loader="maincp" location="entitydefs/fieldtype-oracle.xml"/> | |
| + <!-- | |
| + Please use this field type for Oracle 9i and 10g. Please ensure that you are using Oracle 10g JDBC drivers which are compatible with Oracle 9i. | |
| + The 10g JDBC drivers can be downloaded from here: http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html | |
| + --> | |
| + <field-type name="oracle10g" loader="maincp" location="entitydefs/fieldtype-oracle10g.xml"/> | |
| + <field-type name="postgres" loader="maincp" location="entitydefs/fieldtype-postgres.xml"/> | |
| + <field-type name="postgres72" loader="maincp" location="entitydefs/fieldtype-postgres72.xml"/> <!-- use for postgres 7.2 and above --> | |
| + <field-type name="sapdb" loader="maincp" location="entitydefs/fieldtype-sapdb.xml"/> | |
| + <field-type name="sybase" loader="maincp" location="entitydefs/fieldtype-sybase.xml"/> | |
| + <field-type name="db2" loader="maincp" location="entitydefs/fieldtype-db2.xml"/> | |
| + <!-- | |
| + JRA-4202: FrontBase has 'type' and 'position' as reserved words so make the following changes the entitymodel.xml | |
| + <field name="type" type="short-varchar"/> to <field name="type" col-name="TYPE_" type="short-varchar"/> | |
| + <field name="type" type="long-varchar"/> to <field name="type" col-name="TYPE_" type="long-varchar"/> | |
| + <field name="position" type="integer"/> to <field name="position" col-name="POSITION_" type="integer"/> | |
| + --> | |
| + <field-type name="frontbase" loader="maincp" location="entitydefs/fieldtype-frontbase.xml"/> | |
| + | |
| + | |
| + <!-- DATASOURCE - You will need to update this tag for your installation. | |
| + | |
| + 1. Update field-type-name attribute to match your database. | |
| + Possible values include: cloudscape, db2, firebird, frontbase, hsql, mckoidb, mysql, mssql, oracle10g, oracle, postgres, postgres72, sapdb, sybase | |
| + 2. If using Orion or JBoss you will need to customize the <jndi-jdbc> tag. | |
| + See http://www.atlassian.com/software/jira/docs/latest/servers/ | |
| + 3. If using Postgres 7.3+ (schema-aware), use: | |
| + field-type-name="postgres72" | |
| + and: | |
| + schema-name="public" | |
| + in the datasource attribute list below. | |
| + 4. If using DB2, add: | |
| + constraint-name-clip-length="15" | |
| + to the datasource attribute list below, and an appropriate schema-name attribute, eg: | |
| + schema-name="DB2INST1" | |
| + 5. If not using HSQLDB remove: | |
| + schema-name="PUBLIC" | |
| + | |
| + PLEASE DO NOT CHANGE the datasource name from | |
| + defaultDS unless instructed to by Atlassian Support. | |
| + | |
| + PLEASE DO NOT set the use-foreign-key* values to "true" as JIRA does not currently support this. | |
| + --> | |
| + <datasource name="defaultDS" field-type-name="<%= @node[:jira_database] %>" | |
| + helper-class="org.ofbiz.core.entity.GenericHelperDAO" | |
| + check-on-start="true" | |
| + use-foreign-keys="false" | |
| + use-foreign-key-indices="false" | |
| + check-fks-on-start="false" | |
| + check-fk-indices-on-start="false" | |
| + add-missing-on-start="true" | |
| + check-indices-on-start="true"> | |
| + <jndi-jdbc jndi-server-name="default" jndi-name="java:comp/env/jdbc/JiraDS"/> | |
| +<!-- Orion format: <jndi-jdbc jndi-server-name="default" jndi-name="jdbc/JiraDS"/> --> | |
| +<!-- JBoss format: <jndi-jdbc jndi-server-name="default" jndi-name="java:/DefaultDS"/> --> | |
| +<!-- Weblogic format: <jndi-jdbc jndi-server-name="default" jndi-name="JiraDS"/> --> | |
| + </datasource> | |
| +</entity-config> | |
| diff --git a/jira/templates/default/server.xml.erb b/jira/templates/default/server.xml.erb | |
| new file mode 100644 | |
| index 0000000..3535a87 | |
| --- /dev/null | |
| +++ b/jira/templates/default/server.xml.erb | |
| @@ -0,0 +1,90 @@ | |
| +<Server port="8005" shutdown="SHUTDOWN"> | |
| + | |
| + <Service name="Catalina"> | |
| + | |
| + <Connector port="8080" | |
| + maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" useBodyEncodingForURI="true" | |
| + enableLookups="false" redirectPort="8443" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" /> | |
| + | |
| + <Engine name="Catalina" defaultHost="localhost"> | |
| + <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"> | |
| + | |
| + <Context path="" docBase="${catalina.home}/atlassian-jira" reloadable="false"> | |
| + <Resource name="jdbc/JiraDS" auth="Container" type="javax.sql.DataSource" | |
| + username="<%= @node[:jira_database_user] %>" | |
| + password="<%= @node[:jira_database_password] %>" | |
| + driverClassName="com.mysql.jdbc.Driver" | |
| +url="jdbc:<%= @node[:jira_database] %>://<%= @node[:jira_database_host] %>/jiradb?autoReconnect=true&useUnicode=true&characterEncoding=UTF8" | |
| + maxActive="20" /> | |
| + | |
| + <!-- NOTE: When a database server reboots or their is a network failure all the connections in the | |
| + * connection pool are broken and normally this requires a Application Server reboot. If you include the | |
| + * parameter validationQuery="{QUERY FOR YOUR DB HERE} as show below a new connection is created to replace it. | |
| + * For more information see http://confluence.atlassian.com/display/JIRA/Surviving+Connection+Closures | |
| + * | |
| + * validationQuery="Select 1" | |
| + --> | |
| + | |
| + <!-- NOTE: If you use a database other than hsqldb: | |
| + * delete the minEvictableIdleTimeMillis and timeBetweenEvictionRunsMillis attributes | |
| + * change the database type in atlassian-jira/WEB-INF/classes/entityengine.xml | |
| + --> | |
| + | |
| + <Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction" | |
| + factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/> | |
| + <Manager pathname=""/> | |
| + </Context> | |
| + | |
| + </Host> | |
| + | |
| + <!-- Enable access logging. This should produce access_log.<date> files in the 'logs' directory. --> | |
| + <Valve className="org.apache.catalina.valves.AccessLogValve" | |
| + pattern="%h %l %u %t "%r" %s %b %T" resolveHosts="false" /> | |
| + | |
| + <!-- | |
| + Alternatively to track user interactions, comment out the valve above and uncomment the valve below. | |
| + This will print the session ID in the logs. | |
| + Note: ensure access to the access log is then restricted, as obtaining session IDs poses a security risk | |
| + --> | |
| + <!-- | |
| + <Valve className="org.apache.catalina.valves.AccessLogValve" | |
| + pattern="%h %l %u %t "%r" %s %b %T %S" resolveHosts="false" /> | |
| + --> | |
| + | |
| + </Engine> | |
| + | |
| + <!-- To run JIRA via HTTPS: | |
| + * Uncomment the Connector below | |
| + * Execute: | |
| + %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows) | |
| + $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix) | |
| + with a password value of "changeit" for both the certificate and the keystore itself. | |
| + * If you are on JDK1.3 or earlier, download and install JSSE 1.0.2 or later, and put the JAR files into | |
| + "$JAVA_HOME/jre/lib/ext" | |
| + * Restart and visit https://localhost:8443/ | |
| + | |
| + For more info, see http://jakarta.apache.org/tomcat/tomcat-5.5-doc/ssl-howto.html | |
| + --> | |
| + <!-- | |
| + <Connector port="8443" maxHttpHeaderSize="8192" | |
| + maxThreads="150" minSpareThreads="25" maxSpareThreads="75" | |
| + enableLookups="false" disableUploadTimeout="true" | |
| + acceptCount="100" scheme="https" secure="true" | |
| + clientAuth="false" sslProtocol="TLS" /> | |
| + --> | |
| + | |
| + <!-- To connect to an external web server (typically Apache) --> | |
| + <!-- Define an AJP 1.3 Connector on port 8009 --> | |
| + <!-- | |
| + <Connector port="8009" | |
| + enableLookups="false" redirectPort="8443" protocol="AJP/1.3" /> | |
| + --> | |
| + | |
| + | |
| + </Service> | |
| + | |
| + <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" /> | |
| + <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" /> | |
| + <Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"/> | |
| + | |
| +</Server> | |
| diff --git a/jira/templates/default/sv-jira-run.erb b/jira/templates/default/sv-jira-run.erb | |
| new file mode 100644 | |
| index 0000000..9c6b864 | |
| --- /dev/null | |
| +++ b/jira/templates/default/sv-jira-run.erb | |
| @@ -0,0 +1,5 @@ | |
| +#!/bin/bash | |
| + | |
| +cd <%= @node[:jira_install_path] %> | |
| +exec 2>&1 | |
| +exec chpst -u <%= @node[:jira_run_user] %> env JAVA_HOME=/usr/lib/jvm/java-6-sun JAVA_OPTS="-Xms256m -Xmx256m" <%= @node[:jira_install_path] %>/bin/startup.sh | |
| diff --git a/man/recipes/default.rb b/man/recipes/default.rb | |
| new file mode 100644 | |
| index 0000000..d83d097 | |
| --- /dev/null | |
| +++ b/man/recipes/default.rb | |
| @@ -0,0 +1,23 @@ | |
| +# | |
| +# Cookbook Name:: man | |
| +# Recipe:: default | |
| +# | |
| +# Copyright 2008, 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. | |
| +# | |
| + | |
| +case node[:platform] | |
| +when "Ubuntu","Debian" | |
| + package "man-db" | |
| +end | |
| \ No newline at end of file | |
| diff --git a/munin/recipes/default.rb b/munin/recipes/default.rb | |
| new file mode 100644 | |
| index 0000000..b3b2133 | |
| --- /dev/null | |
| +++ b/munin/recipes/default.rb | |
| @@ -0,0 +1,41 @@ | |
| +# | |
| +# Cookbook Name:: munin | |
| +# Recipe:: default | |
| +# | |
| +# Copyright 2008, 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 "iptables" | |
| + | |
| +package "munin-node" | |
| + | |
| +service "munin-node" do | |
| + supports :restart => true | |
| + action :enable | |
| +end | |
| + | |
| +munin_server_regexs = [] | |
| +search(:nodes, "munin_server_regex:*").each do |ip| | |
| + munin_server_regexs << ip unless munin_server_regexs.detect? { |i| i == ip } | |
| +end | |
| + | |
| +template "/etc/munin/munin-node.conf" do | |
| + source "munin-node.conf.erb" | |
| + mode 0644 | |
| + variables :munin_server_regexs => munin_server_regexs | |
| + notifies :restart, resources(:service => "munin-node") | |
| +end | |
| + | |
| +iptables_rule "port_munin" | |
| \ No newline at end of file | |
| diff --git a/munin/templates/default/munin-node.conf.erb b/munin/templates/default/munin-node.conf.erb | |
| new file mode 100644 | |
| index 0000000..716215b | |
| --- /dev/null | |
| +++ b/munin/templates/default/munin-node.conf.erb | |
| @@ -0,0 +1,41 @@ | |
| +### | |
| +# Generated by Puppet | |
| +### | |
| + | |
| +log_level 4 | |
| +log_file /var/log/munin/munin-node.log | |
| +port 4949 | |
| +pid_file /var/run/munin/munin-node.pid | |
| +background 1 | |
| +setseid 1 | |
| + | |
| +# Which port to bind to; | |
| +host * | |
| +user root | |
| +group root | |
| +setsid yes | |
| + | |
| +# Regexps for files to ignore | |
| + | |
| +ignore_file ~$ | |
| +ignore_file \.bak$ | |
| +ignore_file %$ | |
| +ignore_file \.dpkg-(tmp|new|old|dist)$ | |
| +ignore_file \.rpm(save|new)$ | |
| + | |
| +# Set this if the client doesn't report the correct hostname when | |
| +# telnetting to localhost, port 4949 | |
| +# | |
| +#host_name localhost.localdomain | |
| +<% if @node[:ec2] == "true" %> | |
| +host_name <%= @node[:hostname] %>.amazonaws.com | |
| +<% end %> | |
| + | |
| +# A list of addresses that are allowed to connect. This must be a | |
| +# regular expression, due to brain damage in Net::Server, which | |
| +# doesn't understand CIDR-style network notation. You may repeat | |
| +# the allow line as many times as you'd like | |
| + | |
| +<% @munin_server_regexs.each do |regex| -%> | |
| +allow <%= regex %> | |
| +<% end -%> | |
| diff --git a/munin/templates/default/port_munin.erb b/munin/templates/default/port_munin.erb | |
| new file mode 100644 | |
| index 0000000..f0b5afe | |
| --- /dev/null | |
| +++ b/munin/templates/default/port_munin.erb | |
| @@ -0,0 +1,2 @@ | |
| +# Munin | |
| +-A FWR -p tcp -m tcp --dport 4949 -j ACCEPT | |
| \ No newline at end of file | |
| diff --git a/mysql/attributes/mysql_ec2.rb b/mysql/attributes/mysql_ec2.rb | |
| new file mode 100644 | |
| index 0000000..60ed224 | |
| --- /dev/null | |
| +++ b/mysql/attributes/mysql_ec2.rb | |
| @@ -0,0 +1 @@ | |
| +mysql_ec2_path "/srv/mysql" unless attribute?("mysql_ec2_path") | |
| \ No newline at end of file | |
| diff --git a/mysql/recipes/client.rb b/mysql/recipes/client.rb | |
| new file mode 100644 | |
| index 0000000..1203809 | |
| --- /dev/null | |
| +++ b/mysql/recipes/client.rb | |
| @@ -0,0 +1,34 @@ | |
| +# | |
| +# Cookbook Name:: mysql | |
| +# Recipe:: client | |
| +# | |
| +# Copyright 2008, 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 "mysql-devel" do | |
| + package_name value_for_platform( | |
| + [ "CentOS", "RedHat", "SuSE" ] => { "default" => "mysql-devel" }, | |
| + "default" => 'libmysqlclient15-dev' | |
| + ) | |
| + action :install | |
| +end | |
| + | |
| +package "mysql-client" do | |
| + package_name value_for_platform( | |
| + [ "CentOS", "RedHat", "SuSE" ] => { "default" => "mysql" }, | |
| + "default" => "mysql-client" | |
| + ) | |
| + action :install | |
| +end | |
| \ No newline at end of file | |
| diff --git a/mysql/recipes/default.rb b/mysql/recipes/default.rb | |
| new file mode 100644 | |
| index 0000000..073ea39 | |
| --- /dev/null | |
| +++ b/mysql/recipes/default.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: mysql | |
| +# Recipe:: default | |
| +# | |
| +# Copyright 2008, 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 "mysql::client" | |
| diff --git a/mysql/recipes/server.rb b/mysql/recipes/server.rb | |
| new file mode 100644 | |
| index 0000000..9352667 | |
| --- /dev/null | |
| +++ b/mysql/recipes/server.rb | |
| @@ -0,0 +1,64 @@ | |
| +# | |
| +# Cookbook Name:: mysql | |
| +# Recipe:: default | |
| +# | |
| +# Copyright 2008, 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 "iptables" | |
| + | |
| +include_recipe "mysql::client" | |
| + | |
| +package "mysql-server" do | |
| + action :install | |
| +end | |
| + | |
| +service "mysql" do | |
| + supports :status => true, :restart => true, :reload => true | |
| + action :enable | |
| +end | |
| + | |
| +iptables_rule "port_mysql" | |
| + | |
| +if (node[:ec2] && ! FileTest.directory?(node[:mysql_ec2_path])) | |
| + | |
| + mysql_server_path = "" | |
| + | |
| + case node[:platform] | |
| + when "Ubuntu","Debian" | |
| + mysql_server_path = "/var/lib/mysql" | |
| + else | |
| + mysql_server_path = "/var/mysql" | |
| + end | |
| + | |
| + service "mysql" do | |
| + supports :status => true, :restart => true, :reload => true | |
| + action :stop | |
| + end | |
| + | |
| + execute "install-mysql" do | |
| + command "mv #{mysql_server_path} #{node[:mysql_ec2_path]}" | |
| + not_if do FileTest.directory?(node[:mysql_ec2_path]) end | |
| + end | |
| + | |
| + link node[:mysql_ec2_path] do | |
| + target_file mysql_server_path | |
| + end | |
| + | |
| + service "mysql" do | |
| + supports :status => true, :restart => true, :reload => true | |
| + action :start | |
| + end | |
| + | |
| +end | |
| \ No newline at end of file | |
| diff --git a/mysql/templates/default/port_mysql.erb b/mysql/templates/default/port_mysql.erb | |
| new file mode 100644 | |
| index 0000000..55a2ffc | |
| --- /dev/null | |
| +++ b/mysql/templates/default/port_mysql.erb | |
| @@ -0,0 +1,3 @@ | |
| +# MySQL | |
| +-A FWR -p tcp -m tcp --dport 3306 -j ACCEPT | |
| +-A FWR -p udp -m udp --dport 3306 -j ACCEPT | |
| \ No newline at end of file | |
| diff --git a/nginx/attributes/nginx_locations.rb b/nginx/attributes/nginx_locations.rb | |
| new file mode 100644 | |
| index 0000000..27627a6 | |
| --- /dev/null | |
| +++ b/nginx/attributes/nginx_locations.rb | |
| @@ -0,0 +1,12 @@ | |
| +case platform | |
| +when "Debian","Ubuntu" | |
| + nginx_dir "/etc/nginx" | |
| + nginx_log_dir "/var/log/nginx" | |
| + nginx_user "www-data" | |
| + nginx_binary "/usr/sbin/nginx" | |
| +else | |
| + nginx_dir "/etc/nginx" | |
| + nginx_log_dir "/var/log/nginx" | |
| + nginx_user "www-data" | |
| + nginx_binary "/usr/sbin/nginx" | |
| +end | |
| diff --git a/nginx/attributes/nginx_settings.rb b/nginx/attributes/nginx_settings.rb | |
| new file mode 100644 | |
| index 0000000..3908555 | |
| --- /dev/null | |
| +++ b/nginx/attributes/nginx_settings.rb | |
| @@ -0,0 +1,12 @@ | |
| +nginx_gzip "on" unless attribute?("nginx_gzip") | |
| +nginx_gzip_http_version "1.0" unless attribute?("nginx_gzip_http_version") | |
| +nginx_gzip_comp_level "2" unless attribute?("nginx_gzip_comp_level") | |
| +nginx_gzip_proxied "any" unless attribute?("nginx_gzip_proxied") | |
| +nginx_gzip_types [ "text/plain", "text/html", "text/css", "application/x-javascript", "text/xml", "application/xml", "application/xml+rss", "text/javascript" ] unless attribute?("nginx_gzip_types") | |
| + | |
| +nginx_keepalive "on" unless attribute?("nginx_keepalive") | |
| +nginx_keepalive_timeout 65 unless attribute?("nginx_keepalive_timeout") | |
| + | |
| +nginx_worker_processes 1 unless attribute?("nginx_worker_processes") | |
| +nginx_worker_connections 1024 unless attribute?("nginx_worker_connections") | |
| +nginx_server_names_hash_bucket_size 64 unless attribute?("nginx_server_names_hash_bucket_size") | |
| diff --git a/nginx/definitions/nginx_site.rb b/nginx/definitions/nginx_site.rb | |
| new file mode 100644 | |
| index 0000000..feaf0f5 | |
| --- /dev/null | |
| +++ b/nginx/definitions/nginx_site.rb | |
| @@ -0,0 +1,37 @@ | |
| +# | |
| +# Cookbook Name:: nginx | |
| +# Definition:: nginx_site | |
| +# Author:: AJ Christensen <aj@junglist.gen.nz> | |
| +# | |
| +# Copyright 2008, 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 :nginx_site, :enable => true do | |
| + include_recipe "nginx" | |
| + | |
| + if params[:enable] | |
| + execute "nxensite #{params[:name]}" do | |
| + command "/usr/sbin/nxensite #{params[:name]}" | |
| + notifies :restart, resources(:service => "nginx") | |
| + not_if do File.symlink?("#{node[:nginx_dir]}/sites-enabled/#{params[:name]}") end | |
| + end | |
| + else | |
| + execute "nxdissite #{params[:name]}" do | |
| + command "/usr/sbin/nxdissite #{params[:name]}" | |
| + notifies :restart, resources(:service => "nginx") | |
| + only_if do File.symlink?("#{node[:nginx_dir]}/sites-enabled/#{params[:name]}") end | |
| + end | |
| + end | |
| +end | |
| diff --git a/nginx/recipes/default.rb b/nginx/recipes/default.rb | |
| new file mode 100644 | |
| index 0000000..ab81063 | |
| --- /dev/null | |
| +++ b/nginx/recipes/default.rb | |
| @@ -0,0 +1,56 @@ | |
| +# | |
| +# Cookbook Name:: nginx | |
| +# Recipe:: default | |
| +# Author:: AJ Christensen <aj@junglist.gen.nz> | |
| +# | |
| +# Copyright 2008, 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 "nginx" | |
| + | |
| +directory node[:nginx_log_dir] do | |
| + mode 0755 | |
| + owner node[:nginx_user] | |
| + action :create | |
| +end | |
| + | |
| +%w{nxensite nxdissite}.each do |nxscript| | |
| + template "/usr/sbin/#{nxscript}" do | |
| + source "#{nxscript}.erb" | |
| + mode 0755 | |
| + owner "root" | |
| + group "root" | |
| + end | |
| +end | |
| + | |
| +template "nginx.conf" do | |
| + path "#{node[:nginx_dir]}/nginx.conf" | |
| + source "nginx.conf.erb" | |
| + owner "root" | |
| + group "root" | |
| + mode 0644 | |
| +end | |
| + | |
| +template "#{node[:nginx_dir]}/sites-available/default" do | |
| + source "default-site.erb" | |
| + owner "root" | |
| + group "root" | |
| + mode 0644 | |
| +end | |
| + | |
| +service "nginx" do | |
| + supports :status => true, :restart => true, :reload => true | |
| + action [ :enable, :start ] | |
| +end | |
| diff --git a/nginx/templates/default/default-site.erb b/nginx/templates/default/default-site.erb | |
| new file mode 100644 | |
| index 0000000..6ee84e0 | |
| --- /dev/null | |
| +++ b/nginx/templates/default/default-site.erb | |
| @@ -0,0 +1,11 @@ | |
| +server { | |
| + listen 80; | |
| + server_name <%= @node[:hostname] %>; | |
| + | |
| + access_log <%= @node[:nginx_log_dir] %>/localhost.access.log; | |
| + | |
| + location / { | |
| + root /var/www/nginx-default; | |
| + index index.html index.htm; | |
| + } | |
| +} | |
| diff --git a/nginx/templates/default/nginx.conf.erb b/nginx/templates/default/nginx.conf.erb | |
| new file mode 100644 | |
| index 0000000..d84acad | |
| --- /dev/null | |
| +++ b/nginx/templates/default/nginx.conf.erb | |
| @@ -0,0 +1,37 @@ | |
| +user <%= @node[:nginx_user] %>; | |
| +worker_processes <%= @node[:nginx_worker_processes] %>; | |
| + | |
| +error_log <%= @node[:nginx_log_dir] %>/error.log; | |
| +pid /var/run/nginx.pid; | |
| + | |
| +events { | |
| + worker_connections <%= @node[:nginx_worker_connections] %>; | |
| +} | |
| + | |
| +http { | |
| + include /etc/nginx/mime.types; | |
| + default_type application/octet-stream; | |
| + | |
| + access_log <%= @node[:nginx_log_dir] %>/access.log; | |
| + | |
| + sendfile on; | |
| + tcp_nopush on; | |
| + tcp_nodelay on; | |
| + | |
| + <% if @node[:nginx_keepalive] == "on" %> | |
| + keepalive_timeout <%= @node[:nginx_keepalive_timeout] %>; | |
| + <% end %> | |
| + | |
| + gzip <%= @node[:nginx_gzip] %>; | |
| + <% if @node[:nginx_gzip] == "on" %> | |
| + gzip_http_version <%= @node[:nginx_gzip_http_version] %>; | |
| + gzip_comp_level <%= @node[:nginx_gzip_comp_level] %>; | |
| + gzip_proxied <%= @node[:nginx_gzip_proxied] %>; | |
| + gzip_types <%= @node[:nginx_gzip_types].join(' ') %>; | |
| + <% end %> | |
| + | |
| + server_names_hash_bucket_size <%= @node[:nginx_server_names_hash_bucket_size] %>; | |
| + | |
| + include /etc/nginx/conf.d/*.conf; | |
| + include /etc/nginx/sites-enabled/*; | |
| +} | |
| diff --git a/nginx/templates/default/nxdissite.erb b/nginx/templates/default/nxdissite.erb | |
| new file mode 100644 | |
| index 0000000..9b94775 | |
| --- /dev/null | |
| +++ b/nginx/templates/default/nxdissite.erb | |
| @@ -0,0 +1,29 @@ | |
| +#!/bin/sh -e | |
| + | |
| +SYSCONFDIR='<%= @node[:nginx_dir] %>' | |
| + | |
| +if [ -z $1 ]; then | |
| + echo "Which site would you like to disable?" | |
| + echo -n "Your choices are: " | |
| + ls $SYSCONFDIR/sites-enabled/* | \ | |
| + sed -e "s,$SYSCONFDIR/sites-enabled/,,g" | xargs echo | |
| + echo -n "Site name? " | |
| + read SITENAME | |
| +else | |
| + SITENAME=$1 | |
| +fi | |
| + | |
| +if [ $SITENAME = "default" ]; then | |
| + PRIORITY="000" | |
| +fi | |
| + | |
| +if ! [ -e $SYSCONFDIR/sites-enabled/$SITENAME -o \ | |
| + -e $SYSCONFDIR/sites-enabled/"$PRIORITY"-"$SITENAME" ]; then | |
| + echo "This site is already disabled, or does not exist!" | |
| + exit 1 | |
| +fi | |
| + | |
| +if ! rm $SYSCONFDIR/sites-enabled/$SITENAME 2>/dev/null; then | |
| + rm -f $SYSCONFDIR/sites-enabled/"$PRIORITY"-"$SITENAME" | |
| +fi | |
| +echo "Site $SITENAME disabled; reload nginx to disable." | |
| diff --git a/nginx/templates/default/nxensite.erb b/nginx/templates/default/nxensite.erb | |
| new file mode 100644 | |
| index 0000000..94e96e9 | |
| --- /dev/null | |
| +++ b/nginx/templates/default/nxensite.erb | |
| @@ -0,0 +1,38 @@ | |
| +#!/bin/sh -e | |
| + | |
| +SYSCONFDIR='<%= @node[:nginx_dir] %>' | |
| + | |
| +if [ -z $1 ]; then | |
| + echo "Which site would you like to enable?" | |
| + echo -n "Your choices are: " | |
| + ls $SYSCONFDIR/sites-available/* | \ | |
| + sed -e "s,$SYSCONFDIR/sites-available/,,g" | xargs echo | |
| + echo -n "Site name? " | |
| + read SITENAME | |
| +else | |
| + SITENAME=$1 | |
| +fi | |
| + | |
| +if [ $SITENAME = "default" ]; then | |
| + PRIORITY="000" | |
| +fi | |
| + | |
| +if [ -e $SYSCONFDIR/sites-enabled/$SITENAME -o \ | |
| + -e $SYSCONFDIR/sites-enabled/"$PRIORITY"-"$SITENAME" ]; then | |
| + echo "This site is already enabled!" | |
| + exit 0 | |
| +fi | |
| + | |
| +if ! [ -e $SYSCONFDIR/sites-available/$SITENAME ]; then | |
| + echo "This site does not exist!" | |
| + exit 1 | |
| +fi | |
| + | |
| +if [ $SITENAME = "default" ]; then | |
| + ln -sf $SYSCONFDIR/sites-available/$SITENAME \ | |
| + $SYSCONFDIR/sites-enabled/"$PRIORITY"-"$SITENAME" | |
| +else | |
| + ln -sf $SYSCONFDIR/sites-available/$SITENAME $SYSCONFDIR/sites-enabled/$SITENAME | |
| +fi | |
| + | |
| +echo "Site $SITENAME installed; reload nginx to enable." | |
| diff --git a/openssh/recipes/default.rb b/openssh/recipes/default.rb | |
| new file mode 100644 | |
| index 0000000..2d6f959 | |
| --- /dev/null | |
| +++ b/openssh/recipes/default.rb | |
| @@ -0,0 +1,45 @@ | |
| +# | |
| +# Cookbook Name:: openssh | |
| +# Recipe:: default | |
| +# | |
| +# Copyright 2008, 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 "iptables" | |
| + | |
| +packages = case node[:platform] | |
| + when "CentOS","RedHat","Fedora" | |
| + %w{openssh-clients openssh} | |
| + else | |
| + %w{openssh-client openssh-server} | |
| + end | |
| + | |
| +packages.each do |pkg| | |
| + package pkg | |
| +end | |
| + | |
| +service "ssh" do | |
| + case node[:platform] | |
| + when "CentOS","RedHat","Fedora" | |
| + service_name "sshd" | |
| + else | |
| + service_name "ssh" | |
| + end | |
| + supports :restart => true | |
| + action [ :enable, :start ] | |
| +end | |
| + | |
| +iptables_rule "port_ssh" | |
| + | |
| diff --git a/openssh/templates/default/port_ssh.erb b/openssh/templates/default/port_ssh.erb | |
| new file mode 100644 | |
| index 0000000..9265619 | |
| --- /dev/null | |
| +++ b/openssh/templates/default/port_ssh.erb | |
| @@ -0,0 +1,2 @@ | |
| +# SSH | |
| +-A FWR -p tcp -m tcp --dport 22 -j ACCEPT | |
| \ No newline at end of file | |
| diff --git a/quick_start/attributes/quick_start.rb b/quick_start/attributes/quick_start.rb | |
| new file mode 100644 | |
| index 0000000..978e2d9 | |
| --- /dev/null | |
| +++ b/quick_start/attributes/quick_start.rb | |
| @@ -0,0 +1 @@ | |
| +deep_though "If a tree falls in the forest..." | |
| diff --git a/quick_start/recipes/default.rb b/quick_start/recipes/default.rb | |
| new file mode 100644 | |
| index 0000000..314503b | |
| --- /dev/null | |
| +++ b/quick_start/recipes/default.rb | |
| @@ -0,0 +1,24 @@ | |
| +# | |
| +# Cookbook Name:: quick_start | |
| +# Recipe:: default | |
| +# | |
| +# Copyright 2009, OpsCode | |
| +# | |
| +# 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. | |
| +# | |
| + | |
| +template "/tmp/deep_thought.txt" do | |
| + source "deep_thought.txt.erb" | |
| + variables :deep_thought => node[:deep_thought] | |
| + action :create | |
| +end | |
| diff --git a/quick_start/templates/default/deep_thought.txt.erb b/quick_start/templates/default/deep_thought.txt.erb | |
| new file mode 100644 | |
| index 0000000..d4c9713 | |
| --- /dev/null | |
| +++ b/quick_start/templates/default/deep_thought.txt.erb | |
| @@ -0,0 +1 @@ | |
| +Todays deep thought: <%= @deep_thought %> | |
| diff --git a/redmine/attributes/redmine_settings.rb b/redmine/attributes/redmine_settings.rb | |
| new file mode 100644 | |
| index 0000000..e69de29 | |
| diff --git a/redmine/recipes/default.rb b/redmine/recipes/default.rb | |
| new file mode 100644 | |
| index 0000000..e6860de | |
| --- /dev/null | |
| +++ b/redmine/recipes/default.rb | |
| @@ -0,0 +1,27 @@ | |
| +# | |
| +# Author: Joshua Timberman <joshua.timberman@gmail.com> | |
| +# Cookbook Name:: redmine | |
| +# Recipe:: default | |
| +# | |
| +# Copyright 2008, Joshua Timberman | |
| +# | |
| +# 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. | |
| +# | |
| +# Get prerequisite recipes. | |
| +include_recipe "iptables" | |
| +include_recipe "subversion" | |
| +include_recipe "mysql::server" | |
| + | |
| +runit_service "redmine" | |
| + | |
| +iptables_rule "port_redmine" | |
| \ No newline at end of file | |
| diff --git a/redmine/templates/default/database.yml.erb b/redmine/templates/default/database.yml.erb | |
| new file mode 100644 | |
| index 0000000..1dc6781 | |
| --- /dev/null | |
| +++ b/redmine/templates/default/database.yml.erb | |
| @@ -0,0 +1,47 @@ | |
| +# MySQL (default setup). Versions 4.1 and 5.0 are recommended. | |
| +# | |
| +# Get the fast C bindings: | |
| +# gem install mysql | |
| +# (on OS X: gem install mysql -- --include=/usr/local/lib) | |
| +# And be sure to use new-style password hashing: | |
| +# http://dev.mysql.com/doc/refman/5.0/en/old-client.html | |
| + | |
| +production: | |
| + adapter: mysql | |
| + database: redmine | |
| + host: localhost | |
| + username: root | |
| + password: | |
| + encoding: utf8 | |
| + | |
| +development: | |
| + adapter: mysql | |
| + database: redmine_development | |
| + host: localhost | |
| + username: root | |
| + password: | |
| + encoding: utf8 | |
| + | |
| +test: | |
| + adapter: mysql | |
| + database: redmine_test | |
| + host: localhost | |
| + username: root | |
| + password: | |
| + encoding: utf8 | |
| + | |
| +test_pgsql: | |
| + adapter: postgresql | |
| + database: redmine_test | |
| + host: localhost | |
| + username: postgres | |
| + password: "postgres" | |
| + | |
| +test_sqlite3: | |
| + adapter: sqlite3 | |
| + dbfile: db/test.db | |
| + | |
| +demo: | |
| + adapter: sqlite3 | |
| + dbfile: db/demo.db | |
| + | |
| diff --git a/redmine/templates/default/port_redmine.erb b/redmine/templates/default/port_redmine.erb | |
| new file mode 100644 | |
| index 0000000..609c59b | |
| --- /dev/null | |
| +++ b/redmine/templates/default/port_redmine.erb | |
| @@ -0,0 +1,2 @@ | |
| +# Redmine | |
| +-A FWR -p tcp -m tcp --dport 3000 -j ACCEPT | |
| \ No newline at end of file | |
| diff --git a/redmine/templates/default/settings.yml.erb b/redmine/templates/default/settings.yml.erb | |
| new file mode 100644 | |
| index 0000000..5006445 | |
| --- /dev/null | |
| +++ b/redmine/templates/default/settings.yml.erb | |
| @@ -0,0 +1,142 @@ | |
| +# redMine - project management software | |
| +# Copyright (C) 2006-2007 Jean-Philippe Lang | |
| +# | |
| +# This program is free software; you can redistribute it and/or | |
| +# modify it under the terms of the GNU General Public License | |
| +# as published by the Free Software Foundation; either version 2 | |
| +# of the License, or (at your option) any later version. | |
| +# | |
| +# This program is distributed in the hope that it will be useful, | |
| +# but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| +# GNU General Public License for more details. | |
| +# | |
| +# You should have received a copy of the GNU General Public License | |
| +# along with this program; if not, write to the Free Software | |
| +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
| + | |
| + | |
| +# DO NOT MODIFY THIS FILE !!! | |
| +# Settings can be defined through the application in Admin -> Settings | |
| + | |
| +app_title: | |
| + default: Redmine | |
| +app_subtitle: | |
| + default: Project management | |
| +welcome_text: | |
| + default: | |
| +login_required: | |
| + default: 0 | |
| +self_registration: | |
| + default: '2' | |
| +lost_password: | |
| + default: 1 | |
| +attachment_max_size: | |
| + format: int | |
| + default: 5120 | |
| +issues_export_limit: | |
| + format: int | |
| + default: 500 | |
| +activity_days_default: | |
| + format: int | |
| + default: 30 | |
| +per_page_options: | |
| + default: '25,50,100' | |
| +mail_from: | |
| + default: redmine@example.net | |
| +bcc_recipients: | |
| + default: 1 | |
| +plain_text_mail: | |
| + default: 0 | |
| +text_formatting: | |
| + default: textile | |
| +wiki_compression: | |
| + default: "" | |
| +default_language: | |
| + default: en | |
| +host_name: | |
| + default: localhost:3000 | |
| +protocol: | |
| + default: http | |
| +feeds_limit: | |
| + format: int | |
| + default: 15 | |
| +diff_max_lines_displayed: | |
| + format: int | |
| + default: 1500 | |
| +enabled_scm: | |
| + serialized: true | |
| + default: | |
| + - Subversion | |
| + - Darcs | |
| + - Mercurial | |
| + - Cvs | |
| + - Bazaar | |
| + - Git | |
| +autofetch_changesets: | |
| + default: 1 | |
| +sys_api_enabled: | |
| + default: 0 | |
| +commit_ref_keywords: | |
| + default: 'refs,references,IssueID' | |
| +commit_fix_keywords: | |
| + default: 'fixes,closes' | |
| +commit_fix_status_id: | |
| + format: int | |
| + default: 0 | |
| +commit_fix_done_ratio: | |
| + default: 100 | |
| +# autologin duration in days | |
| +# 0 means autologin is disabled | |
| +autologin: | |
| + format: int | |
| + default: 0 | |
| +# date format | |
| +date_format: | |
| + default: '' | |
| +time_format: | |
| + default: '' | |
| +user_format: | |
| + default: :firstname_lastname | |
| + format: symbol | |
| +cross_project_issue_relations: | |
| + default: 0 | |
| +notified_events: | |
| + serialized: true | |
| + default: | |
| + - issue_added | |
| + - issue_updated | |
| +mail_handler_api_enabled: | |
| + default: 0 | |
| +mail_handler_api_key: | |
| + default: | |
| +issue_list_default_columns: | |
| + serialized: true | |
| + default: | |
| + - tracker | |
| + - status | |
| + - priority | |
| + - subject | |
| + - assigned_to | |
| + - updated_on | |
| +display_subprojects_issues: | |
| + default: 1 | |
| +default_projects_public: | |
| + default: 1 | |
| +sequential_project_identifiers: | |
| + default: 0 | |
| +# encodings used to convert repository files content to UTF-8 | |
| +# multiple values accepted, comma separated | |
| +repositories_encodings: | |
| + default: '' | |
| +# encoding used to convert commit logs to UTF-8 | |
| +commit_logs_encoding: | |
| + default: 'UTF-8' | |
| +ui_theme: | |
| + default: '' | |
| +emails_footer: | |
| + default: |- | |
| + You have received this notification because you have either subscribed to it, or are involved in it. | |
| + To change your notification preferences, please click here: http://hostname/my/account | |
| +gravatar_enabled: | |
| + default: 0 | |
| diff --git a/redmine/templates/default/sv-redmine-log-run.erb b/redmine/templates/default/sv-redmine-log-run.erb | |
| new file mode 100644 | |
| index 0000000..a79a518 | |
| --- /dev/null | |
| +++ b/redmine/templates/default/sv-redmine-log-run.erb | |
| @@ -0,0 +1,2 @@ | |
| +#!/bin/sh | |
| +exec svlogd -tt ./main | |
| diff --git a/redmine/templates/default/sv-redmine-run.erb b/redmine/templates/default/sv-redmine-run.erb | |
| new file mode 100644 | |
| index 0000000..cab6f5c | |
| --- /dev/null | |
| +++ b/redmine/templates/default/sv-redmine-run.erb | |
| @@ -0,0 +1,3 @@ | |
| +#!/bin/sh | |
| +exec 2>&1 | |
| +exec chpst -u <%= @node[:apache_user] %> /srv/redmine/script/server -e production | |
| diff --git a/rsync/recipes/default.rb b/rsync/recipes/default.rb | |
| new file mode 100644 | |
| index 0000000..42abb44 | |
| --- /dev/null | |
| +++ b/rsync/recipes/default.rb | |
| @@ -0,0 +1,20 @@ | |
| +# | |
| +# Cookbook Name:: rsync | |
| +# Recipe:: default | |
| +# | |
| +# Copyright 2008, 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 "rsync" | |
| diff --git a/ruby/recipes/default.rb b/ruby/recipes/default.rb | |
| new file mode 100644 | |
| index 0000000..dc183da | |
| --- /dev/null | |
| +++ b/ruby/recipes/default.rb | |
| @@ -0,0 +1,50 @@ | |
| +# | |
| +# Cookbook Name:: ruby | |
| +# Recipe:: default | |
| +# | |
| +# Copyright 2008, 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 "ruby" do | |
| + action :install | |
| +end | |
| + | |
| +extra_packages = case node[:platform] | |
| + when "Ubuntu","Debian" | |
| + %w{ | |
| + ruby1.8 | |
| + ruby1.8-dev | |
| + rdoc1.8 | |
| + ri1.8 | |
| + libopenssl-ruby | |
| + rake | |
| + } | |
| + when | |
| + %w{ | |
| + ruby-libs | |
| + ruby-devel | |
| + ruby-docs | |
| + ruby-ri | |
| + ruby-irb | |
| + ruby-rdoc | |
| + ruby-mode | |
| + } | |
| + end | |
| + | |
| +extra_packages.each do |pkg| | |
| + package pkg do | |
| + action :install | |
| + end | |
| +end | |
| diff --git a/runit/attributes/sv_bin.rb b/runit/attributes/sv_bin.rb | |
| new file mode 100644 | |
| index 0000000..455016c | |
| --- /dev/null | |
| +++ b/runit/attributes/sv_bin.rb | |
| @@ -0,0 +1,27 @@ | |
| +# | |
| +# Cookbook Name:: runit | |
| +# Attribute File:: sv_bin | |
| +# | |
| +# Copyright 2008, 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. | |
| +# | |
| + | |
| + | |
| +runit_sv_bin `which sv`.chomp! | |
| + | |
| +case platform | |
| +when "Ubuntu","Debian" | |
| + runit_service_dir "/etc/service" | |
| + runit_sv_dir "/etc/sv" | |
| +end | |
| diff --git a/runit/definitions/runit_service.rb b/runit/definitions/runit_service.rb | |
| new file mode 100644 | |
| index 0000000..fbd55eb | |
| --- /dev/null | |
| +++ b/runit/definitions/runit_service.rb | |
| @@ -0,0 +1,72 @@ | |
| +# | |
| +# Cookbook Name:: runit | |
| +# Definition:: runit_service | |
| +# | |
| +# Copyright 2008, 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 :runit_service, :directory => nil, :only_if => false do | |
| + | |
| + params[:directory] ||= node[:runit_sv_dir] | |
| + | |
| + sv_dir_name = "#{params[:directory]}/#{params[:name]}" | |
| + | |
| + directory sv_dir_name do | |
| + mode 0755 | |
| + action :create | |
| + end | |
| + | |
| + directory "#{sv_dir_name}/log" do | |
| + mode 0755 | |
| + action :create | |
| + end | |
| + | |
| + directory "#{sv_dir_name}/log/main" do | |
| + mode 0755 | |
| + action :create | |
| + end | |
| + | |
| + template "#{sv_dir_name}/run" do | |
| + mode 0755 | |
| + source "sv-#{params[:name]}-run.erb" | |
| + end | |
| + | |
| + template "#{sv_dir_name}/log/run" do | |
| + mode 0755 | |
| + source "sv-#{params[:name]}-log-run.erb" | |
| + end | |
| + | |
| + link "sv-#{params[:name]}" do | |
| + source_file node[:runit_sv_bin] | |
| + target_file "/etc/init.d/#{params[:name]}" | |
| + end | |
| + | |
| + link "service-#{params[:name]}" do | |
| + target_file "#{node[:runit_service_dir]}/#{params[:name]}" | |
| + source_file "#{sv_dir_name}" | |
| + end | |
| + | |
| + service params[:name] do | |
| + supports :restart => true, :status => true | |
| + action :enable | |
| + end | |
| + | |
| + #execute "#{params[:name]}-down" do | |
| + # command "/etc/init.d/#{params[:name]} down" | |
| + # only_if do params[:only_if] end | |
| + #end | |
| + | |
| +end | |
| diff --git a/runit/files/Ubuntu-6.10/runsvdir b/runit/files/Ubuntu-6.10/runsvdir | |
| new file mode 100644 | |
| index 0000000..4040e34 | |
| --- /dev/null | |
| +++ b/runit/files/Ubuntu-6.10/runsvdir | |
| @@ -0,0 +1,6 @@ | |
| +start on runlevel-2 | |
| +start on runlevel-3 | |
| +start on runlevel-4 | |
| +start on runlevel-5 | |
| +stop on shutdown | |
| +respawn /usr/sbin/runsvdir-start | |
| diff --git a/runit/files/Ubuntu-7.04/runsvdir b/runit/files/Ubuntu-7.04/runsvdir | |
| new file mode 100644 | |
| index 0000000..ee173c9 | |
| --- /dev/null | |
| +++ b/runit/files/Ubuntu-7.04/runsvdir | |
| @@ -0,0 +1,7 @@ | |
| +start on runlevel 2 | |
| +start on runlevel 3 | |
| +start on runlevel 4 | |
| +start on runlevel 5 | |
| +stop on shutdown | |
| +respawn | |
| +exec /usr/sbin/runsvdir-start | |
| diff --git a/runit/files/Ubuntu-7.10/runsvdir b/runit/files/Ubuntu-7.10/runsvdir | |
| new file mode 100644 | |
| index 0000000..ee173c9 | |
| --- /dev/null | |
| +++ b/runit/files/Ubuntu-7.10/runsvdir | |
| @@ -0,0 +1,7 @@ | |
| +start on runlevel 2 | |
| +start on runlevel 3 | |
| +start on runlevel 4 | |
| +start on runlevel 5 | |
| +stop on shutdown | |
| +respawn | |
| +exec /usr/sbin/runsvdir-start | |
| diff --git a/runit/recipes/default.rb b/runit/recipes/default.rb | |
| new file mode 100644 | |
| index 0000000..f6e5753 | |
| --- /dev/null | |
| +++ b/runit/recipes/default.rb | |
| @@ -0,0 +1,45 @@ | |
| +# | |
| +# Cookbook Name:: runit | |
| +# Recipe:: default | |
| +# | |
| +# Copyright 2008, 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. | |
| +# | |
| + | |
| +case node[:platform] | |
| +when "Debian","Ubuntu" | |
| + execute "start-runsvdir" do | |
| + command "start runsvdir" | |
| + action :nothing | |
| + end | |
| + | |
| + package "runit" do | |
| + action :install | |
| + notifies :run, resources(:execute => "start-runsvdir") | |
| + end | |
| + | |
| + if node[:platform_version].to_f < 8.04 | |
| + remote_file "/etc/event.d/runsvdir" do | |
| + source "runsvdir" | |
| + mode 0644 | |
| + notifies :run, resources(:execute => "start-runsvdir") | |
| + end | |
| + | |
| + file "/etc/inittab" do | |
| + action :touch | |
| + end | |
| + end | |
| +end | |
| + | |
| + | |
| diff --git a/screen/recipes/default.rb b/screen/recipes/default.rb | |
| new file mode 100644 | |
| index 0000000..43e772e | |
| --- /dev/null | |
| +++ b/screen/recipes/default.rb | |
| @@ -0,0 +1,22 @@ | |
| +# | |
| +# Cookbook Name:: screen | |
| +# Recipe:: default | |
| +# | |
| +# Copyright 2008, 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 "screen" do | |
| + action :install | |
| +end | |
| diff --git a/subversion/recipes/default.rb b/subversion/recipes/default.rb | |
| new file mode 100644 | |
| index 0000000..a41d929 | |
| --- /dev/null | |
| +++ b/subversion/recipes/default.rb | |
| @@ -0,0 +1,39 @@ | |
| +# | |
| +# Cookbook Name:: subversion | |
| +# Recipe:: default | |
| +# | |
| +# Copyright 2008, 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.0c | |
| +# | |
| +# 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 "subversion" do | |
| + action :install | |
| +end | |
| + | |
| +extra_packages = case node[:platform] | |
| + when "Ubuntu","Debian" | |
| + if node[:platform_version].to_f < 8.04 | |
| + %w{subversion-tools libsvn-core-perl} | |
| + else | |
| + %w{subversion-tools libsvn-perl} | |
| + end | |
| + when "CentOS","RedHat","Fedora" | |
| + %w{subversion-devel subversion-perl} | |
| + end | |
| + | |
| +extra_packages.each do |pkg| | |
| + package pkg do | |
| + action :install | |
| + end | |
| +end | |
| diff --git a/sudo/attributes/sudoers.rb b/sudo/attributes/sudoers.rb | |
| new file mode 100644 | |
| index 0000000..4113e23 | |
| --- /dev/null | |
| +++ b/sudo/attributes/sudoers.rb | |
| @@ -0,0 +1,30 @@ | |
| +# | |
| +# Cookbook Name:: sudo | |
| +# Attribute File:: sudoers | |
| +# | |
| +# Copyright 2008, 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. | |
| +# | |
| + | |
| +authorization Mash.new unless attribute?("authorization") | |
| + | |
| +authorization[:sudo] = Mash.new unless authorization.has_key?(:sudo) | |
| + | |
| +unless authorization[:sudo].has_key?(:groups) | |
| + authorization[:sudo][:groups] = Array.new | |
| +end | |
| + | |
| +unless authorization[:sudo].has_key?(:users) | |
| + authorization[:sudo][:users] = Array.new unless | |
| +end | |
| diff --git a/sudo/recipes/default.rb b/sudo/recipes/default.rb | |
| new file mode 100644 | |
| index 0000000..c242597 | |
| --- /dev/null | |
| +++ b/sudo/recipes/default.rb | |
| @@ -0,0 +1,33 @@ | |
| +# | |
| +# Cookbook Name:: sudo | |
| +# Recipe:: default | |
| +# | |
| +# Copyright 2008, 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 "sudo" do | |
| + action :upgrade | |
| +end | |
| + | |
| +template "/etc/sudoers" do | |
| + source "sudoers.erb" | |
| + mode 0440 | |
| + owner "root" | |
| + group "root" | |
| + variables( | |
| + :sudoers_groups => node[:authorization][:sudo][:groups], | |
| + :sudoers_users => node[:authorization][:sudo][:users] | |
| + ) | |
| +end | |
| \ No newline at end of file | |
| diff --git a/sudo/templates/default/sudoers.erb b/sudo/templates/default/sudoers.erb | |
| new file mode 100644 | |
| index 0000000..99ce129 | |
| --- /dev/null | |
| +++ b/sudo/templates/default/sudoers.erb | |
| @@ -0,0 +1,22 @@ | |
| +# | |
| +# /etc/sudoers | |
| +# | |
| +# Generated by Chef for <%= @node[:fqdn] %> | |
| +# | |
| + | |
| +Defaults !lecture,tty_tickets,!fqdn | |
| + | |
| +# User privilege specification | |
| +root ALL=(ALL) ALL | |
| + | |
| +<% @sudoers_users.each do |user| -%> | |
| +<%= user %> ALL=(ALL) ALL | |
| +<% end -%> | |
| + | |
| +# Members of the sysadmin group may gain root privileges | |
| +%sysadmin ALL=(ALL) ALL | |
| + | |
| +<% @sudoers_groups.each do |group| -%> | |
| +# Members of the group '<%= group %>' may gain root privileges | |
| +%<%= group %> ALL=(ALL) ALL | |
| +<% end -%> | |
| \ No newline at end of file | |
| diff --git a/teamspeak/recipes/default.rb b/teamspeak/recipes/default.rb | |
| new file mode 100644 | |
| index 0000000..d117fc4 | |
| --- /dev/null | |
| +++ b/teamspeak/recipes/default.rb | |
| @@ -0,0 +1,25 @@ | |
| +# | |
| +# Cookbook Name:: teamspeak | |
| +# Recipe:: default | |
| +# | |
| +# Copyright 2008, Joshua Timberman | |
| +# | |
| +# 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 "iptables" | |
| + | |
| +package "teamspeak-server" | |
| +service "teamspeak-server" do | |
| + action :enable | |
| +end | |
| + | |
| +iptables_rule "port_teamspeak" | |
| \ No newline at end of file | |
| diff --git a/teamspeak/templates/default/port_teamspeak.erb b/teamspeak/templates/default/port_teamspeak.erb | |
| new file mode 100644 | |
| index 0000000..942570e | |
| --- /dev/null | |
| +++ b/teamspeak/templates/default/port_teamspeak.erb | |
| @@ -0,0 +1,4 @@ | |
| +# Teamspeak | |
| +-A FWR -p udp -m udp --dport 8767 -j ACCEPT | |
| +-A FWR -p tcp -m tcp --dport 51234 -j ACCEPT | |
| +-A FWR -p tcp -m tcp --dport 14534 -j ACCEPT | |
| \ No newline at end of file | |
| diff --git a/ubuntu/recipes/default.rb b/ubuntu/recipes/default.rb | |
| new file mode 100644 | |
| index 0000000..b3c8ac4 | |
| --- /dev/null | |
| +++ b/ubuntu/recipes/default.rb | |
| @@ -0,0 +1,26 @@ | |
| +# | |
| +# Cookbook Name:: ubuntu | |
| +# Recipe:: default | |
| +# | |
| +# Copyright 2008, 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. | |
| +# | |
| + | |
| +template "/etc/apt/sources.list" do | |
| + mode 0644 | |
| + variables :code_name => node[:lsbdistcodename] | |
| + source "sources.list.erb" | |
| +end | |
| + | |
| +include_recipe "apt" | |
| diff --git a/ubuntu/templates/default/sources.list.erb b/ubuntu/templates/default/sources.list.erb | |
| new file mode 100644 | |
| index 0000000..e788d2e | |
| --- /dev/null | |
| +++ b/ubuntu/templates/default/sources.list.erb | |
| @@ -0,0 +1,15 @@ | |
| +# | |
| +# Ubuntu <%= @code_name %> - Generated by Chef | |
| +# | |
| + | |
| +deb http://us.archive.ubuntu.com/ubuntu <%= @code_name %> main restricted universe multiverse | |
| +deb-src http://us.archive.ubuntu.com/ubuntu <%= @code_name %> main restricted universe multiverse | |
| + | |
| +deb http://us.archive.ubuntu.com/ubuntu <%= @code_name %>-updates main restricted universe multiverse | |
| +deb-src http://us.archive.ubuntu.com/ubuntu <%= @code_name %>-updates main restricted universe multiverse | |
| + | |
| +# | |
| +# Security updates | |
| +# | |
| +deb http://security.ubuntu.com/ubuntu <%= @code_name %>-security main restricted universe multiverse | |
| +deb-src http://security.ubuntu.com/ubuntu <%= @code_name %>-security main restricted universe multiverse | |
| diff --git a/zsh/recipes/default.rb b/zsh/recipes/default.rb | |
| new file mode 100644 | |
| index 0000000..c8e2f13 | |
| --- /dev/null | |
| +++ b/zsh/recipes/default.rb | |
| @@ -0,0 +1,29 @@ | |
| +# | |
| +# Cookbook Name:: zsh | |
| +# Recipe:: default | |
| +# | |
| +# Copyright 2008, 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 "zsh" do | |
| + action :install | |
| +end | |
| + | |
| +case node[:platform] | |
| +when "Ubuntu" | |
| + package "zsh-doc" do | |
| + action :install | |
| + end | |
| +end | |
| \ No newline at end of file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment