Skip to content

Commit

Permalink
Also add CLI tools kaf and kcat, just give people the choices.
Browse files Browse the repository at this point in the history
kafkactl looked like one of the nicer options to me, but kaf and kcat are both
already in use elsewhere at Culture Amp, so we might as well match the
technology choices.

Add missing kcat config
  • Loading branch information
jasononeil committed Aug 20, 2024
1 parent aab6e0a commit 3d2b8d5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
6 changes: 4 additions & 2 deletions plugins/ca-kafka-local/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ What it provides:
- Process Compose job
- Will print information to the terminal about Kafka, once `kafka-local` is up and running.
- Allows you to add a `depends_on` clause so other services wait for `kafka-local`.
- CLI Tools
- [kafkactl](https://deviceinsight.github.io/kafkactl/) for basic kafka interactions.
- Various Kafka CLI Tools
- [kafkactl](https://deviceinsight.github.io/kafkactl/). We add a configuration file for connecting to `kafka-local` out of the box.
- [kcat](https://github.com/edenhill/kcat). We add a configuration file for connecting to `kafka-local` out of the box.
- [kaf](https://github.com/birdayz/kaf). Note you will need to run `kaf config add-cluster local -b $KAFKA_BROKERS` and then `kaf config select-cluster` to configure connection to `kafka-local`.

## Usage

Expand Down
1 change: 1 addition & 0 deletions plugins/ca-kafka-local/config/kcat/kcat.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bootstrap.servers=${KAFKA_BROKERS}
11 changes: 8 additions & 3 deletions plugins/ca-kafka-local/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,25 @@
"version": "0.0.1",
"description": "Environment variables and tools to interact with `kafka-local` in your service",
"readme": "README.md",
"packages": ["kafkactl@5"],
"packages": ["kafkactl@5", "kcat@1", "envsubst", "kaf"],
"env": {
"KAFKA_BROKERS": "localhost:14231",
"SCHEMA_REGISTRY_URL": "localhost:14228",
"KAFKA_TOPIC_PREFIX": "local",
"KAFKA_UI_URL": "http://localhost:12288",
"KAFKA_CTL_CONFIG": "{{.Virtenv}}/config/kafkactl/config.yaml"
"KAFKA_CTL_CONFIG": "{{.Virtenv}}/config/kafkactl/config.yaml",
"KCAT_CONFIG": "{{.Virtenv}}/config/kcat/kcat.conf"
},
"create_files": {
"{{.Virtenv}}/bin/kafka-local-readme": "bin/kafka-local-readme",
"{{.Virtenv}}/config/process-compose.yaml": "config/process-compose.yaml",
"{{.Virtenv}}/config/kafkactl/config.yaml": "config/kafkactl/config.yaml"
"{{.Virtenv}}/config/kafkactl/config.yaml": "config/kafkactl/config.yaml",
"{{.Virtenv}}/config/kcat/kcat.conf.template": "config/kcat/kcat.conf"
},
"shell": {
"init_hook": [
"envsubst < {{.Virtenv}}/config/kcat/kcat.conf.template > {{.Virtenv}}/config/kcat/kcat.conf"
],
"scripts": {
"kafka-local-readme": "{{.Virtenv}}/bin/kafka-local-readme"
}
Expand Down

0 comments on commit 3d2b8d5

Please sign in to comment.