6.14 Kafka部署

最后更新于:2022-04-02 07:46:02

## Kafka 部署 ### **安装** ``` ansible-playbook -i hosts/kafka_hosts kafka/kafka.yml -e '{"scala_version":"2.11","kafka_version":"2.4.1"}' --tags install_kafka ``` ### **初始化配置** (指定zk cluster) ``` ansible-playbook -i hosts/kafka_hosts kafka/kafka.yml -e '{"scala_version":"2.11","kafka_version":"2.4.1"}' -e '{"zk_cluster":"192.168.12.221:2181,192.168.12.222:2181,192.168.12.223:2181"}' --tags init_conf ``` ### 启停服务 ``` ansible-playbook -i hosts/kafka_hosts kafka/kafka.yml -e '{"scala_version":"2.11","kafka_version":"2.4.1"}' --tags start_kafka ansible-playbook -i hosts/kafka_hosts kafka/kafka.yml -e '{"scala_version":"2.11","kafka_version":"2.4.1"}' --tags stop_kafka ```
';