kevincoakley.zookeeper

Ansible Role: Zookeeper

This Ansible role installs Apache Zookeeper, which can operate in either a standalone mode or a replicated setup. It is tested with Zookeeper version 3.6.1.

Requirements

You need to have a Linux operating system that has systemd available by default. Supported versions include CentOS 7, CentOS 8, Ubuntu 18.04, and Ubuntu 20.04.

Role Variables

  • Host Group Name: Define the system host group in /etc/ansible/hosts to set up the replicated environment automatically:

    zookeeper_ansible_host_group: zookeeper
    
  • Server Variable: The Ansible fact to be used in the conf/zoo.conf file to indicate the servers in the cluster:

    zookeeper_server_variable: ansible_ssh_host
    
  • Zookeeper Version: Specify the version of Zookeeper to be installed:

    zookeeper_version: 3.4.7
    
  • Configuration Variables: Include important settings for Zookeeper:

    zookeeper_tick_time: 2000
    zookeeper_init_limit: 10
    zookeeper_sync_limit: 5
    
  • Data Directory: The location where Zookeeper data will be stored:

    zookeeper_data_dir: /tmp/zookeeper/
    
  • Client Port: The port for Zookeeper clients:

    zookeeper_client_port: 2181
    
  • Max Clients: Limit for maximum client connections:

    zookeeper_max_client_cnxns: 60
    
  • Log Directory: The location for Zookeeper logs:

    zookeeper_log_dir: /tmp/
    

Dependencies

None

Example Playbook

An example playbook for Zookeeper (zookeeper_playbook.yml):

- hosts: zookeeper
  sudo: yes

  vars:
    zookeeper_version: 3.6.1

  roles:
    - zookeeper

Example /etc/ansible/hosts file:

[zookeeper]
zookeeper-0 zookeeper_id=0
zookeeper-1 zookeeper_id=1
zookeeper-2 zookeeper_id=2

License

This role is licensed under the BSD License.

Author Information

Kevin Coakley (GitHub Profile)

Informazioni sul progetto

Apache Zookeeper

Installa
ansible-galaxy install kevincoakley.zookeeper
Licenza
Unknown
Download
2.3k
Proprietario