当前仓库属于暂停状态,部分功能使用受限,详情请查阅 仓库状态说明
27 Star 70 Fork 18

pippo / zookeeper-ansible
暂停

加入 Gitee
与超过 600 万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README.md

zookeeper-ansible

  1. 通过ansible自动化安装zookeeper集群
  2. 确保zookeeper集群节点数为2N+1
  3. 目前仅支持Centos7.x版本
  4. zookeeper 版本为 3.4.10

Configuration

  1. 下载zookeeper至本地任意文件夹
  2. 更新vars/zk.yml 中的 download_path 路径
---
# zookeeper version
zookeeper_version: 3.4.10

# zookeeper user                   
user: "zookeeper"
group: "zookeeper"

# zookeeper data path
data_dir: zookeeper_storage
zookeeper_log_path: "{{install_dir}}/zookeeper_log"  

# zookeeper port
leader_port: 12888
vote_port: 13888
client_port: 12181
jmx_port: 11911
random_port: "30001-65006"

firewall_ports:
  - "{{ leader_port }}"
  - "{{ vote_port }}"
  - "{{ client_port }}"
  - "{{ jmx_port }}"
  - "{{ random_port }}"

# env path
install_dir: "/home/{{ user }}"
download_path: "/home/pippo/Downloads/"               # your local download path
tmp_path: "/tmp"

# host group
zk_hosts: zookeeper                                   # the group define in hosts/host

Install

  1. check zookeeper.yml
  2. install_zk, config_zk, start_service, add_user, open_firewall 修改为false即可取消执行
---

- hosts: zookeeper

  user: root

  vars_files:

    - "vars/zk.yml"

  vars:

    install_zk: true      # install zookeeper

    config_zk: true       # config zookeeper

    start_service: true   # auto start zookeeper service

    add_user: true        # add zookeeper user 

    open_firewall: true   # open firewall

  roles:

    - user                # add user

    - zookeeper           # zookeeper
  1. 安装zookeeper集群
ansible-playbook -i hosts zookeeper.yml

点评 ( 3 )

你可以在登录后,发表评论

简介

利用ansible 安装zookeeper集群 展开 收起
Python
GPL-3.0
取消

发行版

暂无发行版

zookeeper-ansible

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/pippozq/zookeeper-ansible.git
git@gitee.com:pippozq/zookeeper-ansible.git
pippozq
zookeeper-ansible
zookeeper-ansible
master

搜索帮助