Code Monkey home page Code Monkey logo

zookeeper-cookbook's Introduction

zookeeper-cluster-cookbook

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": [
    "zk1.dev.inf.example.com",
    "zk2.dev.inf.example.com",
    "zk3.dev.inf.example.com"
  ],
  "production": [
    "zk1.prod.inf.example.com",
    "zk2.prod.inf.example.com",
    "zk3.prod.inf.example.com",
    "zk4.prod.inf.example.com",
    "zk5.prod.inf.example.com",
  ]
}

zookeeper-cookbook's People

Contributors

acaiafa avatar cobusbernard avatar jerenkrantz avatar johnbellone avatar meson10 avatar sparciii avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.