AnsibleShipyard/ansible-zookeeper

Name: ansible-zookeeper

Owner: Ansible Shipyard

Description: Ansible playbook for ZooKeeper

Created: 2014-08-28 23:10:41.0

Updated: 2017-11-29 08:55:40.0

Pushed: 2017-12-20 16:21:03.0

Homepage: null

Size: 69

Language: Shell

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

ansible-zookeeper

Build Status

ZooKeeper playbook for Ansible

Installation
ble-galaxy install AnsibleShipyard.ansible-zookeeper
Dependencies

Java

Requirements

Ansible version at least 1.6

Role Variables

eeper_version: 3.4.11
eeper_url: http://www.us.apache.org/dist/zookeeper/zookeeper-{{zookeeper_version}}/zookeeper-{{zookeeper_version}}.tar.gz

ag that selects if systemd or upstart will be used for the init service:
te: by default Ubuntu 15.04 and later use systemd (but support switch to upstart)
eeper_debian_systemd_enabled: "{{ ansible_distribution_version|version_compare(15.04, '>=') }}"
eeper_debian_apt_install: false
ptional:) add custom 'ppa' repositories depending on the distro version (only with debian_apt_install=true)
ample: to use a community zookeeper v3.4.8 deb pkg for Ubuntu 14.04 (where latest official is v3.4.5)
eeper_debian_apt_repositories:
repository_url: "ppa:ufscar/zookeeper"
distro_version: "14.04"

cache_timeout: 3600
eeper_register_path_env: false

nt_port: 2181
_limit: 5
_limit: 2
_time: 2000
eeper_autopurge_purgeInterval: 0
eeper_autopurge_snapRetainCount: 10
eeper_cluster_ports: "2888:3888"

_dir: /var/lib/zookeeper
dir: /var/log/zookeeper
eeper_dir: /opt/zookeeper-{{zookeeper_version}} # or /usr/share/zookeeper when zookeeper_debian_apt_install is true
eeper_conf_dir: {{zookeeper_dir}} # or /etc/zookeeper when zookeeper_debian_apt_install is true
eeper_tarball_dir: /opt/src

st of dict (i.e. {zookeeper_hosts:[{host:,id:},{host:,id:},...]})
eeper_hosts:
host: "{{inventory_hostname}}" # the machine running
id: 1

ct of ENV settings to be written into the (optional) conf/zookeeper-env.sh
eeper_env: {}

ntrols Zookeeper myid generation
eeper_force_myid: yes
Example Playbook
me: Installing ZooKeeper
sts: all
do: yes
les:
- role: AnsibleShipyard.ansible-zookeeper
Example Retrieving Tarball From S3
me: Installing ZooKeeper
sts: all
do: yes
rs:
zookeeper_archive_s3_bucket: my-s3-bucket
zookeeper_archive_s3_object: my/s3/directory/zookeeper-{{zookeeper_version}}.tar.gz
les:
- role: AnsibleShipyard.ansible-zookeeper
Cluster Example
me: Zookeeper cluster setup
sts: zookeepers
do: yes
les:
- role: AnsibleShipyard.ansible-zookeeper
  zookeeper_hosts: "{{groups['zookeepers']}}"

Assuming `zookeepers` is a hosts group defined in inventory file.

keepers]
er[1:3]

Custom IP per host group

eeper_hosts: "
{%- set ips = [] %}
{%- for host in groups['zookeepers'] %}
{{- ips.append(dict(id=loop.index, host=host, ip=hostvars[host]['ansible_default_ipv4'].address)) }}
{%- endfor %}
{{- ips -}}"

See this sample playbook which shows how to use this playbook as well as others. It is part of ansible-galaxy-roles and serves as a curation (and thus an example) of all our ansible playbooks.

License

The MIT License (MIT)

Copyright (c) 2014 Kien Pham

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

AnsibleShipyard

Our related playbooks

  1. ansible-mesos
  2. ansible-marathon
  3. ansible-chronos
  4. ansible-zookeeper
Author Information

@AnsibleShipyard/developers and others.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.