+++ /dev/null
-*
-!cruise-control/*.sh
-!cruise-control/*/build/*libs
-!cruise-control/config
+++ /dev/null
-docker/cruise-control-metrics-reporter.jar
+++ /dev/null
-[submodule "cruise-control"]
- path = cruise-control
- url = https://github.com/linkedin/cruise-control.git
ARG VERSION=7.5.1
+
+FROM eclipse-temurin:17-jdk-focal
+
+RUN apt update
+RUN apt install -y git
+WORKDIR /tmp
+RUN git clone -b migrate_to_kafka_2_5 https://github.com/linkedin/cruise-control.git
+WORKDIR cruise-control
+RUN ./gradlew jar
+
FROM confluentinc/cp-kafka-connect:${VERSION}
USER root
-COPY cruise-control /opt/cruise-control/
+COPY --from=0 /tmp/cruise-control/config /opt/cruise-control/config/
+COPY --from=0 /tmp/cruise-control/cruise-control/build /opt/cruise-control/cruise-control/build/
+COPY --from=0 /tmp/cruise-control/kafka-cruise-control-start.sh /opt/cruise-control/
WORKDIR /opt/cruise-control
RUN wget -O - https://github.com/linkedin/cruise-control-ui/releases/download/v0.4.0/cruise-control-ui-0.4.0.tar.gz | tar -xzv
ENV BOOTSTRAP_SERVERS=localhost:9092
#!/bin/bash
+IMAGE=juplo/cruise-control
+
if [ "$1" = "cleanup" ]
then
docker-compose -f docker/docker-compose.yml down -t0 -v --remove-orphans
exit
fi
-git submodule update --init cruise-control || exit 1
-(cd cruise-control; ./gradlew jar) || exit 1
-(cd docker; ln -sf ../cruise-control/cruise-control-metrics-reporter/build/libs/cruise-control-metrics-reporter-*.jar cruise-control-metrics-reporter.jar)
-docker build -t juplo/cruise-control .
+docker-compose -f docker/docker-compose.yml up -d --remove-orphans kafka-1 kafka-2 kafka-3
-docker-compose -f docker/docker-compose.yml up --remove-orphans setup || exit 1
-docker-compose -f docker/docker-compose.yml ps
+if [[
+ $(docker image ls -q $IMAGE) == "" ||
+ "$1" = "build"
+]]
+then
+ DOCKER_BUILDKIT=0 docker build -t juplo/cruise-control . || exit 1
+else
+ echo "Using image existing images:"
+ docker image ls $IMAGE
+fi
docker-compose -f docker/docker-compose.yml up --remove-orphans setup || exit 1
docker-compose -f docker/docker-compose.yml up -d producer consumer-1 consumer-2
+++ /dev/null
-Subproject commit 1f30e8353a06dd76f664334a175254f9090dcded
KAFKA_INTER_BROKER_LISTENER_NAME: BROKER
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
- KAFKA_METRIC_REPORTERS: com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsReporter
- KAFKA_CRUISE_CONTROL_METRICS_REPORTER_BOOTSTRAP_SERVERS: localhost:9092
volumes:
- - ./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
KAFKA_INTER_BROKER_LISTENER_NAME: BROKER
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
- KAFKA_METRIC_REPORTERS: com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsReporter
- KAFKA_CRUISE_CONTROL_METRICS_REPORTER_BOOTSTRAP_SERVERS: localhost:9092
volumes:
- - ./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
KAFKA_INTER_BROKER_LISTENER_NAME: BROKER
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
- KAFKA_METRIC_REPORTERS: com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsReporter
- KAFKA_CRUISE_CONTROL_METRICS_REPORTER_BOOTSTRAP_SERVERS: localhost:9092
volumes:
- - ./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
KAFKA_INTER_BROKER_LISTENER_NAME: BROKER
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 3
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "false"
- KAFKA_METRIC_REPORTERS: com.linkedin.kafka.cruisecontrol.metricsreporter.CruiseControlMetricsReporter
- KAFKA_CRUISE_CONTROL_METRICS_REPORTER_BOOTSTRAP_SERVERS: localhost:9092
volumes:
- - ./cruise-control-metrics-reporter.jar:/usr/share/java/kafka/cruise-control-metrics-reporter.jar:ro
- kafka-4-data:/var/lib/kafka/data
ports:
- 9084:9084