From: Kai Moritz Date: Tue, 26 Sep 2023 20:48:53 +0000 (+0200) Subject: Switched template for kubernates to unmodified images without javaagent X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=27eb13ca94d63b44f18472263d7c3de069302c77;p=demos%2Fkafka%2Fmonitoring Switched template for kubernates to unmodified images without javaagent --- diff --git a/kubernetes/docker-compose.yml b/kubernetes/docker-compose.yml index e32cbde..13e2dc8 100644 --- a/kubernetes/docker-compose.yml +++ b/kubernetes/docker-compose.yml @@ -3,7 +3,7 @@ version: '3.2' services: zookeeper: - build: zookeeper + build: bitnami/zookeeper:3.9.0 environment: ALLOW_ANONYMOUS_LOGIN: 'yes' ZOO_ENABLE_PROMETHEUS_METRICS: 'yes' @@ -14,11 +14,10 @@ services: - 7000:7070 kafka-1: - build: kafka + image: bitnami/kafka:3.4.0 environment: KAFKA_ENABLE_KRAFT: 'false' KAFKA_OPTS: - -javaagent:/opt/prometheus/jmx_prometheus_javaagent.jar=80:/opt/prometheus/config.yml -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=7000 -Dcom.sun.management.jmxremote.authenticate=false @@ -40,11 +39,10 @@ services: - zookeeper kafka-2: - build: kafka + image: bitnami/kafka:3.4.0 environment: KAFKA_ENABLE_KRAFT: 'false' KAFKA_OPTS: - -javaagent:/opt/prometheus/jmx_prometheus_javaagent.jar=80:/opt/prometheus/config.yml -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=7000 -Dcom.sun.management.jmxremote.authenticate=false @@ -71,11 +69,10 @@ services: - zookeeper kafka-3: - build: kafka + image: bitnami/kafka:3.4.0 environment: KAFKA_ENABLE_KRAFT: 'false' KAFKA_OPTS: - -javaagent:/opt/prometheus/jmx_prometheus_javaagent.jar=80:/opt/prometheus/config.yml -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=7000 -Dcom.sun.management.jmxremote.authenticate=false @@ -97,11 +94,10 @@ services: - zookeeper kafka-4: - build: kafka + image: bitnami/kafka:3.4.0 environment: KAFKA_ENABLE_KRAFT: 'false' KAFKA_OPTS: - -javaagent:/opt/prometheus/jmx_prometheus_javaagent.jar=80:/opt/prometheus/config.yml -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=7000 -Dcom.sun.management.jmxremote.authenticate=false @@ -123,11 +119,10 @@ services: - zookeeper kafka-5: - build: kafka + image: bitnami/kafka:3.4.0 environment: KAFKA_ENABLE_KRAFT: 'false' KAFKA_OPTS: - -javaagent:/opt/prometheus/jmx_prometheus_javaagent.jar=80:/opt/prometheus/config.yml -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=7000 -Dcom.sun.management.jmxremote.authenticate=false @@ -148,107 +143,6 @@ services: depends_on: - zookeeper - setup: - image: juplo/toolbox - command: > - bash -c " - kafka-topics --bootstrap-server kafka:9092 --delete --if-exists --topic test - kafka-topics --bootstrap-server kafka:9092 --create --topic test --partitions 33 --replication-factor 3 --config min.insync.replicas=2 - kafka-topics --bootstrap-server kafka:9092 --describe --topic test - " - depends_on: - - kafka-1 - - kafka-2 - - kafka-3 - - kafka-4 - - kafka-5 - - cli: - image: juplo/toolbox - command: sleep infinity - depends_on: - - kafka-1 - - kafka-2 - - kafka-3 - - kafka-4 - - kafka-5 - - burrow: - build: burrow - volumes: - - ./burrow.conf:/app/burrow.toml:ro - 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: - - ./kafka-lag-exporter.conf:/opt/docker/conf/application.conf:ro - ports: - - 8000:8000 - - kafka-exporter: - image: danielqsj/kafka-exporter:v1.6.0 - command: --kafka.server kafka:9092 - ports: - - 9308:9308 - - prometheus: - image: prom/prometheus - ports: - - "9090:9090" - volumes: - - ./prometheus.yml:/etc/prometheus/prometheus.yml - - grafana: - image: grafana/grafana:10.0.3 - ports: - - "3000:3000" - environment: - GF_SECURITY_ADMIN_USER: juplo - GF_SECURITY_ADMIN_PASSWORD: juplo - volumes: - - ./grafana/dashboard.yml:/etc/grafana/provisioning/dashboards/main.yaml - - ./grafana/datasource.yml:/etc/grafana/provisioning/datasources/automatic.yaml - - ./kafka-brokers.json:/var/lib/grafana/dashboards/main-dashboard.json - - grafana:/var/lib/grafana - - 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 - volumes: zookeeper: