sergioferragut opened a new pull request, #14592:
URL: https://github.com/apache/druid/pull/14592
### Description
The goal of this PR is to parameterize the hostnames for the Kafka and Druid
instances such that the jupyter lab environment and its set of notebooks can
run on against a variety of deployments. It also standardizes how notebooks are
created such that they make use of these environment variables when connecting
to Kafka or Druid.
<!-- Describe the goal of this PR, what problem are you fixing. If there is
a corresponding issue (referenced above), it's not necessary to repeat the
description here, however, you may choose to keep one summary sentence. -->
<!-- Describe your patch: what did you change in code? How did you fix the
problem? -->
Adjusted the docker compose files to use defaults for
DRUID_VERSION -> defaults to 26.0
DRUID_HOST -> defaults to "router" which works with Druid deployed with the
docker compose
KAFKA_HOST -> defaults to "kafka" which works with Kafka deployed with
docker compose
Also added a jupyter notebook template @`examples/ that shows how to
initialize both kafka and druid host variables in order to make the notebooks
work with this parameterized hosts approach.
Using these variables users can use the notebooks on other instances of
Druid and/or Kafka.
Examples:
- If you run both Kafka and Druid standalone in the local system and only
run jupyter through docker compose:
`KAFKA_HOST=host.docker.internal DRUID_HOST=host.docker.internal docker
compose --profile jupyter up -d`
- If you run both Druid standalone in the local system and run kafka and
jupyter through docker compose:
`KAFKA_HOST=host.docker.internal DRUID_HOST=host.docker.internal docker
compose --profile kafka-jupyter up -d`
- Self-contained startup with all services running:
`docker compose --profile all-services up -d`
<!-- Check the items by putting "x" in the brackets for the done things. Not
all of these items apply to every PR. Remove the items which are not done or
not relevant to the PR. None of the items from the checklist below are strictly
necessary, but it would be very helpful if you at least self-review the PR. -->
This PR has:
- [ x ] been self-reviewed.
- [ ] using the [concurrency
checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md)
(Remove this item if the PR doesn't have any relation to concurrency.)
- [ ] added documentation for new or modified features or behaviors.
- [ ] a release note entry in the PR description.
- [ ] added Javadocs for most classes and all non-trivial methods. Linked
related entities via Javadoc links.
- [ ] added or updated version, license, or notice information in
[licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
- [ x ] added comments explaining the "why" and the intent of the code
wherever would not be obvious for an unfamiliar reader.
- [ ] added unit tests or modified existing tests to cover new code paths,
ensuring the threshold for [code
coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md)
is met.
- [ ] added integration tests.
- [ x ] been tested in a test Druid cluster.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]