This ansible Playbook provides resources for installing, configuring and managing Apache Kafka. Installs Apache Kafka from a .tgz
source and installs the appropriate configuration for your platform's init system.
It also installs OpenJDK1.8
.
.
├── LICENSE
├── README.md
├── ansible.cfg
├── apache_kafka.yml
├── hosts
└── roles
└── install
├── defaults
│ └── main.yml
├── handlers
│ └── main.yml
├── tasks
│ └── main.yml
└── templates
├── kafka.service.j2
└── zookeeper.service.j2
- RHEL 7.x
- CentOS 7.x
- ansible 2.9.1
It uses key based authentication and it assumes you already have a key and you can configure the path using the ansible_ssh_private_key_file variable in hosts
file.
You can create one using this command:
ssh-keygen -t rsa -b 4096 -m PEM -C vm@mydomain.com -f ~/.ssh/vm_ssh
This variables and their default values are located in roles/install/defaults/main.yml
kafka_version: 2.3.0
kafka_scala_version: 2.12
kafka_user: kafkaAdmin
kafka_group: kafkaAdmin
kafka_root_dir: /opt
kafka_dir: '{{ kafka_root_dir }}/kafka'
ansible-playbook --syntax-check apache_kafka.yml
ansible-playbook apache_kafka.yml
The hosts
file is the inventory file where you need to provide the IPs of the servers that need to be configured. You can also configure the SSH Key to use, username and SSH port.
You can create test servers using this terraform script
Marcelo Zambrana