Ansible Role: Kafka Manager
安裝Kafka Manager服務
介紹
Kafka Manager 是 Yahoo 推出的 Kafka 管理工具宪郊,支持:
- 管理多個集群
- 輕松檢查集群狀態(tài) (topics, brokers, replica distribution, partition distribution)
- 執(zhí)行復制選舉
- 生成分區(qū)指派,基于集群的狀態(tài)
- 分區(qū)的重新指派
該項目基于 Play Framework 框架開發(fā)署浩。
github: https://github.com/yahoo/kafka-manager
要求
此角色僅在RHEL及其衍生產(chǎn)品上運行。
測試環(huán)境
ansible 2.2.1.0
os Centos 6.7 X64
角色變量
software_files_path: "/opt/software"
software_install_path: "/usr/local"
kafka_manager_version: "1.3.3.6"
kafka_manager_file: "kafka-manager-{{ kafka_manager_version }}.tar.gz"
kafka_manager_file_path: "{{ software_files_path }}/{{ kafka_manager_file }}"
kafka_manager_file_url: "https://github.com/yahoo/kafka-manager/archive/{{ kafka_manager_version }}.tar.gz"
kafka_manager_build_file: "kafka-manager-{{ kafka_manager_version }}.zip"
kafka_manager_build_file_path: "{{ software_files_path }}/{{ kafka_manager_build_file }}"
kafka_manager_user: "kafka-manager"
kafka_manager_port: 9000
kafka_manager_zk: 'localhost:2181'
kafka_manager_auth: false
kafka_manager_auth_user: "admin"
kafka_manager_auth_pass: "password"
kafka_manager_javahome: ""
依賴
Kafka 0.8.1.1 or 0.8.2.* or 0.9.0.* or 0.10.0.*
Java 8+
sbt
github地址
https://github.com/kuailemy123/Ansible-roles/tree/master/kafka-manager
Example Playbook
- hosts: node1
roles:
- kafka-manager
自定義參數(shù)
- hosts: node1
vars:
- kafka_manager_javahome: " /usr/java/jdk1.8.0_121"
- kafka_manager_zk: "node1:2181,node2:2181,node3:2181"
- kafka_manager_port: "8080"
roles:
- { role: kafka-manager }
使用
service kafka-manager
Usage: /etc/init.d/kafka-manager {start|stop|status|restart|reload|force-reload|condrestart}