This Ansible playbook will build a Kafka cluster with Zookeeper.
You can pre-build a Rackspace cloud environment or run the playbook against an existing environment.
See INSTALL.md for installation and build instructions.
Ansible >= 2.0.
Expects RHEL/CentOS 6/7 or Ubuntu 14 hosts.
Building the Rackspace Cloud environment requires the
pyraxPython module: pyrax link.
It installs Zookeeper for Kafka (Zookeeper is installed on the first 3 nodes only).
It supports static inventory if the environment is pre-built (
idis automatically set (on the inventory items in alphabetical order).
The data drives can be customized and can be put on top of Rackspace Cloud Block Storage.
It includes init scripts for both Zookeeper and Kafka.
The cloud environment requires the standard
pyraxcredentials file that looks like this:
[rackspace_cloud] username = my_username api_key = 01234567890abcdef
This file will be referenced in the
By default, the file is expected to be:
When provisioning Kafka on existing infrastructure edit
inventory/staticand add the nodes.
To customize, change the variables under
- playbooks/group_vars/all: contains cluster and cloud settings
- playbooks/roles/zookeeper/defaults/main.yml: Zookeeper specific settings
- playbooks/roles/kafka/defaults/main.yml: Kafka specific settings
For a one-node cluster, set
playbooks/group_vars/all to 1.
To provision a Rackspace Cloud environment, run the
provision_rax.sh script after you've customized the variables:
Similarly, run the one of the
kafka_*.sh scripts, depending what type of environment you have.
For a Rackspace Cloud environment:
For static / prebuilt environments: