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,35 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe AgileSolo::Server do
|
5
|
+
def app
|
6
|
+
AgileSolo::Server
|
7
|
+
end
|
8
|
+
|
9
|
+
before do
|
10
|
+
@body = '{
|
11
|
+
"solo": {
|
12
|
+
"run_list":"recipe[sample::default]",
|
13
|
+
"name":"sample",
|
14
|
+
"items":{
|
15
|
+
"id":"items",
|
16
|
+
"data":{
|
17
|
+
"lines":["foo", "bar"]
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}'
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'returns 204 No Content' do
|
25
|
+
AgileSolo::Consumer.any_instance.stub(:execute).and_return(true)
|
26
|
+
put '/solo', @body, "CONTENT_TYPE" => "application/json"
|
27
|
+
expect(last_response.status).to eql 204
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'returns an empty body' do
|
31
|
+
AgileSolo::Consumer.any_instance.stub(:execute).and_return(true)
|
32
|
+
put '/solo', @body, "CONTENT_TYPE" => "application/json"
|
33
|
+
expect(last_response.body.empty?).to be_true
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
SITE
|
2
|
+
remote: http://community.opscode.com/api/v1
|
3
|
+
specs:
|
4
|
+
apache (0.0.5)
|
5
|
+
apache2 (>= 0.0.0)
|
6
|
+
apache2 (1.6.2)
|
7
|
+
apt (1.9.2)
|
8
|
+
build-essential (1.4.0)
|
9
|
+
install_from (3.0.4)
|
10
|
+
metachef (3.0.4)
|
11
|
+
nginx (1.6.0)
|
12
|
+
apt (>= 0.0.0)
|
13
|
+
build-essential (>= 0.0.0)
|
14
|
+
ohai (>= 1.1.4)
|
15
|
+
runit (>= 0.0.0)
|
16
|
+
yum (>= 0.0.0)
|
17
|
+
ohai (1.1.8)
|
18
|
+
redis (3.0.4)
|
19
|
+
install_from (>= 0.0.0)
|
20
|
+
metachef (>= 0.0.0)
|
21
|
+
runit (>= 0.0.0)
|
22
|
+
runit (1.1.4)
|
23
|
+
build-essential (>= 0.0.0)
|
24
|
+
yum (>= 0.0.0)
|
25
|
+
yum (2.2.2)
|
26
|
+
|
27
|
+
DEPENDENCIES
|
28
|
+
apache (>= 0)
|
29
|
+
build-essential (>= 0)
|
30
|
+
nginx (>= 0)
|
31
|
+
redis (>= 0)
|
32
|
+
yum (>= 0)
|
33
|
+
|
@@ -0,0 +1,92 @@
|
|
1
|
+
Z Cloud Application Base for chef-solo
|
2
|
+
========
|
3
|
+
|
4
|
+
ZCloud上にChef-soloでアプリケーションを構築する際のベースにするリポジトリ。
|
5
|
+
|
6
|
+
Links
|
7
|
+
----
|
8
|
+
|
9
|
+
Chef-solo, Metadata-APIについては下記の事前知識が望ましい。
|
10
|
+
|
11
|
+
- Chef-solo のドキュメント
|
12
|
+
- [http://docs.opscode.com/chef_solo.html](http://docs.opscode.com/chef_solo.html)
|
13
|
+
- 日本語の電子書籍 [入門Chef Solo - Infrastructure as Code』](http://d.hatena.ne.jp/naoya/20130313/1363129532)
|
14
|
+
- Joyent Metadata-API
|
15
|
+
- [http://wiki.joyent.com/wiki/display/sdc/Using+the+Metadata+API](http://wiki.joyent.com/wiki/display/sdc/Using+the+Metadata+API)
|
16
|
+
- 他、各ディレクトリの役割詳細はOpscodeのChef-Repoリポジトリを参照
|
17
|
+
- [https://github.com/opscode/chef-repo](https://github.com/opscode/chef-repo)
|
18
|
+
|
19
|
+
概要
|
20
|
+
======
|
21
|
+
|
22
|
+
SmartOSをプロビジョンする際にChef-soloの定期実行を仕込み、GithubからクローンしたChef-repositoryの内容を実行し続ける。
|
23
|
+
|
24
|
+
cookbooksとsite-cookbooks
|
25
|
+
=====
|
26
|
+
|
27
|
+
- Cookbooks: 汎用的なCookbookを入れるところ、application_baserepoでは[librarian-chef](https://github.com/applicationsonline/librarian-chef)で管理する。
|
28
|
+
直接編集してはいけない。
|
29
|
+
- Site-Cookbooks: 個別のCookbookを入れるところ、アプリケーションごとに用意する。
|
30
|
+
|
31
|
+
|
32
|
+
アプリケーションリポジトリの用意
|
33
|
+
====
|
34
|
+
|
35
|
+
この`application-baserepo`をクローンする。
|
36
|
+
|
37
|
+
git clone git@github.com:ZCloud-Firstserver/application_baserepo.git application_yourapp
|
38
|
+
|
39
|
+
git リポジトリを初期化。
|
40
|
+
|
41
|
+
cd application_yourapp
|
42
|
+
rm -rf .git
|
43
|
+
rm -rf user-scripts
|
44
|
+
git init
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
Github_Tokens
|
49
|
+
----
|
50
|
+
|
51
|
+
Github用のTokenマスタ
|
52
|
+
|
53
|
+
### User:firstserver
|
54
|
+
|
55
|
+
- `634eaa5bec9b9d267d4e85587797bc9a68ea4be2` リポジトリR/W権限
|
56
|
+
- `c32727a4e821f96c1bd7896e3deae36dbbdf8251` リポジトリR/W権限
|
57
|
+
|
58
|
+
Cookbook作成
|
59
|
+
----
|
60
|
+
|
61
|
+
下記コマンドでCookbookを作成できる、ライセンスの設定などは`.chef/knife.rb`に記載してあります。
|
62
|
+
|
63
|
+
knife cookbook create sample
|
64
|
+
|
65
|
+
添付の`sample`をコピーしてもよい、下記2つ変更する。
|
66
|
+
|
67
|
+
- ディレクトリのリネーム
|
68
|
+
- metadata.rb のname変更
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
マシン作成
|
73
|
+
====
|
74
|
+
|
75
|
+
Metadata
|
76
|
+
----
|
77
|
+
|
78
|
+
user-scriptに **smartos19.sh**を入れる。
|
79
|
+
[https://github.com/ZCloud-Firstserver/application_baserepo/blob/master/user-scripts/smartos19.sh](https://github.com/ZCloud-Firstserver/application_baserepo/blob/master/user-scripts/smartos19.sh)
|
80
|
+
|
81
|
+
その他3つをメタデータに入れる。
|
82
|
+
|
83
|
+
- zcloud_app: your_app
|
84
|
+
- zcloud_app_repo: https://{ReadOnlyのTokenに置き換える}@github.com/ZCloud-Firstserver/application_your_app.git
|
85
|
+
- user-data: {}
|
86
|
+
|
87
|
+
アプリケーション独自のメタデータがある場合は追加する。
|
88
|
+
|
89
|
+
Roles
|
90
|
+
---
|
91
|
+
|
92
|
+
マシンでは`role[your_app`が継続的に実行される。
|
@@ -0,0 +1,23 @@
|
|
1
|
+
Z Cloud Application Your APP
|
2
|
+
========
|
3
|
+
|
4
|
+
クローンしたアプリケーションリポジトリ用のひな形
|
5
|
+
|
6
|
+
|
7
|
+
パラメータ
|
8
|
+
----
|
9
|
+
|
10
|
+
user-scriptに **smartos19.sh**を入れる。
|
11
|
+
[https://github.com/ZCloud-Firstserver/application_baserepo/blob/master/user-scripts/smartos19.sh](https://github.com/ZCloud-Firstserver/application_baserepo/blob/master/user-scripts/smartos19.sh)
|
12
|
+
|
13
|
+
その他3つをメタデータに入れる。
|
14
|
+
|
15
|
+
- zcloud_app: your_app
|
16
|
+
- zcloud_app_repo: https://{ReadOnlyのTokenに置き換える}@github.com/ZCloud-Firstserver/application_your_app.git
|
17
|
+
- user-data: {}
|
18
|
+
|
19
|
+
Roles
|
20
|
+
---
|
21
|
+
|
22
|
+
マシンでは`role[your_app]`が継続的に実行される。
|
23
|
+
|
@@ -0,0 +1,64 @@
|
|
1
|
+
Description
|
2
|
+
===========
|
3
|
+
various apache server related resource provides (LWRP)
|
4
|
+
|
5
|
+
* `apache_fastcgi` - configure fastcgi server via apache name based virtual host, now only `external` mode available
|
6
|
+
|
7
|
+
Platfroms
|
8
|
+
=========
|
9
|
+
|
10
|
+
* gentoo
|
11
|
+
* ubuntu
|
12
|
+
|
13
|
+
Requirements
|
14
|
+
============
|
15
|
+
|
16
|
+
* apache2 cookbook - https://github.com/opscode/cookbooks/tree/master/apache2
|
17
|
+
|
18
|
+
Resource Attributes
|
19
|
+
===================
|
20
|
+
|
21
|
+
* obligatory
|
22
|
+
* `socket` - a socket to which fast cgi external server is binded
|
23
|
+
* `server_name` - name of virtual host
|
24
|
+
* optional
|
25
|
+
* `server_alias` - Array, a list of server aliases, default value is `[]`
|
26
|
+
* `timeout` - Integer, a time to wait for fast cgi server response, in seconds, default value `180`
|
27
|
+
* `access_log` - a path to apache access log file
|
28
|
+
* `error_log` - a path to apache error log file
|
29
|
+
* `start_service` - true|false, whether to try to restart apache when configuring is done, default value `true`
|
30
|
+
* optional for ssl mode
|
31
|
+
* `ssl` - true|false, make virtual host ssl enabled, default value false
|
32
|
+
* `ssl_cipher_suite`
|
33
|
+
* `ssl_certificate_file`
|
34
|
+
* `ssl_certificate_key_file`
|
35
|
+
|
36
|
+
|
37
|
+
Usage
|
38
|
+
=====
|
39
|
+
|
40
|
+
apache_fastcgi 'myserver' do
|
41
|
+
action 'install'
|
42
|
+
socket '/var/run/fast-cgi-server/socket'
|
43
|
+
server_name 'host.myserver.com'
|
44
|
+
end
|
45
|
+
|
46
|
+
|
47
|
+
Links
|
48
|
+
=====
|
49
|
+
|
50
|
+
* http://httpd.apache.org/docs/1.3/vhosts/
|
51
|
+
* http://www.fastcgi.com/drupal/node/25
|
52
|
+
|
53
|
+
ToDo
|
54
|
+
====
|
55
|
+
|
56
|
+
* test ssl mode for ubuntu
|
57
|
+
* add more platforms support
|
58
|
+
* add more tests
|
59
|
+
* add wiki and howtos
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
|
64
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
{
|
2
|
+
"suggestions": {
|
3
|
+
},
|
4
|
+
"maintainer_email": "YOUR_EMAIL",
|
5
|
+
"recommendations": {
|
6
|
+
},
|
7
|
+
"recipes": {
|
8
|
+
},
|
9
|
+
"attributes": {
|
10
|
+
},
|
11
|
+
"license": "All rights reserved",
|
12
|
+
"groupings": {
|
13
|
+
},
|
14
|
+
"providing": {
|
15
|
+
},
|
16
|
+
"platforms": {
|
17
|
+
"gentoo": ">= 0.0.0",
|
18
|
+
"ubuntu": ">= 0.0.0"
|
19
|
+
},
|
20
|
+
"description": "various apache server related resource provides (LWRP)",
|
21
|
+
"maintainer": "YOUR_COMPANY_NAME",
|
22
|
+
"long_description": "Description\n===========\nvarious apache server related resource provides (LWRP)\n\n* `apache_fastcgi` - configure fastcgi server via apache name based virtual host, now only `external` mode available\n\nPlatfroms\n=========\n\n* gentoo\n* ubuntu\n \nRequirements\n============\n\n* apache2 cookbook - https://github.com/opscode/cookbooks/tree/master/apache2\n\nResource Attributes\n===================\n\n* obligatory \n * `socket` - a socket to which fast cgi external server is binded\n * `server_name` - name of virtual host \n* optional\n * `server_alias` - Array, a list of server aliases, default value is `[]`\n * `timeout` - Integer, a time to wait for fast cgi server response, in seconds, default value `180`\n * `access_log` - a path to apache access log file\n * `error_log` - a path to apache error log file\n * `start_service` - true|false, whether to try to restart apache when configuring is done, default value `true` \n* optional for ssl mode\n * `ssl` - true|false, make virtual host ssl enabled, default value false\n * `ssl_cipher_suite`\n * `ssl_certificate_file`\n * `ssl_certificate_key_file`\n\n \nUsage\n=====\n\n apache_fastcgi 'myserver' do \n action 'install'\n socket '/var/run/fast-cgi-server/socket'\n server_name 'host.myserver.com'\n end\n\n\nLinks\n=====\n\n * http://httpd.apache.org/docs/1.3/vhosts/\n * http://www.fastcgi.com/drupal/node/25\n\nToDo\n====\n\n * test ssl mode for ubuntu\n * add more platforms support \n * add more tests\n * add wiki and howtos\n \n \n \n \n ",
|
23
|
+
"name": "apache",
|
24
|
+
"version": "0.0.5",
|
25
|
+
"replacing": {
|
26
|
+
},
|
27
|
+
"conflicting": {
|
28
|
+
},
|
29
|
+
"dependencies": {
|
30
|
+
"apache2": ">= 0.0.0"
|
31
|
+
}
|
32
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
maintainer "YOUR_COMPANY_NAME"
|
2
|
+
maintainer_email "YOUR_EMAIL"
|
3
|
+
license "All rights reserved"
|
4
|
+
description "various apache server related resource provides (LWRP)"
|
5
|
+
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
6
|
+
version "0.0.5"
|
7
|
+
depends "apache2"
|
8
|
+
|
9
|
+
%w{ gentoo ubuntu }.each do |os|
|
10
|
+
supports os
|
11
|
+
end
|
@@ -0,0 +1,116 @@
|
|
1
|
+
APACHE_VHOST_DIR = '/etc/apache2/vhosts.d/'
|
2
|
+
|
3
|
+
def load_current_resource
|
4
|
+
@res = Chef::Resource::ApacheFastcgi.new(new_resource)
|
5
|
+
@res.name(new_resource.name)
|
6
|
+
@res.server_name(new_resource.server_name)
|
7
|
+
@res.server_alias(new_resource.server_alias)
|
8
|
+
@res.socket(new_resource.socket)
|
9
|
+
@res.timeout(new_resource.timeout)
|
10
|
+
@res.access_log(new_resource.access_log)
|
11
|
+
@res.error_log(new_resource.error_log)
|
12
|
+
@res.start_service(new_resource.start_service)
|
13
|
+
@res.ssl(new_resource.ssl)
|
14
|
+
@res.ssl_cipher_suite(new_resource.ssl_cipher_suite)
|
15
|
+
@res.ssl_certificate_file(new_resource.ssl_certificate_file)
|
16
|
+
@res.ssl_certificate_key_file(new_resource.ssl_certificate_key_file)
|
17
|
+
check_input_params
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
action :install do
|
22
|
+
|
23
|
+
server_name_attr = @res.server_name
|
24
|
+
server_alias_attr = @res.server_alias
|
25
|
+
socket_attr = @res.socket
|
26
|
+
timeout_attr = @res.timeout
|
27
|
+
start_service_attr = @res.start_service
|
28
|
+
|
29
|
+
ssl_attr = @res.ssl
|
30
|
+
ssl_cipher_suite_attr = @res.ssl_cipher_suite
|
31
|
+
ssl_certificate_file_attr = @res.ssl_certificate_file
|
32
|
+
ssl_certificate_key_file_attr = @res.ssl_certificate_key_file
|
33
|
+
|
34
|
+
access_log_attr = access_log
|
35
|
+
error_log_attr = error_log
|
36
|
+
virtual_file_attr = virtual_file
|
37
|
+
|
38
|
+
service 'apache2'
|
39
|
+
|
40
|
+
|
41
|
+
case node.platform # sorry for this case, but gentoo still not supported in apache2 cookbook
|
42
|
+
# http://tickets.opscode.com/browse/COOK-817
|
43
|
+
when 'gentoo'
|
44
|
+
template vhost_config_path do
|
45
|
+
source 'fast-cgi-vhost.erb'
|
46
|
+
variables(
|
47
|
+
:params => {
|
48
|
+
:server_name => server_name_attr,
|
49
|
+
:server_alias => server_alias_attr,
|
50
|
+
:socket => socket_attr,
|
51
|
+
:virtual_file => virtual_file_attr,
|
52
|
+
:idle_timeout => timeout_attr,
|
53
|
+
:access_log => access_log_attr,
|
54
|
+
:error_log => error_log_attr,
|
55
|
+
:ssl => ssl_attr,
|
56
|
+
:ssl_cipher_suite => ssl_cipher_suite_attr,
|
57
|
+
:ssl_certificate_file => ssl_certificate_file_attr,
|
58
|
+
:ssl_certificate_key_file => ssl_certificate_key_file_attr
|
59
|
+
}
|
60
|
+
)
|
61
|
+
cookbook 'apache'
|
62
|
+
notifies :restart, resources(:service =>'apache2') if start_service_attr == true
|
63
|
+
end
|
64
|
+
else
|
65
|
+
web_app vhost_id do # definition goes with apache2 cookbook, see OS supported there ((:
|
66
|
+
template 'fast-cgi-vhost.erb'
|
67
|
+
cookbook 'apache'
|
68
|
+
server_name server_name_attr
|
69
|
+
socket socket_attr
|
70
|
+
virtual_file virtual_file_attr
|
71
|
+
idle_timeout timeout_attr
|
72
|
+
access_log access_log_attr
|
73
|
+
error_log error_log_attr
|
74
|
+
ssl ssl_attr
|
75
|
+
ssl_cipher_suite ssl_cipher_suite_attr
|
76
|
+
ssl_certificate_file ssl_certificate_file_attr
|
77
|
+
ssl_certificate_key_file ssl_certificate_key_file
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
|
82
|
+
new_resource.updated_by_last_action(true)
|
83
|
+
end
|
84
|
+
|
85
|
+
|
86
|
+
def vhost_config_path
|
87
|
+
"#{APACHE_VHOST_DIR}#{vhost_id}.conf"
|
88
|
+
end
|
89
|
+
|
90
|
+
def virtual_file
|
91
|
+
"/tmp/#{vhost_id}-application"
|
92
|
+
end
|
93
|
+
|
94
|
+
def access_log
|
95
|
+
@res.access_log.nil? ? "#{node.apache.log_dir}/#{vhost_id}-access.log" : @res.access_log
|
96
|
+
end
|
97
|
+
|
98
|
+
def error_log
|
99
|
+
@res.error_log.nil? ? "#{node.apache.log_dir}/#{vhost_id}-error.log" : @res.error_log
|
100
|
+
end
|
101
|
+
|
102
|
+
def check_input_params
|
103
|
+
[
|
104
|
+
'socket', 'server_name',
|
105
|
+
].each do |p|
|
106
|
+
raise "#{p} - obligatory parameter" if @res.send(p).nil?
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
|
111
|
+
def vhost_id
|
112
|
+
id = @res.name
|
113
|
+
id.gsub!(' ','-')
|
114
|
+
id.chomp!
|
115
|
+
id
|
116
|
+
end
|