All Projects → evertrue → Zookeeper Cookbook

evertrue / Zookeeper Cookbook

Licence: apache-2.0
Chef cookbook for installing and managing Zookeeper.

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Zookeeper Cookbook

Hadoop cookbook
Cookbook to install Hadoop 2.0+ using Chef
Stars: ✭ 82 (+2.5%)
Mutual labels:  zookeeper, chef, chef-cookbook
Rvm
Development repository for the rvm cookbook
Stars: ✭ 525 (+556.25%)
Mutual labels:  chef, chef-cookbook
Chef Splunk
Development repository for the chef-splunk cookbook
Stars: ✭ 70 (-12.5%)
Mutual labels:  chef, chef-cookbook
Grafana
Development repository for the grafana cookbook
Stars: ✭ 69 (-13.75%)
Mutual labels:  chef, chef-cookbook
Etcd
Development repository for the etcd cookbook
Stars: ✭ 71 (-11.25%)
Mutual labels:  chef, chef-cookbook
Mac os x
This cookbook has been deprecated
Stars: ✭ 78 (-2.5%)
Mutual labels:  chef, chef-cookbook
Iis
Development repository for the iis cookbook
Stars: ✭ 79 (-1.25%)
Mutual labels:  chef, chef-cookbook
Java
Development repository for the java cookbook
Stars: ✭ 365 (+356.25%)
Mutual labels:  chef, chef-cookbook
Dotnetcore Cookbook
Chef cookbook for managing .NET Core (http://dotnet.github.io/) installation and applications on all supported platforms.
Stars: ✭ 9 (-88.75%)
Mutual labels:  chef, chef-cookbook
Osquery Cookbook
A Chef Cookbook to install and configure osquery.
Stars: ✭ 11 (-86.25%)
Mutual labels:  chef, chef-cookbook
Chef Umami
A tool to automatically generate test code for Chef cookbooks and policies.
Stars: ✭ 35 (-56.25%)
Mutual labels:  chef, chef-cookbook
Aws
Development repository for the aws cookbook
Stars: ✭ 473 (+491.25%)
Mutual labels:  chef, chef-cookbook
Jenkins
Development repository for the jenkins cookbook
Stars: ✭ 416 (+420%)
Mutual labels:  chef, chef-cookbook
Fail2ban
Development repository for the fail2ban cookbook
Stars: ✭ 61 (-23.75%)
Mutual labels:  chef, chef-cookbook
Chef Os Hardening
This chef cookbook provides numerous security-related configurations, providing all-round base protection.
Stars: ✭ 386 (+382.5%)
Mutual labels:  chef, chef-cookbook
Nginx
Development repository for the nginx cookbook
Stars: ✭ 528 (+560%)
Mutual labels:  chef, chef-cookbook
Rsyslog
Development repository for the rsyslog cookbook
Stars: ✭ 66 (-17.5%)
Mutual labels:  chef, chef-cookbook
Ruby rbenv
Development repository for the ruby_rbenv cookbook
Stars: ✭ 339 (+323.75%)
Mutual labels:  chef, chef-cookbook
Php
Development repository for the php cookbook
Stars: ✭ 347 (+333.75%)
Mutual labels:  chef, chef-cookbook
Chef Crowd
Chef cookbook to install Atlassian Crowd
Stars: ✭ 5 (-93.75%)
Mutual labels:  chef, chef-cookbook

zookeeper cookbook

ci Cookbook Version

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.

It should be noted that ZooKeeper’s configuration and startup systems are complicated. To elaborate, the service scripts supplied by this cookbook use bin/zkServer.sh inside the ZooKeeper directory, which sources a variety of shell scripts as part of its initialization process.

Please be mindful if you decide to install ZooKeeper to a different location that the path to the config directory should remain pointed to the one within the install directory, unless you instead to completely rewire how ZooKeeper runs in your wrapper cookbook.

Resources

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
  • 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')
  • java_version: The version of OpenJDK to install.
    • Alternatively, set use_java_cookbook false, and manage your Java installation yourself

Example:

zookeeper 'zookeeper' do
  version  '3.4.8'
  username 'zookeeper'
  mirror   'http://www.poolsaboveground.com/apache/zookeeper'
  checksum 'f10a0b51f45c4f64c1fe69ef713abf9eb9571bc7385a82da892e83bb6c965e90'
  action   :install
end

zookeeper_config

This resource renders a ZooKeeper configuration file.

Actions: :create, :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:

      {
        'clientPort' => 2181,
        'dataDir'    => '/var/lib/zookeeper',
        'tickTime'   => 2000,
        'initLimit'  => 5,
        'syncLimit'  => 2
      }
      
  • env_vars: Hash of startup environment variables (defaults to {})

  • log_dir: Log directory (defaults to /var/log/zookeeper)

  • username: 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
  username 'zookeeper'
  action :create
end

zookeeper_service

This resource manages a system service for ZooKeeper. Confusingly, it has only one action, and the resources within are controlled via a property.

This will change in a future release, but is “good enough” for now.

Actions: :create

Properties:

  • service_style: The type of service provider you wish to use. Defaults to systemd, and only allows one of the following:
    • systemd
    • exhibitor
  • install_dir: Where you’ve installed ZooKeeper (defaults to /opt/zookeeper)
  • username: The user to run ZooKeeper under (defaults to zookeeper)
  • service_actions: The actions to pass in to the service resource within this custom resource (defaults to [:enable, :start])
  • template_cookbook: The name of the cookbook to use for the service templates. Allows you to override the service script created & used (defaults to zookeeper, i.e., this cookbook)
  • restart_on_reconfig: Whether or not to restart this service on changes to the service script (defaults to false)

Example:

zookeeper_service 'zookeeper' do
  service_style 'systemd'
  install_dir   '/opt/zookeeper'
  username      'zookeeper'
end

Errata

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

Author and License

Apache License, Version 2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].