from-scratch 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. checksums.yaml +4 -4
  2. data/Berksfile +2 -1
  3. data/Berksfile.lock +20 -1
  4. data/cookbooks/bluepill/CHANGELOG.md +93 -0
  5. data/cookbooks/bluepill/README.md +91 -0
  6. data/cookbooks/bluepill/attributes/default.rb +44 -0
  7. data/cookbooks/bluepill/metadata.json +1 -0
  8. data/cookbooks/bluepill/providers/service.rb +172 -0
  9. data/cookbooks/bluepill/recipes/default.rb +48 -0
  10. data/cookbooks/bluepill/recipes/rsyslog.rb +28 -0
  11. data/cookbooks/bluepill/resources/service.rb +27 -0
  12. data/cookbooks/bluepill/templates/default/bluepill_init.fedora.erb +34 -0
  13. data/cookbooks/bluepill/templates/default/bluepill_init.freebsd.erb +32 -0
  14. data/cookbooks/bluepill/templates/default/bluepill_init.lsb.erb +37 -0
  15. data/cookbooks/bluepill/templates/default/bluepill_init.rhel.erb +34 -0
  16. data/cookbooks/bluepill/templates/default/bluepill_rsyslog.conf.erb +1 -0
  17. data/cookbooks/nginx/CHANGELOG.md +435 -0
  18. data/cookbooks/nginx/README.md +521 -0
  19. data/cookbooks/nginx/attributes/auth_request.rb +23 -0
  20. data/cookbooks/nginx/attributes/default.rb +131 -0
  21. data/cookbooks/nginx/attributes/devel.rb +24 -0
  22. data/cookbooks/nginx/attributes/echo.rb +24 -0
  23. data/cookbooks/nginx/attributes/geoip.rb +31 -0
  24. data/cookbooks/nginx/attributes/headers_more.rb +24 -0
  25. data/cookbooks/nginx/attributes/lua.rb +28 -0
  26. data/cookbooks/nginx/attributes/naxsi.rb +24 -0
  27. data/cookbooks/nginx/attributes/openssl_source.rb +23 -0
  28. data/cookbooks/nginx/attributes/pagespeed.rb +9 -0
  29. data/cookbooks/nginx/attributes/passenger.rb +58 -0
  30. data/cookbooks/nginx/attributes/rate_limiting.rb +23 -0
  31. data/cookbooks/nginx/attributes/repo.rb +35 -0
  32. data/cookbooks/nginx/attributes/set_misc.rb +8 -0
  33. data/cookbooks/nginx/attributes/socketproxy.rb +13 -0
  34. data/cookbooks/nginx/attributes/source.rb +42 -0
  35. data/cookbooks/nginx/attributes/status.rb +22 -0
  36. data/cookbooks/nginx/attributes/syslog.rb +24 -0
  37. data/cookbooks/nginx/attributes/upload_progress.rb +26 -0
  38. data/cookbooks/nginx/definitions/nginx_site.rb +50 -0
  39. data/cookbooks/nginx/files/default/mime.types +78 -0
  40. data/cookbooks/nginx/files/default/naxsi_core.rules +82 -0
  41. data/cookbooks/nginx/libraries/matchers.rb +20 -0
  42. data/cookbooks/nginx/metadata.json +351 -0
  43. data/cookbooks/nginx/recipes/authorized_ips.rb +32 -0
  44. data/cookbooks/nginx/recipes/commons.rb +24 -0
  45. data/cookbooks/nginx/recipes/commons_conf.rb +42 -0
  46. data/cookbooks/nginx/recipes/commons_dir.rb +57 -0
  47. data/cookbooks/nginx/recipes/commons_script.rb +29 -0
  48. data/cookbooks/nginx/recipes/default.rb +31 -0
  49. data/cookbooks/nginx/recipes/headers_more_module.rb +50 -0
  50. data/cookbooks/nginx/recipes/http_auth_request_module.rb +52 -0
  51. data/cookbooks/nginx/recipes/http_echo_module.rb +46 -0
  52. data/cookbooks/nginx/recipes/http_geoip_module.rb +113 -0
  53. data/cookbooks/nginx/recipes/http_gzip_static_module.rb +30 -0
  54. data/cookbooks/nginx/recipes/http_mp4_module.rb +2 -0
  55. data/cookbooks/nginx/recipes/http_perl_module.rb +23 -0
  56. data/cookbooks/nginx/recipes/http_realip_module.rb +38 -0
  57. data/cookbooks/nginx/recipes/http_spdy_module.rb +23 -0
  58. data/cookbooks/nginx/recipes/http_ssl_module.rb +23 -0
  59. data/cookbooks/nginx/recipes/http_stub_status_module.rb +36 -0
  60. data/cookbooks/nginx/recipes/ipv6.rb +23 -0
  61. data/cookbooks/nginx/recipes/lua.rb +47 -0
  62. data/cookbooks/nginx/recipes/naxsi_module.rb +52 -0
  63. data/cookbooks/nginx/recipes/ngx_devel_module.rb +44 -0
  64. data/cookbooks/nginx/recipes/ngx_lua_module.rb +47 -0
  65. data/cookbooks/nginx/recipes/ohai_plugin.rb +35 -0
  66. data/cookbooks/nginx/recipes/openssl_source.rb +45 -0
  67. data/cookbooks/nginx/recipes/package.rb +52 -0
  68. data/cookbooks/nginx/recipes/pagespeed_module.rb +62 -0
  69. data/cookbooks/nginx/recipes/passenger.rb +56 -0
  70. data/cookbooks/nginx/recipes/repo.rb +41 -0
  71. data/cookbooks/nginx/recipes/repo_passenger.rb +39 -0
  72. data/cookbooks/nginx/recipes/set_misc.rb +30 -0
  73. data/cookbooks/nginx/recipes/socketproxy.rb +26 -0
  74. data/cookbooks/nginx/recipes/source.rb +205 -0
  75. data/cookbooks/nginx/recipes/syslog_module.rb +69 -0
  76. data/cookbooks/nginx/recipes/upload_progress_module.rb +53 -0
  77. data/cookbooks/nginx/templates/debian/nginx.init.erb +97 -0
  78. data/cookbooks/nginx/templates/default/default-site.erb +11 -0
  79. data/cookbooks/nginx/templates/default/modules/authorized_ip.erb +6 -0
  80. data/cookbooks/nginx/templates/default/modules/http_geoip.conf.erb +4 -0
  81. data/cookbooks/nginx/templates/default/modules/http_gzip_static.conf.erb +1 -0
  82. data/cookbooks/nginx/templates/default/modules/http_realip.conf.erb +7 -0
  83. data/cookbooks/nginx/templates/default/modules/nginx_status.erb +14 -0
  84. data/cookbooks/nginx/templates/default/modules/passenger.conf.erb +13 -0
  85. data/cookbooks/nginx/templates/default/modules/socketproxy.conf.erb +89 -0
  86. data/cookbooks/nginx/templates/default/modules/upload_progress.erb +4 -0
  87. data/cookbooks/nginx/templates/default/nginx-upstart.conf.erb +39 -0
  88. data/cookbooks/nginx/templates/default/nginx.conf.erb +103 -0
  89. data/cookbooks/nginx/templates/default/nginx.init.erb +111 -0
  90. data/cookbooks/nginx/templates/default/nginx.pill.erb +15 -0
  91. data/cookbooks/nginx/templates/default/nginx.sysconfig.erb +1 -0
  92. data/cookbooks/nginx/templates/default/nxdissite.erb +29 -0
  93. data/cookbooks/nginx/templates/default/nxensite.erb +38 -0
  94. data/cookbooks/nginx/templates/default/plugins/nginx.rb.erb +66 -0
  95. data/cookbooks/nginx/templates/default/sv-nginx-log-run.erb +2 -0
  96. data/cookbooks/nginx/templates/default/sv-nginx-run.erb +4 -0
  97. data/cookbooks/nginx/templates/gentoo/nginx.init.erb +87 -0
  98. data/cookbooks/nginx/templates/suse/nginx.init.erb +115 -0
  99. data/cookbooks/nginx/templates/ubuntu/nginx.init.erb +97 -0
  100. data/cookbooks/ohai/CHANGELOG.md +69 -0
  101. data/cookbooks/ohai/README.md +89 -0
  102. data/cookbooks/ohai/attributes/default.rb +31 -0
  103. data/cookbooks/ohai/files/default/plugins/README +1 -0
  104. data/cookbooks/ohai/libraries/matchers.rb +14 -0
  105. data/cookbooks/ohai/metadata.json +1 -0
  106. data/cookbooks/ohai/providers/hint.rb +38 -0
  107. data/cookbooks/ohai/recipes/default.rb +52 -0
  108. data/cookbooks/ohai/resources/hint.rb +5 -0
  109. data/cookbooks/packagecloud/CHANGELOG.md +12 -0
  110. data/cookbooks/packagecloud/README.md +80 -0
  111. data/cookbooks/packagecloud/attributes/default.rb +8 -0
  112. data/cookbooks/packagecloud/libraries/helper.rb +43 -0
  113. data/cookbooks/packagecloud/libraries/matcher.rb +7 -0
  114. data/cookbooks/packagecloud/metadata.json +1 -0
  115. data/cookbooks/packagecloud/providers/repo.rb +212 -0
  116. data/cookbooks/packagecloud/resources/repo.rb +10 -0
  117. data/cookbooks/packagecloud/templates/.kitchen/logs/kitchen.log +29 -0
  118. data/cookbooks/packagecloud/templates/default/apt.erb +2 -0
  119. data/cookbooks/packagecloud/templates/default/yum.erb +15 -0
  120. data/cookbooks/rsyslog/CHANGELOG.md +193 -0
  121. data/cookbooks/rsyslog/README.md +276 -0
  122. data/cookbooks/rsyslog/attributes/default.rb +131 -0
  123. data/cookbooks/rsyslog/libraries/helpers.rb +25 -0
  124. data/cookbooks/rsyslog/metadata.json +1 -0
  125. data/cookbooks/rsyslog/providers/file_input.rb +44 -0
  126. data/cookbooks/rsyslog/recipes/client.rb +87 -0
  127. data/cookbooks/rsyslog/recipes/default.rb +89 -0
  128. data/cookbooks/rsyslog/recipes/server.rb +44 -0
  129. data/cookbooks/rsyslog/resources/file_input.rb +28 -0
  130. data/cookbooks/rsyslog/templates/default/35-server-per-host.conf.erb +62 -0
  131. data/cookbooks/rsyslog/templates/default/49-relp.conf.erb +10 -0
  132. data/cookbooks/rsyslog/templates/default/49-remote.conf.erb +30 -0
  133. data/cookbooks/rsyslog/templates/default/50-default.conf.erb +6 -0
  134. data/cookbooks/rsyslog/templates/default/file-input.conf.erb +15 -0
  135. data/cookbooks/rsyslog/templates/default/omnios-manifest.xml.erb +30 -0
  136. data/cookbooks/rsyslog/templates/default/rsyslog.conf.erb +117 -0
  137. data/cookbooks/rsyslog/templates/smartos/50-default.conf.erb +18 -0
  138. data/cookbooks/runit/.kitchen.cloud.yml +103 -0
  139. data/cookbooks/runit/.kitchen.yml +38 -0
  140. data/cookbooks/runit/.rspec +3 -0
  141. data/cookbooks/runit/.rubocop.yml +45 -0
  142. data/cookbooks/runit/Berksfile.disabled +11 -0
  143. data/cookbooks/runit/CHANGELOG.md +226 -0
  144. data/cookbooks/runit/CONTRIBUTING.md +266 -0
  145. data/cookbooks/runit/Cheffile +11 -0
  146. data/cookbooks/runit/Gemfile +17 -0
  147. data/cookbooks/runit/LICENSE +201 -0
  148. data/cookbooks/runit/README.md +435 -0
  149. data/cookbooks/runit/Rakefile +23 -0
  150. data/cookbooks/runit/TESTING.md +26 -0
  151. data/cookbooks/runit/attributes/default.rb +62 -0
  152. data/cookbooks/runit/files/default/runit.seed +1 -0
  153. data/cookbooks/runit/files/default/runsvdir +0 -0
  154. data/cookbooks/runit/files/ubuntu-6.10/runsvdir +6 -0
  155. data/cookbooks/runit/files/ubuntu-7.04/runsvdir +7 -0
  156. data/cookbooks/runit/files/ubuntu-7.10/runsvdir +7 -0
  157. data/cookbooks/runit/files/ubuntu-8.04/runsvdir +7 -0
  158. data/cookbooks/runit/libraries/default.rb +0 -0
  159. data/cookbooks/runit/libraries/helpers.rb +190 -0
  160. data/cookbooks/runit/libraries/matchers.rb +69 -0
  161. data/cookbooks/runit/libraries/provider_runit_service.rb +326 -0
  162. data/cookbooks/runit/libraries/resource_runit_service.rb +267 -0
  163. data/cookbooks/runit/metadata.json +50 -0
  164. data/cookbooks/runit/recipes/default.rb +91 -0
  165. data/cookbooks/runit/templates/debian/init.d.erb +66 -0
  166. data/cookbooks/runit/templates/default/log-config.erb +24 -0
  167. data/cookbooks/runit/templates/gentoo/runit-start.sh.erb +32 -0
  168. data/cookbooks/scratchify/Berksfile +2 -1
  169. data/cookbooks/scratchify/Berksfile.lock +20 -1
  170. data/cookbooks/scratchify/lib/from-scratch.rb +1 -4
  171. data/cookbooks/scratchify/lib/from-scratch/version.rb +1 -1
  172. data/cookbooks/scratchify/metadata.json +5 -2
  173. data/cookbooks/scratchify/recipes/default.rb +15 -1
  174. data/cookbooks/scratchify/recipes/nginx_site.rb +4 -0
  175. data/cookbooks/scratchify/recipes/pre_rvm.rb +5 -0
  176. data/cookbooks/scratchify/templates/nginx.erb +31 -0
  177. data/cookbooks/scratchify/templates/node.json.erb +21 -6
  178. data/cookbooks/yum-epel/CHANGELOG.md +84 -0
  179. data/cookbooks/yum-epel/README.md +172 -0
  180. data/cookbooks/yum-epel/attributes/default.rb +1 -0
  181. data/cookbooks/yum-epel/attributes/epel-debuginfo.rb +28 -0
  182. data/cookbooks/yum-epel/attributes/epel-source.rb +28 -0
  183. data/cookbooks/yum-epel/attributes/epel-testing-debuginfo.rb +28 -0
  184. data/cookbooks/yum-epel/attributes/epel-testing-source.rb +28 -0
  185. data/cookbooks/yum-epel/attributes/epel-testing.rb +28 -0
  186. data/cookbooks/yum-epel/attributes/epel.rb +28 -0
  187. data/cookbooks/yum-epel/metadata.json +1 -0
  188. data/cookbooks/yum-epel/recipes/default.rb +61 -0
  189. data/cookbooks/yum/CHANGELOG.md +294 -0
  190. data/cookbooks/yum/README.md +285 -0
  191. data/cookbooks/yum/attributes/main.rb +100 -0
  192. data/cookbooks/yum/libraries/matchers.rb +27 -0
  193. data/cookbooks/yum/metadata.json +1 -0
  194. data/cookbooks/yum/providers/globalconfig.rb +41 -0
  195. data/cookbooks/yum/providers/repository.rb +106 -0
  196. data/cookbooks/yum/recipes/default.rb +26 -0
  197. data/cookbooks/yum/resources/globalconfig.rb +109 -0
  198. data/cookbooks/yum/resources/repository.rb +69 -0
  199. data/cookbooks/yum/templates/default/main.erb +276 -0
  200. data/cookbooks/yum/templates/default/repo.erb +125 -0
  201. data/lib/from-scratch.rb +1 -0
  202. data/lib/from-scratch/version.rb +1 -1
  203. data/metadata.rb +5 -1
  204. data/recipes/default.rb +15 -1
  205. data/recipes/nginx_site.rb +4 -0
  206. data/recipes/pre_rvm.rb +5 -0
  207. data/templates/nginx.erb +31 -0
  208. data/templates/node.json.erb +21 -6
  209. metadata +194 -1
@@ -0,0 +1,23 @@
1
+ #
2
+ # Cookbook Name:: nginx
3
+ # Attributes:: auth_request
4
+ #
5
+ # Author:: David Radcliffe (<radcliffe.david@gmail.com>)
6
+ #
7
+ # Copyright 2013, David Radcliffe
8
+ #
9
+ # Licensed under the Apache License, Version 2.0 (the "License");
10
+ # you may not use this file except in compliance with the License.
11
+ # You may obtain a copy of the License at
12
+ #
13
+ # http://www.apache.org/licenses/LICENSE-2.0
14
+ #
15
+ # Unless required by applicable law or agreed to in writing, software
16
+ # distributed under the License is distributed on an "AS IS" BASIS,
17
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ # See the License for the specific language governing permissions and
19
+ # limitations under the License.
20
+ #
21
+
22
+ default['nginx']['auth_request']['url'] = 'http://mdounin.ru/hg/ngx_http_auth_request_module/archive/ee8ff54f9b66.tar.gz'
23
+ default['nginx']['auth_request']['checksum'] = '7ab85e1c350c5a9c60ed1319c45fed144cc3c3e1'
@@ -0,0 +1,131 @@
1
+ #
2
+ # Cookbook Name:: nginx
3
+ # Attributes:: default
4
+ #
5
+ # Author:: Adam Jacob (<adam@chef.io>)
6
+ # Author:: Joshua Timberman (<joshua@chef.io>)
7
+ #
8
+ # Copyright 2009-2013, Chef Software, Inc.
9
+ #
10
+ # Licensed under the Apache License, Version 2.0 (the "License");
11
+ # you may not use this file except in compliance with the License.
12
+ # You may obtain a copy of the License at
13
+ #
14
+ # http://www.apache.org/licenses/LICENSE-2.0
15
+ #
16
+ # Unless required by applicable law or agreed to in writing, software
17
+ # distributed under the License is distributed on an "AS IS" BASIS,
18
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ # See the License for the specific language governing permissions and
20
+ # limitations under the License.
21
+ #
22
+
23
+ # In order to update the version, the checksum attribute must be changed too.
24
+ # This attribute is in the source.rb file, though we recommend overriding
25
+ # attributes by modifying a role, or the node itself.
26
+ default['nginx']['version'] = '1.6.2'
27
+ default['nginx']['package_name'] = 'nginx'
28
+ default['nginx']['port'] = '80'
29
+ default['nginx']['dir'] = '/etc/nginx'
30
+ default['nginx']['script_dir'] = '/usr/sbin'
31
+ default['nginx']['log_dir'] = '/var/log/nginx'
32
+ default['nginx']['log_dir_perm'] = '0750'
33
+ default['nginx']['binary'] = '/usr/sbin/nginx'
34
+ default['nginx']['default_root'] = '/var/www/nginx-default'
35
+ default['nginx']['ulimit'] = '1024'
36
+
37
+ default['nginx']['pid'] = '/var/run/nginx.pid'
38
+
39
+ case node['platform_family']
40
+ when 'debian'
41
+ default['nginx']['user'] = 'www-data'
42
+ default['nginx']['init_style'] = 'runit'
43
+ if platform == 'ubuntu' && platform_version == '14.04'
44
+ default['nginx']['pid'] = '/run/nginx.pid'
45
+ end
46
+ when 'rhel', 'fedora'
47
+ default['nginx']['user'] = 'nginx'
48
+ default['nginx']['init_style'] = 'init'
49
+ default['nginx']['repo_source'] = 'epel'
50
+ when 'gentoo'
51
+ default['nginx']['user'] = 'nginx'
52
+ default['nginx']['init_style'] = 'init'
53
+ when 'freebsd'
54
+ default['nginx']['package_name'] = 'www/nginx'
55
+ default['nginx']['user'] = 'www'
56
+ default['nginx']['dir'] = '/usr/local/etc/nginx'
57
+ default['nginx']['script_dir'] = '/usr/local/sbin'
58
+ default['nginx']['binary'] = '/usr/local/sbin/nginx'
59
+ default['nginx']['default_root'] = '/usr/local/www/nginx-dist'
60
+ when 'suse'
61
+ default['nginx']['user'] = 'wwwrun'
62
+ default['nginx']['init_style'] = 'init'
63
+ default['nginx']['group'] = 'www'
64
+ else
65
+ default['nginx']['user'] = 'www-data'
66
+ default['nginx']['init_style'] = 'init'
67
+ end
68
+
69
+ default['nginx']['upstart']['runlevels'] = '2345'
70
+ default['nginx']['upstart']['respawn_limit'] = nil
71
+ default['nginx']['upstart']['foreground'] = true
72
+
73
+ default['nginx']['group'] = node['nginx']['group'] || node['nginx']['user']
74
+
75
+ default['nginx']['gzip'] = 'on'
76
+ default['nginx']['gzip_static'] = 'off'
77
+ default['nginx']['gzip_http_version'] = '1.0'
78
+ default['nginx']['gzip_comp_level'] = '2'
79
+ default['nginx']['gzip_proxied'] = 'any'
80
+ default['nginx']['gzip_vary'] = 'off'
81
+ default['nginx']['gzip_buffers'] = nil
82
+ default['nginx']['gzip_types'] = %w(
83
+ text/plain
84
+ text/css
85
+ application/x-javascript
86
+ text/xml
87
+ application/xml
88
+ application/rss+xml
89
+ application/atom+xml
90
+ text/javascript
91
+ application/javascript
92
+ application/json
93
+ text/mathml
94
+ )
95
+ default['nginx']['gzip_min_length'] = 1_000
96
+ default['nginx']['gzip_disable'] = 'MSIE [1-6]\.'
97
+
98
+ default['nginx']['keepalive'] = 'on'
99
+ default['nginx']['keepalive_requests'] = 100
100
+ default['nginx']['keepalive_timeout'] = 65
101
+ default['nginx']['worker_processes'] = node['cpu'] && node['cpu']['total'] ? node['cpu']['total'] : 1
102
+ default['nginx']['worker_connections'] = 1_024
103
+ default['nginx']['worker_rlimit_nofile'] = nil
104
+ default['nginx']['multi_accept'] = false
105
+ default['nginx']['event'] = nil
106
+ default['nginx']['accept_mutex_delay'] = nil
107
+ default['nginx']['server_tokens'] = nil
108
+ default['nginx']['server_names_hash_bucket_size'] = 64
109
+ default['nginx']['variables_hash_max_size'] = 1024
110
+ default['nginx']['variables_hash_bucket_size'] = 64
111
+ default['nginx']['sendfile'] = 'on'
112
+ default['nginx']['underscores_in_headers'] = nil
113
+ default['nginx']['tcp_nodelay'] = 'on'
114
+ default['nginx']['tcp_nopush'] = 'on'
115
+
116
+ default['nginx']['access_log_options'] = nil
117
+ default['nginx']['error_log_options'] = nil
118
+ default['nginx']['disable_access_log'] = false
119
+ default['nginx']['log_formats'] = {}
120
+ default['nginx']['install_method'] = 'package'
121
+ default['nginx']['default_site_enabled'] = true
122
+ default['nginx']['types_hash_max_size'] = 2_048
123
+ default['nginx']['types_hash_bucket_size'] = 64
124
+
125
+ default['nginx']['proxy_read_timeout'] = nil
126
+ default['nginx']['client_body_buffer_size'] = nil
127
+ default['nginx']['client_max_body_size'] = nil
128
+ default['nginx']['large_client_header_buffers'] = nil
129
+ default['nginx']['default']['modules'] = []
130
+
131
+ default['nginx']['extra_configs'] = {}
@@ -0,0 +1,24 @@
1
+ #
2
+ # Cookbook Name:: nginx
3
+ # Attributes:: devel
4
+ #
5
+ # Author:: Arthur Freyman (<afreyman@riotgames.com>)
6
+ #
7
+ # Copyright 2013, Riot Games
8
+ #
9
+ # Licensed under the Apache License, Version 2.0 (the "License");
10
+ # you may not use this file except in compliance with the License.
11
+ # You may obtain a copy of the License at
12
+ #
13
+ # http://www.apache.org/licenses/LICENSE-2.0
14
+ #
15
+ # Unless required by applicable law or agreed to in writing, software
16
+ # distributed under the License is distributed on an "AS IS" BASIS,
17
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ # See the License for the specific language governing permissions and
19
+ # limitations under the License.
20
+ #
21
+
22
+ default['nginx']['devel']['version'] = '0.2.18'
23
+ default['nginx']['devel']['url'] = "https://github.com/simpl/ngx_devel_kit/archive/v#{node['nginx']['devel']['version']}.tar.gz"
24
+ default['nginx']['devel']['checksum'] = 'c9c9f0a1b068d38c6c45b15d9605f1b2344dbcd45abf0764cd8e2ba92d6a3d2c'
@@ -0,0 +1,24 @@
1
+ #
2
+ # Cookbook Name:: nginx
3
+ # Attributes:: echo
4
+ #
5
+ # Author:: Danial Pearce (<github@tigris.id.au>)
6
+ #
7
+ # Copyright 2013, Danial Pearce
8
+ #
9
+ # Licensed under the Apache License, Version 2.0 (the "License");
10
+ # you may not use this file except in compliance with the License.
11
+ # You may obtain a copy of the License at
12
+ #
13
+ # http://www.apache.org/licenses/LICENSE-2.0
14
+ #
15
+ # Unless required by applicable law or agreed to in writing, software
16
+ # distributed under the License is distributed on an "AS IS" BASIS,
17
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ # See the License for the specific language governing permissions and
19
+ # limitations under the License.
20
+ #
21
+
22
+ default['nginx']['echo']['version'] = '0.57'
23
+ default['nginx']['echo']['url'] = "https://github.com/openresty/echo-nginx-module/archive/v#{node['nginx']['echo']['version']}.tar.gz"
24
+ default['nginx']['echo']['checksum'] = '8467237ca0fae74ca7a32fbd34fc6044df307098415d48068214c9c235695a07'
@@ -0,0 +1,31 @@
1
+ #
2
+ # Cookbook Name:: nginx
3
+ # Attributes:: geoip
4
+ #
5
+ # Author:: Jamie Winsor (<jamie@vialstudios.com>)
6
+ #
7
+ # Copyright 2012-2013, Riot Games
8
+ #
9
+ # Licensed under the Apache License, Version 2.0 (the "License");
10
+ # you may not use this file except in compliance with the License.
11
+ # You may obtain a copy of the License at
12
+ #
13
+ # http://www.apache.org/licenses/LICENSE-2.0
14
+ #
15
+ # Unless required by applicable law or agreed to in writing, software
16
+ # distributed under the License is distributed on an "AS IS" BASIS,
17
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ # See the License for the specific language governing permissions and
19
+ # limitations under the License.
20
+ #
21
+
22
+ default['nginx']['geoip']['path'] = '/srv/geoip'
23
+ default['nginx']['geoip']['enable_city'] = true
24
+ default['nginx']['geoip']['country_dat_url'] = 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz'
25
+ default['nginx']['geoip']['country_dat_checksum'] = '79ff1099e96c2dc1c2539c9a18aaa13a9afd085cae477df60d95f1644d42bc07'
26
+ default['nginx']['geoip']['city_dat_url'] = 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz'
27
+ default['nginx']['geoip']['city_dat_checksum'] = '8a6467033a528f68b1a97de24d9d0ce86c8e8e83683820e16e433ddbd3f712f7'
28
+ default['nginx']['geoip']['lib_version'] = '1.6.3'
29
+ lib_version = node['nginx']['geoip']['lib_version'] # convenience variable for line length
30
+ default['nginx']['geoip']['lib_url'] = "https://github.com/maxmind/geoip-api-c/releases/download/v#{lib_version}/GeoIP-#{lib_version}.tar.gz"
31
+ default['nginx']['geoip']['lib_checksum'] = 'e483839a81a91c3c85df89ef409fc7b526c489e0355d537861cfd1ea9534a8f2'
@@ -0,0 +1,24 @@
1
+ #
2
+ # Cookbook Name:: nginx
3
+ # Attributes:: headers_more
4
+ #
5
+ # Author:: Lucas Jandrew (<ljandrew@riotgames.com>)
6
+ #
7
+ # Copyright 2012-2013, Riot Games
8
+ #
9
+ # Licensed under the Apache License, Version 2.0 (the "License");
10
+ # you may not use this file except in compliance with the License.
11
+ # You may obtain a copy of the License at
12
+ #
13
+ # http://www.apache.org/licenses/LICENSE-2.0
14
+ #
15
+ # Unless required by applicable law or agreed to in writing, software
16
+ # distributed under the License is distributed on an "AS IS" BASIS,
17
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ # See the License for the specific language governing permissions and
19
+ # limitations under the License.
20
+ #
21
+
22
+ default['nginx']['headers_more']['version'] = '0.25'
23
+ default['nginx']['headers_more']['source_url'] = "https://github.com/openresty/headers-more-nginx-module/archive/v#{node['nginx']['headers_more']['version']}.tar.gz"
24
+ default['nginx']['headers_more']['source_checksum'] = '1473f96f59dcec9d83ce65d691559993c1f80da8c0a4c0c0a30dae9f969eeabf'
@@ -0,0 +1,28 @@
1
+ #
2
+ # Cookbook Name:: nginx
3
+ # Attributes:: lua
4
+ #
5
+ # Author:: Arthur Freyman (<afreyman@riotgames.com>)
6
+ #
7
+ # Copyright 2013, Riot Games
8
+ #
9
+ # Licensed under the Apache License, Version 2.0 (the "License");
10
+ # you may not use this file except in compliance with the License.
11
+ # You may obtain a copy of the License at
12
+ #
13
+ # http://www.apache.org/licenses/LICENSE-2.0
14
+ #
15
+ # Unless required by applicable law or agreed to in writing, software
16
+ # distributed under the License is distributed on an "AS IS" BASIS,
17
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ # See the License for the specific language governing permissions and
19
+ # limitations under the License.
20
+ #
21
+
22
+ default['nginx']['lua']['version'] = '0.8.7'
23
+ default['nginx']['lua']['url'] = "https://github.com/chaoslawful/lua-nginx-module/archive/v#{node['nginx']['lua']['version']}.tar.gz"
24
+ default['nginx']['lua']['checksum'] = '4b9be3c159b9c884a38e044e07aaf4d06bd2893977d0b0dae02c124d8e907f93'
25
+
26
+ default['nginx']['luajit']['version'] = '2.0.2'
27
+ default['nginx']['luajit']['url'] = "http://luajit.org/download/LuaJIT-#{node['nginx']['luajit']['version']}.tar.gz"
28
+ default['nginx']['luajit']['checksum'] = 'c05202974a5890e777b181908ac237625b499aece026654d7cc33607e3f46c38'
@@ -0,0 +1,24 @@
1
+ #
2
+ # Cookbook Name:: nginx
3
+ # Attributes:: naxsi
4
+ #
5
+ # Author:: Artiom Lunev (<artiom.lunev@gmail.com>)
6
+ #
7
+ # Copyright 2012-2013, Artiom Lunev
8
+ #
9
+ # Licensed under the Apache License, Version 2.0 (the "License");
10
+ # you may not use this file except in compliance with the License.
11
+ # You may obtain a copy of the License at
12
+ #
13
+ # http://www.apache.org/licenses/LICENSE-2.0
14
+ #
15
+ # Unless required by applicable law or agreed to in writing, software
16
+ # distributed under the License is distributed on an "AS IS" BASIS,
17
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ # See the License for the specific language governing permissions and
19
+ # limitations under the License.
20
+ #
21
+
22
+ default['nginx']['naxsi']['version'] = '0.53-2'
23
+ default['nginx']['naxsi']['url'] = "https://github.com/nbs-system/naxsi/archive/#{node['nginx']['naxsi']['version']}.tar.gz"
24
+ default['nginx']['naxsi']['checksum'] = '3eadff1d91995beae41b92733ade28091c2075a24ae37058f4d6aa90b0f4b660'
@@ -0,0 +1,23 @@
1
+ #
2
+ # Cookbook Name:: nginx
3
+ # Attributes:: openssl_source
4
+ #
5
+ # Author:: David Radcliffe (<radcliffe.david@gmail.com>)
6
+ #
7
+ # Copyright 2013, David Radcliffe
8
+ #
9
+ # Licensed under the Apache License, Version 2.0 (the "License");
10
+ # you may not use this file except in compliance with the License.
11
+ # You may obtain a copy of the License at
12
+ #
13
+ # http://www.apache.org/licenses/LICENSE-2.0
14
+ #
15
+ # Unless required by applicable law or agreed to in writing, software
16
+ # distributed under the License is distributed on an "AS IS" BASIS,
17
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ # See the License for the specific language governing permissions and
19
+ # limitations under the License.
20
+ #
21
+
22
+ default['nginx']['openssl_source']['version'] = '1.0.1h'
23
+ default['nginx']['openssl_source']['url'] = "http://www.openssl.org/source/openssl-#{node['nginx']['openssl_source']['version']}.tar.gz"
@@ -0,0 +1,9 @@
1
+ #
2
+ # Cookbook Name:: nginx
3
+ # Recipe:: pagespeed_module
4
+ #
5
+ default['nginx']['pagespeed']['version'] = '1.8.31.4'
6
+ default['nginx']['pagespeed']['url'] = "https://github.com/pagespeed/ngx_pagespeed/archive/release-#{node['nginx']['pagespeed']['version']}-beta.tar.gz"
7
+ default['nginx']['psol']['url'] = "https://dl.google.com/dl/page-speed/psol/#{node['nginx']['pagespeed']['version']}.tar.gz"
8
+ default['nginx']['pagespeed']['packages']['rhel'] = %w(gcc-c++ pcre-dev pcre-devel zlib-devel make)
9
+ default['nginx']['pagespeed']['packages']['debian'] = %w(build-essential zlib1g-dev libpcre3 libpcre3-dev)
@@ -0,0 +1,58 @@
1
+ #
2
+ # Cookbook Name:: nginx
3
+ # Attribute:: passenger
4
+ #
5
+ # Author:: Alex Dergachev (<alex@evolvingweb.ca>)
6
+ #
7
+ # Copyright 2013, Chef Software, Inc.
8
+ # Copyright 2012, Susan Potter
9
+ #
10
+ # Licensed under the Apache License, Version 2.0 (the "License");
11
+ # you may not use this file except in compliance with the License.
12
+ # You may obtain a copy of the License at
13
+ #
14
+ # http://www.apache.org/licenses/LICENSE-2.0
15
+ #
16
+ # Unless required by applicable law or agreed to in writing, software
17
+ # distributed under the License is distributed on an "AS IS" BASIS,
18
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ # See the License for the specific language governing permissions and
20
+ # limitations under the License.
21
+ #
22
+
23
+ node.default['nginx']['passenger']['version'] = '4.0.57'
24
+
25
+ if node['nginx']['repo_source'] == 'passenger'
26
+ node.default['nginx']['passenger']['root'] = '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini'
27
+ node.default['nginx']['passenger']['ruby'] = '/usr/bin/ruby'
28
+ elsif node['languages'].attribute?('ruby')
29
+ node.default['nginx']['passenger']['root'] = "#{node['languages']['ruby']['gems_dir']}/gems/passenger-#{node['nginx']['passenger']['version']}"
30
+ node.default['nginx']['passenger']['ruby'] = node['languages']['ruby']['ruby_bin']
31
+ else
32
+ Chef::Log.warn("node['languages']['ruby'] attribute not detected in #{cookbook_name}::#{recipe_name}")
33
+ Chef::Log.warn("Install a Ruby for automatic detection of node['nginx']['passenger'] attributes (root, ruby)")
34
+ Chef::Log.warn('Using default values that may or may not work for this system.')
35
+ node.default['nginx']['passenger']['root'] = "/usr/lib/ruby/gems/1.8/gems/passenger-#{node['nginx']['passenger']['version']}"
36
+ node.default['nginx']['passenger']['ruby'] = '/usr/bin/ruby'
37
+ end
38
+
39
+ if platform_family?('rhel') && node['platform_version'].to_i >= 6
40
+ node.default['nginx']['passenger']['packages']['rhel'] = %w(ruby-devel libcurl-devel)
41
+ else
42
+ node.default['nginx']['passenger']['packages']['rhel'] = %w(ruby-devel curl-devel)
43
+ end
44
+ node.default['nginx']['passenger']['packages']['fedora'] = %w(ruby-devel libcurl-devel)
45
+ node.default['nginx']['passenger']['packages']['debian'] = %w(ruby-dev libcurl4-gnutls-dev)
46
+
47
+ node.default['nginx']['passenger']['install_rake'] = true
48
+ node.default['nginx']['passenger']['spawn_method'] = 'smart-lv2'
49
+ node.default['nginx']['passenger']['buffer_response'] = 'on'
50
+ node.default['nginx']['passenger']['max_pool_size'] = 6
51
+ node.default['nginx']['passenger']['min_instances'] = 1
52
+ node.default['nginx']['passenger']['max_instances_per_app'] = 0
53
+ node.default['nginx']['passenger']['pool_idle_time'] = 300
54
+ node.default['nginx']['passenger']['max_requests'] = 0
55
+ node.default['nginx']['passenger']['gem_binary'] = nil
56
+
57
+ # NodeJs disable by default
58
+ node.default['nginx']['passenger']['nodejs'] = nil
@@ -0,0 +1,23 @@
1
+ #
2
+ # Cookbook Name:: nginx
3
+ # Attribute:: rate_limiting
4
+ #
5
+ # Copyright 2013, Chef Software, 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
+ default['nginx']['enable_rate_limiting'] = false
21
+ default['nginx']['rate_limiting_zone_name'] = 'default'
22
+ default['nginx']['rate_limiting_backoff'] = '10m'
23
+ default['nginx']['rate_limit'] = '1r/s'
@@ -0,0 +1,35 @@
1
+ #
2
+ # Cookbook Name:: nginx
3
+ # Recipe:: repo
4
+ #
5
+ # Author:: Nick Rycar <nrycar@bluebox.net>
6
+ #
7
+ # Copyright 2008-2013, Chef Software, Inc.
8
+ #
9
+ # Licensed under the Apache License, Version 2.0 (the "License");
10
+ # you may not use this file except in compliance with the License.
11
+ # You may obtain a copy of the License at
12
+ #
13
+ # http://www.apache.org/licenses/LICENSE-2.0
14
+ #
15
+ # Unless required by applicable law or agreed to in writing, software
16
+ # distributed under the License is distributed on an "AS IS" BASIS,
17
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ # See the License for the specific language governing permissions and
19
+ # limitations under the License.
20
+ #
21
+
22
+ case node['platform_family']
23
+ when 'rhel', 'fedora'
24
+ case node['platform']
25
+ when 'centos'
26
+ # See http://wiki.nginx.org/Install
27
+ default['nginx']['upstream_repository'] = "http://nginx.org/packages/centos/#{node['platform_version'].to_i}/$basearch/"
28
+ when 'amazon'
29
+ default['nginx']['upstream_repository'] = 'http://nginx.org/packages/rhel/6/$basearch/'
30
+ else
31
+ default['nginx']['upstream_repository'] = "http://nginx.org/packages/rhel/#{node['platform_version'].to_i}/$basearch/"
32
+ end
33
+ when 'debian'
34
+ default['nginx']['upstream_repository'] = "http://nginx.org/packages/#{node['platform']}"
35
+ end