{"id":13780841,"url":"https://github.com/evertrue/zookeeper-cookbook","last_synced_at":"2025-05-11T14:34:07.171Z","repository":{"id":6788929,"uuid":"8036243","full_name":"evertrue/zookeeper-cookbook","owner":"evertrue","description":"Chef cookbook for installing and managing Zookeeper.","archived":false,"fork":false,"pushed_at":"2024-01-04T11:55:44.000Z","size":550,"stargazers_count":81,"open_issues_count":4,"forks_count":119,"subscribers_count":29,"default_branch":"master","last_synced_at":"2024-05-18T22:09:59.288Z","etag":null,"topics":["chef","chef-cookbook","zookeeper"],"latest_commit_sha":null,"homepage":"https://supermarket.chef.io/cookbooks/zookeeper","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/evertrue.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-02-05T19:33:32.000Z","updated_at":"2024-06-30T20:57:21.307Z","dependencies_parsed_at":"2022-07-29T03:08:17.366Z","dependency_job_id":null,"html_url":"https://github.com/evertrue/zookeeper-cookbook","commit_stats":null,"previous_names":[],"tags_count":92,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evertrue%2Fzookeeper-cookbook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evertrue%2Fzookeeper-cookbook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evertrue%2Fzookeeper-cookbook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evertrue%2Fzookeeper-cookbook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evertrue","download_url":"https://codeload.github.com/evertrue/zookeeper-cookbook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225064410,"owners_count":17415240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chef","chef-cookbook","zookeeper"],"created_at":"2024-08-03T18:01:20.326Z","updated_at":"2024-11-17T16:30:31.273Z","avatar_url":"https://github.com/evertrue.png","language":"Ruby","funding_links":[],"categories":["Cookbooks"],"sub_categories":["Service Discovery"],"readme":"# zookeeper cookbook\n\n![ci](https://github.com/evertrue/zookeeper-cookbook/workflows/ci/badge.svg)\n[![Cookbook Version](https://img.shields.io/cookbook/v/zookeeper.svg)](https://supermarket.chef.io/cookbooks/zookeeper)\n\n## Table of Contents\n\n* [Zookeeper](#zookeeper)\n    - [Usage](#usage)\n        + [Resources](#resources)\n            * [zookeeper](#zookeeper)\n            * [zookeeper_config](#zookeeper_config)\n            * [zookeeper_service](#zookeeper_service)\n    - [Errata](#errata)\n    - [Author and License](#author-and-license)\n\n## Apache ZooKeeper\n\n[Apache ZooKeeper](http://zookeeper.apache.org/) is a coordination and discovery\nservice maintained by the Apache Software Foundation.\n\nThis cookbook focuses on deploying ZooKeeper via Chef.\n\nIt 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.\n\nPlease 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.\n\n### Resources\n\n#### `zookeeper`\n\nThe `zookeeper` resource is responsible for installing and (eventually)\nuninstalling Zookeeper from a node.\n\nActions: `:install`, `:uninstall`\n\nParameters:\n\n* `version`: Version of ZooKeeper to install\n* `username`: The user who will eventually run Zookeeper (default: `'zookeeper'`)\n* `user_home`: Path to the home folder for the Zookeeper user (default: `/home/zookeeper`)\n* `mirror`: The mirror to obtain ZooKeeper from (required)\n* `checksum`: Checksum for the ZooKeeper download file\n* `install_dir`: Which directory to install Zookeeper to (default: `'/opt/zookeeper'`)\n* `java_version`: The version of OpenJDK to install.\n    - Alternatively, set `use_java_cookbook false`, and manage your Java installation yourself\n\nExample:\n\n``` ruby\nzookeeper 'zookeeper' do\n  version  '3.4.8'\n  username 'zookeeper'\n  mirror   'http://www.poolsaboveground.com/apache/zookeeper'\n  checksum 'f10a0b51f45c4f64c1fe69ef713abf9eb9571bc7385a82da892e83bb6c965e90'\n  action   :install\nend\n```\n\n#### `zookeeper_config`\n\nThis resource renders a ZooKeeper configuration file.\n\nActions: `:create`, `:delete`\n\nParameters:\n\n* `conf_file` (name attribute): Base name of the config file\n* `conf_dir`: Path to write the configuration file to (defaults to `/opt/zookeeper/conf`)\n* `config`: Hash of configuration parameters to add to the file\n    - Defaults to:\n\n        ```ruby\n        {\n          'clientPort' =\u003e 2181,\n          'dataDir'    =\u003e '/var/lib/zookeeper',\n          'tickTime'   =\u003e 2000,\n          'initLimit'  =\u003e 5,\n          'syncLimit'  =\u003e 2\n        }\n        ```\n\n* `env_vars`: Hash of startup environment variables (defaults to `{}`)\n* `log_dir`: Log directory (defaults to `/var/log/zookeeper`)\n* `username`: The user to give ownership of the file to (default: `zookeeper`)\n\nExample:\n\n``` ruby\nconfig_hash = {\n  clientPort: 2181,\n  dataDir: '/mnt/zk',\n  tickTime: 2000,\n  'autopurge.snapRetainCount' =\u003e 1,\n  'autopurge.purgeInterval' =\u003e 1\n  }\n}\n\nzookeeper_config 'zoo.cfg' do\n  config config_hash\n  username 'zookeeper'\n  action :create\nend\n```\n\n#### `zookeeper_service`\n\nThis resource manages a system service for ZooKeeper. Confusingly, it has only one action, and the resources within are controlled via a property.\n\nThis will change in a future release, but is “good enough” for now.\n\nActions: `:create`\n\nProperties:\n\n* `service_style`: The type of service provider you wish to use. Defaults to `systemd`, and only allows one of the following:\n    - `systemd`\n    - `exhibitor`\n* `install_dir`: Where you’ve installed ZooKeeper (defaults to `/opt/zookeeper`)\n* `username`: The user to run ZooKeeper under (defaults to `zookeeper`)\n* `service_actions`: The actions to pass in to the service resource within this custom resource (defaults to `[:enable, :start]`)\n* `template_cookbook`: The name of the cookbook to use for the service templates. Allows you to override the service script created \u0026 used (defaults to `zookeeper`, i.e., this cookbook)\n* `restart_on_reconfig`: Whether or not to restart this service on changes to the service script (defaults to `false`)\n\nExample:\n\n```ruby\nzookeeper_service 'zookeeper' do\n  service_style 'systemd'\n  install_dir   '/opt/zookeeper'\n  username      'zookeeper'\nend\n```\n\n## Errata\n\n* Version 1.4.7 on the community site is in fact version 1.4.8.\n\n## Author and License\n\n* Jeff Byrnes \u003cthejeffbyrnes@gmail.com\u003e\n* EverTrue \u003cdevops@evertrue.com\u003e\n* Simple Finance \u003cops@simple.com\u003e\n\nApache License, Version 2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevertrue%2Fzookeeper-cookbook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevertrue%2Fzookeeper-cookbook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevertrue%2Fzookeeper-cookbook/lists"}