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,185 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: runit
|
3
|
+
# Provider:: service
|
4
|
+
#
|
5
|
+
# Copyright 2011, Joshua Timberman
|
6
|
+
# Copyright 2011, Opscode, Inc.
|
7
|
+
#
|
8
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
9
|
+
# you may not use this file except in compliance with the License.
|
10
|
+
# You may obtain a copy of the License at
|
11
|
+
#
|
12
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
13
|
+
#
|
14
|
+
# Unless required by applicable law or agreed to in writing, software
|
15
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
16
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
17
|
+
# See the License for the specific language governing permissions and
|
18
|
+
# limitations under the License.
|
19
|
+
#
|
20
|
+
|
21
|
+
require 'chef/resource'
|
22
|
+
require 'chef/resource/service'
|
23
|
+
|
24
|
+
class Chef
|
25
|
+
class Resource
|
26
|
+
class RunitService < Chef::Resource::Service
|
27
|
+
|
28
|
+
def initialize(name, run_context=nil)
|
29
|
+
super
|
30
|
+
runit_node = runit_attributes_from_node(run_context)
|
31
|
+
@resource_name = :runit_service
|
32
|
+
@provider = Chef::Provider::Service::Runit
|
33
|
+
@supports = { :restart => true, :reload => true, :status => true }
|
34
|
+
@action = :enable
|
35
|
+
@allowed_actions = [:nothing, :start, :stop, :enable, :disable, :restart, :reload, :status, :once, :hup, :cont, :term, :kill, :up, :down, :usr1, :usr2]
|
36
|
+
|
37
|
+
# sv_bin, sv_dir and service_dir may have been set in the node attributes
|
38
|
+
@sv_bin = runit_node[:sv_bin] || '/usr/bin/sv'
|
39
|
+
@sv_dir = runit_node[:sv_dir] || '/etc/sv'
|
40
|
+
@service_dir = runit_node[:service_dir] || '/etc/service'
|
41
|
+
|
42
|
+
@control = []
|
43
|
+
@options = {}
|
44
|
+
@env = {}
|
45
|
+
@log = true
|
46
|
+
@cookbook = nil
|
47
|
+
@finish = false
|
48
|
+
@owner = nil
|
49
|
+
@group = nil
|
50
|
+
@enabled = false
|
51
|
+
@running = false
|
52
|
+
@default_logger = false
|
53
|
+
@restart_on_update = true
|
54
|
+
@run_template_name = @service_name
|
55
|
+
@log_template_name = @service_name
|
56
|
+
@finish_script_template_name = @service_name
|
57
|
+
@control_template_names = {}
|
58
|
+
@status_command = "#{@sv_bin} status #{@service_dir}"
|
59
|
+
@sv_templates = true
|
60
|
+
|
61
|
+
#
|
62
|
+
# Backward Compat Hack
|
63
|
+
#
|
64
|
+
# This ensures a 'service' resource exists for all 'runit_service' resources.
|
65
|
+
# This should allow all recipes using the previous 'runit_service' definition to
|
66
|
+
# continue operating.
|
67
|
+
#
|
68
|
+
unless run_context.nil?
|
69
|
+
service_dir_name = ::File.join(@service_dir, @name)
|
70
|
+
@service_mirror = Chef::Resource::Service.new(name, run_context)
|
71
|
+
@service_mirror.provider(Chef::Provider::Service::Simple)
|
72
|
+
@service_mirror.supports(@supports)
|
73
|
+
@service_mirror.start_command("#{@sv_bin} start #{service_dir_name}")
|
74
|
+
@service_mirror.stop_command("#{@sv_bin} stop #{service_dir_name}")
|
75
|
+
@service_mirror.restart_command("#{@sv_bin} restart #{service_dir_name}")
|
76
|
+
@service_mirror.status_command("#{@sv_bin} status #{service_dir_name}")
|
77
|
+
@service_mirror.action(:nothing)
|
78
|
+
run_context.resource_collection.insert(@service_mirror)
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
def sv_bin(arg=nil)
|
83
|
+
set_or_return(:sv_bin, arg, :kind_of => [String])
|
84
|
+
end
|
85
|
+
|
86
|
+
def sv_dir(arg=nil)
|
87
|
+
set_or_return(:sv_dir, arg, :kind_of => [String, FalseClass])
|
88
|
+
end
|
89
|
+
|
90
|
+
def service_dir(arg=nil)
|
91
|
+
set_or_return(:service_dir, arg, :kind_of => [String])
|
92
|
+
end
|
93
|
+
|
94
|
+
def control(arg=nil)
|
95
|
+
set_or_return(:control, arg, :kind_of => [Array])
|
96
|
+
end
|
97
|
+
|
98
|
+
def options(arg=nil)
|
99
|
+
if @env.empty?
|
100
|
+
opts = @options
|
101
|
+
else
|
102
|
+
opts = @options.merge!(:env_dir => ::File.join(@sv_dir, @service_name, 'env'))
|
103
|
+
end
|
104
|
+
set_or_return(
|
105
|
+
:options,
|
106
|
+
arg,
|
107
|
+
:kind_of => [Hash],
|
108
|
+
:default => opts
|
109
|
+
)
|
110
|
+
end
|
111
|
+
|
112
|
+
def env(arg=nil)
|
113
|
+
set_or_return(:env, arg, :kind_of => [Hash])
|
114
|
+
end
|
115
|
+
|
116
|
+
def log(arg=nil)
|
117
|
+
set_or_return(:log, arg, :kind_of => [TrueClass, FalseClass])
|
118
|
+
end
|
119
|
+
|
120
|
+
def cookbook(arg=nil)
|
121
|
+
set_or_return(:cookbook, arg, :kind_of => [String])
|
122
|
+
end
|
123
|
+
|
124
|
+
def finish(arg=nil)
|
125
|
+
set_or_return(:finish, arg, :kind_of => [TrueClass, FalseClass])
|
126
|
+
end
|
127
|
+
|
128
|
+
def owner(arg=nil)
|
129
|
+
set_or_return(:owner, arg, :regex => [Chef::Config[:user_valid_regex]])
|
130
|
+
end
|
131
|
+
|
132
|
+
def group(arg=nil)
|
133
|
+
set_or_return(:group, arg, :regex => [Chef::Config[:group_valid_regex]])
|
134
|
+
end
|
135
|
+
|
136
|
+
def default_logger(arg=nil)
|
137
|
+
set_or_return(:default_logger, arg, :kind_of => [TrueClass, FalseClass])
|
138
|
+
end
|
139
|
+
|
140
|
+
def restart_on_update(arg=nil)
|
141
|
+
set_or_return(:restart_on_update, arg, :kind_of => [TrueClass, FalseClass])
|
142
|
+
end
|
143
|
+
|
144
|
+
def run_template_name(arg=nil)
|
145
|
+
set_or_return(:run_template_name, arg, :kind_of => [String])
|
146
|
+
end
|
147
|
+
alias :template_name :run_template_name
|
148
|
+
|
149
|
+
def log_template_name(arg=nil)
|
150
|
+
set_or_return(:log_template_name, arg, :kind_of => [String])
|
151
|
+
end
|
152
|
+
|
153
|
+
def finish_script_template_name(arg=nil)
|
154
|
+
set_or_return(:finish_script_template_name, arg, :kind_of => [String])
|
155
|
+
end
|
156
|
+
|
157
|
+
def control_template_names(arg=nil)
|
158
|
+
set_or_return(
|
159
|
+
:control_template_names,
|
160
|
+
arg,
|
161
|
+
:kind_of => [Hash],
|
162
|
+
:default => set_control_template_names
|
163
|
+
)
|
164
|
+
end
|
165
|
+
|
166
|
+
def set_control_template_names
|
167
|
+
@control.each do |signal|
|
168
|
+
@control_template_names[signal] ||= @service_name
|
169
|
+
end
|
170
|
+
@control_template_names
|
171
|
+
end
|
172
|
+
|
173
|
+
def sv_templates(arg=nil)
|
174
|
+
set_or_return(:sv_templates, arg, :kind_of => [TrueClass, FalseClass])
|
175
|
+
end
|
176
|
+
|
177
|
+
def runit_attributes_from_node(run_context)
|
178
|
+
runit_attr = if run_context && run_context.node
|
179
|
+
run_context.node[:runit]
|
180
|
+
end
|
181
|
+
runit_attr || {}
|
182
|
+
end
|
183
|
+
end
|
184
|
+
end
|
185
|
+
end
|
@@ -0,0 +1,16 @@
|
|
1
|
+
name "runit"
|
2
|
+
maintainer "Opscode, Inc."
|
3
|
+
maintainer_email "cookbooks@opscode.com"
|
4
|
+
license "Apache 2.0"
|
5
|
+
description "Installs runit and provides runit_service definition"
|
6
|
+
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
7
|
+
version "1.1.4"
|
8
|
+
|
9
|
+
recipe "runit", "Installs and configures runit"
|
10
|
+
|
11
|
+
%w{ ubuntu debian gentoo centos redhat amazon scientific oracle enterpriseenterprise }.each do |os|
|
12
|
+
supports os
|
13
|
+
end
|
14
|
+
|
15
|
+
depends "build-essential"
|
16
|
+
depends "yum"
|
@@ -0,0 +1,124 @@
|
|
1
|
+
#
|
2
|
+
# Cookbook Name:: runit
|
3
|
+
# Recipe:: default
|
4
|
+
#
|
5
|
+
# Copyright 2008-2010, Opscode, Inc.
|
6
|
+
#
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
# you may not use this file except in compliance with the License.
|
9
|
+
# You may obtain a copy of the License at
|
10
|
+
#
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
12
|
+
#
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
# See the License for the specific language governing permissions and
|
17
|
+
# limitations under the License.
|
18
|
+
#
|
19
|
+
|
20
|
+
service "runit" do
|
21
|
+
action :nothing
|
22
|
+
end
|
23
|
+
|
24
|
+
execute "start-runsvdir" do
|
25
|
+
command value_for_platform(
|
26
|
+
"debian" => { "default" => "runsvdir-start" },
|
27
|
+
"ubuntu" => { "default" => "start runsvdir" },
|
28
|
+
"gentoo" => { "default" => "/etc/init.d/runit-start start" }
|
29
|
+
)
|
30
|
+
action :nothing
|
31
|
+
end
|
32
|
+
|
33
|
+
execute "runit-hup-init" do
|
34
|
+
command "telinit q"
|
35
|
+
only_if "grep ^SV /etc/inittab"
|
36
|
+
action :nothing
|
37
|
+
end
|
38
|
+
|
39
|
+
case node["platform_family"]
|
40
|
+
when "rhel"
|
41
|
+
|
42
|
+
include_recipe "build-essential"
|
43
|
+
# `rpmdevtools` is in EPEL repo in EL <= 5
|
44
|
+
include_recipe "yum::epel" if node["platform_version"].to_i <= 5
|
45
|
+
|
46
|
+
packages = %w{rpm-build rpmdevtools tar gzip}
|
47
|
+
packages.each do |p|
|
48
|
+
package p
|
49
|
+
end
|
50
|
+
|
51
|
+
if node["platform_version"].to_i >= 6
|
52
|
+
package "glibc-static"
|
53
|
+
else
|
54
|
+
package "buildsys-macros"
|
55
|
+
end
|
56
|
+
|
57
|
+
cookbook_file "#{Chef::Config[:file_cache_path]}/runit-2.1.1.tar.gz" do
|
58
|
+
source "runit-2.1.1.tar.gz"
|
59
|
+
not_if "rpm -qa | grep -q '^runit'"
|
60
|
+
notifies :run, "bash[rhel_build_install]", :immediately
|
61
|
+
end
|
62
|
+
|
63
|
+
bash "rhel_build_install" do
|
64
|
+
user "root"
|
65
|
+
cwd Chef::Config[:file_cache_path]
|
66
|
+
code <<-EOH
|
67
|
+
tar xzf runit-2.1.1.tar.gz
|
68
|
+
cd runit-2.1.1
|
69
|
+
./build.sh
|
70
|
+
EOH
|
71
|
+
notifies :install, "rpm_package[runit-211]", :immediately
|
72
|
+
action :nothing
|
73
|
+
end
|
74
|
+
|
75
|
+
rpm_package "runit-211" do
|
76
|
+
source "/root/rpmbuild/RPMS/runit-2.1.1.rpm"
|
77
|
+
action :nothing
|
78
|
+
end
|
79
|
+
|
80
|
+
when "debian","gentoo"
|
81
|
+
|
82
|
+
if platform?("gentoo")
|
83
|
+
template "/etc/init.d/runit-start" do
|
84
|
+
source "runit-start.sh.erb"
|
85
|
+
mode 0755
|
86
|
+
end
|
87
|
+
|
88
|
+
service "runit-start" do
|
89
|
+
action :nothing
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
package "runit" do
|
94
|
+
action :install
|
95
|
+
if platform?("ubuntu", "debian")
|
96
|
+
response_file "runit.seed"
|
97
|
+
end
|
98
|
+
notifies value_for_platform(
|
99
|
+
"debian" => { "4.0" => :run, "default" => :nothing },
|
100
|
+
"ubuntu" => {
|
101
|
+
"default" => :nothing,
|
102
|
+
"9.04" => :run,
|
103
|
+
"8.10" => :run,
|
104
|
+
"8.04" => :run },
|
105
|
+
"gentoo" => { "default" => :run }
|
106
|
+
), "execute[start-runsvdir]", :immediately
|
107
|
+
notifies value_for_platform(
|
108
|
+
"debian" => { "squeeze/sid" => :run, "default" => :nothing },
|
109
|
+
"default" => :nothing
|
110
|
+
), "execute[runit-hup-init]", :immediately
|
111
|
+
if platform?("gentoo")
|
112
|
+
notifies :enable, "service[runit-start]"
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
if node["platform"] =~ /ubuntu/i && node["platform_version"].to_f <= 8.04
|
117
|
+
cookbook_file "/etc/event.d/runsvdir" do
|
118
|
+
source "runsvdir"
|
119
|
+
mode 0644
|
120
|
+
notifies :run, "execute[start-runsvdir]", :immediately
|
121
|
+
only_if do ::File.directory?("/etc/event.d") end
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
### BEGIN INIT INFO
|
3
|
+
# Provides: <%= @name %>
|
4
|
+
# Required-Start:
|
5
|
+
# Required-Stop:
|
6
|
+
# Default-Start:
|
7
|
+
# Default-Stop:
|
8
|
+
# Short-Description: initscript for runit-managed <%= @name %> service
|
9
|
+
### END INIT INFO
|
10
|
+
|
11
|
+
# Author: Opscode, Inc. <cookbooks@opscode.com>
|
12
|
+
|
13
|
+
PATH=/sbin:/usr/sbin:/bin:/usr/bin
|
14
|
+
DESC="runit-managed <%= @name %>"
|
15
|
+
NAME=<%= @name %>
|
16
|
+
RUNIT=/usr/bin/sv
|
17
|
+
SCRIPTNAME=/etc/init.d/$NAME
|
18
|
+
|
19
|
+
# Exit if runit is not installed
|
20
|
+
[ -x $RUNIT ] || exit 0
|
21
|
+
|
22
|
+
# Load the VERBOSE setting and other rcS variables
|
23
|
+
. /lib/init/vars.sh
|
24
|
+
|
25
|
+
# Define LSB log_* functions.
|
26
|
+
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
|
27
|
+
. /lib/lsb/init-functions
|
28
|
+
|
29
|
+
|
30
|
+
case "$1" in
|
31
|
+
start)
|
32
|
+
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC " "$NAME"
|
33
|
+
$RUNIT start $NAME
|
34
|
+
[ "$VERBOSE" != no ] && log_end_msg $?
|
35
|
+
;;
|
36
|
+
stop)
|
37
|
+
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
|
38
|
+
$RUNIT stop $NAME
|
39
|
+
[ "$VERBOSE" != no ] && log_end_msg $?
|
40
|
+
;;
|
41
|
+
status)
|
42
|
+
$RUNIT status $NAME && exit 0 || exit $?
|
43
|
+
;;
|
44
|
+
reload)
|
45
|
+
[ "$VERBOSE" != no ] && log_daemon_msg "Reloading $DESC" "$NAME"
|
46
|
+
$RUNIT reload $NAME
|
47
|
+
[ "$VERBOSE" != no ] && log_end_msg $?
|
48
|
+
;;
|
49
|
+
force-reload)
|
50
|
+
[ "$VERBOSE" != no ] && log_daemon_msg "Force reloading $DESC" "$NAME"
|
51
|
+
$RUNIT force-reload $NAME
|
52
|
+
[ "$VERBOSE" != no ] && log_end_msg $?
|
53
|
+
;;
|
54
|
+
restart)
|
55
|
+
[ "$VERBOSE" != no ] && log_daemon_msg "Restarting $DESC" "$NAME"
|
56
|
+
$RUNIT restart $NAME
|
57
|
+
[ "$VERBOSE" != no ] && log_end_msg $?
|
58
|
+
;;
|
59
|
+
*)
|
60
|
+
echo "Usage: $SCRIPTNAME {start|stop|status|reload|force-reload|restart}" >&2
|
61
|
+
exit 3
|
62
|
+
;;
|
63
|
+
esac
|
64
|
+
|
65
|
+
:
|
66
|
+
|
@@ -0,0 +1,32 @@
|
|
1
|
+
#!/sbin/runscript
|
2
|
+
# Copyright 1999-2006 Gentoo Foundation
|
3
|
+
# Distributed under the terms of the GNU General Public License v2
|
4
|
+
# $Header: $
|
5
|
+
|
6
|
+
depend() {
|
7
|
+
after net
|
8
|
+
}
|
9
|
+
|
10
|
+
start() {
|
11
|
+
ebegin "Starting runsvdir"
|
12
|
+
start-stop-daemon --start --exec /usr/bin/runsvdir \
|
13
|
+
--background --make-pidfile \
|
14
|
+
--pidfile /var/run/runsvdir.pid -- <%= node.runit.sv_dir %>
|
15
|
+
eend $?
|
16
|
+
}
|
17
|
+
|
18
|
+
stop() {
|
19
|
+
local ret1 ret2
|
20
|
+
ebegin "Stopping runsvdir"
|
21
|
+
start-stop-daemon --stop --oknodo --pidfile /var/run/runsvdir.pid
|
22
|
+
ret1=$?
|
23
|
+
eend ${ret1}
|
24
|
+
|
25
|
+
ebegin "Stopping services and logging"
|
26
|
+
sv shutdown -w 10 <%= node.runit.sv_dir %>/*
|
27
|
+
ret2=$?
|
28
|
+
eend ${ret2}
|
29
|
+
|
30
|
+
return $((ret1+ret2))
|
31
|
+
}
|
32
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
---
|
2
|
+
driver_plugin: vagrant
|
3
|
+
platforms:
|
4
|
+
- name: centos-6.4
|
5
|
+
driver_config:
|
6
|
+
box: opscode-centos-6.4
|
7
|
+
box_url: https://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-6.4_provisionerless.box
|
8
|
+
require_chef_omnibus: true
|
9
|
+
run_list:
|
10
|
+
- name: centos-5.9
|
11
|
+
driver_config:
|
12
|
+
box: opscode-centos-5.9
|
13
|
+
box_url: https://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-5.9_provisionerless.box
|
14
|
+
require_chef_omnibus: true
|
15
|
+
run_list:
|
16
|
+
|
17
|
+
suites:
|
18
|
+
- name: test
|
19
|
+
run_list:
|
20
|
+
- recipe[minitest-handler]
|
21
|
+
- recipe[yum::test]
|
22
|
+
attributes: {}
|