A set of Chef recipes for installing and configuring Apache Zookeeper.
Clone or download
Latest commit abceab8 Mar 7, 2016
Failed to load latest commit information.
attributes Fixes license copyright year in attributes. Jan 14, 2016
libraries Update code documentation. Feb 22, 2016
recipes Accept oracle terms by default. Feb 27, 2016
.codeclimate.yml Adds codeclimate configuration file. Jan 14, 2016
.rubocop.yml SingleSpaceBeforeFirstArg been renamed Feb 27, 2016
.yardopts Adds yardopts to the project. Jul 30, 2015
Berksfile Finally puts some lipstick on this pig! Jun 18, 2015
CHANGELOG.md Fixes java-properties gem to be loaded correctly. Jan 14, 2016
README.md Correcting the json, fqdn and ensemble example. Feb 21, 2016
Rakefile Updates travis.yml with cargo-cult Rakefile. Aug 28, 2015
chefignore Initial commit of zookeeper-cluster cookbook. Apr 6, 2015



Build Status Code Quality Cookbook Version License

Application cookbook which installs and configures Apache Zookeeper.

Apache Zookeeper is a highly-available, centralized service which is commonly used for maintaining configuration information, distributed service discovery and providing coordination services. This cookbook takes a simplified approach towards configuring Apache Zookeeper.

Basic Usage

This cookbook was designed from the ground up to make it dead simple to install and configure a Zookeeper cluster using Chef. It also highlights several of our best practices for developing reusable Chef cookbooks at Bloomberg.

This cookbook provides node attributes which can be used to fine tune the default recipe which installs and configures Zookeeper. The values from the node attributes are passed directly into the configuration and service resources.

Out of the box the following platforms are certified to work and are tested using our Test Kitchen configuration. Additional platforms may work, but your mileage may vary.

  • CentOS (RHEL) 6.6, 7.1
  • Ubuntu 12.04, 14.04

The correct way to use this cookbook is to create a wrapper cookbook which configures all of the members of the Zookeeper ensemble (cluster). We do this by using a data bag for each Chef environment. The default recipe in your wrapper cookbook may look something like the following block:

bag = data_bag_item('config', 'zookeeper')[node.chef_environment]
node.default['zookeeper-cluster']['config']['instance_name'] = node['fqdn']
node.default['zookeeper-cluster']['config']['ensemble'] = bag
include_recipe 'zookeeper-cluster::default'

The data bag for the above block should have an array of fully-qualified hostnames, the exact ones that appear in node['fqdn'], which represent the members of the Zookeeper ensemble. These hostnames are used when configuring the Zookeeper service on each node.

  "id": "zookeeper",
  "development": [
  "production": [