-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Instant kraft demo #1124
base: 7.2.1-post
Are you sure you want to change the base?
WIP: Instant kraft demo #1124
Conversation
$ docker compose exec broker kafka-topics --create --topic zookeeper-vacation-ideas --bootstrap-server localhost:9092 | ||
|
||
$ docker-compose exec broker kafka-producer-perf-test --topic zookeeper-vacation-ideas \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commands used include both docker compose
and docker-compose
. The former I think relies on later versions of Docker with either Compose included, or via a command-plugins capability.
Maybe we should stick to one. I think our formal docs lean towards docker-compose
.
``` | ||
$ git clone https://github.com/confluentinc/examples.git && cd examples/instant-kraft | ||
|
||
$ docker compose up |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For better or worse, our examples seem to usually use docker-compose up -d
, i.e. launch detached/daemonized, so the current shell isn't left bound to the command and tailing the logs. Downside is that you have to docker logs
or docker-compose logs
to see any errors or interesting logging.
Up to you whether you want the -d
here, but note that users might struggle with losing their shell prompt, and also unintentionally kill with CTRL-C.
|
||
>> cat metadataQuorum/leader | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we mention CTRL-D to exit the REPL?
$ docker compose up | ||
``` | ||
|
||
That's it! One container, one process, doing the the broker and controller work. No Zookeeper. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think ZooKeeper (camel case) is standard.
___ | ||
.'O o'-._ | ||
/ O o_.-`| | ||
/O_.-' O | | ||
|O o O .-` | ||
|o O_.-' | ||
'--` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might need to be in a code block to appear proper cheesy.
``` | ||
|
||
## Step 3 | ||
Explore the cluster using the new kafka metadata command line tool. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we refer to it inline by name? I don't mind, just asking: kafka-metadata-shell
$ docker compose up | ||
``` | ||
|
||
That's it! One container, one process, doing the the broker and controller work. No Zookeeper. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doing the the broker and controller work
Remove duplicate "the" and reword. Maybe
One container, one process performing both broker and controller/quorum roles.
``` | ||
|
||
That's it! One container, one process, doing the the broker and controller work. No Zookeeper. | ||
The key server configure to enable KRaft is the `process.roles`. Here we have the same node doing both the broker and quorum conroller work. Note that this is ok for local development, but in production you should have seperate nodes for the broker and controller quorum nodes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs rewording.
The key server configuration for enabling KRaft is process.roles
.
@addisonhuddy fyi moved this back to "draft" mode to avoid the stale PR reminders. |
|
Creating a single node, lightweight KRaft example that is based on the cp-all-in-one-kraft demo. Over time, this demo will evolve as the KRaft tooling improves. The main goal of the example is to show how easy it is to run Kafka in KRaft mode.
Includes