-
Notifications
You must be signed in to change notification settings - Fork 10
Adding instruction for running Kroxylicious via Docker Compose to qui… #165
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
base: main
Are you sure you want to change the base?
Conversation
…ck start guide (#2435)
Thanks @gunnarmorling We like Kaf so we do build our own image I'll give the PR a proper pass later. |
@gunnarmorling would you be able to sign off your commits? A |
services: | ||
# from https://github.com/apache/kafka/blob/trunk/docker/examples/docker-compose-files/single-node/plaintext/docker-compose.yml | ||
kafka: | ||
image: apache/kafka:4.0.0 |
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.
We'll probably want to extend our renovate config to bump the image refs. Does not need to be part of this PR.
Thanks all for reviewing! Will look into kaf support, thanks for that reference, @SamBarker! Will also sign off the commit, @tombentley. |
|
||
## Step 1: Create the Compose file | ||
|
||
Create a file named _docker-compose.yaml_ with the following contents: |
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.
suggestion: It's just called compose.yaml
nowadays:
- https://docs.docker.com/compose/intro/compose-application-model/#the-compose-file
- https://github.com/compose-spec/compose-spec/blob/00655e2222608fa6eaecdf12ac5195889ca2244a/spec.md#compose-file
The default path for a Compose file is
compose.yaml
(preferred) orcompose.yml
that is placed in the working directory. Compose also supportsdocker-compose.yaml
anddocker-compose.yml
for backwards compatibility of earlier versions. If both files exist, Compose prefers the canonicalcompose.yaml
.
Create a file named _docker-compose.yaml_ with the following contents: | |
Create a file named `compose.yaml` with the following contents: |
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.
Interesting, TIL. Thanks for bringing this up!
|
||
```yaml | ||
services: | ||
# from https://github.com/apache/kafka/blob/trunk/docker/examples/docker-compose-files/single-node/plaintext/docker-compose.yml |
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.
nitpick: Use the tagged commit for Kafka 4.0.0 to keep the contents of the docker-compose.yml
file stable.
# from https://github.com/apache/kafka/blob/trunk/docker/examples/docker-compose-files/single-node/plaintext/docker-compose.yml | |
# from https://github.com/apache/kafka/blob/4.0.0/docker/examples/docker-compose-files/single-node/plaintext/docker-compose.yml |
ports: | ||
- '9092:9092' |
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.
question: Do we need to expose any port here?
The (local) clients will use Kroxylicious to connect to the cluster, no?
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.
Strictly speaking, it's not needed. I still like it, as it allows local clients to connect directly, when needed.
|
||
## Step 3: Start the proxy | ||
|
||
In the directory with both the _docker-compose.yaml_ file and the _proxy-config.yaml_ file, run the following command: |
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.
suggestion: see previous comment.
In the directory with both the _docker-compose.yaml_ file and the _proxy-config.yaml_ file, run the following command: | |
In the directory with both the `compose.yaml` file and the `proxy-config.yaml` file, run the following command: |
@k-wall were you intending to do another pass on this one? |
Quick heads-up, that I'm still planning to send an update to this, hopefully next week. |
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.
Thanks @gunnarmorling
I think we've swapped from markdown to ascii doc for quickstarts between you starting this and my review.
The other wrinkle is your PR is against a past version of the docs 0.13.0 rather than to the current SNAPSHOT. So this should probably become a peer of docs/proxy-quick-start, maybe as container-quick-start
.
kroxylicious: | ||
image: quay.io/kroxylicious/kroxylicious:{{ page.version }} | ||
ports: | ||
- 9192:9192 | ||
- 9193:9193 | ||
volumes: | ||
- ./proxy-config.yaml:/opt/kroxylicious/config/proxy-config.yaml | ||
command: --config=/opt/kroxylicious/config/proxy-config.yaml | ||
networks: | ||
- my-network |
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 ended up playing with compose for an issue and ended up with
kroxylicious:
image: 'quay.io/kroxylicious/proxy:0.15.0-SNAPSHOT'
container_name: kroxylicious
command: --config /opt/kroxylicious/config/proxy-config.yaml
ports:
- "9192-9196:9192-9196"
configs:
- source: proxy-config
target: /opt/kroxylicious/config/proxy-config.yaml
configs:
proxy-config:
file: ./proxy-config.yaml
The specifying the config/volumes at the top level seemed to help make things work with podman machine on a mac.
I'm not sure what syntax for ports is easier to read either. The one entry per line from your snippet vs the range on each side notation from mine.
…ck start guide (#2435)
Fixes kroxylicious/kroxylicious#2435. It's a first quick draft to get a discussion going. Please let me know if there's anything which should be changed, be it in terms of contents or operational details like commit message structure, etc. Note I didn't copy that tabbed pane for the client commands from the local example, as there's no ready-made container image for kaf. While one could build an image locally, I felt it's not worth the effort probably. Thanks for any feedback!