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 3.0.3

Installs/Configures zookeeper

Policyfile
Berkshelf
Knife
cookbook 'zookeeper', '= 3.0.3', :supermarket
cookbook 'zookeeper', '= 3.0.3'
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')
* user_home: Path to the home folder for the Zookeeper user (default: /home/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.7' do
user 'zookeeper'
mirror 'http://www.poolsaboveground.com/apache/zookeeper'
checksum '2e043e04c4da82fbdb38a68e585f3317535b3842c726e0993312948afcc83870'
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.7/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
* auth_scheme: The authentication scheme (default: digest)
* auth_cert: The authentication password or data
* acl_digest: Hash of acl permissions per 'digest' id
* acl_ip: Hash of acl permissions per 'ip'
* acl_sasl: Hash of acl permissions per 'sasl' id (SASLAuthentication provider must be enabled)
* acl_world: Acl permissions for anyone (default: Zk::PERM_ALL)

Example:
ruby
zookeeper_node '/data/myNode' do
action :create
connect_str "localhost:2181"
data "my data"
auth_scheme "digest"
auth_cert "user1:pwd1"
acl_digest "user1:a9l5yfb9zl8WCXjVmi5/XOC0Ep4=" => Zk::PERM_ALL
acl_ip "127.0.0.1" => Zk::PERM_READ | Zk::PERM_WRITE
acl_sasl "user@CHEF.IO" => Zk::PERM_ADMIN
acl_world Zk::PERM_NONE
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.

3.0.3

  • Ensure zookeeper user has a home folder (#163, #164)

3.0.2

  • Roll back to version 3.4.6 as per a deadlock issue found by @eherot on #156

3.0.1

  • Run apt-get update at compile time
  • Use lazy evaluation for config_dir (#153, h/t to @Maniacal)
  • Update to testing using Chef 12.x
    • Works around the fact that Serverspec requires a version of net-ssh that needs Ruby >= 2.0

3.0.0

  • Fix setting of CLASSPATH to have version dynamically set
  • Upgrade to ZooKeeper 3.4.7, due to the disappearance of ZK 3.4.6 at the chosen mirror
    • Upgrading ZK is potentially breaking

2.13.1

  • Switch to using value_for_platform_family() to determine the SysV service script provider to use
    • Makes the cookbook less restrictive w/r/t using it on a RHEL-based OS

2.13.0

  • Improve generally for better CentOS support (#146)
  • Create ZooKeeper log dir on installation (#147)
  • Add SysV support for CentOS systems not using Upstart/Runit/Exhibitor
  • Fix testing by dropping usage of Chef Zero
    • Not sure why Chef Zero won’t work, but it’d be nice to get it going again
    • Seems to complain about not being able to find something w/r/t the tester cookbook

2.12.0

  • Add ability to configure znode ACL via node LWRP (#145 thanks @Annih)
  • Create zookeeper user as system user (#142 thanks @petere)
  • Update to prelease runit cookbook b/c of a bug in that cookbook
    • Soon as the next release of it is cut, we can revert e371719
  • Switch to chef-zero for the Test Kitchen provisioner

2.11.0

  • Fix logic around creating zookeeper-env.sh (Fixes #141)
  • Add tests for default attribtues & using node[:zookeeper][:env_vars]
  • Add JAVA_OPTS attribute (#144, thanks @andrewgoktepe)

2.10.0

  • Move creation of zookeeper-env.sh to zookeeper::install, to allow cookbooks that only call that recipe (e.g., exhibitor)
  • Relax permissions on ZK install_dir (#140)

2.9.0

  • Add creation & configuration of zookeeper-env.sh, an optional file to bring in custom EnvVars for Zookeeper to use
  • Fix typo in source for SysV init script (#139)

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
            

3.0.3 failed this metric

FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/attributes/default.rb:3
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/attributes/default.rb:5
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/attributes/default.rb:6
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/attributes/default.rb:8
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/attributes/default.rb:9
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/attributes/default.rb:10
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/attributes/default.rb:11
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/attributes/default.rb:12
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/attributes/default.rb:13
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/attributes/default.rb:15
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/attributes/default.rb:16
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/attributes/default.rb:17
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/attributes/default.rb:20
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/attributes/default.rb:22
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/attributes/default.rb:29
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/recipes/config_render.rb:20
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/recipes/config_render.rb:21
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/recipes/config_render.rb:22
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/recipes/config_render.rb:23
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/recipes/install.rb:17
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/recipes/install.rb:29
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/recipes/install.rb:30
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/recipes/install.rb:31
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/recipes/install.rb:32
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/recipes/install.rb:33
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/recipes/install.rb:34
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/recipes/install.rb:35
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/recipes/install.rb:36
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/recipes/install.rb:41
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/recipes/install.rb:42
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/recipes/install.rb:43
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/recipes/install.rb:44
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/recipes/service.rb:17
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/recipes/service.rb:18
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/recipes/service.rb:22
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/templates/default/environment-defaults.erb:2
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/templates/default/environment-defaults.erb:5
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/templates/default/environment-defaults.erb:7
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/templates/default/environment-defaults.erb:8
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/templates/default/environment-defaults.erb:9
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/templates/default/environment-defaults.erb:10
FC001: Use strings in preference to symbols to access node attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/templates/default/environment-defaults.erb:18
FC002: Avoid string interpolation where not required: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/recipes/config_render.rb:21
FC009: Resource attribute not recognised: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/recipes/install.rb:42
FC017: LWRP does not notify when updated: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/providers/default.rb:39
FC017: LWRP does not notify when updated: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/providers/default.rb:88
FC019: Access node attributes in a consistent manner: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/recipes/install.rb:23
FC023: Prefer conditional attributes: /tmp/cook/89bf63c618b9e6ace92c38f7/zookeeper/recipes/install.rb:41