agile_solo 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (371) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +22 -0
  3. data/Gemfile +4 -0
  4. data/LICENSE +20 -0
  5. data/README.md +90 -0
  6. data/Rakefile +1 -0
  7. data/agile_solo.gemspec +30 -0
  8. data/lib/agile_solo.rb +13 -0
  9. data/lib/agile_solo/application/solo.rb +20 -0
  10. data/lib/agile_solo/command.rb +17 -0
  11. data/lib/agile_solo/composite_command.rb +35 -0
  12. data/lib/agile_solo/config.rb +13 -0
  13. data/lib/agile_solo/consumer.rb +41 -0
  14. data/lib/agile_solo/server.rb +19 -0
  15. data/lib/agile_solo/version.rb +3 -0
  16. data/spec/agile_solo/command_spec.rb +15 -0
  17. data/spec/agile_solo/composite_command_spec.rb +31 -0
  18. data/spec/agile_solo/config_spec.rb +8 -0
  19. data/spec/agile_solo/consumer_spec.rb +52 -0
  20. data/spec/agile_solo/server_spec.rb +35 -0
  21. data/spec/chef_repo/.chef/knife.rb +6 -0
  22. data/spec/chef_repo/.gitignore +3 -0
  23. data/spec/chef_repo/.gitmodules +3 -0
  24. data/spec/chef_repo/.librarian/chef/config +3 -0
  25. data/spec/chef_repo/Cheffile +11 -0
  26. data/spec/chef_repo/Cheffile.lock +33 -0
  27. data/spec/chef_repo/README.md +92 -0
  28. data/spec/chef_repo/README_APP.md +23 -0
  29. data/spec/chef_repo/Rakefile +5 -0
  30. data/spec/chef_repo/chefignore +11 -0
  31. data/spec/chef_repo/cookbooks/apache/CHANGES.md +9 -0
  32. data/spec/chef_repo/cookbooks/apache/README.md +64 -0
  33. data/spec/chef_repo/cookbooks/apache/metadata.json +32 -0
  34. data/spec/chef_repo/cookbooks/apache/metadata.rb +11 -0
  35. data/spec/chef_repo/cookbooks/apache/providers/fastcgi.rb +116 -0
  36. data/spec/chef_repo/cookbooks/apache/recipes/default.rb +8 -0
  37. data/spec/chef_repo/cookbooks/apache/resources/fastcgi.rb +14 -0
  38. data/spec/chef_repo/cookbooks/apache/templates/default/fast-cgi-vhost.erb +41 -0
  39. data/spec/chef_repo/cookbooks/apache2/.gitignore +3 -0
  40. data/spec/chef_repo/cookbooks/apache2/CHANGELOG.md +158 -0
  41. data/spec/chef_repo/cookbooks/apache2/CONTRIBUTING.md +257 -0
  42. data/spec/chef_repo/cookbooks/apache2/Gemfile +10 -0
  43. data/spec/chef_repo/cookbooks/apache2/LICENSE +201 -0
  44. data/spec/chef_repo/cookbooks/apache2/README.md +581 -0
  45. data/spec/chef_repo/cookbooks/apache2/attributes/default.rb +153 -0
  46. data/spec/chef_repo/cookbooks/apache2/attributes/mod_auth_cas.rb +2 -0
  47. data/spec/chef_repo/cookbooks/apache2/attributes/mod_auth_openid.rb +32 -0
  48. data/spec/chef_repo/cookbooks/apache2/attributes/mod_ssl.rb +19 -0
  49. data/spec/chef_repo/cookbooks/apache2/definitions/apache_conf.rb +26 -0
  50. data/spec/chef_repo/cookbooks/apache2/definitions/apache_module.rb +53 -0
  51. data/spec/chef_repo/cookbooks/apache2/definitions/apache_site.rb +43 -0
  52. data/spec/chef_repo/cookbooks/apache2/definitions/web_app.rb +50 -0
  53. data/spec/chef_repo/cookbooks/apache2/files/default/apache2_module_conf_generate.pl +41 -0
  54. data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/default_test.rb +77 -0
  55. data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/god_monitor_test.rb +34 -0
  56. data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_apreq2_test.rb +19 -0
  57. data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_auth_cas_test.rb +11 -0
  58. data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_auth_openid_test.rb +37 -0
  59. data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_cgi_test.rb +13 -0
  60. data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_dav_svn_test.rb +14 -0
  61. data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_fastcgi.rb +11 -0
  62. data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_include_test.rb +15 -0
  63. data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_perl_test.rb +18 -0
  64. data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_php5_test.rb +13 -0
  65. data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_python_test.rb +10 -0
  66. data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/mod_ssl_test.rb +28 -0
  67. data/spec/chef_repo/cookbooks/apache2/files/default/tests/minitest/support/helpers.rb +65 -0
  68. data/spec/chef_repo/cookbooks/apache2/metadata.json +527 -0
  69. data/spec/chef_repo/cookbooks/apache2/metadata.rb +213 -0
  70. data/spec/chef_repo/cookbooks/apache2/recipes/default.rb +223 -0
  71. data/spec/chef_repo/cookbooks/apache2/recipes/god_monitor.rb +33 -0
  72. data/spec/chef_repo/cookbooks/apache2/recipes/iptables.rb +20 -0
  73. data/spec/chef_repo/cookbooks/apache2/recipes/logrotate.rb +31 -0
  74. data/spec/chef_repo/cookbooks/apache2/recipes/mod_alias.rb +22 -0
  75. data/spec/chef_repo/cookbooks/apache2/recipes/mod_apreq2.rb +54 -0
  76. data/spec/chef_repo/cookbooks/apache2/recipes/mod_auth_basic.rb +20 -0
  77. data/spec/chef_repo/cookbooks/apache2/recipes/mod_auth_cas.rb +59 -0
  78. data/spec/chef_repo/cookbooks/apache2/recipes/mod_auth_digest.rb +20 -0
  79. data/spec/chef_repo/cookbooks/apache2/recipes/mod_auth_openid.rb +125 -0
  80. data/spec/chef_repo/cookbooks/apache2/recipes/mod_authn_file.rb +20 -0
  81. data/spec/chef_repo/cookbooks/apache2/recipes/mod_authnz_ldap.rb +20 -0
  82. data/spec/chef_repo/cookbooks/apache2/recipes/mod_authz_default.rb +20 -0
  83. data/spec/chef_repo/cookbooks/apache2/recipes/mod_authz_groupfile.rb +20 -0
  84. data/spec/chef_repo/cookbooks/apache2/recipes/mod_authz_host.rb +20 -0
  85. data/spec/chef_repo/cookbooks/apache2/recipes/mod_authz_user.rb +20 -0
  86. data/spec/chef_repo/cookbooks/apache2/recipes/mod_autoindex.rb +22 -0
  87. data/spec/chef_repo/cookbooks/apache2/recipes/mod_cgi.rb +20 -0
  88. data/spec/chef_repo/cookbooks/apache2/recipes/mod_dav.rb +20 -0
  89. data/spec/chef_repo/cookbooks/apache2/recipes/mod_dav_fs.rb +21 -0
  90. data/spec/chef_repo/cookbooks/apache2/recipes/mod_dav_svn.rb +41 -0
  91. data/spec/chef_repo/cookbooks/apache2/recipes/mod_deflate.rb +22 -0
  92. data/spec/chef_repo/cookbooks/apache2/recipes/mod_dir.rb +22 -0
  93. data/spec/chef_repo/cookbooks/apache2/recipes/mod_env.rb +20 -0
  94. data/spec/chef_repo/cookbooks/apache2/recipes/mod_expires.rb +20 -0
  95. data/spec/chef_repo/cookbooks/apache2/recipes/mod_fastcgi.rb +26 -0
  96. data/spec/chef_repo/cookbooks/apache2/recipes/mod_fcgid.rb +55 -0
  97. data/spec/chef_repo/cookbooks/apache2/recipes/mod_headers.rb +20 -0
  98. data/spec/chef_repo/cookbooks/apache2/recipes/mod_include.rb +22 -0
  99. data/spec/chef_repo/cookbooks/apache2/recipes/mod_ldap.rb +20 -0
  100. data/spec/chef_repo/cookbooks/apache2/recipes/mod_log_config.rb +24 -0
  101. data/spec/chef_repo/cookbooks/apache2/recipes/mod_logio.rb +24 -0
  102. data/spec/chef_repo/cookbooks/apache2/recipes/mod_mime.rb +22 -0
  103. data/spec/chef_repo/cookbooks/apache2/recipes/mod_negotiation.rb +22 -0
  104. data/spec/chef_repo/cookbooks/apache2/recipes/mod_perl.rb +44 -0
  105. data/spec/chef_repo/cookbooks/apache2/recipes/mod_php5.rb +78 -0
  106. data/spec/chef_repo/cookbooks/apache2/recipes/mod_proxy.rb +22 -0
  107. data/spec/chef_repo/cookbooks/apache2/recipes/mod_proxy_ajp.rb +21 -0
  108. data/spec/chef_repo/cookbooks/apache2/recipes/mod_proxy_balancer.rb +20 -0
  109. data/spec/chef_repo/cookbooks/apache2/recipes/mod_proxy_connect.rb +20 -0
  110. data/spec/chef_repo/cookbooks/apache2/recipes/mod_proxy_http.rb +20 -0
  111. data/spec/chef_repo/cookbooks/apache2/recipes/mod_python.rb +37 -0
  112. data/spec/chef_repo/cookbooks/apache2/recipes/mod_rewrite.rb +20 -0
  113. data/spec/chef_repo/cookbooks/apache2/recipes/mod_setenvif.rb +22 -0
  114. data/spec/chef_repo/cookbooks/apache2/recipes/mod_ssl.rb +46 -0
  115. data/spec/chef_repo/cookbooks/apache2/recipes/mod_status.rb +22 -0
  116. data/spec/chef_repo/cookbooks/apache2/recipes/mod_wsgi.rb +38 -0
  117. data/spec/chef_repo/cookbooks/apache2/recipes/mod_xsendfile.rb +38 -0
  118. data/spec/chef_repo/cookbooks/apache2/templates/default/a2dismod.erb +22 -0
  119. data/spec/chef_repo/cookbooks/apache2/templates/default/a2dissite.erb +29 -0
  120. data/spec/chef_repo/cookbooks/apache2/templates/default/a2enmod.erb +37 -0
  121. data/spec/chef_repo/cookbooks/apache2/templates/default/a2ensite.erb +38 -0
  122. data/spec/chef_repo/cookbooks/apache2/templates/default/apache2.conf.erb +238 -0
  123. data/spec/chef_repo/cookbooks/apache2/templates/default/apache2.god.erb +19 -0
  124. data/spec/chef_repo/cookbooks/apache2/templates/default/charset.erb +6 -0
  125. data/spec/chef_repo/cookbooks/apache2/templates/default/default-site.erb +57 -0
  126. data/spec/chef_repo/cookbooks/apache2/templates/default/etc-sysconfig-httpd.erb +31 -0
  127. data/spec/chef_repo/cookbooks/apache2/templates/default/mods/README +2 -0
  128. data/spec/chef_repo/cookbooks/apache2/templates/default/mods/alias.conf.erb +24 -0
  129. data/spec/chef_repo/cookbooks/apache2/templates/default/mods/auth_cas.conf.erb +1 -0
  130. data/spec/chef_repo/cookbooks/apache2/templates/default/mods/auth_cas.load.erb +1 -0
  131. data/spec/chef_repo/cookbooks/apache2/templates/default/mods/authopenid.load.erb +1 -0
  132. data/spec/chef_repo/cookbooks/apache2/templates/default/mods/autoindex.conf.erb +101 -0
  133. data/spec/chef_repo/cookbooks/apache2/templates/default/mods/deflate.conf.erb +16 -0
  134. data/spec/chef_repo/cookbooks/apache2/templates/default/mods/dir.conf.erb +5 -0
  135. data/spec/chef_repo/cookbooks/apache2/templates/default/mods/fastcgi.conf.erb +5 -0
  136. data/spec/chef_repo/cookbooks/apache2/templates/default/mods/fcgid.conf.erb +10 -0
  137. data/spec/chef_repo/cookbooks/apache2/templates/default/mods/include.conf.erb +4 -0
  138. data/spec/chef_repo/cookbooks/apache2/templates/default/mods/include.erb +4 -0
  139. data/spec/chef_repo/cookbooks/apache2/templates/default/mods/mime.conf.erb +198 -0
  140. data/spec/chef_repo/cookbooks/apache2/templates/default/mods/negotiation.conf.erb +18 -0
  141. data/spec/chef_repo/cookbooks/apache2/templates/default/mods/php5.conf.erb +16 -0
  142. data/spec/chef_repo/cookbooks/apache2/templates/default/mods/proxy.conf.erb +19 -0
  143. data/spec/chef_repo/cookbooks/apache2/templates/default/mods/setenvif.conf.erb +28 -0
  144. data/spec/chef_repo/cookbooks/apache2/templates/default/mods/ssl.conf.erb +77 -0
  145. data/spec/chef_repo/cookbooks/apache2/templates/default/mods/status.conf.erb +26 -0
  146. data/spec/chef_repo/cookbooks/apache2/templates/default/port_apache.erb +3 -0
  147. data/spec/chef_repo/cookbooks/apache2/templates/default/ports.conf.erb +6 -0
  148. data/spec/chef_repo/cookbooks/apache2/templates/default/security.erb +50 -0
  149. data/spec/chef_repo/cookbooks/apache2/templates/default/web_app.conf.erb +47 -0
  150. data/spec/chef_repo/cookbooks/apt/.gitignore +14 -0
  151. data/spec/chef_repo/cookbooks/apt/.kitchen.yml +33 -0
  152. data/spec/chef_repo/cookbooks/apt/Berksfile +8 -0
  153. data/spec/chef_repo/cookbooks/apt/CHANGELOG.md +79 -0
  154. data/spec/chef_repo/cookbooks/apt/CONTRIBUTING +29 -0
  155. data/spec/chef_repo/cookbooks/apt/LICENSE +201 -0
  156. data/spec/chef_repo/cookbooks/apt/README.md +238 -0
  157. data/spec/chef_repo/cookbooks/apt/TESTING.md +25 -0
  158. data/spec/chef_repo/cookbooks/apt/attributes/default.rb +3 -0
  159. data/spec/chef_repo/cookbooks/apt/files/default/apt-proxy-v2.conf +50 -0
  160. data/spec/chef_repo/cookbooks/apt/metadata.json +34 -0
  161. data/spec/chef_repo/cookbooks/apt/metadata.rb +14 -0
  162. data/spec/chef_repo/cookbooks/apt/providers/preference.rb +61 -0
  163. data/spec/chef_repo/cookbooks/apt/providers/repository.rb +138 -0
  164. data/spec/chef_repo/cookbooks/apt/recipes/cacher-client.rb +59 -0
  165. data/spec/chef_repo/cookbooks/apt/recipes/cacher-ng.rb +38 -0
  166. data/spec/chef_repo/cookbooks/apt/recipes/default.rb +68 -0
  167. data/spec/chef_repo/cookbooks/apt/resources/preference.rb +30 -0
  168. data/spec/chef_repo/cookbooks/apt/resources/repository.rb +40 -0
  169. data/spec/chef_repo/cookbooks/apt/templates/default/01proxy.erb +2 -0
  170. data/spec/chef_repo/cookbooks/apt/templates/default/acng.conf.erb +276 -0
  171. data/spec/chef_repo/cookbooks/apt/templates/ubuntu-10.04/acng.conf.erb +270 -0
  172. data/spec/chef_repo/cookbooks/build-essential/.gitignore +4 -0
  173. data/spec/chef_repo/cookbooks/build-essential/.kitchen.yml +42 -0
  174. data/spec/chef_repo/cookbooks/build-essential/Berksfile +3 -0
  175. data/spec/chef_repo/cookbooks/build-essential/CHANGELOG.md +42 -0
  176. data/spec/chef_repo/cookbooks/build-essential/CONTRIBUTING +29 -0
  177. data/spec/chef_repo/cookbooks/build-essential/LICENSE +201 -0
  178. data/spec/chef_repo/cookbooks/build-essential/README.md +139 -0
  179. data/spec/chef_repo/cookbooks/build-essential/TESTING.md +25 -0
  180. data/spec/chef_repo/cookbooks/build-essential/attributes/default.rb +33 -0
  181. data/spec/chef_repo/cookbooks/build-essential/metadata.json +44 -0
  182. data/spec/chef_repo/cookbooks/build-essential/metadata.rb +16 -0
  183. data/spec/chef_repo/cookbooks/build-essential/recipes/debian.rb +45 -0
  184. data/spec/chef_repo/cookbooks/build-essential/recipes/default.rb +24 -0
  185. data/spec/chef_repo/cookbooks/build-essential/recipes/fedora.rb +36 -0
  186. data/spec/chef_repo/cookbooks/build-essential/recipes/mac_os_x.rb +40 -0
  187. data/spec/chef_repo/cookbooks/build-essential/recipes/rhel.rb +43 -0
  188. data/spec/chef_repo/cookbooks/build-essential/recipes/smartos.rb +36 -0
  189. data/spec/chef_repo/cookbooks/build-essential/recipes/solaris2.rb +42 -0
  190. data/spec/chef_repo/cookbooks/build-essential/recipes/suse.rb +36 -0
  191. data/spec/chef_repo/cookbooks/install_from/README.md +51 -0
  192. data/spec/chef_repo/cookbooks/install_from/attributes/default.rb +2 -0
  193. data/spec/chef_repo/cookbooks/install_from/metadata.json +46 -0
  194. data/spec/chef_repo/cookbooks/install_from/metadata.rb +19 -0
  195. data/spec/chef_repo/cookbooks/install_from/providers/release.rb +143 -0
  196. data/spec/chef_repo/cookbooks/install_from/recipes/default.rb +26 -0
  197. data/spec/chef_repo/cookbooks/install_from/resources/release.rb +121 -0
  198. data/spec/chef_repo/cookbooks/metachef/.rspec +3 -0
  199. data/spec/chef_repo/cookbooks/metachef/.watchr +20 -0
  200. data/spec/chef_repo/cookbooks/metachef/Gemfile +15 -0
  201. data/spec/chef_repo/cookbooks/metachef/README.md +97 -0
  202. data/spec/chef_repo/cookbooks/metachef/attributes/default.rb +18 -0
  203. data/spec/chef_repo/cookbooks/metachef/definitions/daemon_user.rb +68 -0
  204. data/spec/chef_repo/cookbooks/metachef/definitions/kill_old_service.rb +35 -0
  205. data/spec/chef_repo/cookbooks/metachef/definitions/standard_dirs.rb +54 -0
  206. data/spec/chef_repo/cookbooks/metachef/libraries/aspect.rb +125 -0
  207. data/spec/chef_repo/cookbooks/metachef/libraries/aspects.rb +170 -0
  208. data/spec/chef_repo/cookbooks/metachef/libraries/attr_struct.rb +160 -0
  209. data/spec/chef_repo/cookbooks/metachef/libraries/component.rb +164 -0
  210. data/spec/chef_repo/cookbooks/metachef/libraries/cookbook_utils.rb +69 -0
  211. data/spec/chef_repo/cookbooks/metachef/libraries/discovery.rb +124 -0
  212. data/spec/chef_repo/cookbooks/metachef/libraries/discovery_lol.rb +55 -0
  213. data/spec/chef_repo/cookbooks/metachef/libraries/dump_aspects.rb +83 -0
  214. data/spec/chef_repo/cookbooks/metachef/libraries/metachef.rb +18 -0
  215. data/spec/chef_repo/cookbooks/metachef/libraries/node_utils.rb +91 -0
  216. data/spec/chef_repo/cookbooks/metachef/metadata.json +102 -0
  217. data/spec/chef_repo/cookbooks/metachef/metadata.rb +39 -0
  218. data/spec/chef_repo/cookbooks/metachef/recipes/default.rb +22 -0
  219. data/spec/chef_repo/cookbooks/nginx/.gitignore +9 -0
  220. data/spec/chef_repo/cookbooks/nginx/.kitchen.yml +62 -0
  221. data/spec/chef_repo/cookbooks/nginx/Berksfile +7 -0
  222. data/spec/chef_repo/cookbooks/nginx/CHANGELOG.md +158 -0
  223. data/spec/chef_repo/cookbooks/nginx/CONTRIBUTING.md +257 -0
  224. data/spec/chef_repo/cookbooks/nginx/LICENSE +201 -0
  225. data/spec/chef_repo/cookbooks/nginx/README.md +398 -0
  226. data/spec/chef_repo/cookbooks/nginx/TESTING.md +25 -0
  227. data/spec/chef_repo/cookbooks/nginx/attributes/default.rb +89 -0
  228. data/spec/chef_repo/cookbooks/nginx/attributes/echo.rb +10 -0
  229. data/spec/chef_repo/cookbooks/nginx/attributes/geoip.rb +30 -0
  230. data/spec/chef_repo/cookbooks/nginx/attributes/headers_more.rb +22 -0
  231. data/spec/chef_repo/cookbooks/nginx/attributes/naxsi.rb +24 -0
  232. data/spec/chef_repo/cookbooks/nginx/attributes/repo.rb +30 -0
  233. data/spec/chef_repo/cookbooks/nginx/attributes/source.rb +41 -0
  234. data/spec/chef_repo/cookbooks/nginx/attributes/upload_progress.rb +23 -0
  235. data/spec/chef_repo/cookbooks/nginx/chefignore +96 -0
  236. data/spec/chef_repo/cookbooks/nginx/definitions/nginx_site.rb +41 -0
  237. data/spec/chef_repo/cookbooks/nginx/files/default/mime.types +74 -0
  238. data/spec/chef_repo/cookbooks/nginx/files/default/naxsi_core.rules +82 -0
  239. data/spec/chef_repo/cookbooks/nginx/files/default/tests/minitest/default_test.rb +12 -0
  240. data/spec/chef_repo/cookbooks/nginx/files/default/tests/minitest/source_test.rb +9 -0
  241. data/spec/chef_repo/cookbooks/nginx/files/default/tests/minitest/support/helpers.rb +7 -0
  242. data/spec/chef_repo/cookbooks/nginx/metadata.json +315 -0
  243. data/spec/chef_repo/cookbooks/nginx/metadata.rb +113 -0
  244. data/spec/chef_repo/cookbooks/nginx/recipes/authorized_ips.rb +37 -0
  245. data/spec/chef_repo/cookbooks/nginx/recipes/commons.rb +23 -0
  246. data/spec/chef_repo/cookbooks/nginx/recipes/commons_conf.rb +40 -0
  247. data/spec/chef_repo/cookbooks/nginx/recipes/commons_dir.rb +41 -0
  248. data/spec/chef_repo/cookbooks/nginx/recipes/commons_script.rb +28 -0
  249. data/spec/chef_repo/cookbooks/nginx/recipes/default.rb +46 -0
  250. data/spec/chef_repo/cookbooks/nginx/recipes/headers_more_module.rb +54 -0
  251. data/spec/chef_repo/cookbooks/nginx/recipes/http_echo_module.rb +46 -0
  252. data/spec/chef_repo/cookbooks/nginx/recipes/http_geoip_module.rb +116 -0
  253. data/spec/chef_repo/cookbooks/nginx/recipes/http_gzip_static_module.rb +23 -0
  254. data/spec/chef_repo/cookbooks/nginx/recipes/http_realip_module.rb +42 -0
  255. data/spec/chef_repo/cookbooks/nginx/recipes/http_ssl_module.rb +23 -0
  256. data/spec/chef_repo/cookbooks/nginx/recipes/http_stub_status_module.rb +36 -0
  257. data/spec/chef_repo/cookbooks/nginx/recipes/ipv6.rb +22 -0
  258. data/spec/chef_repo/cookbooks/nginx/recipes/naxsi_module.rb +53 -0
  259. data/spec/chef_repo/cookbooks/nginx/recipes/ohai_plugin.rb +39 -0
  260. data/spec/chef_repo/cookbooks/nginx/recipes/passenger.rb +81 -0
  261. data/spec/chef_repo/cookbooks/nginx/recipes/repo.rb +42 -0
  262. data/spec/chef_repo/cookbooks/nginx/recipes/source.rb +204 -0
  263. data/spec/chef_repo/cookbooks/nginx/recipes/upload_progress_module.rb +46 -0
  264. data/spec/chef_repo/cookbooks/nginx/templates/debian/nginx.init.erb +97 -0
  265. data/spec/chef_repo/cookbooks/nginx/templates/default/default-site.erb +11 -0
  266. data/spec/chef_repo/cookbooks/nginx/templates/default/modules/authorized_ip.erb +6 -0
  267. data/spec/chef_repo/cookbooks/nginx/templates/default/modules/http_geoip.conf.erb +4 -0
  268. data/spec/chef_repo/cookbooks/nginx/templates/default/modules/http_realip.conf.erb +4 -0
  269. data/spec/chef_repo/cookbooks/nginx/templates/default/modules/nginx_status.erb +14 -0
  270. data/spec/chef_repo/cookbooks/nginx/templates/default/modules/passenger.conf.erb +10 -0
  271. data/spec/chef_repo/cookbooks/nginx/templates/default/nginx-upstart.conf.erb +40 -0
  272. data/spec/chef_repo/cookbooks/nginx/templates/default/nginx.conf.erb +69 -0
  273. data/spec/chef_repo/cookbooks/nginx/templates/default/nginx.init.erb +111 -0
  274. data/spec/chef_repo/cookbooks/nginx/templates/default/nginx.pill.erb +15 -0
  275. data/spec/chef_repo/cookbooks/nginx/templates/default/nginx.sysconfig.erb +1 -0
  276. data/spec/chef_repo/cookbooks/nginx/templates/default/nxdissite.erb +29 -0
  277. data/spec/chef_repo/cookbooks/nginx/templates/default/nxensite.erb +38 -0
  278. data/spec/chef_repo/cookbooks/nginx/templates/default/plugins/nginx.rb.erb +66 -0
  279. data/spec/chef_repo/cookbooks/nginx/templates/default/sv-nginx-log-run.erb +2 -0
  280. data/spec/chef_repo/cookbooks/nginx/templates/default/sv-nginx-run.erb +3 -0
  281. data/spec/chef_repo/cookbooks/nginx/templates/gentoo/nginx.init.erb +87 -0
  282. data/spec/chef_repo/cookbooks/nginx/templates/ubuntu/nginx.init.erb +97 -0
  283. data/spec/chef_repo/cookbooks/ohai/CHANGELOG.md +27 -0
  284. data/spec/chef_repo/cookbooks/ohai/CONTRIBUTING +29 -0
  285. data/spec/chef_repo/cookbooks/ohai/LICENSE +201 -0
  286. data/spec/chef_repo/cookbooks/ohai/README.md +49 -0
  287. data/spec/chef_repo/cookbooks/ohai/attributes/default.rb +29 -0
  288. data/spec/chef_repo/cookbooks/ohai/files/default/plugins/README +1 -0
  289. data/spec/chef_repo/cookbooks/ohai/metadata.json +60 -0
  290. data/spec/chef_repo/cookbooks/ohai/metadata.rb +23 -0
  291. data/spec/chef_repo/cookbooks/ohai/recipes/default.rb +54 -0
  292. data/spec/chef_repo/cookbooks/redis/README.md +76 -0
  293. data/spec/chef_repo/cookbooks/redis/attributes/default.rb +51 -0
  294. data/spec/chef_repo/cookbooks/redis/metadata.json +304 -0
  295. data/spec/chef_repo/cookbooks/redis/metadata.rb +112 -0
  296. data/spec/chef_repo/cookbooks/redis/recipes/client.rb +23 -0
  297. data/spec/chef_repo/cookbooks/redis/recipes/default.rb +34 -0
  298. data/spec/chef_repo/cookbooks/redis/recipes/install_from_package.rb +26 -0
  299. data/spec/chef_repo/cookbooks/redis/recipes/install_from_release.rb +30 -0
  300. data/spec/chef_repo/cookbooks/redis/recipes/server.rb +42 -0
  301. data/spec/chef_repo/cookbooks/redis/templates/default/redis.conf.erb +136 -0
  302. data/spec/chef_repo/cookbooks/redis/templates/default/sv-redis_server-log-run.erb +2 -0
  303. data/spec/chef_repo/cookbooks/redis/templates/default/sv-redis_server-run.erb +6 -0
  304. data/spec/chef_repo/cookbooks/runit/.gitignore +17 -0
  305. data/spec/chef_repo/cookbooks/runit/.kitchen.yml +53 -0
  306. data/spec/chef_repo/cookbooks/runit/Berksfile +12 -0
  307. data/spec/chef_repo/cookbooks/runit/CHANGELOG.md +97 -0
  308. data/spec/chef_repo/cookbooks/runit/CONTRIBUTING.md +257 -0
  309. data/spec/chef_repo/cookbooks/runit/Gemfile +8 -0
  310. data/spec/chef_repo/cookbooks/runit/LICENSE +201 -0
  311. data/spec/chef_repo/cookbooks/runit/README.md +448 -0
  312. data/spec/chef_repo/cookbooks/runit/Rakefile +17 -0
  313. data/spec/chef_repo/cookbooks/runit/attributes/default.rb +77 -0
  314. data/spec/chef_repo/cookbooks/runit/files/default/runit-2.1.1.tar.gz +0 -0
  315. data/spec/chef_repo/cookbooks/runit/files/default/runit.seed +1 -0
  316. data/spec/chef_repo/cookbooks/runit/files/default/runsvdir +0 -0
  317. data/spec/chef_repo/cookbooks/runit/files/ubuntu-6.10/runsvdir +6 -0
  318. data/spec/chef_repo/cookbooks/runit/files/ubuntu-7.04/runsvdir +7 -0
  319. data/spec/chef_repo/cookbooks/runit/files/ubuntu-7.10/runsvdir +7 -0
  320. data/spec/chef_repo/cookbooks/runit/files/ubuntu-8.04/runsvdir +7 -0
  321. data/spec/chef_repo/cookbooks/runit/libraries/default.rb +0 -0
  322. data/spec/chef_repo/cookbooks/runit/libraries/provider_runit_service.rb +428 -0
  323. data/spec/chef_repo/cookbooks/runit/libraries/resource_runit_service.rb +185 -0
  324. data/spec/chef_repo/cookbooks/runit/metadata.rb +16 -0
  325. data/spec/chef_repo/cookbooks/runit/recipes/default.rb +124 -0
  326. data/spec/chef_repo/cookbooks/runit/templates/debian/init.d.erb +66 -0
  327. data/spec/chef_repo/cookbooks/runit/templates/gentoo/runit-start.sh.erb +32 -0
  328. data/spec/chef_repo/cookbooks/yum/.gitignore +14 -0
  329. data/spec/chef_repo/cookbooks/yum/.kitchen.yml +22 -0
  330. data/spec/chef_repo/cookbooks/yum/Berksfile +7 -0
  331. data/spec/chef_repo/cookbooks/yum/CHANGELOG.md +97 -0
  332. data/spec/chef_repo/cookbooks/yum/CONTRIBUTING.md +257 -0
  333. data/spec/chef_repo/cookbooks/yum/LICENSE +201 -0
  334. data/spec/chef_repo/cookbooks/yum/README.md +270 -0
  335. data/spec/chef_repo/cookbooks/yum/attributes/default.rb +30 -0
  336. data/spec/chef_repo/cookbooks/yum/attributes/elrepo.rb +24 -0
  337. data/spec/chef_repo/cookbooks/yum/attributes/epel.rb +39 -0
  338. data/spec/chef_repo/cookbooks/yum/attributes/remi.rb +30 -0
  339. data/spec/chef_repo/cookbooks/yum/files/default/tests/minitest/default_test.rb +28 -0
  340. data/spec/chef_repo/cookbooks/yum/files/default/tests/minitest/support/helpers.rb +37 -0
  341. data/spec/chef_repo/cookbooks/yum/files/default/tests/minitest/test_test.rb +66 -0
  342. data/spec/chef_repo/cookbooks/yum/metadata.json +100 -0
  343. data/spec/chef_repo/cookbooks/yum/metadata.rb +37 -0
  344. data/spec/chef_repo/cookbooks/yum/providers/key.rb +79 -0
  345. data/spec/chef_repo/cookbooks/yum/providers/repository.rb +124 -0
  346. data/spec/chef_repo/cookbooks/yum/recipes/default.rb +18 -0
  347. data/spec/chef_repo/cookbooks/yum/recipes/elrepo.rb +31 -0
  348. data/spec/chef_repo/cookbooks/yum/recipes/epel.rb +35 -0
  349. data/spec/chef_repo/cookbooks/yum/recipes/ius.rb +42 -0
  350. data/spec/chef_repo/cookbooks/yum/recipes/remi.rb +35 -0
  351. data/spec/chef_repo/cookbooks/yum/recipes/repoforge.rb +41 -0
  352. data/spec/chef_repo/cookbooks/yum/recipes/test.rb +39 -0
  353. data/spec/chef_repo/cookbooks/yum/recipes/yum.rb +23 -0
  354. data/spec/chef_repo/cookbooks/yum/resources/key.rb +29 -0
  355. data/spec/chef_repo/cookbooks/yum/resources/repository.rb +41 -0
  356. data/spec/chef_repo/cookbooks/yum/templates/default/repo.erb +38 -0
  357. data/spec/chef_repo/cookbooks/yum/templates/default/yum-rhel5.conf.erb +33 -0
  358. data/spec/chef_repo/cookbooks/yum/templates/default/yum-rhel6.conf.erb +36 -0
  359. data/spec/chef_repo/data_bags/.gitkeep +0 -0
  360. data/spec/chef_repo/data_bags/sample/items.json +1 -0
  361. data/spec/chef_repo/roles/.gitkeep +0 -0
  362. data/spec/chef_repo/roles/dummy.json +14 -0
  363. data/spec/chef_repo/site-cookbooks/.gitkeep +0 -0
  364. data/spec/chef_repo/site-cookbooks/sample/CHANGELOG.md +12 -0
  365. data/spec/chef_repo/site-cookbooks/sample/README.md +68 -0
  366. data/spec/chef_repo/site-cookbooks/sample/metadata.rb +7 -0
  367. data/spec/chef_repo/site-cookbooks/sample/recipes/default.rb +18 -0
  368. data/spec/chef_repo/solo.rb +3 -0
  369. data/spec/fixtures/items.json +1 -0
  370. data/spec/spec_helper.rb +32 -0
  371. metadata +880 -0
@@ -0,0 +1,448 @@
1
+ Description
2
+ ===========
3
+
4
+ Installs runit and provides the `runit_service` service resource for
5
+ managing processes (services) under runit.
6
+
7
+ This cookbook does not use runit to replace system init, nor are there
8
+ plans to do so.
9
+
10
+ For more information about runit:
11
+
12
+ * http://smarden.org/runit/
13
+
14
+ About Runit
15
+ ===========
16
+
17
+ In brief, Runit is a process supervision suite. It is simple to set
18
+ up, and doesn't require complex shell scripts to be written to start
19
+ processes running as system services.
20
+
21
+ To manage a process in runit, create a "service" directory that
22
+ contains a "`run`" script. In this cookbook we refer to that directory
23
+ as the `sv_dir` (see __Attributes__ and __Resource/Provider__). That
24
+ service directory is symbolically linked into runit's own service
25
+ directory where its `runsvdir` program looks for processes to manage.
26
+ See the [runit documentation](http://smarden.org/runit/) for detailed
27
+ information on runit.
28
+
29
+ Supervised processes are analogous to services under other systems
30
+ such as sysvinit or upstart.
31
+
32
+ Requirements
33
+ ============
34
+
35
+ ## Platform:
36
+
37
+ * Debian/Ubuntu
38
+ * Gentoo
39
+ * RHEL
40
+
41
+ Attributes
42
+ ==========
43
+
44
+ See `attributes/default.rb` for defaults generated per platform.
45
+
46
+ * `node['runit']['sv_bin']` - Full path to the `sv` binary.
47
+ * `node['runit']['chpst_bin']` - Full path to the `chpst` binary.
48
+ * `node['runit']['service_dir']` - Full path to the default "services"
49
+ directory where enabled services are linked.
50
+ * `node['runit']['sv_dir']` - Full path to the directory where
51
+ service lives, which gets linked to `service_dir`.
52
+ * `node['runit']['start']` - Command to start the runsvdir service
53
+ * `node['runit']['stop]` - Command to stop the runsvdir service
54
+ * `node['runit']['reload']` - Command to reload the runsvdir service
55
+
56
+ Recipes
57
+ =======
58
+
59
+ default
60
+ -------
61
+
62
+ The default recipe installs runit and starts `runsvdir` to supervise
63
+ the services in runit's service directory (e.g., `/etc/service`).
64
+
65
+ On RHEL family systems, it will build the runit RPM using [Ian Meyer's
66
+ runit RPM SPEC](https://github.com/imeyer/runit-rpm).
67
+
68
+ On Debian family systems, the runit packages are maintained by the
69
+ runit author, Gerrit Pape, and the recipe will use that for
70
+ installation.
71
+
72
+ On Gentoo, the runit ebuild package is installed.
73
+
74
+ Resource/Provider
75
+ =================
76
+
77
+ This cookbook has a resource, `runit_service`, for managing services
78
+ under runit. This service subclasses the Chef `service` resource.
79
+
80
+ **This resource replaces the runit_service definition. See the
81
+ CHANGELOG.md file in this cookbook for breaking change information
82
+ and any actions you may need to take to update cookbooks using
83
+ runit_service.**
84
+
85
+ ## Actions:
86
+
87
+ - **enable** - enables the service, creating the required run scripts
88
+ and symlinks. This is the default action.
89
+ - **start** - starts the service with `sv start`
90
+ - **stop** - stops the service with `sv stop`
91
+ - **disable** - stops the service with `sv down` and removes the service symlink
92
+ - **restart** - restarts the service with `sv restart`
93
+ - **reload** - reloads the service with `sv force-reload`
94
+ - **once** - starts the service with `sv once`.
95
+ - **hup** - sends the `HUP` signal to the service with `sv hup`
96
+ - **cont** - sends the `CONT` signal to the service
97
+ - **term** - sends the `TERM` signal to the service
98
+ - **kill** - sends the `KILL` signal to the service
99
+ - **up** - starts the service with `sv up`
100
+ - **down** - downs the service with `sv down`
101
+ - **usr1** - sends the `USR1` signal to the service with `sv 1`
102
+ - **usr2** - sends the `USR2` signal to the service with `sv 2`
103
+
104
+ Service management actions are taken with runit's "`sv`" program.
105
+
106
+ Read the `sv(8)` [man page](http://smarden.org/runit/sv.8.html) for
107
+ more information on the `sv` program.
108
+
109
+ ## Parameter Attributes
110
+
111
+ The first three parameters, `sv_dir`, `service_dir`, and `sv_bin` will
112
+ attempt to use the corresponding node attributes, and fall back to
113
+ hardcoded default values that match the settings used on Debian
114
+ platform systems.
115
+
116
+ Many of these parameters are only used in the `:enable` action.
117
+
118
+ - **sv_dir** - The base "service directory" for the services managed by
119
+ the resource. By default, this will attempt to use the
120
+ `node['runit']['sv_dir']` attribute, and falls back to `/etc/sv`.
121
+ - **service_dir** - The directory where services are symlinked to be
122
+ supervised by `runsvdir`. By default, this will attempt to use the
123
+ `node['runit']['service_dir']` attribute, and falls back to
124
+ `/etc/service`.
125
+ - **sv_bin** - The path to the `sv` program binary. This will attempt
126
+ to use the `node['runit']['sv_bin']` attribute, and falls back to
127
+ `/usr/bin/sv`.
128
+ - **service_name** - *Name attribute*. The name of the service. This
129
+ will be used in the directory of the managed service in the
130
+ `sv_dir` and `service_dir`.
131
+ - **sv_templates** - If true, the `:enable` action will create the
132
+ service directory with the appropriate templates. Default is
133
+ `true`. Set this to `false` if the service has a package that
134
+ provides its own service directory. See __Usage__ examples.
135
+ - **options** - Options passed as variables to templates, for
136
+ compatibility with legacy runit service definition. Default is an
137
+ empty hash.
138
+ - **env** - A hash of environment variables with their values as content
139
+ used in the service's `env` directory. Default is an empty hash.
140
+ - **log** - Whether to start the service's logger with svlogd, requires
141
+ a template `sv-service_name-log-run.erb` to configure the log's run
142
+ script. Default is true.
143
+ - **default_logger** - Whether a default `log/run` script should be set
144
+ up. If true, the default content of the run script will use
145
+ `svlogd` to write logs to `/var/log/service_name`. Default is false.
146
+ - **cookbook** - A cookbook where templates are located instead of
147
+ where the resource is used. Applies for all the templates in the
148
+ `enable` action.
149
+ - **finish** - whether the service has a finish script, requires a
150
+ template `sv-service_name-finish.erb`
151
+ - **control** - An array of signals to customize control of the service,
152
+ see [runsv man page](http://smarden.org/runit/runsv.8.html) on how
153
+ to use this. This requires that each template be created with the
154
+ name `sv-service_name-signal.erb`.
155
+ - **owner** - user that should own the templates created to enable the
156
+ service
157
+ - **group** - group that should own the templates created to enable the
158
+ service
159
+ - **run_template_name** - alternate filename of the run run script to
160
+ use replacing `service_name`.
161
+ - **log_template_name** - alternate filename of the log run script to
162
+ use replacing `service_name`.
163
+ - **finish_script_template_name** - alternate filename of the finish
164
+ script to use, replacing `service_name`.
165
+ - **control_template_names** - a hash of control signals (see *control*
166
+ above) and their alternate template name(s) replacing
167
+ `service_name`.
168
+ - **status_command** - The command used to check the status of the
169
+ service to see if it is enabled/running (if it's running, it's
170
+ enabled). This hardcodes the location of the sv program to
171
+ `/usr/bin/sv` due to the aforementioned cookbook load order.
172
+ - **restart_on_update** - Whether the service should be restarted when
173
+ the run script is updated. Defaults to `true`. Set to `false` if
174
+ the service shouldn't be restarted when the run script is updated.
175
+
176
+ Unlike previous versions of the cookbook using the `runit_service`
177
+ definition, the `runit_service` resource can be notified. See
178
+ __Usage__ examples below.
179
+
180
+ Usage
181
+ =====
182
+
183
+ To get runit installed on supported platforms, use `recipe[runit]`.
184
+ Once it is installed, use the `runit_service` resource to set up
185
+ services to be managed by runit.
186
+
187
+ In order to use the `runit_service` resource in your cookbook(s), each
188
+ service managed will also need to have `sv-service_name-run.erb` and
189
+ `sv-service_name-log-run.erb` templates created. If the `log`
190
+ parameter is false, the log run script isn't created. If the `log`
191
+ parameter is true, and `default_logger` is also true, the log run
192
+ script will be created with the default content:
193
+
194
+ #!/bin/sh
195
+ exec svlogd -tt /var/log/service_name
196
+
197
+ Examples
198
+ --------
199
+
200
+ These are example use cases of the `runit_service` resource described
201
+ above. There are others in the `runit_test` cookbook that is included
202
+ in the [git repository](https://github.com/opscode-cookbooks/runit).
203
+
204
+ **Default Example**
205
+
206
+ This example uses all the defaults in the `:enable` action to set up
207
+ the service.
208
+
209
+ We'll set up `chef-client` to run as a service under runit, such as is
210
+ done in the `chef-client` cookbook. This example will be more simple
211
+ than in that cookbook. First, create the required run template,
212
+ `chef-client/templates/default/sv-chef-client-run.erb`.
213
+
214
+ #!/bin/sh
215
+ exec 2>&1
216
+ exec /usr/bin/env chef-client -i 1800 -s 30
217
+
218
+ Then create the required log/run template,
219
+ `chef-client/templates/default/sv-chef-client-log-run.erb`.
220
+
221
+ #!/bin/sh
222
+ exec svlogd -tt ./main
223
+
224
+ __Note__ This will cause output of the running process to go to
225
+ `/etc/sv/chef-client/log/main/current`. Some people may not like this,
226
+ see the following example. This is preserved for compatibility reasons.
227
+
228
+ Finally, set up the service in the recipe with:
229
+
230
+ runit_service "chef-client"
231
+
232
+ **Default Logger Example**
233
+
234
+ To use a default logger with svlogd which will log to
235
+ `/var/log/chef-client/current`, instead, use the `default_logger` option.
236
+
237
+ runit_service "chef-client" do
238
+ default_logger true
239
+ end
240
+
241
+ **No Log Service**
242
+
243
+ If there isn't an appendant log service, set `log` to false, and the
244
+ log/run script won't be created.
245
+
246
+ runit_service "no-svlog" do
247
+ log false
248
+ end
249
+
250
+ **Finish Script**
251
+
252
+ To create a service that has a finish script in its service directory,
253
+ set the `finish` parameter to `true`, and create a
254
+ `sv-finisher-finish.erb` template.
255
+
256
+ runit_service "finisher" do
257
+ finish true
258
+ end
259
+
260
+ This will create `/etc/sv/finisher/finish`.
261
+
262
+ **Alternate service directory**
263
+
264
+ If the service directory for the managed service isn't the `sv_dir`
265
+ (`/etc/sv`), then specify it:
266
+
267
+ runit_service "custom_service" do
268
+ sv_dir "/etc/custom_service/runit"
269
+ end
270
+
271
+ **No Service Directory**
272
+
273
+ If the service to manage has a package that provides its service
274
+ directory, such as `git-daemon` on Debian systems, set `sv_templates`
275
+ to false.
276
+
277
+ package "git-daemon-run"
278
+
279
+ runit_service "git-daemon" do
280
+ sv_templates false
281
+ end
282
+
283
+ This will create the service symlink in `/etc/service`, but it will
284
+ not manage any templates in the service directory.
285
+
286
+ **User Controlled Services**
287
+
288
+ To set up services controlled by a non-privileged user, we follow the
289
+ recommended configuration in the
290
+ [runit documentation](http://smarden.org/runit/faq.html#user) (Is it
291
+ possible to allow a user other than root to control a service?).
292
+
293
+ Suppose the user's name is floyd, and floyd wants to run floyds-app.
294
+ Assuming that the floyd user and group are already managed with Chef,
295
+ create a `runsvdir-floyd` runit_service.
296
+
297
+ runit_service "runsvdir-floyd"
298
+
299
+ Create the `sv-runsvdir-floyd-log-run.erb` template, or add `log
300
+ false`. Also create the `sv-runsvdir-floyd-run.erb` with the following
301
+ content:
302
+
303
+ #!/bin/sh
304
+ exec 2>&1
305
+ exec chpst -ufloyd runsvdir /home/floyd/service
306
+
307
+ Next, create the `runit_service` resource for floyd's app:
308
+
309
+ runit_service "floyds-app" do
310
+ sv_dir "/home/floyd/sv"
311
+ service_dir "/home/floyd/service"
312
+ owner "floyd"
313
+ group "floyd"
314
+ end
315
+
316
+ And now floyd can manage the service with sv:
317
+
318
+ $ id
319
+ uid=1000(floyd) gid=1001(floyd) groups=1001(floyd)
320
+ $ sv stop /home/floyd/service/floyds-app/
321
+ ok: down: /home/floyd/service/floyds-app/: 0s, normally up
322
+ $ sv start /home/floyd/service/floyds-app/
323
+ ok: run: /home/floyd/service/floyds-app/: (pid 5287) 0s
324
+ $ sv status /home/floyd/service/floyds-app/
325
+ run: /home/floyd/service/floyds-app/: (pid 5287) 13s; run: log: (pid 4691) 726s
326
+
327
+ **Options**
328
+
329
+ Next, let's set up memcached under runit with some additional options
330
+ using the `options` parameter. First, the
331
+ `memcached/templates/default/sv-memcached-run.erb` template:
332
+
333
+ #!/bin/sh
334
+ exec 2>&1
335
+ exec chpst -u <%= @options[:user] %> /usr/bin/memcached -v -m <%= @options[:memory] %> -p <%= @options[:port] %>
336
+
337
+ Note that the script uses `chpst` (which comes with runit) to set the
338
+ user option, then starts memcached on the specified memory and port
339
+ (see below).
340
+
341
+ The log/run template,
342
+ `memcached/templates/default/sv-memcached-log-run.erb`:
343
+
344
+ #!/bin/sh
345
+ exec svlogd -tt ./main
346
+
347
+ Finally, the `runit_service` in our recipe:
348
+
349
+ runit_service "memcached" do
350
+ options({
351
+ :memory => node[:memcached][:memory],
352
+ :port => node[:memcached][:port],
353
+ :user => node[:memcached][:user]}.merge(params)
354
+ )
355
+ end
356
+
357
+ This is where the user, port and memory options used in the run
358
+ template are used.
359
+
360
+ **Notifying Runit Services**
361
+
362
+ In previous versions of this cookbook where the definition was used,
363
+ it created a `service` resource that could be notified. With the
364
+ `runit_service` resource, recipes need to use the full resource name.
365
+ For example:
366
+
367
+ runit_service "my-service"
368
+
369
+ template "/etc/my-service.conf" do
370
+ notifies :restart, "runit_service[my-service]"
371
+ end
372
+
373
+ Because the resource implements actions for various commands that `sv`
374
+ can send to the service, any of those actions could be used for
375
+ notification. For example, `chef-client` supports triggering a Chef
376
+ run with a USR1 signal.
377
+
378
+ template "/tmp/chef-notifier" do
379
+ notifies :usr1, "runit_service[chef-client]"
380
+ end
381
+
382
+ For older implementations of services that used `runit_service` as a
383
+ definition, but may support alternate service styles, use a
384
+ conditional, such as based on an attribute:
385
+
386
+ service_to_notify = case node['nginx']['init_style']
387
+ when "runit"
388
+ "runit_service[nginx]"
389
+ else
390
+ "service[nginx]"
391
+ end
392
+
393
+ template "/etc/nginx/nginx.conf" do
394
+ notifies :restart, service_to_notify
395
+ end
396
+
397
+ **More Examples**
398
+
399
+ For more examples, see the `runit_test` cookbook's `service` recipe in
400
+ the [git repository](https://github.com/opscode-cookbooks/runit).
401
+
402
+ Testing
403
+ =======
404
+
405
+ This cookbook has tests in the GitHub repository. To run the tests:
406
+
407
+ git clone git://github.com/opscode-cookbooks/runit.git
408
+ cd runit
409
+ bundle install
410
+
411
+ There are two kinds of tests, unit tests and integration tests.
412
+
413
+ ## Unit Tests
414
+
415
+ The resource/provider code is unit tested with rspec. To run these
416
+ tests, use rake:
417
+
418
+ bundle exec rake spec
419
+
420
+ ## Integration Tests
421
+
422
+ Integration tests are setup to run under minitest-chef. They are
423
+ automatically run under test kitchen.
424
+
425
+ bundle exec kitchen test
426
+
427
+ This tests the default recipe ("default" configuration), and various
428
+ uses of the `runit_service` resource ("service" configuration).
429
+
430
+ License and Author
431
+ ==================
432
+
433
+ Author:: Adam Jacob <adam@opscode.com>
434
+ Author:: Joshua Timberman <joshua@opscode.com>
435
+
436
+ Copyright:: 2008-2013, Opscode, Inc
437
+
438
+ Licensed under the Apache License, Version 2.0 (the "License");
439
+ you may not use this file except in compliance with the License.
440
+ You may obtain a copy of the License at
441
+
442
+ http://www.apache.org/licenses/LICENSE-2.0
443
+
444
+ Unless required by applicable law or agreed to in writing, software
445
+ distributed under the License is distributed on an "AS IS" BASIS,
446
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
447
+ See the License for the specific language governing permissions and
448
+ limitations under the License.
@@ -0,0 +1,17 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ Bundler.setup
4
+
5
+ require 'rake'
6
+ require 'foodcritic'
7
+ require 'rspec/core/rake_task'
8
+
9
+ task :default => [:spec]
10
+
11
+ RSpec::Core::RakeTask.new(:spec) do |t|
12
+ t.pattern = "./test/spec{,/*/**}/*_spec.rb"
13
+ end
14
+
15
+ FoodCritic::Rake::LintTask.new do |t|
16
+ t.options = {:fail_tags => ['correctness']}
17
+ end