Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

zookeeper (82) Versions 2.8.0

Installs/Configures zookeeper

Policyfile
Berkshelf
Knife
cookbook 'zookeeper', '= 2.8.0', :supermarket
cookbook 'zookeeper', '= 2.8.0'
knife supermarket install zookeeper
knife supermarket download zookeeper
README
Dependencies
Changelog
Quality 0%

Table of Contents

Zookeeper

Zookeeper is a coordination and discovery
service maintained by the Apache Software Foundation.

This cookbook focuses on deploying Zookeeper via Chef.

Usage

This cookbook is primarily a library cookbook. It implements a zookeeper
resource to handle the installation and configuration of Zookeeper. It ships
with a default recipe for backwards compatibility pre-LWRP which will work
fine, but is really just an example.

For local development, you can either use Vagrant, in which case you will need
the vagrant-omnibus Vagrant plugin:

vagrant plugin install vagrant-omnibus

Or, you can use Test-Kitchen, which will handle the bootstrapping for you, and
is the preferred method for testing this cookbook (usually via a wrapper
cookbook).

Recipes

  • zookeeper::default : Installs and configures zookeeper. This does not start or manage the service.
  • zookeeper::install : Installs the zookeeper but does not configure it.
  • zookeeper::config_render : Configures zookeeper but does not install it.
  • zookeeper::service : Starts and manages the zookeeper service. Requires zookeeper to be installed/configured.

Resources

This cookbook ships with one resource, with future plans for two more covering
service management and configuration rendering.

zookeeper

The zookeeper resource is responsible for installing and (eventually)
uninstalling Zookeeper from a node.

Actions: :install, :uninstall

Parameters:
* version: Version of Zookeeper to install (name attribute)
* user: The user who will eventually run Zookeeper (default: 'zookeeper')
* mirror: The mirror to obtain Zookeeper from (required)
* checksum: Checksum for the Zookeeper download file
* install_dir: Which directory to install Zookeeper to (default:
`'/opt/zookeeper')

Example:
ruby
zookeeper '3.4.6' do
user 'zookeeper'
mirror 'http://www.poolsaboveground.com/apache/zookeeper'
checksum '01b3938547cd620dc4c93efe07c0360411f4a66962a70500b163b59014046994'
action :install
end

zookeeper_config

This resource renders a Zookeeper configuration file. Period-delimited
parameters can be specified either as a flat hash, or by embeddeding each
sub-section within a separate hash. See the example below for an example.

Actions: :render, :delete

Parameters:
* user: The user to give ownership of the file to (default: zookeeper)
* config: Hash of configuration parameters to add to the file
* path: Path to write the configuration file to.

Example:
``` ruby
config_hash = {
clientPort: 2181,
dataDir: '/mnt/zk',
tickTime: 2000,
autopurge: {
snapRetainCount: 1,
purgeInterval: 1
}
}

zookeeper_config '/opt/zookeeper/zookeeper-3.4.6/conf/zoo.cfg' do
config config_hash
user 'zookeeper'
action :render
end
```

zookeeper_node

This resource can create nodes in Zookeeper.

Actions: :create, :create_if_missing, :delete

Parameters:
* path: The zookeeper node path (default: The name of the resource)
* connect_str: The zookeeper connection string (required)
* data: The data to write to the node

Example:
ruby
zookeeper_node '/data/myNode' do
action :create
connect_str "localhost:2181"
data "my data"
end

Errata

  • Version 1.4.7 on the community site is in fact version 1.4.8.

Author and License

Simple Finance ops@simple.com
Apache License, Version 2.0

CHANGELOG for zookeeper

This file is used to list changes made in each version of zookeeper.

2.8.0

  • Proper init support (contributed by @shaneramey)

2.7.0

  • Add some tests
  • Fix up zookeeper_node
  • Call runit recipe before service declaration

2.6.0

  • Run apt::default and update at compille time if on Debian (#127)

2.5.1

  • Report zookeeper_config as updated only if zoo.cfg is updated (#110)
  • Fix zk_installed return value (#113)
  • Fix docs (#114, #115)
  • Fix for undefined new method error (#116)
  • Always install build-essential, regardless of usage of java cookbook

2.5.0

  • Allow configurable data_dir parameter for Zookeeper data directory location (contributed by @eherot)

2.4.3

  • Fix erroneous attribute reference

2.4.2

  • Allow pre-installed Java (contributed by @solarce)

2.4.1

  • Fixed recipe call (contributed by @solarce)

2.4.0

  • Split out config rendering to separate recipe (contributed by @solarce)

2.3.0

  • Split out installation to a separate recipe (contributed by @Gazzonyx)

2.2.1

  • Set minimum build-essential version for RHEL support (contributed by @Gazzonyx)

2.2.0

  • Upstart support (contributed by @solarce)

2.1.1

  • Added a service recipe which can be run and activated using new service_style attribute.

2.1.0

  • A basic configuration is rendered by default.
  • Clarify some points in the README about zookeeper_config

2.0.0

  • Exhibitor cookbook factored out (contributed by @wolf31o2)
  • Zookeeper recipe rewritten as LWRP
  • Documentation updated slightly
  • Tested and verified and (hopefully) as backwards-compatible as possible
    • Being a full version bump, there are no backwards-compatibility promises
  • TODO
    • Better documentation
    • zookeeper_service resource
    • zookeeper_config resource
    • Better tests
    • Swap out "community" Java

1.7.4

  • Force build-essential to run at compile time (contributed by @davidgiesberg)

1.7.3

  • Bugfix for attribute access (fixes 1.7.2 bug)

1.7.2

  • Move ZK download location calculation to recipe to eliminate ordering bug

1.7.1

  • Test-kitchen support added
  • Patch installed to support CentOS platform

1.7.0

  • Switched to Runit for process supervision (contributed by @gansbrest)
  • DEPRECATION WARNING: Upstart is no longer supported and has been removed
  • Re-add check-local-zk.py script but punt on utilizing it
  • This means we recommend staying on 1.6.1 or below if you use Upstart
  • In the meantime, we are working on a strategy to integrate this functionality into the Runit script, to support dependent services

1.6.0

  • Attribute overrides to defaultconfig should now work (contributed by @trane)

1.5.1

  • Add correct (Apache v2) license to metadta.rb (#61)

1.5.0

  • Add logic to download existing exhibitor jar

1.4.10

  • changes: Skip S3 credentials file if AWS credentials are not provided
  • Moved property files from inaccessible chef dir to exhibitor install dir.
  • Logged output to syslog.
  • Added option to set exhibitor/amazon log level

1.4.9

  • Added: s3credentials template to assist with --configtype s3

1.4.8

  • Added config hook and default for servers-spec setting
  • bugfix: cache permission denied error on exhibitor jar move
  • bugfix: ZooKeeper install tar cache EACCES error

1.4.7

  • bugfix: zk_connect_str actually returned when chroot passed.
  • forward zk port in vagrant

1.4.4

  • fix for backwards compatibility with ruby 1.8.7

0.1.0:

  • Initial release of zookeeper

Foodcritic Metric
            

2.8.0 failed this metric

FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/attributes/default.rb:3
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/attributes/default.rb:4
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/attributes/default.rb:5
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/attributes/default.rb:6
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/attributes/default.rb:7
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/attributes/default.rb:8
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/attributes/default.rb:11
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/attributes/default.rb:13
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/recipes/config_render.rb:18
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/recipes/config_render.rb:19
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/recipes/config_render.rb:25
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/recipes/config_render.rb:26
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/recipes/install.rb:17
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/recipes/install.rb:34
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/recipes/install.rb:35
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/recipes/install.rb:36
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/recipes/install.rb:37
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/recipes/install.rb:38
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/recipes/install.rb:39
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/recipes/service.rb:17
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/recipes/service.rb:18
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/recipes/service.rb:22
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/templates/default/environment-defaults.erb:2
FC017: LWRP does not notify when updated: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/providers/default.rb:36
FC017: LWRP does not notify when updated: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/providers/default.rb:76
FC017: LWRP does not notify when updated: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/providers/node.rb:25
FC017: LWRP does not notify when updated: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/providers/node.rb:31
FC017: LWRP does not notify when updated: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/providers/node.rb:39
FC019: Access node attributes in a consistent manner: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/recipes/install.rb:23
FC031: Cookbook without metadata file: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/metadata.rb:1
FC033: Missing template: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/recipes/service.rb:65
FC045: Consider setting cookbook name in metadata: /tmp/cook/e50f95740618c86dea2b65cb/zookeeper/metadata.rb:1