Initial Chef repository
This commit is contained in:
23
cookbooks/nginx/attributes/auth_request.rb
Normal file
23
cookbooks/nginx/attributes/auth_request.rb
Normal file
@@ -0,0 +1,23 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Attributes:: auth_request
|
||||
#
|
||||
# Author:: David Radcliffe (<radcliffe.david@gmail.com>)
|
||||
#
|
||||
# Copyright 2013, David Radcliffe
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['nginx']['auth_request']['url'] = 'http://mdounin.ru/hg/ngx_http_auth_request_module/archive/ee8ff54f9b66.tar.gz'
|
||||
default['nginx']['auth_request']['checksum'] = '7ab85e1c350c5a9c60ed1319c45fed144cc3c3e1'
|
||||
131
cookbooks/nginx/attributes/default.rb
Normal file
131
cookbooks/nginx/attributes/default.rb
Normal file
@@ -0,0 +1,131 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Attributes:: default
|
||||
#
|
||||
# Author:: Adam Jacob (<adam@chef.io>)
|
||||
# Author:: Joshua Timberman (<joshua@chef.io>)
|
||||
#
|
||||
# Copyright 2009-2013, Chef Software, 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.
|
||||
#
|
||||
|
||||
# In order to update the version, the checksum attribute must be changed too.
|
||||
# This attribute is in the source.rb file, though we recommend overriding
|
||||
# attributes by modifying a role, or the node itself.
|
||||
default['nginx']['version'] = '1.6.2'
|
||||
default['nginx']['package_name'] = 'nginx'
|
||||
default['nginx']['port'] = '80'
|
||||
default['nginx']['dir'] = '/etc/nginx'
|
||||
default['nginx']['script_dir'] = '/usr/sbin'
|
||||
default['nginx']['log_dir'] = '/var/log/nginx'
|
||||
default['nginx']['log_dir_perm'] = '0750'
|
||||
default['nginx']['binary'] = '/usr/sbin/nginx'
|
||||
default['nginx']['default_root'] = '/var/www/nginx-default'
|
||||
default['nginx']['ulimit'] = '1024'
|
||||
|
||||
default['nginx']['pid'] = '/var/run/nginx.pid'
|
||||
|
||||
case node['platform_family']
|
||||
when 'debian'
|
||||
default['nginx']['user'] = 'www-data'
|
||||
default['nginx']['init_style'] = 'runit'
|
||||
if platform == 'ubuntu' && platform_version == '14.04'
|
||||
default['nginx']['pid'] = '/run/nginx.pid'
|
||||
end
|
||||
when 'rhel', 'fedora'
|
||||
default['nginx']['user'] = 'nginx'
|
||||
default['nginx']['init_style'] = 'init'
|
||||
default['nginx']['repo_source'] = 'epel'
|
||||
when 'gentoo'
|
||||
default['nginx']['user'] = 'nginx'
|
||||
default['nginx']['init_style'] = 'init'
|
||||
when 'freebsd'
|
||||
default['nginx']['package_name'] = 'www/nginx'
|
||||
default['nginx']['user'] = 'www'
|
||||
default['nginx']['dir'] = '/usr/local/etc/nginx'
|
||||
default['nginx']['script_dir'] = '/usr/local/sbin'
|
||||
default['nginx']['binary'] = '/usr/local/sbin/nginx'
|
||||
default['nginx']['default_root'] = '/usr/local/www/nginx-dist'
|
||||
when 'suse'
|
||||
default['nginx']['user'] = 'wwwrun'
|
||||
default['nginx']['init_style'] = 'init'
|
||||
default['nginx']['group'] = 'www'
|
||||
else
|
||||
default['nginx']['user'] = 'www-data'
|
||||
default['nginx']['init_style'] = 'init'
|
||||
end
|
||||
|
||||
default['nginx']['upstart']['runlevels'] = '2345'
|
||||
default['nginx']['upstart']['respawn_limit'] = nil
|
||||
default['nginx']['upstart']['foreground'] = true
|
||||
|
||||
default['nginx']['group'] = node['nginx']['group'] || node['nginx']['user']
|
||||
|
||||
default['nginx']['gzip'] = 'on'
|
||||
default['nginx']['gzip_static'] = 'off'
|
||||
default['nginx']['gzip_http_version'] = '1.0'
|
||||
default['nginx']['gzip_comp_level'] = '2'
|
||||
default['nginx']['gzip_proxied'] = 'any'
|
||||
default['nginx']['gzip_vary'] = 'off'
|
||||
default['nginx']['gzip_buffers'] = nil
|
||||
default['nginx']['gzip_types'] = %w(
|
||||
text/plain
|
||||
text/css
|
||||
application/x-javascript
|
||||
text/xml
|
||||
application/xml
|
||||
application/rss+xml
|
||||
application/atom+xml
|
||||
text/javascript
|
||||
application/javascript
|
||||
application/json
|
||||
text/mathml
|
||||
)
|
||||
default['nginx']['gzip_min_length'] = 1_000
|
||||
default['nginx']['gzip_disable'] = 'MSIE [1-6]\.'
|
||||
|
||||
default['nginx']['keepalive'] = 'on'
|
||||
default['nginx']['keepalive_requests'] = 100
|
||||
default['nginx']['keepalive_timeout'] = 65
|
||||
default['nginx']['worker_processes'] = node['cpu'] && node['cpu']['total'] ? node['cpu']['total'] : 1
|
||||
default['nginx']['worker_connections'] = 1_024
|
||||
default['nginx']['worker_rlimit_nofile'] = nil
|
||||
default['nginx']['multi_accept'] = false
|
||||
default['nginx']['event'] = nil
|
||||
default['nginx']['accept_mutex_delay'] = nil
|
||||
default['nginx']['server_tokens'] = nil
|
||||
default['nginx']['server_names_hash_bucket_size'] = 64
|
||||
default['nginx']['variables_hash_max_size'] = 1024
|
||||
default['nginx']['variables_hash_bucket_size'] = 64
|
||||
default['nginx']['sendfile'] = 'on'
|
||||
default['nginx']['underscores_in_headers'] = nil
|
||||
default['nginx']['tcp_nodelay'] = 'on'
|
||||
default['nginx']['tcp_nopush'] = 'on'
|
||||
|
||||
default['nginx']['access_log_options'] = nil
|
||||
default['nginx']['error_log_options'] = nil
|
||||
default['nginx']['disable_access_log'] = false
|
||||
default['nginx']['log_formats'] = {}
|
||||
default['nginx']['install_method'] = 'package'
|
||||
default['nginx']['default_site_enabled'] = true
|
||||
default['nginx']['types_hash_max_size'] = 2_048
|
||||
default['nginx']['types_hash_bucket_size'] = 64
|
||||
|
||||
default['nginx']['proxy_read_timeout'] = nil
|
||||
default['nginx']['client_body_buffer_size'] = nil
|
||||
default['nginx']['client_max_body_size'] = nil
|
||||
default['nginx']['large_client_header_buffers'] = nil
|
||||
default['nginx']['default']['modules'] = []
|
||||
|
||||
default['nginx']['extra_configs'] = {}
|
||||
24
cookbooks/nginx/attributes/devel.rb
Normal file
24
cookbooks/nginx/attributes/devel.rb
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Attributes:: devel
|
||||
#
|
||||
# Author:: Arthur Freyman (<afreyman@riotgames.com>)
|
||||
#
|
||||
# Copyright 2013, Riot Games
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['nginx']['devel']['version'] = '0.2.18'
|
||||
default['nginx']['devel']['url'] = "https://github.com/simpl/ngx_devel_kit/archive/v#{node['nginx']['devel']['version']}.tar.gz"
|
||||
default['nginx']['devel']['checksum'] = 'c9c9f0a1b068d38c6c45b15d9605f1b2344dbcd45abf0764cd8e2ba92d6a3d2c'
|
||||
24
cookbooks/nginx/attributes/echo.rb
Normal file
24
cookbooks/nginx/attributes/echo.rb
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Attributes:: echo
|
||||
#
|
||||
# Author:: Danial Pearce (<github@tigris.id.au>)
|
||||
#
|
||||
# Copyright 2013, Danial Pearce
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['nginx']['echo']['version'] = '0.57'
|
||||
default['nginx']['echo']['url'] = "https://github.com/openresty/echo-nginx-module/archive/v#{node['nginx']['echo']['version']}.tar.gz"
|
||||
default['nginx']['echo']['checksum'] = '8467237ca0fae74ca7a32fbd34fc6044df307098415d48068214c9c235695a07'
|
||||
31
cookbooks/nginx/attributes/geoip.rb
Normal file
31
cookbooks/nginx/attributes/geoip.rb
Normal file
@@ -0,0 +1,31 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Attributes:: geoip
|
||||
#
|
||||
# Author:: Jamie Winsor (<jamie@vialstudios.com>)
|
||||
#
|
||||
# Copyright 2012-2013, Riot Games
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['nginx']['geoip']['path'] = '/srv/geoip'
|
||||
default['nginx']['geoip']['enable_city'] = true
|
||||
default['nginx']['geoip']['country_dat_url'] = 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz'
|
||||
default['nginx']['geoip']['country_dat_checksum'] = '79ff1099e96c2dc1c2539c9a18aaa13a9afd085cae477df60d95f1644d42bc07'
|
||||
default['nginx']['geoip']['city_dat_url'] = 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz'
|
||||
default['nginx']['geoip']['city_dat_checksum'] = '8a6467033a528f68b1a97de24d9d0ce86c8e8e83683820e16e433ddbd3f712f7'
|
||||
default['nginx']['geoip']['lib_version'] = '1.6.3'
|
||||
lib_version = node['nginx']['geoip']['lib_version'] # convenience variable for line length
|
||||
default['nginx']['geoip']['lib_url'] = "https://github.com/maxmind/geoip-api-c/releases/download/v#{lib_version}/GeoIP-#{lib_version}.tar.gz"
|
||||
default['nginx']['geoip']['lib_checksum'] = 'e483839a81a91c3c85df89ef409fc7b526c489e0355d537861cfd1ea9534a8f2'
|
||||
24
cookbooks/nginx/attributes/headers_more.rb
Normal file
24
cookbooks/nginx/attributes/headers_more.rb
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Attributes:: headers_more
|
||||
#
|
||||
# Author:: Lucas Jandrew (<ljandrew@riotgames.com>)
|
||||
#
|
||||
# Copyright 2012-2013, Riot Games
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['nginx']['headers_more']['version'] = '0.25'
|
||||
default['nginx']['headers_more']['source_url'] = "https://github.com/openresty/headers-more-nginx-module/archive/v#{node['nginx']['headers_more']['version']}.tar.gz"
|
||||
default['nginx']['headers_more']['source_checksum'] = '1473f96f59dcec9d83ce65d691559993c1f80da8c0a4c0c0a30dae9f969eeabf'
|
||||
28
cookbooks/nginx/attributes/lua.rb
Normal file
28
cookbooks/nginx/attributes/lua.rb
Normal file
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Attributes:: lua
|
||||
#
|
||||
# Author:: Arthur Freyman (<afreyman@riotgames.com>)
|
||||
#
|
||||
# Copyright 2013, Riot Games
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['nginx']['lua']['version'] = '0.8.7'
|
||||
default['nginx']['lua']['url'] = "https://github.com/chaoslawful/lua-nginx-module/archive/v#{node['nginx']['lua']['version']}.tar.gz"
|
||||
default['nginx']['lua']['checksum'] = '4b9be3c159b9c884a38e044e07aaf4d06bd2893977d0b0dae02c124d8e907f93'
|
||||
|
||||
default['nginx']['luajit']['version'] = '2.0.2'
|
||||
default['nginx']['luajit']['url'] = "http://luajit.org/download/LuaJIT-#{node['nginx']['luajit']['version']}.tar.gz"
|
||||
default['nginx']['luajit']['checksum'] = 'c05202974a5890e777b181908ac237625b499aece026654d7cc33607e3f46c38'
|
||||
24
cookbooks/nginx/attributes/naxsi.rb
Normal file
24
cookbooks/nginx/attributes/naxsi.rb
Normal file
@@ -0,0 +1,24 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Attributes:: naxsi
|
||||
#
|
||||
# Author:: Artiom Lunev (<artiom.lunev@gmail.com>)
|
||||
#
|
||||
# Copyright 2012-2013, Artiom Lunev
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['nginx']['naxsi']['version'] = '0.53-2'
|
||||
default['nginx']['naxsi']['url'] = "https://github.com/nbs-system/naxsi/archive/#{node['nginx']['naxsi']['version']}.tar.gz"
|
||||
default['nginx']['naxsi']['checksum'] = '3eadff1d91995beae41b92733ade28091c2075a24ae37058f4d6aa90b0f4b660'
|
||||
23
cookbooks/nginx/attributes/openssl_source.rb
Normal file
23
cookbooks/nginx/attributes/openssl_source.rb
Normal file
@@ -0,0 +1,23 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Attributes:: openssl_source
|
||||
#
|
||||
# Author:: David Radcliffe (<radcliffe.david@gmail.com>)
|
||||
#
|
||||
# Copyright 2013, David Radcliffe
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['nginx']['openssl_source']['version'] = '1.0.1h'
|
||||
default['nginx']['openssl_source']['url'] = "http://www.openssl.org/source/openssl-#{node['nginx']['openssl_source']['version']}.tar.gz"
|
||||
9
cookbooks/nginx/attributes/pagespeed.rb
Normal file
9
cookbooks/nginx/attributes/pagespeed.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Recipe:: pagespeed_module
|
||||
#
|
||||
default['nginx']['pagespeed']['version'] = '1.8.31.4'
|
||||
default['nginx']['pagespeed']['url'] = "https://github.com/pagespeed/ngx_pagespeed/archive/release-#{node['nginx']['pagespeed']['version']}-beta.tar.gz"
|
||||
default['nginx']['psol']['url'] = "https://dl.google.com/dl/page-speed/psol/#{node['nginx']['pagespeed']['version']}.tar.gz"
|
||||
default['nginx']['pagespeed']['packages']['rhel'] = %w(gcc-c++ pcre-dev pcre-devel zlib-devel make)
|
||||
default['nginx']['pagespeed']['packages']['debian'] = %w(build-essential zlib1g-dev libpcre3 libpcre3-dev)
|
||||
58
cookbooks/nginx/attributes/passenger.rb
Normal file
58
cookbooks/nginx/attributes/passenger.rb
Normal file
@@ -0,0 +1,58 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Attribute:: passenger
|
||||
#
|
||||
# Author:: Alex Dergachev (<alex@evolvingweb.ca>)
|
||||
#
|
||||
# Copyright 2013, Chef Software, Inc.
|
||||
# Copyright 2012, Susan Potter
|
||||
#
|
||||
# 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.
|
||||
#
|
||||
|
||||
node.default['nginx']['passenger']['version'] = '4.0.57'
|
||||
|
||||
if node['nginx']['repo_source'] == 'passenger'
|
||||
node.default['nginx']['passenger']['root'] = '/usr/lib/ruby/vendor_ruby/phusion_passenger/locations.ini'
|
||||
node.default['nginx']['passenger']['ruby'] = '/usr/bin/ruby'
|
||||
elsif node['languages'].attribute?('ruby')
|
||||
node.default['nginx']['passenger']['root'] = "#{node['languages']['ruby']['gems_dir']}/gems/passenger-#{node['nginx']['passenger']['version']}"
|
||||
node.default['nginx']['passenger']['ruby'] = node['languages']['ruby']['ruby_bin']
|
||||
else
|
||||
Chef::Log.warn("node['languages']['ruby'] attribute not detected in #{cookbook_name}::#{recipe_name}")
|
||||
Chef::Log.warn("Install a Ruby for automatic detection of node['nginx']['passenger'] attributes (root, ruby)")
|
||||
Chef::Log.warn('Using default values that may or may not work for this system.')
|
||||
node.default['nginx']['passenger']['root'] = "/usr/lib/ruby/gems/1.8/gems/passenger-#{node['nginx']['passenger']['version']}"
|
||||
node.default['nginx']['passenger']['ruby'] = '/usr/bin/ruby'
|
||||
end
|
||||
|
||||
if platform_family?('rhel') && node['platform_version'].to_i >= 6
|
||||
node.default['nginx']['passenger']['packages']['rhel'] = %w(ruby-devel libcurl-devel)
|
||||
else
|
||||
node.default['nginx']['passenger']['packages']['rhel'] = %w(ruby-devel curl-devel)
|
||||
end
|
||||
node.default['nginx']['passenger']['packages']['fedora'] = %w(ruby-devel libcurl-devel)
|
||||
node.default['nginx']['passenger']['packages']['debian'] = %w(ruby-dev libcurl4-gnutls-dev)
|
||||
|
||||
node.default['nginx']['passenger']['install_rake'] = true
|
||||
node.default['nginx']['passenger']['spawn_method'] = 'smart-lv2'
|
||||
node.default['nginx']['passenger']['buffer_response'] = 'on'
|
||||
node.default['nginx']['passenger']['max_pool_size'] = 6
|
||||
node.default['nginx']['passenger']['min_instances'] = 1
|
||||
node.default['nginx']['passenger']['max_instances_per_app'] = 0
|
||||
node.default['nginx']['passenger']['pool_idle_time'] = 300
|
||||
node.default['nginx']['passenger']['max_requests'] = 0
|
||||
node.default['nginx']['passenger']['gem_binary'] = nil
|
||||
|
||||
# NodeJs disable by default
|
||||
node.default['nginx']['passenger']['nodejs'] = nil
|
||||
23
cookbooks/nginx/attributes/rate_limiting.rb
Normal file
23
cookbooks/nginx/attributes/rate_limiting.rb
Normal file
@@ -0,0 +1,23 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Attribute:: rate_limiting
|
||||
#
|
||||
# Copyright 2013, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['nginx']['enable_rate_limiting'] = false
|
||||
default['nginx']['rate_limiting_zone_name'] = 'default'
|
||||
default['nginx']['rate_limiting_backoff'] = '10m'
|
||||
default['nginx']['rate_limit'] = '1r/s'
|
||||
35
cookbooks/nginx/attributes/repo.rb
Normal file
35
cookbooks/nginx/attributes/repo.rb
Normal file
@@ -0,0 +1,35 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Recipe:: repo
|
||||
#
|
||||
# Author:: Nick Rycar <nrycar@bluebox.net>
|
||||
#
|
||||
# Copyright 2008-2013, Chef Software, 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_family']
|
||||
when 'rhel', 'fedora'
|
||||
case node['platform']
|
||||
when 'centos'
|
||||
# See http://wiki.nginx.org/Install
|
||||
default['nginx']['upstream_repository'] = "http://nginx.org/packages/centos/#{node['platform_version'].to_i}/$basearch/"
|
||||
when 'amazon'
|
||||
default['nginx']['upstream_repository'] = 'http://nginx.org/packages/rhel/6/$basearch/'
|
||||
else
|
||||
default['nginx']['upstream_repository'] = "http://nginx.org/packages/rhel/#{node['platform_version'].to_i}/$basearch/"
|
||||
end
|
||||
when 'debian'
|
||||
default['nginx']['upstream_repository'] = "http://nginx.org/packages/#{node['platform']}"
|
||||
end
|
||||
8
cookbooks/nginx/attributes/set_misc.rb
Normal file
8
cookbooks/nginx/attributes/set_misc.rb
Normal file
@@ -0,0 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Attributes:: set_misc
|
||||
#
|
||||
|
||||
default['nginx']['set_misc']['version'] = '0.24'
|
||||
default['nginx']['set_misc']['url'] = "https://github.com/agentzh/set-misc-nginx-module/archive/v#{node['nginx']['set_misc']['version']}.tar.gz"
|
||||
default['nginx']['set_misc']['checksum'] = 'da404a7dac5fa4a0a86f42b4ec7648b607f4cd66'
|
||||
13
cookbooks/nginx/attributes/socketproxy.rb
Normal file
13
cookbooks/nginx/attributes/socketproxy.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
default['nginx']['socketproxy']['root'] = '/usr/share/nginx/apps'
|
||||
default['nginx']['socketproxy']['app_owner'] = 'root'
|
||||
default['nginx']['socketproxy']['logname'] = 'socketproxy'
|
||||
default['nginx']['socketproxy']['log_level'] = 'error'
|
||||
# default['nginx']['socketproxy']['default_app'] = 'default'
|
||||
# default['nginx']['socketproxy']['apps'] = {
|
||||
# 'default' => {
|
||||
# 'prepend_slash' => false,
|
||||
# 'context_name' => '',
|
||||
# 'subdir' => 'current',
|
||||
# 'socket_path' => 'shared/sockets/unicorn.sock'
|
||||
# }
|
||||
# }
|
||||
42
cookbooks/nginx/attributes/source.rb
Normal file
42
cookbooks/nginx/attributes/source.rb
Normal file
@@ -0,0 +1,42 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Attributes:: source
|
||||
#
|
||||
# Author:: Jamie Winsor (<jamie@vialstudios.com>)
|
||||
#
|
||||
# Copyright 2012-2013, Riot Games
|
||||
#
|
||||
# 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_attribute 'nginx::default'
|
||||
|
||||
default['nginx']['source']['version'] = node['nginx']['version']
|
||||
default['nginx']['source']['prefix'] = "/opt/nginx-#{node['nginx']['source']['version']}"
|
||||
default['nginx']['source']['conf_path'] = "#{node['nginx']['dir']}/nginx.conf"
|
||||
default['nginx']['source']['sbin_path'] = "#{node['nginx']['source']['prefix']}/sbin/nginx"
|
||||
default['nginx']['source']['default_configure_flags'] = %W(
|
||||
--prefix=#{node['nginx']['source']['prefix']}
|
||||
--conf-path=#{node['nginx']['dir']}/nginx.conf
|
||||
--sbin-path=#{node['nginx']['source']['sbin_path']}
|
||||
)
|
||||
|
||||
default['nginx']['configure_flags'] = []
|
||||
default['nginx']['source']['version'] = node['nginx']['version']
|
||||
default['nginx']['source']['url'] = "http://nginx.org/download/nginx-#{node['nginx']['source']['version']}.tar.gz"
|
||||
default['nginx']['source']['checksum'] = 'b5608c2959d3e7ad09b20fc8f9e5bd4bc87b3bc8ba5936a513c04ed8f1391a18'
|
||||
default['nginx']['source']['modules'] = %w(
|
||||
nginx::http_ssl_module
|
||||
nginx::http_gzip_static_module
|
||||
)
|
||||
default['nginx']['source']['use_existing_user'] = false
|
||||
22
cookbooks/nginx/attributes/status.rb
Normal file
22
cookbooks/nginx/attributes/status.rb
Normal file
@@ -0,0 +1,22 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Attributes:: status
|
||||
#
|
||||
# Author:: David Radcliffe (<radcliffe.david@gmail.com>)
|
||||
#
|
||||
# Copyright 2013, David Radcliffe
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['nginx']['status']['port'] = '8090'
|
||||
24
cookbooks/nginx/attributes/syslog.rb
Normal file
24
cookbooks/nginx/attributes/syslog.rb
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Attributes:: syslog
|
||||
#
|
||||
# Author:: Bob Ziuchkovski (<bob@bz-technology.com>)
|
||||
#
|
||||
# Copyright 2014, UserTesting
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['nginx']['syslog']['git_repo'] = 'https://github.com/yaoweibin/nginx_syslog_patch.git'
|
||||
default['nginx']['syslog']['git_revision'] = 'master'
|
||||
26
cookbooks/nginx/attributes/upload_progress.rb
Normal file
26
cookbooks/nginx/attributes/upload_progress.rb
Normal file
@@ -0,0 +1,26 @@
|
||||
#
|
||||
# Cookbook Name:: nginx
|
||||
# Attributes:: upload_progress
|
||||
#
|
||||
# Author:: Jamie Winsor (<jamie@vialstudios.com>)
|
||||
#
|
||||
# Copyright 2012, Riot Games
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
default['nginx']['upload_progress']['url'] = 'https://github.com/masterzen/nginx-upload-progress-module/tarball/v0.9.0'
|
||||
default['nginx']['upload_progress']['checksum'] = '3fb903dab595cf6656fa0fc5743a48daffbba2f6b5c554836be630800eaad4e2'
|
||||
default['nginx']['upload_progress']['javascript_output'] = true
|
||||
default['nginx']['upload_progress']['zone_name'] = 'proxied'
|
||||
default['nginx']['upload_progress']['zone_size'] = '1m'
|
||||
Reference in New Issue
Block a user