Kafka Broker rack awareness

  • Canonical
Channel Revision Published Runs on
latest/stable 5 27 Feb 2024
Ubuntu 22.04
latest/edge 5 22 Jun 2023
Ubuntu 22.04
juju deploy kafka-broker-rack-awareness --channel edge
Show information

Platform:

Ubuntu
22.04

Kafka Broker rack awareness Operator

Overview

This charm handles the configuration of the broker.rack setting for Kafka. It needs to be used alongside the Kafka operator.

Usage

Basic usage

The rack awareness Operator needs to be deployed to the same machine as the Kafka operator. First create a machine:


$ juju add-machine --series=jammy

Using juju status, get the number of the machine that was just created. If the model is empty it will be number 0.


$ juju deploy kafka --channel edge --to=0

$ juju deploy kafka-broker-rack-awareness --channel edge --to=0

Lastly, use config to set the broker.rack value:


$ juju config kafka-broker-rack-awareness broker-rack="my-value"

To watch the process, juju status can be used.

To specify different rack values, more than one rack awareness operator can be deployed. For example, if we have two brokers on a different zone each:


$ juju deploy kafka-broker-rack-awareness zone-one --channel edge --to=0 # machine of the first broker

$ juju deploy kafka-broker-rack-awareness zone-two --channel edge --to=1 # machine of the second broker

$ juju config zone-one broker-rack="zone-one"

$ juju config zone-two broker-rack="zone-two"


Help improve this document in the forum (guidelines). Last updated 1 year, 5 months ago.