Apache Kafka (KRaft Cluster)
OSSApache Kafka in KRaft mode on systemd (no ZooKeeper, no Docker, no Bitnami). Node IDs, quorum voters and advertised listeners are computed from the inventory.
by opensible ✓· ⬇ 0 installs· Messaging & Streaming· v1.0.0· template
kafka-clusterUse in the OpenSible console
Open Infrastructure → Stack Hub Blueprints, switch the source to Cloud hub, then pick Apache Kafka (KRaft Cluster) and press Use.
Requirements
ansible >=2.14
Default variables
defaults.json
{
"become": true,
"brokers": [
{
"ip": "",
"name": "kafka-1",
"ssh_port": "",
"ssh_user": ""
},
{
"ip": "",
"name": "kafka-2",
"ssh_port": "",
"ssh_user": ""
},
{
"ip": "",
"name": "kafka-3",
"ssh_port": "",
"ssh_user": ""
}
],
"log_dir": "/var/log/kafka",
"data_dir": "/var/lib/kafka/data",
"heap_opts": "-Xms1G -Xmx1G",
"cluster_id": "opensible-kafka",
"client_port": 9092,
"install_dir": "/opt/kafka",
"kafka_version": "3.8.1",
"open_firewall": true,
"num_partitions": 6,
"controller_port": 9093,
"ssh_port_default": 22,
"ssh_user_default": "root",
"auto_create_topics": false,
"replication_factor": 3,
"kafka_scala_version": "2.13",
"log_retention_hours": 168,
"min_insync_replicas": 2
}vars.example.yml
vars.example.yml
# Example variables — copy to vars.yml and edit
kafka_version: "3.8.1"
kafka_scala_version: "2.13"
cluster_id: opensible-kafka
client_port: 9092
controller_port: 9093
replication_factor: 3
min_insync_replicas: 2
num_partitions: 6
auto_create_topics: false
log_retention_hours: 168
heap_opts: "-Xms1G -Xmx1G"
install_dir: /opt/kafka
data_dir: /var/lib/kafka/data
log_dir: /var/log/kafka
open_firewall: true
become: true
Versions (1)
v1.0.0playbook.yml
