X-Git-Url: https://juplo.de/gitweb/?a=blobdiff_plain;f=docker-compose.yml;h=d0af4c9e4a0cd89ea58f703086edb8217139c705;hb=0fc4394612a25e651ca13ac366292a31453d8c1d;hp=5ecfff270cea1755e13afcfc625bc8380f9f4153;hpb=03b6fe40eab4e482edd0ae176a5e3cdd7a649659;p=demos%2Fkafka%2Fmonitoring diff --git a/docker-compose.yml b/docker-compose.yml index 5ecfff2..d0af4c9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,10 +6,20 @@ services: build: zookeeper environment: ALLOW_ANONYMOUS_LOGIN: 'yes' + ZOO_ENABLE_PROMETHEUS_METRICS: 'yes' + volumes: + - zookeeper:/bitnami/zookeeper + ports: + - 2181:2181 + - 7000:7070 kafka-1: build: kafka environment: + KAFKA_OPTS: + -Dcom.sun.management.jmxremote=true + -Dcom.sun.management.jmxremote.port=7000 + -Dcom.sun.management.jmxremote.authenticate=false KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper:2181 KAFKA_CFG_LISTENERS: BROKER://:9092, LOCALHOST://:9081 KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: BROKER:PLAINTEXT, LOCALHOST:PLAINTEXT @@ -19,14 +29,21 @@ services: KAFKA_CFG_INTER_BROKER_LISTENER_NAME: BROKER KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR: 3 KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: "false" + volumes: + - kafka-1:/bitnami/kafka ports: - 9081:9081 + - 7001:7000 depends_on: - zookeeper kafka-2: build: kafka environment: + KAFKA_OPTS: + -Dcom.sun.management.jmxremote=true + -Dcom.sun.management.jmxremote.port=7000 + -Dcom.sun.management.jmxremote.authenticate=false KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper:2181 KAFKA_CFG_LISTENERS: BROKER://:9092, LOCALHOST://:9082 KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: BROKER:PLAINTEXT, LOCALHOST:PLAINTEXT @@ -36,9 +53,12 @@ services: KAFKA_CFG_INTER_BROKER_LISTENER_NAME: BROKER KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR: 3 KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: "false" + volumes: + - kafka-2:/bitnami/kafka ports: - 9092:9082 - 9082:9082 + - 7002:7000 networks: default: aliases: @@ -49,6 +69,10 @@ services: kafka-3: build: kafka environment: + KAFKA_OPTS: + -Dcom.sun.management.jmxremote=true + -Dcom.sun.management.jmxremote.port=7000 + -Dcom.sun.management.jmxremote.authenticate=false KAFKA_CFG_ZOOKEEPER_CONNECT: zookeeper:2181 KAFKA_CFG_LISTENERS: BROKER://:9092, LOCALHOST://:9083 KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP: BROKER:PLAINTEXT, LOCALHOST:PLAINTEXT @@ -58,8 +82,11 @@ services: KAFKA_CFG_INTER_BROKER_LISTENER_NAME: BROKER KAFKA_CFG_OFFSETS_TOPIC_REPLICATION_FACTOR: 3 KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE: "false" + volumes: + - kafka-3:/bitnami/kafka ports: - 9083:9083 + - 7003:7000 depends_on: - zookeeper @@ -91,6 +118,14 @@ services: ports: - 8080:8080 + burrow_exporter: + build: burrow_exporter + environment: + BURROW_ADDR: http://burrow:8080 + API_VERSION: 3 + ports: + - 8008:8080 + kafka-lag-exporter: image: seglo/kafka-lag-exporter:0.8.2 volumes: @@ -120,12 +155,40 @@ services: producer: image: juplo/simple-producer:1.0-SNAPSHOT + entrypoint: java + -Dcom.sun.management.jmxremote=true + -Dcom.sun.management.jmxremote.port=7000 + -Dcom.sun.management.jmxremote.local.only=false + -Dcom.sun.management.jmxremote.authenticate=false + -Dcom.sun.management.jmxremote.ssl=false + -jar /opt/app.jar command: kafka:9092 test producer + ports: + - 7010:7000 consumer: image: juplo/simple-consumer:1.0-SNAPSHOT + entrypoint: java + -Dcom.sun.management.jmxremote=true + -Dcom.sun.management.jmxremote.port=7000 + -Dcom.sun.management.jmxremote.local.only=false + -Dcom.sun.management.jmxremote.authenticate=false + -Dcom.sun.management.jmxremote.ssl=false + -jar /opt/app.jar command: kafka:9092 test my-group consumer + ports: + - 7020:7000 + + cli: + image: juplo/toolbox + command: sleep infinity + depends_on: + - setup volumes: + zookeeper: + kafka-1: + kafka-2: + kafka-3: grafana: