fast_food 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +73 -0
- data/Rakefile +8 -0
- data/chef/.chef/bootstrap/chef-solo.erb +27 -0
- data/chef/.chef/knife.rb +8 -0
- data/chef/.gitignore +1 -0
- data/chef/README +3 -0
- data/chef/cookbooks/README +1 -0
- data/chef/cookbooks/apache2/.gitignore +1 -0
- data/chef/cookbooks/apache2/CHANGELOG.md +81 -0
- data/chef/cookbooks/apache2/CONTRIBUTING +29 -0
- data/chef/cookbooks/apache2/Gemfile +10 -0
- data/chef/cookbooks/apache2/LICENSE +201 -0
- data/chef/cookbooks/apache2/README.md +373 -0
- data/chef/cookbooks/apache2/attributes/default.rb +149 -0
- data/chef/cookbooks/apache2/attributes/mod_auth_openid.rb +32 -0
- data/chef/cookbooks/apache2/definitions/apache_conf.rb +26 -0
- data/chef/cookbooks/apache2/definitions/apache_module.rb +53 -0
- data/chef/cookbooks/apache2/definitions/apache_site.rb +43 -0
- data/chef/cookbooks/apache2/definitions/web_app.rb +49 -0
- data/chef/cookbooks/apache2/files/default/apache2_module_conf_generate.pl +41 -0
- data/chef/cookbooks/apache2/files/default/tests/minitest/default_test.rb +64 -0
- data/chef/cookbooks/apache2/files/default/tests/minitest/helpers.rb +36 -0
- data/chef/cookbooks/apache2/files/default/tests/minitest/mod_auth_openid_test.rb +25 -0
- data/chef/cookbooks/apache2/files/default/tests/minitest/mod_dav_svn_test.rb +16 -0
- data/chef/cookbooks/apache2/files/default/tests/minitest/mod_perl_test.rb +22 -0
- data/chef/cookbooks/apache2/files/default/tests/minitest/mod_php5_test.rb +19 -0
- data/chef/cookbooks/apache2/files/default/tests/minitest/mod_python_test.rb +14 -0
- data/chef/cookbooks/apache2/files/default/tests/minitest/mod_ssl_test.rb +19 -0
- data/chef/cookbooks/apache2/files/default/tests/minitest/mod_wsgi_test.rb +14 -0
- data/chef/cookbooks/apache2/files/default/tests/minitest/mod_xsendfile_test.rb +14 -0
- data/chef/cookbooks/apache2/files/default/tests/minitest/modules_test.rb +19 -0
- data/chef/cookbooks/apache2/metadata.json +511 -0
- data/chef/cookbooks/apache2/metadata.rb +205 -0
- data/chef/cookbooks/apache2/recipes/default.rb +221 -0
- data/chef/cookbooks/apache2/recipes/god_monitor.rb +33 -0
- data/chef/cookbooks/apache2/recipes/mod_alias.rb +22 -0
- data/chef/cookbooks/apache2/recipes/mod_apreq2.rb +45 -0
- data/chef/cookbooks/apache2/recipes/mod_auth_basic.rb +20 -0
- data/chef/cookbooks/apache2/recipes/mod_auth_digest.rb +20 -0
- data/chef/cookbooks/apache2/recipes/mod_auth_openid.rb +113 -0
- data/chef/cookbooks/apache2/recipes/mod_authn_file.rb +20 -0
- data/chef/cookbooks/apache2/recipes/mod_authnz_ldap.rb +20 -0
- data/chef/cookbooks/apache2/recipes/mod_authz_default.rb +20 -0
- data/chef/cookbooks/apache2/recipes/mod_authz_groupfile.rb +20 -0
- data/chef/cookbooks/apache2/recipes/mod_authz_host.rb +20 -0
- data/chef/cookbooks/apache2/recipes/mod_authz_user.rb +20 -0
- data/chef/cookbooks/apache2/recipes/mod_autoindex.rb +22 -0
- data/chef/cookbooks/apache2/recipes/mod_cgi.rb +20 -0
- data/chef/cookbooks/apache2/recipes/mod_dav.rb +20 -0
- data/chef/cookbooks/apache2/recipes/mod_dav_fs.rb +20 -0
- data/chef/cookbooks/apache2/recipes/mod_dav_svn.rb +29 -0
- data/chef/cookbooks/apache2/recipes/mod_deflate.rb +22 -0
- data/chef/cookbooks/apache2/recipes/mod_dir.rb +22 -0
- data/chef/cookbooks/apache2/recipes/mod_env.rb +20 -0
- data/chef/cookbooks/apache2/recipes/mod_expires.rb +20 -0
- data/chef/cookbooks/apache2/recipes/mod_fastcgi.rb +26 -0
- data/chef/cookbooks/apache2/recipes/mod_fcgid.rb +53 -0
- data/chef/cookbooks/apache2/recipes/mod_headers.rb +20 -0
- data/chef/cookbooks/apache2/recipes/mod_ldap.rb +20 -0
- data/chef/cookbooks/apache2/recipes/mod_log_config.rb +24 -0
- data/chef/cookbooks/apache2/recipes/mod_logio.rb +24 -0
- data/chef/cookbooks/apache2/recipes/mod_mime.rb +22 -0
- data/chef/cookbooks/apache2/recipes/mod_negotiation.rb +22 -0
- data/chef/cookbooks/apache2/recipes/mod_perl.rb +39 -0
- data/chef/cookbooks/apache2/recipes/mod_php5.rb +99 -0
- data/chef/cookbooks/apache2/recipes/mod_proxy.rb +22 -0
- data/chef/cookbooks/apache2/recipes/mod_proxy_ajp.rb +21 -0
- data/chef/cookbooks/apache2/recipes/mod_proxy_balancer.rb +20 -0
- data/chef/cookbooks/apache2/recipes/mod_proxy_connect.rb +20 -0
- data/chef/cookbooks/apache2/recipes/mod_proxy_http.rb +20 -0
- data/chef/cookbooks/apache2/recipes/mod_python.rb +32 -0
- data/chef/cookbooks/apache2/recipes/mod_rewrite.rb +20 -0
- data/chef/cookbooks/apache2/recipes/mod_setenvif.rb +22 -0
- data/chef/cookbooks/apache2/recipes/mod_ssl.rb +43 -0
- data/chef/cookbooks/apache2/recipes/mod_status.rb +22 -0
- data/chef/cookbooks/apache2/recipes/mod_wsgi.rb +27 -0
- data/chef/cookbooks/apache2/recipes/mod_xsendfile.rb +27 -0
- data/chef/cookbooks/apache2/templates/default/a2dismod.erb +22 -0
- data/chef/cookbooks/apache2/templates/default/a2dissite.erb +29 -0
- data/chef/cookbooks/apache2/templates/default/a2enmod.erb +37 -0
- data/chef/cookbooks/apache2/templates/default/a2ensite.erb +38 -0
- data/chef/cookbooks/apache2/templates/default/apache2.conf.erb +237 -0
- data/chef/cookbooks/apache2/templates/default/apache2.god.erb +19 -0
- data/chef/cookbooks/apache2/templates/default/charset.erb +6 -0
- data/chef/cookbooks/apache2/templates/default/default-site.erb +57 -0
- data/chef/cookbooks/apache2/templates/default/mods/README +2 -0
- data/chef/cookbooks/apache2/templates/default/mods/alias.conf.erb +24 -0
- data/chef/cookbooks/apache2/templates/default/mods/authopenid.load.erb +1 -0
- data/chef/cookbooks/apache2/templates/default/mods/autoindex.conf.erb +101 -0
- data/chef/cookbooks/apache2/templates/default/mods/deflate.conf.erb +16 -0
- data/chef/cookbooks/apache2/templates/default/mods/dir.conf.erb +5 -0
- data/chef/cookbooks/apache2/templates/default/mods/fastcgi.conf.erb +5 -0
- data/chef/cookbooks/apache2/templates/default/mods/fcgid.conf.erb +10 -0
- data/chef/cookbooks/apache2/templates/default/mods/mime.conf.erb +198 -0
- data/chef/cookbooks/apache2/templates/default/mods/negotiation.conf.erb +18 -0
- data/chef/cookbooks/apache2/templates/default/mods/php5.conf.erb +16 -0
- data/chef/cookbooks/apache2/templates/default/mods/proxy.conf.erb +19 -0
- data/chef/cookbooks/apache2/templates/default/mods/setenvif.conf.erb +28 -0
- data/chef/cookbooks/apache2/templates/default/mods/ssl.conf.erb +76 -0
- data/chef/cookbooks/apache2/templates/default/mods/status.conf.erb +26 -0
- data/chef/cookbooks/apache2/templates/default/port_apache.erb +2 -0
- data/chef/cookbooks/apache2/templates/default/ports.conf.erb +6 -0
- data/chef/cookbooks/apache2/templates/default/security.erb +50 -0
- data/chef/cookbooks/apache2/templates/default/web_app.conf.erb +43 -0
- data/chef/cookbooks/build-essential/.gitignore +4 -0
- data/chef/cookbooks/build-essential/CHANGELOG.md +31 -0
- data/chef/cookbooks/build-essential/CONTRIBUTING +29 -0
- data/chef/cookbooks/build-essential/Gemfile +3 -0
- data/chef/cookbooks/build-essential/LICENSE +201 -0
- data/chef/cookbooks/build-essential/README.md +129 -0
- data/chef/cookbooks/build-essential/attributes/default.rb +33 -0
- data/chef/cookbooks/build-essential/metadata.json +41 -0
- data/chef/cookbooks/build-essential/metadata.rb +14 -0
- data/chef/cookbooks/build-essential/recipes/default.rb +92 -0
- data/chef/cookbooks/database/.gitignore +1 -0
- data/chef/cookbooks/database/CHANGELOG.md +46 -0
- data/chef/cookbooks/database/CONTRIBUTING +29 -0
- data/chef/cookbooks/database/LICENSE +201 -0
- data/chef/cookbooks/database/README.md +468 -0
- data/chef/cookbooks/database/libraries/provider_database_mysql.rb +103 -0
- data/chef/cookbooks/database/libraries/provider_database_mysql_user.rb +76 -0
- data/chef/cookbooks/database/libraries/provider_database_postgresql.rb +131 -0
- data/chef/cookbooks/database/libraries/provider_database_postgresql_user.rb +83 -0
- data/chef/cookbooks/database/libraries/provider_database_sql_server.rb +109 -0
- data/chef/cookbooks/database/libraries/provider_database_sql_server_user.rb +106 -0
- data/chef/cookbooks/database/libraries/resource_database.rb +119 -0
- data/chef/cookbooks/database/libraries/resource_database_user.rb +90 -0
- data/chef/cookbooks/database/libraries/resource_mysql_database.rb +34 -0
- data/chef/cookbooks/database/libraries/resource_mysql_database_user.rb +34 -0
- data/chef/cookbooks/database/libraries/resource_postgresql_database.rb +35 -0
- data/chef/cookbooks/database/libraries/resource_postgresql_database_user.rb +35 -0
- data/chef/cookbooks/database/libraries/resource_sql_server_database.rb +34 -0
- data/chef/cookbooks/database/libraries/resource_sql_server_database_user.rb +34 -0
- data/chef/cookbooks/database/metadata.json +45 -0
- data/chef/cookbooks/database/metadata.rb +22 -0
- data/chef/cookbooks/database/recipes/default.rb +20 -0
- data/chef/cookbooks/database/recipes/ebs_backup.rb +89 -0
- data/chef/cookbooks/database/recipes/ebs_volume.rb +204 -0
- data/chef/cookbooks/database/recipes/master.rb +78 -0
- data/chef/cookbooks/database/recipes/mysql.rb +20 -0
- data/chef/cookbooks/database/recipes/postgresql.rb +20 -0
- data/chef/cookbooks/database/recipes/snapshot.rb +62 -0
- data/chef/cookbooks/database/templates/default/app_grants.sql.erb +8 -0
- data/chef/cookbooks/database/templates/default/aws_config.erb +3 -0
- data/chef/cookbooks/database/templates/default/chef-solo-database-snapshot.cron.erb +6 -0
- data/chef/cookbooks/database/templates/default/chef-solo-database-snapshot.json.erb +1 -0
- data/chef/cookbooks/database/templates/default/chef-solo-database-snapshot.rb.erb +6 -0
- data/chef/cookbooks/database/templates/default/ebs-backup-cron.erb +2 -0
- data/chef/cookbooks/database/templates/default/ebs-db-backup.sh.erb +8 -0
- data/chef/cookbooks/database/templates/default/ebs-db-restore.sh.erb +10 -0
- data/chef/cookbooks/database/templates/default/s3cfg.erb +27 -0
- data/chef/cookbooks/fast_food/recipes/default.rb +24 -0
- data/chef/cookbooks/fast_food/recipes/site.rb +7 -0
- data/chef/cookbooks/fast_food/templates/default/web_app.conf.erb +43 -0
- data/chef/cookbooks/git/CHANGELOG.md +49 -0
- data/chef/cookbooks/git/CONTRIBUTING +29 -0
- data/chef/cookbooks/git/LICENSE +201 -0
- data/chef/cookbooks/git/README.md +115 -0
- data/chef/cookbooks/git/attributes/default.rb +37 -0
- data/chef/cookbooks/git/metadata.json +48 -0
- data/chef/cookbooks/git/metadata.rb +20 -0
- data/chef/cookbooks/git/recipes/default.rb +46 -0
- data/chef/cookbooks/git/recipes/server.rb +38 -0
- data/chef/cookbooks/git/recipes/source.rb +48 -0
- data/chef/cookbooks/git/recipes/windows.rb +32 -0
- data/chef/cookbooks/git/templates/default/sv-git-daemon-log-run.erb +2 -0
- data/chef/cookbooks/git/templates/default/sv-git-daemon-run.erb +3 -0
- data/chef/cookbooks/imagemagick/README.md +57 -0
- data/chef/cookbooks/imagemagick/metadata.json +37 -0
- data/chef/cookbooks/imagemagick/metadata.rb +14 -0
- data/chef/cookbooks/imagemagick/recipes/default.rb +25 -0
- data/chef/cookbooks/imagemagick/recipes/devel.rb +32 -0
- data/chef/cookbooks/imagemagick/recipes/rmagick.rb +22 -0
- data/chef/cookbooks/mysql/.gitignore +5 -0
- data/chef/cookbooks/mysql/CHANGELOG.md +125 -0
- data/chef/cookbooks/mysql/CONTRIBUTING +29 -0
- data/chef/cookbooks/mysql/Gemfile +8 -0
- data/chef/cookbooks/mysql/LICENSE +201 -0
- data/chef/cookbooks/mysql/README.md +227 -0
- data/chef/cookbooks/mysql/attributes/client.rb +50 -0
- data/chef/cookbooks/mysql/attributes/server.rb +240 -0
- data/chef/cookbooks/mysql/files/default/tests/minitest/server_test.rb +36 -0
- data/chef/cookbooks/mysql/files/default/tests/minitest/support/helpers.rb +11 -0
- data/chef/cookbooks/mysql/libraries/helpers.rb +33 -0
- data/chef/cookbooks/mysql/metadata.json +418 -0
- data/chef/cookbooks/mysql/metadata.rb +140 -0
- data/chef/cookbooks/mysql/recipes/client.rb +59 -0
- data/chef/cookbooks/mysql/recipes/default.rb +20 -0
- data/chef/cookbooks/mysql/recipes/ruby.rb +36 -0
- data/chef/cookbooks/mysql/recipes/server.rb +221 -0
- data/chef/cookbooks/mysql/recipes/server_ec2.rb +51 -0
- data/chef/cookbooks/mysql/templates/default/debian.cnf.erb +12 -0
- data/chef/cookbooks/mysql/templates/default/grants.sql.erb +15 -0
- data/chef/cookbooks/mysql/templates/default/my.cnf.erb +312 -0
- data/chef/cookbooks/mysql/templates/default/mysql-server.seed.erb +10 -0
- data/chef/cookbooks/mysql/templates/default/port_mysql.erb +3 -0
- data/chef/cookbooks/mysql/templates/windows/my.cnf.erb +61 -0
- data/chef/cookbooks/openssl/README.md +37 -0
- data/chef/cookbooks/openssl/libraries/secure_password.rb +37 -0
- data/chef/cookbooks/openssl/metadata.json +30 -0
- data/chef/cookbooks/openssl/metadata.rb +8 -0
- data/chef/cookbooks/openssl/recipes/default.rb +19 -0
- data/chef/cookbooks/passenger_apache2/.gitignore +4 -0
- data/chef/cookbooks/passenger_apache2/CHANGELOG.md +29 -0
- data/chef/cookbooks/passenger_apache2/CONTRIBUTING +29 -0
- data/chef/cookbooks/passenger_apache2/Gemfile +3 -0
- data/chef/cookbooks/passenger_apache2/LICENSE +201 -0
- data/chef/cookbooks/passenger_apache2/README.md +77 -0
- data/chef/cookbooks/passenger_apache2/attributes/default.rb +5 -0
- data/chef/cookbooks/passenger_apache2/metadata.json +38 -0
- data/chef/cookbooks/passenger_apache2/metadata.rb +17 -0
- data/chef/cookbooks/passenger_apache2/recipes/default.rb +60 -0
- data/chef/cookbooks/passenger_apache2/recipes/mod_rails.rb +47 -0
- data/chef/cookbooks/passenger_apache2/templates/default/passenger.conf.erb +3 -0
- data/chef/cookbooks/passenger_apache2/templates/default/passenger.load.erb +1 -0
- data/chef/cookbooks/passenger_apache2/templates/default/passenger_web_app.conf.erb +32 -0
- data/chef/cookbooks/passenger_apache2/templates/default/web_app.conf.erb +32 -0
- data/chef/roles/apache2.rb +12 -0
- data/chef/roles/mysql.rb +18 -0
- data/chef/solo.rb +5 -0
- data/config/deploy/centos.sh +17 -0
- data/config/deploy/production.rb +3 -0
- data/config/deploy/ubuntu.sh +10 -0
- data/config/deploy.rb +99 -0
- data/config/deployment.yml +6 -0
- data/fast_food.gemspec +26 -0
- data/lib/fast_food/railtie.rb +9 -0
- data/lib/fast_food/version.rb +3 -0
- data/lib/fast_food.rb +5 -0
- data/lib/tasks/fast_food.rake +100 -0
- data/spec/lib/fast_food_spec.rb +0 -0
- data/spec/spec_helper.rb +1 -0
- metadata +349 -0
@@ -0,0 +1,99 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apache2
|
3
|
+
# Recipe:: php5
|
4
|
+
#
|
5
|
+
# Copyright 2008-2009, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
case node['platform']
|
21
|
+
when "debian", "ubuntu"
|
22
|
+
package "libapache2-mod-php5" do
|
23
|
+
action :install
|
24
|
+
end
|
25
|
+
|
26
|
+
when "arch"
|
27
|
+
package "php-apache" do
|
28
|
+
action :install
|
29
|
+
notifies :run, resources(:execute => "generate-module-list"), :immediately
|
30
|
+
end
|
31
|
+
|
32
|
+
when "amazon", "redhat", "centos", "scientific"
|
33
|
+
package "php package" do
|
34
|
+
if node['platform_version'].to_f < 6.0
|
35
|
+
package_name "php53"
|
36
|
+
else
|
37
|
+
package_name "php"
|
38
|
+
end
|
39
|
+
action :install
|
40
|
+
notifies :run, resources(:execute => "generate-module-list"), :immediately
|
41
|
+
not_if "which php"
|
42
|
+
end
|
43
|
+
|
44
|
+
# delete stock config
|
45
|
+
file "#{node['apache']['dir']}/conf.d/php.conf" do
|
46
|
+
action :delete
|
47
|
+
end
|
48
|
+
|
49
|
+
# replace with debian style config
|
50
|
+
template "#{node['apache']['dir']}/mods-available/php5.conf" do
|
51
|
+
source "mods/php5.conf.erb"
|
52
|
+
notifies :restart, "service[apache2]"
|
53
|
+
end
|
54
|
+
|
55
|
+
when "fedora"
|
56
|
+
package "php package" do
|
57
|
+
package_name "php"
|
58
|
+
action :install
|
59
|
+
notifies :run, resources(:execute => "generate-module-list"), :immediately
|
60
|
+
not_if "which php"
|
61
|
+
end
|
62
|
+
|
63
|
+
# delete stock config
|
64
|
+
file "#{node['apache']['dir']}/conf.d/php.conf" do
|
65
|
+
action :delete
|
66
|
+
end
|
67
|
+
|
68
|
+
# replace with debian style config
|
69
|
+
template "#{node['apache']['dir']}/mods-available/php5.conf" do
|
70
|
+
source "mods/php5.conf.erb"
|
71
|
+
notifies :restart, "service[apache2]"
|
72
|
+
end
|
73
|
+
|
74
|
+
when "freebsd"
|
75
|
+
freebsd_port_options "php5" do
|
76
|
+
options "APACHE" => true
|
77
|
+
action :create
|
78
|
+
end
|
79
|
+
|
80
|
+
package "php package" do
|
81
|
+
package_name "php5"
|
82
|
+
source "ports"
|
83
|
+
action :install
|
84
|
+
notifies :run, resources(:execute => "generate-module-list"), :immediately
|
85
|
+
end
|
86
|
+
|
87
|
+
# replace with debian style config
|
88
|
+
template "#{node['apache']['dir']}/mods-available/php5.conf" do
|
89
|
+
source "mods/php5.conf.erb"
|
90
|
+
notifies :restart, "service[apache2]"
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
apache_module "php5" do
|
95
|
+
case node['platform']
|
96
|
+
when "redhat","centos","scientific","amazon","fedora","freebsd"
|
97
|
+
filename "libphp5.so"
|
98
|
+
end
|
99
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apache2
|
3
|
+
# Recipe:: proxy
|
4
|
+
#
|
5
|
+
# Copyright 2008-2009, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
apache_module "proxy" do
|
21
|
+
conf true
|
22
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apache2
|
3
|
+
# Recipe:: proxy
|
4
|
+
#
|
5
|
+
# Copyright 2008-2009, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
include_recipe "apache2::mod_proxy"
|
21
|
+
apache_module "proxy_ajp"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apache2
|
3
|
+
# Recipe:: proxy
|
4
|
+
#
|
5
|
+
# Copyright 2008-2009, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
apache_module "proxy_balancer"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apache2
|
3
|
+
# Recipe:: proxy
|
4
|
+
#
|
5
|
+
# Copyright 2008-2009, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
apache_module "proxy_connect"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apache2
|
3
|
+
# Recipe:: proxy_http
|
4
|
+
#
|
5
|
+
# Copyright 2008-2009, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
apache_module "proxy_http"
|
@@ -0,0 +1,32 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apache2
|
3
|
+
# Recipe:: python
|
4
|
+
#
|
5
|
+
# Copyright 2008-2009, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
case node['platform']
|
21
|
+
when "debian", "ubuntu"
|
22
|
+
package "libapache2-mod-python" do
|
23
|
+
action :install
|
24
|
+
end
|
25
|
+
when "redhat", "centos", "scientific", "fedora", "amazon"
|
26
|
+
package "mod_python" do
|
27
|
+
action :install
|
28
|
+
notifies :run, resources(:execute => "generate-module-list"), :immediately
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
apache_module "python"
|
@@ -0,0 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apache2
|
3
|
+
# Recipe:: rewrite
|
4
|
+
#
|
5
|
+
# Copyright 2008-2009, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
apache_module "rewrite"
|
@@ -0,0 +1,22 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apache2
|
3
|
+
# Recipe:: setenvif
|
4
|
+
#
|
5
|
+
# Copyright 2008-2009, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
apache_module "setenvif" do
|
21
|
+
conf true
|
22
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apache2
|
3
|
+
# Recipe:: ssl
|
4
|
+
#
|
5
|
+
# Copyright 2008-2009, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
if platform?("redhat", "centos", "scientific", "fedora", "amazon")
|
21
|
+
package "mod_ssl" do
|
22
|
+
action :install
|
23
|
+
notifies :run, resources(:execute => "generate-module-list"), :immediately
|
24
|
+
end
|
25
|
+
|
26
|
+
file "#{node['apache']['dir']}/conf.d/ssl.conf" do
|
27
|
+
action :delete
|
28
|
+
backup false
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
ports = node['apache']['listen_ports'].include?("443") ? node['apache']['listen_ports'] : [node['apache']['listen_ports'], "443"].flatten
|
33
|
+
|
34
|
+
template "#{node['apache']['dir']}/ports.conf" do
|
35
|
+
source "ports.conf.erb"
|
36
|
+
variables :apache_listen_ports => ports.map{|p| p.to_i}.uniq
|
37
|
+
notifies :restart, resources(:service => "apache2")
|
38
|
+
mode 0644
|
39
|
+
end
|
40
|
+
|
41
|
+
apache_module "ssl" do
|
42
|
+
conf true
|
43
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apache2
|
3
|
+
# Recipe:: status
|
4
|
+
#
|
5
|
+
# Copyright 2008-2009, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
apache_module "status" do
|
21
|
+
conf true
|
22
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apache2
|
3
|
+
# Recipe:: python
|
4
|
+
#
|
5
|
+
# Copyright 2008-2009, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
case node['platform']
|
21
|
+
when "debian","ubuntu"
|
22
|
+
package "libapache2-mod-wsgi"
|
23
|
+
when "redhat", "centos", "scientific", "fedora", "arch", "amazon"
|
24
|
+
package "mod_wsgi"
|
25
|
+
end
|
26
|
+
|
27
|
+
apache_module "wsgi"
|
@@ -0,0 +1,27 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: apache2
|
3
|
+
# Recipe:: mod_xsendfile
|
4
|
+
#
|
5
|
+
# Copyright 2011, CustomInk, LLC.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
case node['platform']
|
21
|
+
when "debian","ubuntu"
|
22
|
+
package "libapache2-mod-xsendfile"
|
23
|
+
when "centos","redhat","scientific","fedora","amazon"
|
24
|
+
package "mod_xsendfile"
|
25
|
+
end
|
26
|
+
|
27
|
+
apache_module "xsendfile"
|
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/bin/sh -e
|
2
|
+
|
3
|
+
SYSCONFDIR='<%= node['apache']['dir'] %>'
|
4
|
+
|
5
|
+
if [ -z $1 ]; then
|
6
|
+
echo "Which module would you like to disable?"
|
7
|
+
echo -n "Your choices are: "
|
8
|
+
ls $SYSCONFDIR/mods-enabled/*.load | \
|
9
|
+
sed -e "s,$SYSCONFDIR/mods-enabled/,,g" | sed -e 's/\.load$//g;' | xargs echo
|
10
|
+
echo -n "Module name? "
|
11
|
+
read MODNAME
|
12
|
+
else
|
13
|
+
MODNAME=$1
|
14
|
+
fi
|
15
|
+
|
16
|
+
if ! [ -e $SYSCONFDIR/mods-enabled/$MODNAME.load ]; then
|
17
|
+
echo "This module is already disabled, or does not exist!"
|
18
|
+
exit 1
|
19
|
+
fi
|
20
|
+
|
21
|
+
rm -f $SYSCONFDIR/mods-enabled/$MODNAME.*
|
22
|
+
echo "Module $MODNAME disabled; reload apache to fully disable."
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#!/bin/sh -e
|
2
|
+
|
3
|
+
SYSCONFDIR='<%= node['apache']['dir'] %>'
|
4
|
+
|
5
|
+
if [ -z $1 ]; then
|
6
|
+
echo "Which site would you like to disable?"
|
7
|
+
echo -n "Your choices are: "
|
8
|
+
ls $SYSCONFDIR/sites-enabled/* | \
|
9
|
+
sed -e "s,$SYSCONFDIR/sites-enabled/,,g" | xargs echo
|
10
|
+
echo -n "Site name? "
|
11
|
+
read SITENAME
|
12
|
+
else
|
13
|
+
SITENAME=$1
|
14
|
+
fi
|
15
|
+
|
16
|
+
if [ $SITENAME = "default" ]; then
|
17
|
+
PRIORITY="000"
|
18
|
+
fi
|
19
|
+
|
20
|
+
if ! [ -e $SYSCONFDIR/sites-enabled/$SITENAME -o \
|
21
|
+
-e $SYSCONFDIR/sites-enabled/"$PRIORITY"-"$SITENAME" ]; then
|
22
|
+
echo "This site is already disabled, or does not exist!"
|
23
|
+
exit 1
|
24
|
+
fi
|
25
|
+
|
26
|
+
if ! rm $SYSCONFDIR/sites-enabled/$SITENAME 2>/dev/null; then
|
27
|
+
rm -f $SYSCONFDIR/sites-enabled/"$PRIORITY"-"$SITENAME"
|
28
|
+
fi
|
29
|
+
echo "Site $SITENAME disabled; reload apache to disable."
|
@@ -0,0 +1,37 @@
|
|
1
|
+
#!/bin/sh -e
|
2
|
+
|
3
|
+
SYSCONFDIR='<%= node['apache']['dir'] %>'
|
4
|
+
|
5
|
+
if [ -z $1 ]; then
|
6
|
+
echo "Which module would you like to enable?"
|
7
|
+
echo -n "Your choices are: "
|
8
|
+
ls $SYSCONFDIR/mods-available/*.load | \
|
9
|
+
sed -e "s,$SYSCONFDIR/mods-available/,,g" | sed -e 's/\.load$//g;' | xargs echo
|
10
|
+
echo -n "Module name? "
|
11
|
+
read MODNAME
|
12
|
+
else
|
13
|
+
MODNAME=$1
|
14
|
+
fi
|
15
|
+
|
16
|
+
#figure out if we're on a prefork or threaded mpm
|
17
|
+
if [ -x /usr/sbin/apache2 ]; then
|
18
|
+
PREFORK=`/usr/sbin/apache2 -l | grep prefork || true`
|
19
|
+
fi
|
20
|
+
|
21
|
+
if [ -e $SYSCONFDIR/mods-enabled/$MODNAME.load -a -e $SYSCONFDIR/mods-enabled/$MODNAME.conf ]; then
|
22
|
+
echo "This module is already enabled!"
|
23
|
+
exit 0
|
24
|
+
fi
|
25
|
+
|
26
|
+
if ! [ -e $SYSCONFDIR/mods-available/$MODNAME.load ]; then
|
27
|
+
echo "This module does not exist!"
|
28
|
+
exit 1
|
29
|
+
fi
|
30
|
+
|
31
|
+
for i in conf load; do
|
32
|
+
if [ -e $SYSCONFDIR/mods-available/$MODNAME.$i -a ! -e $SYSCONFDIR/mods-enabled/$MODNAME.$i ]; then
|
33
|
+
ln -sf $SYSCONFDIR/mods-available/$MODNAME.$i $SYSCONFDIR/mods-enabled/$MODNAME.$i;
|
34
|
+
fi
|
35
|
+
done
|
36
|
+
|
37
|
+
echo "Module $MODNAME installed; reload apache to enable."
|
@@ -0,0 +1,38 @@
|
|
1
|
+
#!/bin/sh -e
|
2
|
+
|
3
|
+
SYSCONFDIR='<%= node['apache']['dir'] %>'
|
4
|
+
|
5
|
+
if [ -z $1 ]; then
|
6
|
+
echo "Which site would you like to enable?"
|
7
|
+
echo -n "Your choices are: "
|
8
|
+
ls $SYSCONFDIR/sites-available/* | \
|
9
|
+
sed -e "s,$SYSCONFDIR/sites-available/,,g" | xargs echo
|
10
|
+
echo -n "Site name? "
|
11
|
+
read SITENAME
|
12
|
+
else
|
13
|
+
SITENAME=$1
|
14
|
+
fi
|
15
|
+
|
16
|
+
if [ $SITENAME = "default" ]; then
|
17
|
+
PRIORITY="000"
|
18
|
+
fi
|
19
|
+
|
20
|
+
if [ -e $SYSCONFDIR/sites-enabled/$SITENAME -o \
|
21
|
+
-e $SYSCONFDIR/sites-enabled/"$PRIORITY"-"$SITENAME" ]; then
|
22
|
+
echo "This site is already enabled!"
|
23
|
+
exit 0
|
24
|
+
fi
|
25
|
+
|
26
|
+
if ! [ -e $SYSCONFDIR/sites-available/$SITENAME ]; then
|
27
|
+
echo "This site does not exist!"
|
28
|
+
exit 1
|
29
|
+
fi
|
30
|
+
|
31
|
+
if [ $SITENAME = "default" ]; then
|
32
|
+
ln -sf $SYSCONFDIR/sites-available/$SITENAME \
|
33
|
+
$SYSCONFDIR/sites-enabled/"$PRIORITY"-"$SITENAME"
|
34
|
+
else
|
35
|
+
ln -sf $SYSCONFDIR/sites-available/$SITENAME $SYSCONFDIR/sites-enabled/$SITENAME
|
36
|
+
fi
|
37
|
+
|
38
|
+
echo "Site $SITENAME installed; reload apache to enable."
|