miguno/puppet-zookeeper — pull request #2 by patoarvizu (2014-03-27 22:53:20+00:00)
Title: Add configuration and tests to make the module Debian-compatible

I don't think it would be too hard to make this Debian-compatible.

Creating a .deb from a .rpm is trivial with tools like alien. Also, the Cloudera repo has .deb packages, but this module seems too coupled with the Cloudera package.

If you download the zookeeper tar.gz from the apache project page, you can untar it and build a deb or rpm package from the source using ant. But the control scripts in these packages are different than what the Cloudera package provides. Mainly, they don't require a 'service zookeeper-server init'.

I'm adding a parameter to indicate if the package comes from Cloudera or somewhere else, with a default of Cloudera. Then I use that to construct the $initialize_check variable and setting it to empty if the service doesn't need to be initialized.

Accordingly I'm also adding 'Debian' to the list of supported os families.

One last minor thing: I'm parameterizing the 'zookeeper-initialize' exec to sync it up with the $package_name variable.

I'm much less familiar with zookeeper than with puppet, so it's possible that I'm overseeing something, but I'd appreciate the feedback so I can rework my solution.

Thanks!