agile_solo 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +22 -0
- data/Gemfile +4 -0
- data/LICENSE +20 -0
- data/README.md +90 -0
- data/Rakefile +1 -0
- data/agile_solo.gemspec +30 -0
- data/lib/agile_solo.rb +13 -0
- data/lib/agile_solo/application/solo.rb +20 -0
- data/lib/agile_solo/command.rb +17 -0
- data/lib/agile_solo/composite_command.rb +35 -0
- data/lib/agile_solo/config.rb +13 -0
- data/lib/agile_solo/consumer.rb +41 -0
- data/lib/agile_solo/server.rb +19 -0
- data/lib/agile_solo/version.rb +3 -0
- data/spec/agile_solo/command_spec.rb +15 -0
- data/spec/agile_solo/composite_command_spec.rb +31 -0
- data/spec/agile_solo/config_spec.rb +8 -0
- data/spec/agile_solo/consumer_spec.rb +52 -0
- data/spec/agile_solo/server_spec.rb +35 -0
- data/spec/chef_repo/.chef/knife.rb +6 -0
- data/spec/chef_repo/.gitignore +3 -0
- data/spec/chef_repo/.gitmodules +3 -0
- data/spec/chef_repo/.librarian/chef/config +3 -0
- data/spec/chef_repo/Cheffile +11 -0
- data/spec/chef_repo/Cheffile.lock +33 -0
- data/spec/chef_repo/README.md +92 -0
- data/spec/chef_repo/README_APP.md +23 -0
- data/spec/chef_repo/Rakefile +5 -0
- data/spec/chef_repo/chefignore +11 -0
- data/spec/chef_repo/cookbooks/apache/CHANGES.md +9 -0
- data/spec/chef_repo/cookbooks/apache/README.md +64 -0
- data/spec/chef_repo/cookbooks/apache/metadata.json +32 -0
- data/spec/chef_repo/cookbooks/apache/metadata.rb +11 -0
- data/spec/chef_repo/cookbooks/apache/providers/fastcgi.rb +116 -0
- data/spec/chef_repo/cookbooks/apache/recipes/default.rb +8 -0
- data/spec/chef_repo/cookbooks/apache/resources/fastcgi.rb +14 -0
- data/spec/chef_repo/cookbooks/apache/templates/default/fast-cgi-vhost.erb +41 -0
- data/spec/chef_repo/cookbooks/apache2/.gitignore +3 -0
- data/spec/chef_repo/cookbooks/apache2/CHANGELOG.md +158 -0
- data/spec/chef_repo/cookbooks/apache2/CONTRIBUTING.md +257 -0
- data/spec/chef_repo/cookbooks/apache2/Gemfile +10 -0
- data/spec/chef_repo/cookbooks/apache2/LICENSE +201 -0
- data/spec/chef_repo/cookbooks/apache2/README.md +581 -0
- data/spec/chef_repo/cookbooks/apache2/attributes/default.rb +153 -0
- data/spec/chef_repo/cookbooks/apache2/attributes/mod_auth_cas.rb +2 -0
- data/spec/chef_repo/cookbooks/apache2/attributes/mod_auth_openid.rb +32 -0
- data/spec/chef_repo/cookbooks/apache2/attributes/mod_ssl.rb +19 -0
- data/spec/chef_repo/cookbooks/apache2/definitions/apache_conf.rb +26 -0
- data/spec/chef_repo/cookbooks/apache2/definitions/apache_module.rb +53 -0
- data/spec/chef_repo/cookbooks/apache2/definitions/apache_site.rb +43 -0
- data/spec/chef_repo/cookbooks/apache2/definitions/web_app.rb +50 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/apache2_module_conf_generate.pl +41 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/default_test.rb +77 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/god_monitor_test.rb +34 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_apreq2_test.rb +19 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_auth_cas_test.rb +11 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_auth_openid_test.rb +37 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_cgi_test.rb +13 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_dav_svn_test.rb +14 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_fastcgi.rb +11 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_include_test.rb +15 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_perl_test.rb +18 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_php5_test.rb +13 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_python_test.rb +10 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_ssl_test.rb +28 -0
- data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/support/helpers.rb +65 -0
- data/spec/chef_repo/cookbooks/apache2/metadata.json +527 -0
- data/spec/chef_repo/cookbooks/apache2/metadata.rb +213 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/default.rb +223 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/god_monitor.rb +33 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/iptables.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/logrotate.rb +31 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_alias.rb +22 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_apreq2.rb +54 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_auth_basic.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_auth_cas.rb +59 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_auth_digest.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_auth_openid.rb +125 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_authn_file.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_authnz_ldap.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_authz_default.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_authz_groupfile.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_authz_host.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_authz_user.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_autoindex.rb +22 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_cgi.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_dav.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_dav_fs.rb +21 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_dav_svn.rb +41 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_deflate.rb +22 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_dir.rb +22 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_env.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_expires.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_fastcgi.rb +26 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_fcgid.rb +55 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_headers.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_include.rb +22 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_ldap.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_log_config.rb +24 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_logio.rb +24 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_mime.rb +22 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_negotiation.rb +22 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_perl.rb +44 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_php5.rb +78 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_proxy.rb +22 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_proxy_ajp.rb +21 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_proxy_balancer.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_proxy_connect.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_proxy_http.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_python.rb +37 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_rewrite.rb +20 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_setenvif.rb +22 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_ssl.rb +46 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_status.rb +22 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_wsgi.rb +38 -0
- data/spec/chef_repo/cookbooks/apache2/recipes/mod_xsendfile.rb +38 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/a2dismod.erb +22 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/a2dissite.erb +29 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/a2enmod.erb +37 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/a2ensite.erb +38 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/apache2.conf.erb +238 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/apache2.god.erb +19 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/charset.erb +6 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/default-site.erb +57 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/etc-sysconfig-httpd.erb +31 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/README +2 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/alias.conf.erb +24 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/auth_cas.conf.erb +1 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/auth_cas.load.erb +1 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/authopenid.load.erb +1 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/autoindex.conf.erb +101 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/deflate.conf.erb +16 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/dir.conf.erb +5 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/fastcgi.conf.erb +5 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/fcgid.conf.erb +10 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/include.conf.erb +4 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/include.erb +4 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/mime.conf.erb +198 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/negotiation.conf.erb +18 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/php5.conf.erb +16 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/proxy.conf.erb +19 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/setenvif.conf.erb +28 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/ssl.conf.erb +77 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/mods/status.conf.erb +26 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/port_apache.erb +3 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/ports.conf.erb +6 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/security.erb +50 -0
- data/spec/chef_repo/cookbooks/apache2/templates/default/web_app.conf.erb +47 -0
- data/spec/chef_repo/cookbooks/apt/.gitignore +14 -0
- data/spec/chef_repo/cookbooks/apt/.kitchen.yml +33 -0
- data/spec/chef_repo/cookbooks/apt/Berksfile +8 -0
- data/spec/chef_repo/cookbooks/apt/CHANGELOG.md +79 -0
- data/spec/chef_repo/cookbooks/apt/CONTRIBUTING +29 -0
- data/spec/chef_repo/cookbooks/apt/LICENSE +201 -0
- data/spec/chef_repo/cookbooks/apt/README.md +238 -0
- data/spec/chef_repo/cookbooks/apt/TESTING.md +25 -0
- data/spec/chef_repo/cookbooks/apt/attributes/default.rb +3 -0
- data/spec/chef_repo/cookbooks/apt/files/default/apt-proxy-v2.conf +50 -0
- data/spec/chef_repo/cookbooks/apt/metadata.json +34 -0
- data/spec/chef_repo/cookbooks/apt/metadata.rb +14 -0
- data/spec/chef_repo/cookbooks/apt/providers/preference.rb +61 -0
- data/spec/chef_repo/cookbooks/apt/providers/repository.rb +138 -0
- data/spec/chef_repo/cookbooks/apt/recipes/cacher-client.rb +59 -0
- data/spec/chef_repo/cookbooks/apt/recipes/cacher-ng.rb +38 -0
- data/spec/chef_repo/cookbooks/apt/recipes/default.rb +68 -0
- data/spec/chef_repo/cookbooks/apt/resources/preference.rb +30 -0
- data/spec/chef_repo/cookbooks/apt/resources/repository.rb +40 -0
- data/spec/chef_repo/cookbooks/apt/templates/default/01proxy.erb +2 -0
- data/spec/chef_repo/cookbooks/apt/templates/default/acng.conf.erb +276 -0
- data/spec/chef_repo/cookbooks/apt/templates/ubuntu-10.04/acng.conf.erb +270 -0
- data/spec/chef_repo/cookbooks/build-essential/.gitignore +4 -0
- data/spec/chef_repo/cookbooks/build-essential/.kitchen.yml +42 -0
- data/spec/chef_repo/cookbooks/build-essential/Berksfile +3 -0
- data/spec/chef_repo/cookbooks/build-essential/CHANGELOG.md +42 -0
- data/spec/chef_repo/cookbooks/build-essential/CONTRIBUTING +29 -0
- data/spec/chef_repo/cookbooks/build-essential/LICENSE +201 -0
- data/spec/chef_repo/cookbooks/build-essential/README.md +139 -0
- data/spec/chef_repo/cookbooks/build-essential/TESTING.md +25 -0
- data/spec/chef_repo/cookbooks/build-essential/attributes/default.rb +33 -0
- data/spec/chef_repo/cookbooks/build-essential/metadata.json +44 -0
- data/spec/chef_repo/cookbooks/build-essential/metadata.rb +16 -0
- data/spec/chef_repo/cookbooks/build-essential/recipes/debian.rb +45 -0
- data/spec/chef_repo/cookbooks/build-essential/recipes/default.rb +24 -0
- data/spec/chef_repo/cookbooks/build-essential/recipes/fedora.rb +36 -0
- data/spec/chef_repo/cookbooks/build-essential/recipes/mac_os_x.rb +40 -0
- data/spec/chef_repo/cookbooks/build-essential/recipes/rhel.rb +43 -0
- data/spec/chef_repo/cookbooks/build-essential/recipes/smartos.rb +36 -0
- data/spec/chef_repo/cookbooks/build-essential/recipes/solaris2.rb +42 -0
- data/spec/chef_repo/cookbooks/build-essential/recipes/suse.rb +36 -0
- data/spec/chef_repo/cookbooks/install_from/README.md +51 -0
- data/spec/chef_repo/cookbooks/install_from/attributes/default.rb +2 -0
- data/spec/chef_repo/cookbooks/install_from/metadata.json +46 -0
- data/spec/chef_repo/cookbooks/install_from/metadata.rb +19 -0
- data/spec/chef_repo/cookbooks/install_from/providers/release.rb +143 -0
- data/spec/chef_repo/cookbooks/install_from/recipes/default.rb +26 -0
- data/spec/chef_repo/cookbooks/install_from/resources/release.rb +121 -0
- data/spec/chef_repo/cookbooks/metachef/.rspec +3 -0
- data/spec/chef_repo/cookbooks/metachef/.watchr +20 -0
- data/spec/chef_repo/cookbooks/metachef/Gemfile +15 -0
- data/spec/chef_repo/cookbooks/metachef/README.md +97 -0
- data/spec/chef_repo/cookbooks/metachef/attributes/default.rb +18 -0
- data/spec/chef_repo/cookbooks/metachef/definitions/daemon_user.rb +68 -0
- data/spec/chef_repo/cookbooks/metachef/definitions/kill_old_service.rb +35 -0
- data/spec/chef_repo/cookbooks/metachef/definitions/standard_dirs.rb +54 -0
- data/spec/chef_repo/cookbooks/metachef/libraries/aspect.rb +125 -0
- data/spec/chef_repo/cookbooks/metachef/libraries/aspects.rb +170 -0
- data/spec/chef_repo/cookbooks/metachef/libraries/attr_struct.rb +160 -0
- data/spec/chef_repo/cookbooks/metachef/libraries/component.rb +164 -0
- data/spec/chef_repo/cookbooks/metachef/libraries/cookbook_utils.rb +69 -0
- data/spec/chef_repo/cookbooks/metachef/libraries/discovery.rb +124 -0
- data/spec/chef_repo/cookbooks/metachef/libraries/discovery_lol.rb +55 -0
- data/spec/chef_repo/cookbooks/metachef/libraries/dump_aspects.rb +83 -0
- data/spec/chef_repo/cookbooks/metachef/libraries/metachef.rb +18 -0
- data/spec/chef_repo/cookbooks/metachef/libraries/node_utils.rb +91 -0
- data/spec/chef_repo/cookbooks/metachef/metadata.json +102 -0
- data/spec/chef_repo/cookbooks/metachef/metadata.rb +39 -0
- data/spec/chef_repo/cookbooks/metachef/recipes/default.rb +22 -0
- data/spec/chef_repo/cookbooks/nginx/.gitignore +9 -0
- data/spec/chef_repo/cookbooks/nginx/.kitchen.yml +62 -0
- data/spec/chef_repo/cookbooks/nginx/Berksfile +7 -0
- data/spec/chef_repo/cookbooks/nginx/CHANGELOG.md +158 -0
- data/spec/chef_repo/cookbooks/nginx/CONTRIBUTING.md +257 -0
- data/spec/chef_repo/cookbooks/nginx/LICENSE +201 -0
- data/spec/chef_repo/cookbooks/nginx/README.md +398 -0
- data/spec/chef_repo/cookbooks/nginx/TESTING.md +25 -0
- data/spec/chef_repo/cookbooks/nginx/attributes/default.rb +89 -0
- data/spec/chef_repo/cookbooks/nginx/attributes/echo.rb +10 -0
- data/spec/chef_repo/cookbooks/nginx/attributes/geoip.rb +30 -0
- data/spec/chef_repo/cookbooks/nginx/attributes/headers_more.rb +22 -0
- data/spec/chef_repo/cookbooks/nginx/attributes/naxsi.rb +24 -0
- data/spec/chef_repo/cookbooks/nginx/attributes/repo.rb +30 -0
- data/spec/chef_repo/cookbooks/nginx/attributes/source.rb +41 -0
- data/spec/chef_repo/cookbooks/nginx/attributes/upload_progress.rb +23 -0
- data/spec/chef_repo/cookbooks/nginx/chefignore +96 -0
- data/spec/chef_repo/cookbooks/nginx/definitions/nginx_site.rb +41 -0
- data/spec/chef_repo/cookbooks/nginx/files/default/mime.types +74 -0
- data/spec/chef_repo/cookbooks/nginx/files/default/naxsi_core.rules +82 -0
- data/spec/chef_repo/cookbooks/nginx/files/default/tests/minitest/default_test.rb +12 -0
- data/spec/chef_repo/cookbooks/nginx/files/default/tests/minitest/source_test.rb +9 -0
- data/spec/chef_repo/cookbooks/nginx/files/default/tests/minitest/support/helpers.rb +7 -0
- data/spec/chef_repo/cookbooks/nginx/metadata.json +315 -0
- data/spec/chef_repo/cookbooks/nginx/metadata.rb +113 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/authorized_ips.rb +37 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/commons.rb +23 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/commons_conf.rb +40 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/commons_dir.rb +41 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/commons_script.rb +28 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/default.rb +46 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/headers_more_module.rb +54 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/http_echo_module.rb +46 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/http_geoip_module.rb +116 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/http_gzip_static_module.rb +23 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/http_realip_module.rb +42 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/http_ssl_module.rb +23 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/http_stub_status_module.rb +36 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/ipv6.rb +22 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/naxsi_module.rb +53 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/ohai_plugin.rb +39 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/passenger.rb +81 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/repo.rb +42 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/source.rb +204 -0
- data/spec/chef_repo/cookbooks/nginx/recipes/upload_progress_module.rb +46 -0
- data/spec/chef_repo/cookbooks/nginx/templates/debian/nginx.init.erb +97 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/default-site.erb +11 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/modules/authorized_ip.erb +6 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/modules/http_geoip.conf.erb +4 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/modules/http_realip.conf.erb +4 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/modules/nginx_status.erb +14 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/modules/passenger.conf.erb +10 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/nginx-upstart.conf.erb +40 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/nginx.conf.erb +69 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/nginx.init.erb +111 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/nginx.pill.erb +15 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/nginx.sysconfig.erb +1 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/nxdissite.erb +29 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/nxensite.erb +38 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/plugins/nginx.rb.erb +66 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/sv-nginx-log-run.erb +2 -0
- data/spec/chef_repo/cookbooks/nginx/templates/default/sv-nginx-run.erb +3 -0
- data/spec/chef_repo/cookbooks/nginx/templates/gentoo/nginx.init.erb +87 -0
- data/spec/chef_repo/cookbooks/nginx/templates/ubuntu/nginx.init.erb +97 -0
- data/spec/chef_repo/cookbooks/ohai/CHANGELOG.md +27 -0
- data/spec/chef_repo/cookbooks/ohai/CONTRIBUTING +29 -0
- data/spec/chef_repo/cookbooks/ohai/LICENSE +201 -0
- data/spec/chef_repo/cookbooks/ohai/README.md +49 -0
- data/spec/chef_repo/cookbooks/ohai/attributes/default.rb +29 -0
- data/spec/chef_repo/cookbooks/ohai/files/default/plugins/README +1 -0
- data/spec/chef_repo/cookbooks/ohai/metadata.json +60 -0
- data/spec/chef_repo/cookbooks/ohai/metadata.rb +23 -0
- data/spec/chef_repo/cookbooks/ohai/recipes/default.rb +54 -0
- data/spec/chef_repo/cookbooks/redis/README.md +76 -0
- data/spec/chef_repo/cookbooks/redis/attributes/default.rb +51 -0
- data/spec/chef_repo/cookbooks/redis/metadata.json +304 -0
- data/spec/chef_repo/cookbooks/redis/metadata.rb +112 -0
- data/spec/chef_repo/cookbooks/redis/recipes/client.rb +23 -0
- data/spec/chef_repo/cookbooks/redis/recipes/default.rb +34 -0
- data/spec/chef_repo/cookbooks/redis/recipes/install_from_package.rb +26 -0
- data/spec/chef_repo/cookbooks/redis/recipes/install_from_release.rb +30 -0
- data/spec/chef_repo/cookbooks/redis/recipes/server.rb +42 -0
- data/spec/chef_repo/cookbooks/redis/templates/default/redis.conf.erb +136 -0
- data/spec/chef_repo/cookbooks/redis/templates/default/sv-redis_server-log-run.erb +2 -0
- data/spec/chef_repo/cookbooks/redis/templates/default/sv-redis_server-run.erb +6 -0
- data/spec/chef_repo/cookbooks/runit/.gitignore +17 -0
- data/spec/chef_repo/cookbooks/runit/.kitchen.yml +53 -0
- data/spec/chef_repo/cookbooks/runit/Berksfile +12 -0
- data/spec/chef_repo/cookbooks/runit/CHANGELOG.md +97 -0
- data/spec/chef_repo/cookbooks/runit/CONTRIBUTING.md +257 -0
- data/spec/chef_repo/cookbooks/runit/Gemfile +8 -0
- data/spec/chef_repo/cookbooks/runit/LICENSE +201 -0
- data/spec/chef_repo/cookbooks/runit/README.md +448 -0
- data/spec/chef_repo/cookbooks/runit/Rakefile +17 -0
- data/spec/chef_repo/cookbooks/runit/attributes/default.rb +77 -0
- data/spec/chef_repo/cookbooks/runit/files/default/runit-2.1.1.tar.gz +0 -0
- data/spec/chef_repo/cookbooks/runit/files/default/runit.seed +1 -0
- data/spec/chef_repo/cookbooks/runit/files/default/runsvdir +0 -0
- data/spec/chef_repo/cookbooks/runit/files/ubuntu-6.10/runsvdir +6 -0
- data/spec/chef_repo/cookbooks/runit/files/ubuntu-7.04/runsvdir +7 -0
- data/spec/chef_repo/cookbooks/runit/files/ubuntu-7.10/runsvdir +7 -0
- data/spec/chef_repo/cookbooks/runit/files/ubuntu-8.04/runsvdir +7 -0
- data/spec/chef_repo/cookbooks/runit/libraries/default.rb +0 -0
- data/spec/chef_repo/cookbooks/runit/libraries/provider_runit_service.rb +428 -0
- data/spec/chef_repo/cookbooks/runit/libraries/resource_runit_service.rb +185 -0
- data/spec/chef_repo/cookbooks/runit/metadata.rb +16 -0
- data/spec/chef_repo/cookbooks/runit/recipes/default.rb +124 -0
- data/spec/chef_repo/cookbooks/runit/templates/debian/init.d.erb +66 -0
- data/spec/chef_repo/cookbooks/runit/templates/gentoo/runit-start.sh.erb +32 -0
- data/spec/chef_repo/cookbooks/yum/.gitignore +14 -0
- data/spec/chef_repo/cookbooks/yum/.kitchen.yml +22 -0
- data/spec/chef_repo/cookbooks/yum/Berksfile +7 -0
- data/spec/chef_repo/cookbooks/yum/CHANGELOG.md +97 -0
- data/spec/chef_repo/cookbooks/yum/CONTRIBUTING.md +257 -0
- data/spec/chef_repo/cookbooks/yum/LICENSE +201 -0
- data/spec/chef_repo/cookbooks/yum/README.md +270 -0
- data/spec/chef_repo/cookbooks/yum/attributes/default.rb +30 -0
- data/spec/chef_repo/cookbooks/yum/attributes/elrepo.rb +24 -0
- data/spec/chef_repo/cookbooks/yum/attributes/epel.rb +39 -0
- data/spec/chef_repo/cookbooks/yum/attributes/remi.rb +30 -0
- data/spec/chef_repo/cookbooks/yum/files/default/tests/minitest/default_test.rb +28 -0
- data/spec/chef_repo/cookbooks/yum/files/default/tests/minitest/support/helpers.rb +37 -0
- data/spec/chef_repo/cookbooks/yum/files/default/tests/minitest/test_test.rb +66 -0
- data/spec/chef_repo/cookbooks/yum/metadata.json +100 -0
- data/spec/chef_repo/cookbooks/yum/metadata.rb +37 -0
- data/spec/chef_repo/cookbooks/yum/providers/key.rb +79 -0
- data/spec/chef_repo/cookbooks/yum/providers/repository.rb +124 -0
- data/spec/chef_repo/cookbooks/yum/recipes/default.rb +18 -0
- data/spec/chef_repo/cookbooks/yum/recipes/elrepo.rb +31 -0
- data/spec/chef_repo/cookbooks/yum/recipes/epel.rb +35 -0
- data/spec/chef_repo/cookbooks/yum/recipes/ius.rb +42 -0
- data/spec/chef_repo/cookbooks/yum/recipes/remi.rb +35 -0
- data/spec/chef_repo/cookbooks/yum/recipes/repoforge.rb +41 -0
- data/spec/chef_repo/cookbooks/yum/recipes/test.rb +39 -0
- data/spec/chef_repo/cookbooks/yum/recipes/yum.rb +23 -0
- data/spec/chef_repo/cookbooks/yum/resources/key.rb +29 -0
- data/spec/chef_repo/cookbooks/yum/resources/repository.rb +41 -0
- data/spec/chef_repo/cookbooks/yum/templates/default/repo.erb +38 -0
- data/spec/chef_repo/cookbooks/yum/templates/default/yum-rhel5.conf.erb +33 -0
- data/spec/chef_repo/cookbooks/yum/templates/default/yum-rhel6.conf.erb +36 -0
- data/spec/chef_repo/data_bags/.gitkeep +0 -0
- data/spec/chef_repo/data_bags/sample/items.json +1 -0
- data/spec/chef_repo/roles/.gitkeep +0 -0
- data/spec/chef_repo/roles/dummy.json +14 -0
- data/spec/chef_repo/site-cookbooks/.gitkeep +0 -0
- data/spec/chef_repo/site-cookbooks/sample/CHANGELOG.md +12 -0
- data/spec/chef_repo/site-cookbooks/sample/README.md +68 -0
- data/spec/chef_repo/site-cookbooks/sample/metadata.rb +7 -0
- data/spec/chef_repo/site-cookbooks/sample/recipes/default.rb +18 -0
- data/spec/chef_repo/solo.rb +3 -0
- data/spec/fixtures/items.json +1 -0
- data/spec/spec_helper.rb +32 -0
- metadata +880 -0
@@ -0,0 +1,398 @@
|
|
1
|
+
Description
|
2
|
+
===========
|
3
|
+
|
4
|
+
Installs nginx from package OR source code and sets up configuration
|
5
|
+
handling similar to Debian's Apache2 scripts.
|
6
|
+
|
7
|
+
Requirements
|
8
|
+
============
|
9
|
+
|
10
|
+
Cookbooks
|
11
|
+
---------
|
12
|
+
|
13
|
+
The following cookbooks are direct dependencies because they're used
|
14
|
+
for common "default" functionality.
|
15
|
+
|
16
|
+
* build-essential (for nginx::source)
|
17
|
+
* ohai (for nginx::ohai_plugin)
|
18
|
+
|
19
|
+
The following cookbook is not a strict dependency because its use can
|
20
|
+
be controlled by an attribute, so it may not be a common "default."
|
21
|
+
|
22
|
+
* runit (for nginx::source)
|
23
|
+
|
24
|
+
On RHEL family distros, the "yum" cookbook is required for "`recipe[yum::epel]`".
|
25
|
+
|
26
|
+
On Ubuntu, when using Nginx.org's stable package, "`recipe[apt]`"
|
27
|
+
is required.
|
28
|
+
|
29
|
+
Platform
|
30
|
+
--------
|
31
|
+
|
32
|
+
The following platforms are supported and tested under test kitchen:
|
33
|
+
|
34
|
+
* Ubuntu 10.04, Ubuntu 12.04
|
35
|
+
* CentOS 5.8, 6.3
|
36
|
+
|
37
|
+
Other Debian and RHEL family distributions are assumed to work.
|
38
|
+
|
39
|
+
Attributes
|
40
|
+
==========
|
41
|
+
|
42
|
+
Node attributes for this cookbook are logically separated into
|
43
|
+
different files. Some attributes are set only via a specific recipe.
|
44
|
+
|
45
|
+
## default.rb
|
46
|
+
|
47
|
+
Generally used attributes. Some have platform specific values. See
|
48
|
+
`attributes/default.rb`. "The Config" refers to "nginx.conf" the main
|
49
|
+
config file.
|
50
|
+
|
51
|
+
**v0.101.0 - Attribute Change**: `node['nginx']['url']` is now
|
52
|
+
`node['nginx']['source']['url']` as the URL was only used when
|
53
|
+
retrieving the source to build Nginx.
|
54
|
+
|
55
|
+
* `node['nginx']['dir']` - Location for Nginx configuration.
|
56
|
+
* `node['nginx']['log_dir']` - Location for Nginx logs.
|
57
|
+
* `node['nginx']['user']` - User that Nginx will run as.
|
58
|
+
* `node['nginx']['group]` - Group for Nginx.
|
59
|
+
* `node['nginx']['binary']` - Path to the Nginx binary.
|
60
|
+
* `node['nginx']['init_style']` - How to run Nginx as a service when
|
61
|
+
using `nginx::source`. Values can be "runit", "upstart", "init" or
|
62
|
+
"bluepill". When using runit or bluepill, those recipes will be
|
63
|
+
included as well and are dependencies of this cookbook. Recipes
|
64
|
+
are not included for upstart, it is assumed that upstart is built
|
65
|
+
into the platform you are using (ubuntu or el6). This attribute is
|
66
|
+
not used in the `nginx` recipe because the package manager's init
|
67
|
+
script style for the platform is assumed. Upstart is never set as
|
68
|
+
a default as this represents a change in behavior, if you are running
|
69
|
+
ubuntu or el6 and want to use upstart, please set this attribute in
|
70
|
+
a role or similar.
|
71
|
+
* `node['nginx']['upstart']['foreground']` - Set this to true if you
|
72
|
+
want upstart to run nginx in the foreground, set to false if you
|
73
|
+
want upstart to detach and track the process via pid.
|
74
|
+
* `node['nginx']['upstart']['runlevels']` - String of runlevels in the
|
75
|
+
format '2345' which determines which runlevels nginx will start at
|
76
|
+
when entering and stop at when leaving.
|
77
|
+
* `node['nginx']['upstart']['respawn_limit']` - Respawn limit in upstart
|
78
|
+
stanza format, count followed by space followed by interval in seconds.
|
79
|
+
* `node['nginx']['pid']` - Location of the PID file.
|
80
|
+
* `node['nginx']['keepalive']` - Whether to use `keepalive_timeout`,
|
81
|
+
any value besides "on" will leave that option out of the config.
|
82
|
+
* `node['nginx']['keepalive_timeout']` - used for config value of
|
83
|
+
`keepalive_timeout`.
|
84
|
+
* `node['nginx']['worker_processes']` - used for config value of
|
85
|
+
`worker_processes`.
|
86
|
+
* `node['nginx']['worker_connections']` - used for config value of
|
87
|
+
`events { worker_connections }`
|
88
|
+
* `node['nginx']['worker_rlimit_nofile']` - used for config value of
|
89
|
+
`worker_rlimit_nofile`. Can replace any "ulimit -n" command. The
|
90
|
+
value depend on your usage (cache or not) but must always be
|
91
|
+
superior than worker_connections.
|
92
|
+
* `node['nginx']['multi_accept']` - used for config value of `events {
|
93
|
+
multi_accept }`. Try to accept() as many connections as possible.
|
94
|
+
Disable by default.
|
95
|
+
* `node['nginx']['event']` - used for config value of `events { use
|
96
|
+
}`. Set the event-model. By default nginx looks for the most
|
97
|
+
suitable method for your OS.
|
98
|
+
* `node['nginx']['server_names_hash_bucket_size']` - used for config
|
99
|
+
value of `server_names_hash_bucket_size`.
|
100
|
+
* `node['nginx']['disable_access_log']` - set to true to disable the
|
101
|
+
general access log, may be useful on high traffic sites.
|
102
|
+
* `node['nginx']['default_site_enabled']` - enable the default site
|
103
|
+
* `node['nginx']['sendfile']` - Whether to use `sendfile`. Defaults to "on".
|
104
|
+
* `node['nginx']['install_method']` - Whether nginx is installed from
|
105
|
+
packages or from source.
|
106
|
+
* `node['nginx']['types_hash_max_size']` - Used for the
|
107
|
+
`types_hash_max_size` configuration directive.
|
108
|
+
* `node['nginx']['types_hash_bucket_size']` - Used for the
|
109
|
+
`types_hash_bucket_size` configuration directive.
|
110
|
+
* `node['nginx']['proxy_read_timeout']` - defines a timeout (between two
|
111
|
+
successive read operations) for reading a response from the proxied server.
|
112
|
+
* `node['nginx']['client_max_body_size']` - specifies the maximum accepted body
|
113
|
+
size of a client request, as indicated by the request header Content-Length.
|
114
|
+
|
115
|
+
### Attributes for configuring the gzip module
|
116
|
+
|
117
|
+
* `node['nginx']['gzip']` - Whether to use gzip, can be "on" or "off"
|
118
|
+
* `node['nginx']['gzip_http_version']` - used for config value of `gzip_http_version`.
|
119
|
+
* `node['nginx']['gzip_comp_level']` - used for config value of `gzip_comp_level`.
|
120
|
+
* `node['nginx']['gzip_proxied']` - used for config value of `gzip_proxied`.
|
121
|
+
* `node['nginx']['gzip_types']` - used for config value of `gzip_types` - must be an Array.
|
122
|
+
|
123
|
+
### Attributes set in recipes
|
124
|
+
|
125
|
+
*nginx::source*
|
126
|
+
|
127
|
+
* `node['nginx']['daemon_disable']` - Whether the daemon should be
|
128
|
+
disabled which can be true or false; disable the daemon (run in the
|
129
|
+
foreground) when using a service supervisor such as runit or
|
130
|
+
bluepill for "init_style". This is automatically set in the
|
131
|
+
`nginx::source` recipe when the init style is not bluepill or runit.
|
132
|
+
|
133
|
+
*nginx::authorized_ips*
|
134
|
+
|
135
|
+
* `node['nginx']['remote_ip_var']` - The remote ip variable name to
|
136
|
+
use.
|
137
|
+
* `node['nginx']['authorized_ips']` - IPs authorized by the module
|
138
|
+
|
139
|
+
*nginx::http_realip_module*
|
140
|
+
|
141
|
+
From: http://wiki.nginx.org/HttpRealIpModule
|
142
|
+
|
143
|
+
* `node['nginx']['realip']['header']` - Header to use for the RealIp
|
144
|
+
Module; only accepts "X-Forwarded-For" or "X-Real-IP"
|
145
|
+
* `node['nginx']['realip']['addresses']` - Addresses to use for the
|
146
|
+
`http_realip` configuration.
|
147
|
+
|
148
|
+
## source.rb
|
149
|
+
|
150
|
+
These attributes are used in the `nginx::source` recipe. Some of them
|
151
|
+
are dynamically modified during the run. See `attributes/source.rb`
|
152
|
+
for default values.
|
153
|
+
|
154
|
+
* `node['nginx']['source']['url']` - (versioned) URL for the Nginx
|
155
|
+
source code. By default this will use the version specified as
|
156
|
+
`node['nginx']['version'].
|
157
|
+
* `node['nginx']['source']['prefix']` - (versioned) prefix for
|
158
|
+
installing nginx from source
|
159
|
+
* `node['nginx']['source']['conf_path']` - location of the main config
|
160
|
+
file, in `node['nginx']['dir']` by default.
|
161
|
+
* `node['nginx']['source']['modules']` - Array of modules that should
|
162
|
+
be compiled into Nginx by including their recipes in
|
163
|
+
`nginx::source`.
|
164
|
+
* `node['nginx']['source']['default_configure_flags']` - The default
|
165
|
+
flags passed to the configure script when building Nginx.
|
166
|
+
* `node['nginx']['configure_flags']` - Preserved for compatibility and
|
167
|
+
dynamically generated from the
|
168
|
+
`node['nginx']['source']['default_configure_flags']` in the
|
169
|
+
`nginx::source` recipe.
|
170
|
+
|
171
|
+
## geoip.rb
|
172
|
+
|
173
|
+
These attributes are used in the `nginx::http_geoip_module` recipe.
|
174
|
+
Please note that the `country_dat_checksum` and `city_dat_checksum`
|
175
|
+
are based on downloads from a datacenter in Fremont, CA, USA. You
|
176
|
+
really should override these with checksums for the geo tarballs from
|
177
|
+
your node location.
|
178
|
+
|
179
|
+
**Note** The upstream, maxmind.com, may block access for repeated
|
180
|
+
downloads of the data files. It is recommended that you download and
|
181
|
+
host the data files, and change the URLs in the attributes.
|
182
|
+
|
183
|
+
* `node['nginx']['geoip']['path']` - Location where to install the
|
184
|
+
geoip libraries.
|
185
|
+
* `node['nginx']['geoip']['enable_city']` - Whether to enable City
|
186
|
+
data
|
187
|
+
* `node['nginx']['geoip']['country_dat_url']` - Country data tarball
|
188
|
+
URL
|
189
|
+
* `node['nginx']['geoip']['country_dat_checksum']` - Country data
|
190
|
+
tarball checksum
|
191
|
+
* `node['nginx']['geoip']['city_dat_url']` - City data tarball URL
|
192
|
+
* `node['nginx']['geoip']['city_dat_checksum']` - City data tarball
|
193
|
+
checksum
|
194
|
+
* `node['nginx']['geoip']['lib_version']` - Version of the GeoIP
|
195
|
+
library to install
|
196
|
+
* `node['nginx']['geoip']['lib_url']` - (Versioned) Tarball URL of the
|
197
|
+
GeoIP library
|
198
|
+
* `node['nginx']['geoip']['lib_checksum']` - Checksum of the GeoIP
|
199
|
+
library tarball
|
200
|
+
|
201
|
+
## upload_progress.rb
|
202
|
+
|
203
|
+
These attributes are used in the `nginx::upload_progress_module`
|
204
|
+
recipe.
|
205
|
+
|
206
|
+
* `node['nginx']['upload_progress']['url']` - URL for the tarball.
|
207
|
+
* `node['nginx']['upload_progress']['checksum']` - Checksum of the
|
208
|
+
tarball.
|
209
|
+
|
210
|
+
## passenger.rb
|
211
|
+
|
212
|
+
These attributes are used in the `nginx::passenger` recipe.
|
213
|
+
|
214
|
+
* `node['nginx']['passenger']['version']` - passenger gem version
|
215
|
+
* `node['nginx']['passenger']['root']` - passenger gem root path
|
216
|
+
* `node['nginx']['passenger']['max_pool_size']` - maximum passenger
|
217
|
+
pool size (default=10)
|
218
|
+
* `node['nginx']['passenger']['ruby']` - Ruby path for Passenger to
|
219
|
+
use (default=`$(which ruby)`)
|
220
|
+
* `node['nginx']['passenger']['spawn_method']` - passenger spawn
|
221
|
+
method to use (default=`smart-lv2`)
|
222
|
+
* `node['nginx']['passenger']['use_global_queue']` - turns on or off
|
223
|
+
global queuing (default=`on`)
|
224
|
+
* `node['nginx']['passenger']['buffer_response']` - turns on or off
|
225
|
+
response buffering (default=`on`)
|
226
|
+
* `node['nginx']['passenger']['max_pool_size']` - passenger maximum
|
227
|
+
pool size (default=`6`)
|
228
|
+
* `node['nginx']['passenger']['min_instances']` - minimum instances
|
229
|
+
(default=`1`)
|
230
|
+
* `node['nginx']['passenger']['max_instances_per_app']` - maximum
|
231
|
+
instances per app (default=`0`)
|
232
|
+
* `node['nginx']['passenger']['pool_idle_time']` - passenger pool idle
|
233
|
+
time (default=`300`)
|
234
|
+
* `node['nginx']['passenger']['max_requests']` - maximum requests
|
235
|
+
(default=`0`)
|
236
|
+
|
237
|
+
## echo.rb
|
238
|
+
|
239
|
+
These attributes are used in the `nginx::http_echo_module` recipe.
|
240
|
+
|
241
|
+
* `node['nginx']['echo']['version']` - The version of `http_echo` you
|
242
|
+
want (default: 0.40)
|
243
|
+
* `node['nginx']['echo']['url']` - URL for the tarball.
|
244
|
+
* `node['nginx']['echo']['checksum']` - Checksum of the tarball.
|
245
|
+
|
246
|
+
Recipes
|
247
|
+
=======
|
248
|
+
|
249
|
+
This cookbook provides three main recipes for installing Nginx.
|
250
|
+
|
251
|
+
* default.rb: *Use this recipe* if you have a native package for
|
252
|
+
Nginx.
|
253
|
+
* repo.rb: The developer of Nginx also maintain
|
254
|
+
[stable packages](http://nginx.org/en/download.html) for several
|
255
|
+
platforms.
|
256
|
+
* source.rb: *Use this recipe* if you do not have a native package for
|
257
|
+
Nginx, or if you want to install a newer version than is available,
|
258
|
+
or if you have custom module compilation needs.
|
259
|
+
|
260
|
+
Several recipes are related to the `source` recipe specifically. See
|
261
|
+
that recipe's section below for a description.
|
262
|
+
|
263
|
+
## default.rb
|
264
|
+
|
265
|
+
The default recipe will install Nginx as a native package for the
|
266
|
+
system through the package manager and sets up the configuration
|
267
|
+
according to the Debian site enable/disable style with `sites-enabled`
|
268
|
+
using the `nxensite` and `nxdissite` scripts. The nginx service will
|
269
|
+
be managed with the normal init scripts that are presumably included
|
270
|
+
in the native package.
|
271
|
+
|
272
|
+
Includes the `ohai_plugin` recipe so the plugin is available.
|
273
|
+
|
274
|
+
## ohai_plugin.rb
|
275
|
+
|
276
|
+
This recipe provides an Ohai plugin as a template. It is included by
|
277
|
+
both the `default` and `source` recipes.
|
278
|
+
|
279
|
+
## authorized_ips.rb
|
280
|
+
|
281
|
+
Sets up configuration for the `authorized_ip` nginx module.
|
282
|
+
|
283
|
+
## source.rb
|
284
|
+
|
285
|
+
This recipe is responsible for building Nginx from source. It ensures
|
286
|
+
that the required packages to build Nginx are installed (pcre,
|
287
|
+
openssl, compile tools). The source will be downloaded from the
|
288
|
+
`node['nginx']['source']['url']`. The `node['nginx']['user']` will be
|
289
|
+
created as a system user. The appropriate configuration and log
|
290
|
+
directories and config files will be created as well according to the
|
291
|
+
attributes `node['nginx']['dir']` and 'node['nginx']['log_dir']`.
|
292
|
+
|
293
|
+
The recipe attempts to detect whether additional modules should be
|
294
|
+
added to the configure command through recipe inclusion (see below),
|
295
|
+
and whether the version or configuration flags have changed and should
|
296
|
+
trigger a recompile.
|
297
|
+
|
298
|
+
The nginx service will be set up according to
|
299
|
+
`node['nginx']['init_style']`. Available options are:
|
300
|
+
|
301
|
+
* runit: uses runit cookbook and sets up `runit_service`.
|
302
|
+
* bluepill: uses bluepill cookbook and sets up `bluepill_service`.
|
303
|
+
* anything else (e.g., "init") will use the nginx init script
|
304
|
+
template.
|
305
|
+
|
306
|
+
**RHEL/CentOS** This recipe should work on RHEL/CentOS with "init" as
|
307
|
+
the init style.
|
308
|
+
|
309
|
+
The following recipes are used to build module support into Nginx. To
|
310
|
+
use a module in the `nginx::source` recipe, add its recipe name to the
|
311
|
+
attribute `node['nginx']['source']['modules']`.
|
312
|
+
|
313
|
+
* `ipv6.rb` - enables IPv6 support
|
314
|
+
* `http_echo_module.rb` - downloads the `http_echo_module` module and
|
315
|
+
enables it as a module when compiling nginx.
|
316
|
+
* `http_geoip_module.rb` - installs the GeoIP libraries and data files
|
317
|
+
and enables the module for compilation.
|
318
|
+
* `http_gzip_static_module.rb` - enables the module for compilation.
|
319
|
+
* `http_realip_module.rb` - enables the module for compilation and
|
320
|
+
creates the configuration.
|
321
|
+
* `http_ssl_module.rb` - enables SSL for compilation.
|
322
|
+
* `http_stub_status_module.rb` - provides `nginx_status` configuration
|
323
|
+
and enables the module for compilation.
|
324
|
+
* `naxsi_module` - enables the naxsi module for the web application
|
325
|
+
firewall for nginx.
|
326
|
+
* `passenger` - builds the passenger gem and configuration for
|
327
|
+
"`mod_passenger`".
|
328
|
+
* `upload_progress_module.rb` - builds the `upload_progress` module
|
329
|
+
and enables it as a module when compiling nginx.
|
330
|
+
|
331
|
+
Adding New Modules
|
332
|
+
------------------
|
333
|
+
|
334
|
+
To add a new module to be compiled into nginx in the source recipe,
|
335
|
+
the node's run state is manipulated in a recipe, and the module as a
|
336
|
+
recipe should be added to `node['nginx']['source']['modules']`. For
|
337
|
+
example:
|
338
|
+
|
339
|
+
node.run_state['nginx_configure_flags'] =
|
340
|
+
node.run_state['nginx_configure_flags'] | ["--with-http_stub_status_module"]
|
341
|
+
|
342
|
+
The recipe will be included by `recipe[nginx::source]` automatically,
|
343
|
+
adding the configure flags. Add any other configuration templates or
|
344
|
+
other resources as required. See the recipes described above for
|
345
|
+
examples.
|
346
|
+
|
347
|
+
Ohai Plugin
|
348
|
+
===========
|
349
|
+
|
350
|
+
The `ohai_plugin` recipe includes an Ohai plugin. It will be
|
351
|
+
automatically installed and activated, providing the following
|
352
|
+
attributes via ohai, no matter how nginx is installed (source or
|
353
|
+
package):
|
354
|
+
|
355
|
+
* `node['nginx']['version']` - version of nginx
|
356
|
+
* `node['nginx']['configure_arguments']` - options passed to
|
357
|
+
./configure when nginx was built
|
358
|
+
* `node['nginx']['prefix']` - installation prefix
|
359
|
+
* `node['nginx']['conf_path']` - configuration file path
|
360
|
+
|
361
|
+
In the source recipe, it is used to determine whether control
|
362
|
+
attributes for building nginx have changed.
|
363
|
+
|
364
|
+
Usage
|
365
|
+
=====
|
366
|
+
|
367
|
+
Include the recipe on your node or role that fits how you wish to
|
368
|
+
install Nginx on your system per the recipes section above. Modify the
|
369
|
+
attributes as required in your role to change how various
|
370
|
+
configuration is applied per the attributes section above. In general,
|
371
|
+
override attributes in the role should be used when changing
|
372
|
+
attributes.
|
373
|
+
|
374
|
+
There's some redundancy in that the config handling hasn't been
|
375
|
+
separated from the installation method (yet), so use only one of the
|
376
|
+
recipes, default or source.
|
377
|
+
|
378
|
+
License and Author
|
379
|
+
==================
|
380
|
+
|
381
|
+
- Author:: Joshua Timberman (<joshua@opscode.com>)
|
382
|
+
- Author:: Adam Jacob (<adam@opscode.com>)
|
383
|
+
- Author:: AJ Christensen (<aj@opscode.com>)
|
384
|
+
- Author:: Jamie Winsor (<jamie@vialstudios.com>)
|
385
|
+
|
386
|
+
- Copyright:: 2008-2012, Opscode, Inc
|
387
|
+
|
388
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
389
|
+
you may not use this file except in compliance with the License.
|
390
|
+
You may obtain a copy of the License at
|
391
|
+
|
392
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
393
|
+
|
394
|
+
Unless required by applicable law or agreed to in writing, software
|
395
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
396
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
397
|
+
See the License for the specific language governing permissions and
|
398
|
+
limitations under the License.
|
@@ -0,0 +1,25 @@
|
|
1
|
+
This cookbook includes support for running tests via Test Kitchen (1.0). This has some requirements.
|
2
|
+
|
3
|
+
1. You must be using the Git repository, rather than the downloaded cookbook from the Chef Community Site.
|
4
|
+
2. You must have Vagrant 1.1 installed.
|
5
|
+
3. You must have a "sane" Ruby 1.9.3 environment.
|
6
|
+
|
7
|
+
Once the above requirements are met, install the additional requirements:
|
8
|
+
|
9
|
+
Install the berkshelf plugin for vagrant, and berkshelf to your local Ruby environment.
|
10
|
+
|
11
|
+
vagrant plugin install vagrant-berkshelf
|
12
|
+
gem install berkshelf
|
13
|
+
|
14
|
+
Install Test Kitchen 1.0 (unreleased yet, use the alpha / prerelease version).
|
15
|
+
|
16
|
+
gem install test-kitchen --pre
|
17
|
+
|
18
|
+
Install the Vagrant driver for Test Kitchen.
|
19
|
+
|
20
|
+
gem install kitchen-vagrant
|
21
|
+
|
22
|
+
Once the above are installed, you should be able to run Test Kitchen:
|
23
|
+
|
24
|
+
kitchen list
|
25
|
+
kitchen test
|
@@ -0,0 +1,89 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: nginx
|
3
|
+
# Attributes:: default
|
4
|
+
#
|
5
|
+
# Author:: Adam Jacob (<adam@opscode.com>)
|
6
|
+
# Author:: Joshua Timberman (<joshua@opscode.com>)
|
7
|
+
#
|
8
|
+
# Copyright 2009-2011, Opscode, 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 should be
|
24
|
+
# changed too. It is in the source.rb file, though we recommend
|
25
|
+
# overriding attributes by modifying a role, or the node itself.
|
26
|
+
# default['nginx']['source']['checksum']
|
27
|
+
default['nginx']['version'] = "1.2.6"
|
28
|
+
default['nginx']['package_name'] = "nginx"
|
29
|
+
default['nginx']['dir'] = "/etc/nginx"
|
30
|
+
default['nginx']['log_dir'] = "/var/log/nginx"
|
31
|
+
default['nginx']['binary'] = "/usr/sbin/nginx"
|
32
|
+
|
33
|
+
case node['platform']
|
34
|
+
when "debian","ubuntu"
|
35
|
+
default['nginx']['user'] = "www-data"
|
36
|
+
default['nginx']['init_style'] = "runit"
|
37
|
+
when "redhat","centos","scientific","amazon","oracle","fedora"
|
38
|
+
default['nginx']['user'] = "nginx"
|
39
|
+
default['nginx']['init_style'] = "init"
|
40
|
+
default['nginx']['repo_source'] = "epel"
|
41
|
+
else
|
42
|
+
default['nginx']['user'] = "www-data"
|
43
|
+
default['nginx']['init_style'] = "init"
|
44
|
+
end
|
45
|
+
|
46
|
+
default['nginx']['upstart']['runlevels'] = '2345'
|
47
|
+
default['nginx']['upstart']['respawn_limit'] = nil
|
48
|
+
default['nginx']['upstart']['foreground'] = true
|
49
|
+
|
50
|
+
default['nginx']['group'] = node['nginx']['user']
|
51
|
+
|
52
|
+
default['nginx']['pid'] = "/var/run/nginx.pid"
|
53
|
+
|
54
|
+
default['nginx']['gzip'] = "on"
|
55
|
+
default['nginx']['gzip_http_version'] = "1.0"
|
56
|
+
default['nginx']['gzip_comp_level'] = "2"
|
57
|
+
default['nginx']['gzip_proxied'] = "any"
|
58
|
+
default['nginx']['gzip_vary'] = "off"
|
59
|
+
default['nginx']['gzip_buffers'] = nil
|
60
|
+
default['nginx']['gzip_types'] = [
|
61
|
+
"text/plain",
|
62
|
+
"text/css",
|
63
|
+
"application/x-javascript",
|
64
|
+
"text/xml",
|
65
|
+
"application/xml",
|
66
|
+
"application/xml+rss",
|
67
|
+
"text/javascript",
|
68
|
+
"application/javascript",
|
69
|
+
"application/json"
|
70
|
+
]
|
71
|
+
|
72
|
+
default['nginx']['keepalive'] = "on"
|
73
|
+
default['nginx']['keepalive_timeout'] = 65
|
74
|
+
default['nginx']['worker_processes'] = node['cpu'] && node['cpu']['total'] ? node['cpu']['total'] : 1
|
75
|
+
default['nginx']['worker_connections'] = 1024
|
76
|
+
default['nginx']['worker_rlimit_nofile'] = nil
|
77
|
+
default['nginx']['multi_accept'] = false
|
78
|
+
default['nginx']['event'] = nil
|
79
|
+
default['nginx']['server_names_hash_bucket_size'] = 64
|
80
|
+
default['nginx']['sendfile'] = 'on'
|
81
|
+
|
82
|
+
default['nginx']['disable_access_log'] = false
|
83
|
+
default['nginx']['install_method'] = 'package'
|
84
|
+
default['nginx']['default_site_enabled'] = true
|
85
|
+
default['nginx']['types_hash_max_size'] = 2048
|
86
|
+
default['nginx']['types_hash_bucket_size'] = 64
|
87
|
+
|
88
|
+
default['nginx']['proxy_read_timeout'] = nil
|
89
|
+
default['nginx']['client_max_body_size'] = nil
|