This Ansible Role aims to install and configure Apache Kafka and Apache Zookeeper using the Confluent package.
All configurations can be passed through vars, you can see the list of necessary vars at defaults and customize them as you wish.
Ansible 2.2+, Python and Pip.
pip install ansible>=2.2.0
After installing Ansible, you must install a Java role, and use it in your playbook. Kafka needs a JVM to run.
It's strongly recommended (as you can see here) to run the latest version of Oracle JDK 1.8 (Java 8) or Java 11.
Requirements includes Ansiblebit Oracle Java role, which can be easily installed through:
ansible-galaxy install -r requirements.yaml
The test suite is currently executing against Ansible 2.9.6 (as you can see here), inside Docker containers running both major Python versions (2 and 3).
For further information on the Docker images being used to run containers on the CI, take a look at docker-ansible
---
- hosts: kafka,zookeeper
vars:
dst_path: "/opt"
local_path: "/tmp"
confluent_version: "5.4.0"
scala_version: "2.12"
confluent_distribution: "confluent-community"
log_basepath: "/var/log"
data_basepath: "/var/data"
initscripts_path: "/usr/sbin"
conf_dest: "/etc/config"
# Oracle Java necessary vars. IF you are using ansiblebit.oracle-java
oracle_java_set_as_default: yes
oracle_java_version: 8
roles:
- ansiblebit.oracle-java
- macunha1.confluent-kafka
---
- hosts: kafka,zookeeper
roles:
- ansiblebit.oracle-java
- macunha1.confluent-kafka
[kafka]
192.168.50.3
[zookeeper]
192.168.50.3
- Ansible - Simple IT Automation
- Confluent Kafka Package - Kafka for the Enterprise
- Feel free to fill an issue with feature request(s), or to send me a Pull request, I will be happy to collaborate.
- If this role didn't work for you, or if you found some bug during the execution, let me know.
Thanks to these amazing contributors for making this role better