-
Notifications
You must be signed in to change notification settings - Fork 3.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
docker: add pulsar example #3789
Merged
codefromthecrypt
merged 4 commits into
openzipkin:master
from
CodePrometheus:feat-pulsar-docker
Feb 3, 2025
+53
−0
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# | ||
# Copyright The OpenZipkin Authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
|
||
# Use latest from https://hub.docker.com/r/apachepulsar/pulsar/tags | ||
ARG pulsar_version=4.0.2 | ||
|
||
# We copy files from the context into a scratch container first to avoid a problem where docker and | ||
# docker compose don't share layer hashes https://github.com/docker/compose/issues/883 normally. | ||
# COPY --from= works around the issue. | ||
FROM scratch as scratch | ||
|
||
WORKDIR /docker-bin | ||
COPY build-bin/docker/docker-healthcheck /docker-bin/ | ||
|
||
ARG pulsar_version | ||
|
||
FROM apachepulsar/pulsar:${pulsar_version} as zipkin-pulsar | ||
LABEL pulsar-version=$pulsar_version | ||
LABEL org.opencontainers.image.description="Apache Pulsar on Alpine Linux" | ||
|
||
# Add HEALTHCHECK and ENTRYPOINT scripts into the default search path | ||
COPY --from=scratch /docker-bin/* /usr/local/bin/ | ||
# We use start period of 30s to avoid marking the container unhealthy on slow or contended CI hosts | ||
HEALTHCHECK --interval=1s --start-period=30s --timeout=5s CMD ["docker-healthcheck"] | ||
|
||
# Usually, we read env set from pid 1 to get docker-healthcheck parameters. | ||
# However, pulsar-server has to start as root even if permissions are dropped | ||
# later. So, we expose it in the Dockerfile instead. | ||
ENV HEALTHCHECK_PORT=8080 | ||
ENV HEALTHCHECK_KIND=http | ||
ENV HEALTHCHECK_PATH=/admin/v2/clusters/standalone | ||
ENV PULSAR_LOG_ROOT_LEVEL=WARN | ||
EXPOSE 8080 6650 | ||
CMD ["bin/pulsar", "standalone"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
## zipkin-pulsar Docker image | ||
|
||
The `zipkin-pulsar` testing image runs Pulsar for Pulsar collector integration. | ||
|
||
To build `openzipkin/zipkin-pulsar:test`, from the top-level of the repository, run: | ||
```bash | ||
$ DOCKER_FILE=docker/test-images/zipkin-pulsar/Dockerfile build-bin/docker/docker_build openzipkin/zipkin-pulsar:test | ||
``` | ||
|
||
You can use the env variable `PULSAR_LOG_ROOT_LEVEL` to change the log level for Pulsar. Defaults to "WARN". |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
shouldn't we check the service port 6650 (esp if we are using tcp)
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 modified it to HTTP on port 8080, which is enough for the healthcheck.
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.
ok mainly I was concerned about race condition where 8080 is ready, but service port not. If this becomes a problem we can revisit