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- 2.13.1
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.1
- 2.5.0
- 2.4.1
- 2.4.0
- 2.3.0
- 2.2.1
- 2.2.0
- 2.1.1
- 2.1.0
- 2.0.0
- 1.7.4
- 1.7.3
- 1.7.2
- 1.7.1
- 1.7.0
- 1.6.1
- 1.6.0
- 1.5.0
- 1.4.10
- 1.4.9
- 1.4.8
- 1.4.7
- 1.4.6
- 1.4.5
- 1.4.4
- 1.4.3
- 1.4.1
- 1.3.3
- 1.3.1
- 1.2.3
- 1.2.1
- 1.1.0
- 0.1.0
Installs/Configures zookeeper
cookbook 'zookeeper', '= 8.3.0', :supermarket
knife supermarket install zookeeper
knife supermarket download zookeeper
zookeeper cookbook
Table of Contents
Apache ZooKeeper
Apache 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
and zookeeper_config
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.
Testing is handled using Test Kitchen, with the expectation that you have it installed as part of the Chef DK.
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 two resources, with future plans for one more covering
service management.
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) -
username
: 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:
zookeeper '3.4.8' do username 'zookeeper' mirror 'http://www.poolsaboveground.com/apache/zookeeper' checksum 'f10a0b51f45c4f64c1fe69ef713abf9eb9571bc7385a82da892e83bb6c965e90' action :install end
zookeeper_config
This resource renders a ZooKeeper configuration file.
Actions: :render
, :delete
Parameters:
-
conf_file
(name attribute): Base name of the config file -
conf_dir
: Path to write the configuration file to (defaults to/opt/zookeeper/conf
) -
config
: Hash of configuration parameters to add to the file- Defaults to:
ruby { 'clientPort' => 2181, 'dataDir' => '/var/lib/zookeeper', 'tickTime' => 2000, 'initLimit' => 5, 'syncLimit' => 2 }
- Defaults to:
-
env_vars
: Hash of startup environment variables (defaults to{}
) -
log_dir
: Log directory (defaults to/var/log/zookeeper
) -
user
: The user to give ownership of the file to (default:zookeeper
)
Example:
config_hash = { clientPort: 2181, dataDir: '/mnt/zk', tickTime: 2000, 'autopurge.snapRetainCount' => 1, 'autopurge.purgeInterval' => 1 } } zookeeper_config 'zoo.cfg' do config config_hash user 'zookeeper' action :render end
zookeeper_node
This resource can create nodes in a running instance of 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:
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
EverTrue devops@evertrue.com
Simple Finance ops@simple.com
Apache License, Version 2.0
Dependent cookbooks
build-essential >= 0.0.0 |
java >= 1.39 |
runit >= 1.7 |
magic >= 1.1 |
ark >= 1.0 |
Contingent cookbooks
CHANGELOG for zookeeper
This file is used to list changes made in each version of zookeeper.
v8.2.0
Changes
- Add new property to
zookeeper_service
to restart on changes to its config (h/t @jaybocc2 #200)
v8.1.3
Fixes
- Fix misnamed attribute
- Lost in the shuffle long ago!
v8.1.2
Fixes
- Ensure the /opt/zookeeper-$version directory is owned by zookeeper:zookeeper (#196)
v8.1.1
Fixes
- Update checksum to match that of version 3.4.9 (fixes #194)
- Actually test sending checksum in attributes to
zookeeper
resource when setting up test instance (Relates to #194) - In
zookeeper
resource,if property_is_set? new_resource.checksum
always returns false. Useif new_resource.checksum
instead.
v8.1.0
Changes
- NOTICE Install zookeeper 3.4.9
Fixes
- Make sure java_opts is actually rendered in the ZK env config
v8.0.1
Fixes
- Correct missed change of
user
tousername
in SysV script template (#189 h/t @d601)
v8.0.0
Potentially Breaking
- Loosen dependencies’ pins to all be
>=
, (#187 #188 h/t @Stromweld)
v7.1.1
Fixes
- Fix order of operations re:
link[/opt/zookeeper]
(a sub-unit of theark[zookeeper]
resource) (#183, @Stromweld)
v7.1.0
Changes
- Add SystemD support
v7.0.0
Potentially Breaking
- Completely refactor existing LWRPs into Chef 12.5 Custom Resources
- Refactor
zookeeper::service
into a Custom Resource (#86) - Drop
apt
cookbook in favor of built-in resources in Chef >= 12.11 - Migrate all logic inside resources
- Use
ark
to download & install ZooKeeper, rather than handling every resource directly- This is almost certainly a breaking change, as it moves where ZooKeeper is installed by default
- Advantage: a symlink is created at
/#{install_dir}/zookeeper
, pointing to/#{install_dir}/zookeeper-#{version}
, so handling paths to the current install is far easier - Caution:
/#{install_dir}/zookeeper
has been, until now, a container directory for any installations of ZooKeeper (e.g.,/#{install_dir}/zookeeper/zookeeper-#{version}
)
- Refactor recipes to wrap resources
- An attempt at backwards compatibility has been made, using the previous attribute-driven style
- These attributes & recipes will be dropped in future, as per a deprecation notice added to
zookeeper::default
Changes
- Add more tests in an attempt at being comprehensive of various ways this cookbook can be used
v6.0.0
Potentially Breaking
- Drop separate
environment-defaults
file for Upstart/SysV in favor of using same env vars as Runit- Consistency is key
- Use
zkServer.sh
for all service scripts - Drop pinning for
build-essential
- Rewire how env vars are used to correctly set the config & log locations
- Default values added to set the config & log paths properly
Fixes
- Set Upstart & SysV services to
action: [:enable, :start]
to match the Runit service
Changes
- Pass values into Upstart & SysV init scripts, rather than directly using attributes
- Drop any Minitest unit tests in favor of ChefSpec
v5.0.2
Fixes
- Update to working Apache mirror (#170 #178)
v5.0.1
Fixes
- Drop pinning of apt cookbook to avoid transitive depsolving pain
v5.0.0
Breaking
- Use java-cookbook-installed version of Java by way of the
$JAVA_HOME
env var
Fixes
- Ensure
zookeeper-env.sh
gets the correct values:- Properly set
node[zookeeper][config_dir]
with lazy interpolation of thenode[zookeeper][version]
attribute - Use lazy evaluation for
exports_config
- Properly set
- Export some env vars for subshelled SysV-run services
Other changes
- Add proper testing suite using RuboCop, Foodcritic, ChefSpec, and Test Kitchen, automated w/ Travis CI
- Pin dependency versions to avoid breaking changes being introduced from upstream
v4.1.0
- Add ability to configure JMX port & local only settings via attributes (#172 @felka)
v4.0.0
- Upgrade to ZooKeeper 3.4.8
v3.0.6
- Add
initLimit
andsyncLimit
to ZooKeeper config (#171)
v3.0.5
- Use
node[zookeeper][user]
attribute consistently - Fix user for runit-managed service style (#166 #167)
v3.0.4
- Add missing
user_home
attribute tozookeeper
resource
v3.0.3
- Ensure
zookeeper
user has a home folder (#163, #164)
v3.0.2
- Roll back to version 3.4.6 as per a deadlock issue found by @eherot on #156
v3.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
v3.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
v2.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
v2.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
v2.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
v2.11.0
- Fix logic around creating
zookeeper-env.sh
(Fixes #141) - Add tests for default attributes & using
node[zookeeper][env_vars]
- Add JAVA_OPTS attribute (#144, thanks @andrewgoktepe)
v2.10.0
- Move creation of
zookeeper-env.sh
tozookeeper::install
, to allow cookbooks that only call that recipe (e.g.,exhibitor
) - Relax permissions on ZK install_dir (#140)
v2.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)
v2.8.0
- Proper init support (contributed by @shaneramey)
v2.7.0
- Add some tests
- Fix up zookeeper_node
- Call runit recipe before service declaration
v2.6.0
- Run apt::default and update at compille time if on Debian (#127)
v2.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 ofjava
cookbook
v2.5.0
- Allow configurable
data_dir
parameter for Zookeeper data directory location (contributed by @eherot)
v2.4.3
- Fix erroneous attribute reference
v2.4.2
- Allow pre-installed Java (contributed by @solarce)
v2.4.1
- Fixed recipe call (contributed by @solarce)
v2.4.0
- Split out config rendering to separate recipe (contributed by @solarce)
v2.3.0
- Split out installation to a separate recipe (contributed by @Gazzonyx)
v2.2.1
- Set minimum build-essential version for RHEL support (contributed by @Gazzonyx)
v2.2.0
- Upstart support (contributed by @solarce)
v2.1.1
- Added a service recipe which can be run and activated using new
service_style
attribute.
v2.1.0
- A basic configuration is rendered by default.
- Clarify some points in the README about
zookeeper_config
v2.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
v1.7.4
- Force build-essential to run at compile time (contributed by @davidgiesberg)
v1.7.3
- Bugfix for attribute access (fixes 1.7.2 bug)
v1.7.2
- Move ZK download location calculation to recipe to eliminate ordering bug
v1.7.1
- Test-kitchen support added
- Patch installed to support CentOS platform
v1.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
v1.6.0
- Attribute overrides to defaultconfig should now work (contributed by @trane)
v1.5.1
- Add correct (Apache v2) license to metadta.rb (#61)
v1.5.0
- Add logic to download existing exhibitor jar
v1.4.10
- changes: Skip S3 credentials file if AWS credentials are not provided
OpsWorks related changes
- Moved property files from inaccessible chef dir to exhibitor install dir.
- Logged output to syslog.
- Added option to set exhibitor/amazon log level
v1.4.9
- Added: s3credentials template to assist with --configtype s3
v1.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
v1.4.7
- bugfix: zk_connect_str actually returned when chroot passed.
- forward zk port in vagrant
v1.4.4
- fix for backwards compatibility with ruby 1.8.7
v0.1.0:
- Initial release of zookeeper
Collaborator Number Metric
8.3.0 passed this metric
Contributing File Metric
8.3.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
8.3.0 passed this metric
License Metric
8.3.0 passed this metric
No Binaries Metric
8.3.0 passed this metric
Testing File Metric
8.3.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
8.3.0 passed this metric
8.3.0 passed this metric
8.3.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
8.3.0 passed this metric
License Metric
8.3.0 passed this metric
No Binaries Metric
8.3.0 passed this metric
Testing File Metric
8.3.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
8.3.0 passed this metric
8.3.0 passed this metric
8.3.0 passed this metric
No Binaries Metric
8.3.0 passed this metric
Testing File Metric
8.3.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
8.3.0 passed this metric
8.3.0 passed this metric
8.3.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
8.3.0 passed this metric
8.3.0 passed this metric