lusis/chef-logstash — pull request #108 by pcn (2013-05-10 08:34:49+00:00)
Title: Fixup to use runit and the runit_service lwrp

Even on ubuntu 12.04 and above, we'd like to keep using runit.

I've added some flexibility to the agent recipe to get runit working with it on ubuntu:

1) Provides a node['logstash']['agent']['use_runit'] flag. When this is set to true, then runit will be used for startup no matter what the platform
2) When using runit, it's more in keeping with how it works to have the logs managed via stdout and have them be rotated via svlogd. Since svlogd wants to manage one directory per service, add the attribute node['logstash']['agent']['log_dir'], and if its set, use that for logs (and don't set up log rotation on /var/log/logstash since it wouldn't be used for this case).
3) The newest runit_service LWRP will try to start the service as soon as it's defined. Move the creation of the service until after the jar is downloaded and in place.

I'm doing this so that I can create a wrapper cookbook that can customize this cookbook, and I think these are the things that would make this work on ubuntu 12.04 and later for me.

Thanks!