diff --git a/docker-compose/kafka/README.md b/docker-compose/kafka/README.md new file mode 100644 index 00000000000..0f18aad2e11 --- /dev/null +++ b/docker-compose/kafka/README.md @@ -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
Jaeger UI] --> S + S --> MemStore + KafkaBroker --> ZooKeeper + subgraph Kafka + KafkaBroker + ZooKeeper + end + subgraph Shared Storage + S + MemStore + end +``` diff --git a/docker-compose/kafka/docker-compose.yml b/docker-compose/kafka/docker-compose.yml new file mode 100644 index 00000000000..02922cd95a4 --- /dev/null +++ b/docker-compose/kafka/docker-compose.yml @@ -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