evertrue / zookeeper-cookbook

Chef cookbook for installing and managing Zookeeper.

Home Page:https://supermarket.chef.io/cookbooks/zookeeper

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement zookeeper_service

jakedavis opened this issue · comments

The Zookeeper docs recommend process supervision. As a baseline, we should have a resource which basically calls zkServer.sh start. But as a more resilient solution, we should probably have a Runit option, and possibly others depending on peoples' cup of tea.

What's the status of this, @jakedavis? Had some great momentum going!

Ha, status is we have a service internally and maybe I should slurp it into this cookbook :) I think I did take a swing at a zookeeper_service resource, but it got messy quickly when I tried to be dynamic about it.

Thinking at the least we can add a node[:zookeeper][:service_style] attribute that defaults to runit, run a case on it in a service recipe and then just have Runit for now. The Sensu cookbook kind of does this (here), so maybe using that as inspiration might work.

@jakedavis sounds like a great path to tread to get this to a minimally working state. Thanks also for access to SimpleFinance/chef-exhibitor.

Alright, took a swing at it in #91

Since we usually use upstart to manage services, here's a stab at some upstart supprt

Is there some way to control what user zookeeper is run as using runit? If I use systemv, zookeeper runs as zookeeper. But with runit, it always seems to start up as root.

@corbesero that’d be a separate issue, which I’ve opened here: #166. This issue is meant to cover a refactor of how the service is set up; it should be refactored as its own custom resource.

I think this would best be served as part of a larger refactor of the LWRPs into Chef 12.5-style custom resources.