-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sample docker-compose configuration using Kafka
Signed-off-by: Yuri Shkuro <github@ysh.us>
- Loading branch information
1 parent
fdc3ae5
commit 7006e9f
Showing
2 changed files
with
159 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Sample configuration with Kafka | ||
|
||
This `docker-compose` environment provides a sample configuration of Jaeger depoyment utilizing collector-Kafka-injester pipeline. Storage is provided by the `jageer-remote-storage` service running memstore. | ||
|
||
Jaeger UI can be accessed at http://localhost:16686/, as usual, and refreshing the screen should produce internal traces. | ||
|
||
```mermaid | ||
graph LR | ||
C[jaeger-collector] --> KafkaBroker | ||
KafkaBroker --> I[jaeger-ingester] | ||
I --> S[jaeger-remote-storage] | ||
UI[jaeger-query<br>Jaeger UI] --> S | ||
S --> MemStore | ||
KafkaBroker --> ZooKeeper | ||
subgraph Kafka | ||
KafkaBroker | ||
ZooKeeper | ||
end | ||
subgraph Shared Storage | ||
S | ||
MemStore | ||
end | ||
``` |
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,136 @@ | ||
version: "2.1" | ||
|
||
services: | ||
zookeeper: | ||
image: bitnami/zookeeper | ||
ports: | ||
- 2181:2181 | ||
environment: | ||
- ALLOW_ANONYMOUS_LOGIN=yes | ||
kafka: | ||
image: 'bitnami/kafka:latest' | ||
ports: | ||
- '9092:9092' | ||
environment: | ||
- KAFKA_BROKER_ID=1 | ||
- KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 | ||
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181 | ||
- ALLOW_PLAINTEXT_LISTENER=yes | ||
- KAFKA_LISTENERS=INTERNAL://0.0.0.0:9092,OUTSIDE://0.0.0.0:9094 | ||
- KAFKA_ADVERTISED_LISTENERS=INTERNAL://kafka:9092,OUTSIDE://localhost:9094 | ||
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=INTERNAL:PLAINTEXT,OUTSIDE:PLAINTEXT | ||
- KAFKA_INTER_BROKER_LISTENER_NAME=INTERNAL | ||
restart: always | ||
depends_on: | ||
- zookeeper | ||
links: | ||
- zookeeper | ||
healthcheck: | ||
test: ["CMD-SHELL", "kafka-topics.sh --list --bootstrap-server 127.0.0.1:9092"] | ||
interval: 5s | ||
timeout: 5s | ||
retries: 3 | ||
start_period: 5s | ||
|
||
jaeger-remote-storage: | ||
image: jaegertracing/jaeger-remote-storage | ||
ports: | ||
- 17271:17271 | ||
environment: | ||
- SPAN_STORAGE_TYPE=memory | ||
healthcheck: | ||
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:17270/ || exit 1"] | ||
interval: 5s | ||
timeout: 5s | ||
retries: 3 | ||
|
||
jaeger-collector: | ||
image: jaegertracing/jaeger-collector | ||
command: | ||
- "--collector.otlp.enabled=true" | ||
- "--log-level=debug" | ||
ports: | ||
- 4318:4318 | ||
- 14250:14250 | ||
environment: | ||
- SPAN_STORAGE_TYPE=kafka | ||
- KAFKA_PRODUCER_BROKERS=kafka:9092 | ||
healthcheck: | ||
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:14269/ || exit 1"] | ||
interval: 5s | ||
timeout: 5s | ||
retries: 3 | ||
depends_on: | ||
kafka: | ||
condition: service_healthy | ||
links: | ||
- kafka | ||
|
||
jaeger-ingester: | ||
image: jaegertracing/jaeger-ingester | ||
command: | ||
- "--grpc-storage.server=jaeger-remote-storage:17271" | ||
- "--log-level=debug" | ||
environment: | ||
- SPAN_STORAGE_TYPE=grpc-plugin | ||
- KAFKA_CONSUMER_BROKERS=kafka:9092 | ||
healthcheck: | ||
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:14270/ || exit 1"] | ||
interval: 5s | ||
timeout: 5s | ||
retries: 3 | ||
depends_on: | ||
kafka: | ||
condition: service_healthy | ||
jaeger-remote-storage: | ||
condition: service_healthy | ||
jaeger-collector: | ||
condition: service_healthy | ||
links: | ||
- kafka | ||
- jaeger-remote-storage | ||
|
||
jaeger-agent: | ||
image: jaegertracing/jaeger-agent | ||
command: | ||
- "--reporter.grpc.host-port=jaeger-collector:14250" | ||
- "--log-level=debug" | ||
ports: | ||
- "6831:6831/udp" | ||
- "6832:6832/udp" | ||
- "5778:5778" | ||
restart: on-failure | ||
healthcheck: | ||
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:14271/ || exit 1"] | ||
interval: 5s | ||
timeout: 5s | ||
retries: 3 | ||
depends_on: | ||
jaeger-collector: | ||
condition: service_healthy | ||
links: | ||
- jaeger-collector | ||
|
||
jaeger-query: | ||
image: jaegertracing/jaeger-query | ||
command: | ||
- "--grpc-storage.server=jaeger-remote-storage:17271" | ||
- "--log-level=debug" | ||
environment: | ||
- SPAN_STORAGE_TYPE=grpc-plugin | ||
- JAEGER_AGENT_HOST=jaeger-agent | ||
ports: | ||
- "16686:16686" | ||
- "16687" | ||
restart: on-failure | ||
healthcheck: | ||
test: ["CMD-SHELL", "wget --no-verbose --tries=1 --spider http://localhost:16687/ || exit 1"] | ||
interval: 5s | ||
timeout: 5s | ||
retries: 3 | ||
depends_on: | ||
jaeger-remote-storage: | ||
condition: service_healthy | ||
links: | ||
- jaeger-agent | ||
- jaeger-remote-storage |