--- /dev/null
+ARG VERSION=7.5.1
+FROM confluentinc/cp-kafka-connect:${VERSION}
+USER root
+COPY cruise-control /opt/cruise-control/
+WORKDIR /opt/cruise-control
+ENV BOOTSTRAP_SERVERS=localhost:9092
+ENV ZOOKEEPER_CONNECT=localhost:2181
+RUN echo -e '#!/bin/bash\n sed -ie "s+^bootstrap\.servers=.*$+bootstrap.servers=${BOOTSTRAP_SERVERS}+;s+^zookeeper\.connect=.*$+zookeeper.connect=${ZOOKEEPER_CONNECT}+" config/cruisecontrol.properties\nexec ./kafka-cruise-control-start.sh "$@"' > run.sh; chmod a+x run.sh
+ENTRYPOINT [ "/opt/cruise-control/run.sh" ]
+CMD [ "config/cruisecontrol.properties" ]
-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.port=9101
-Dcom.sun.management.jmxremote.authenticate=false
+ KAFKA_METRIC_REPORTERS: com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsReporter
volumes:
- ./jmx-exporter.yml:/etc/jmx-exporter.yml:ro
+ - ./cruise-control-metrics-reporter.jar:/usr/share/java/kafka/cruise-control-metrics-reporter.jar:ro
- kafka-1-data:/var/lib/kafka/data
ports:
- 9081:9081
-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.port=9101
-Dcom.sun.management.jmxremote.authenticate=false
+ KAFKA_METRIC_REPORTERS: com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsReporter
volumes:
- ./jmx-exporter.yml:/etc/jmx-exporter.yml:ro
+ - ./cruise-control-metrics-reporter.jar:/usr/share/java/kafka/cruise-control-metrics-reporter.jar:ro
- kafka-2-data:/var/lib/kafka/data
ports:
- 9092:9082
-Dcom.sun.management.jmxremote=true
-Dcom.sun.management.jmxremote.port=9101
-Dcom.sun.management.jmxremote.authenticate=false
+ KAFKA_METRIC_REPORTERS: com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsReporter
volumes:
- ./jmx-exporter.yml:/etc/jmx-exporter.yml:ro
+ - ./cruise-control-metrics-reporter.jar:/usr/share/java/kafka/cruise-control-metrics-reporter.jar:ro
- kafka-3-data:/var/lib/kafka/data
ports:
- 9083:9083
depends_on:
- zookeeper
+ cruise-control:
+ image: juplo/cruise-control
+ environment:
+ BOOTSTRAP_SERVERS: kafka-1:9092,kafka-2:9092,kafka-3:9092
+ ZOOKEEPER_CONNECT: zookeeper:2181/
+ ports:
+ - "9090:9090"
+
schema-registry:
image: confluentinc/cp-schema-registry:7.5.1
environment:
echo -n Bereits konfiguriert:
cat INITIALIZED
kafka-topics --bootstrap-server kafka:9092 --describe --topic test
+ kafka-topics --bootstrap-server kafka:9092 --describe --topic __CruiseControlMetrics
else
kafka-topics --bootstrap-server kafka:9092 \
--delete \
--if-exists \
--topic test
+ kafka-topics --bootstrap-server kafka:9092 \
+ --delete \
+ --if-exists \
+ --topic __CruiseControlMetrics
kafka-topics --bootstrap-server kafka:9092 \
--create \
--topic test \
--partitions 2 \
--replication-factor 3 \
--config min.insync.replicas=2 \
+ kafka-topics --bootstrap-server kafka:9092 \
+ --create \
+ --topic __CruiseControlMetrics \
+ --partitions 2 \
+ --replication-factor 3 \
+ --config min.insync.replicas=2 \
&& echo Das Topic \'test\' wurde erfolgreich angelegt: \
&& kafka-topics --bootstrap-server kafka:9092 --describe --topic test \
+ && kafka-topics --bootstrap-server kafka:9092 --describe --topic __CruiseControlMetrics \
&& date > INITIALIZED
fi
stop_grace_period: 0s