https://github.com/streamthoughts/jikkou[Jikkou] (jikkō / 実行) is an open-source tool to help you automate the management of the configurations that live on your https://kafka.apache.org/documentation/[Apache Kafka] clusters.
First, let's install latest Jikkou release
sudo dpkg --remove jikkou && \
sudo rm -rf /usr/bin/jikkou && \
wget https://github.com/streamthoughts/jikkou/releases/download/v0.13.0/jikkou.deb && \
sudo dpkg -i jikkou.deb && \
source <(jikkou generate-completion) && \
jikkou --version
Then, Start a local Kafka environment (using Docker)
wget https://github.com/streamthoughts/jikkou/raw/main/docker-compose.yml && \
wget https://github.com/streamthoughts/jikkou/raw/main/down && \
wget https://github.com/streamthoughts/jikkou/raw/main/up && \
chmod +x ./up && ./up
jikkou config set-context localhost --config=kafka.client.bootstrap.servers=localhost:9092
jikkou config view --name localhost
jikkou health get kafkabroker | yq
jikkou get kafkabrokerlist | yq
Display Resource Definition
cat ./resources/initial-topics.yaml | yq
Create Kafka Topics
jikkou apply --files ./demo/resources/initial-topics.yaml --selector "metadata.name MATCHES (jikkou-demo-.*)"
NOTE: Run the command above a second time to see the behavior of Jikkou
Display Resource Definition
cat ./resources/remove-topics.yaml | yq
Delete Kafka Topics
jikkou apply \
--files ./resources/remove-topics.yaml \
--selector "metadata.name MATCHES (jikkou-demo-.*)"
WARN: When working on a production environment, we highly recommend to always run the apply or delete command with the --selector
options to make sure to not remove any topics by accident. Furthermore, always run your command in --dry-run
mode to check for changes that will be executed by Jikkou before proceeding.
Display Resource Definition
cat ./resources/topics-configmap.yaml | yq
Validate Resource Definition
jikkou validate \
--files ./resources/topics-configmap.yaml | yq
Apply Resource Definition
jikkou topics \
apply \
--files ./resources/topics-configmap.yaml \
--selector "metadata.name MATCHES (jikkou-demo-.*)"
Display Resource Definition
cat ./resources/topics-template.tpl
Display Values
cat ./resources/topics-values.yaml | yq
Validate Resource Definition
jikkou validate \
--files ./resources/topics-template.tpl \
--values-files ./resources/topics-values.yaml | yq
Apply Resource Definition
TOPIC_PREFIX=demo jikkou topics \
apply \
--files ./resources/topics-template.tpl \
--values-files ./resources/topics-values.yaml \
--include ".*iot.*" \
--yes