UI für Cruise Control direkt mit in das Image eingebaut
authorKai Moritz <kai@juplo.de>
Mon, 9 Oct 2023 17:35:39 +0000 (19:35 +0200)
committerKai Moritz <kai@juplo.de>
Mon, 16 Oct 2023 20:39:44 +0000 (22:39 +0200)
.gitmodules
docker/Dockerfile
docker/README.sh
docker/cruise-control-ui [deleted submodule]
docker/docker-compose.yml

index f96c757..72381dc 100644 (file)
@@ -1,6 +1,3 @@
 [submodule "docker/cruise-control"]
        path = docker/cruise-control
        url = https://github.com/linkedin/cruise-control.git
-[submodule "docker/cruise-control-ui"]
-       path = docker/cruise-control-ui
-       url = https://github.com/linkedin/cruise-control-ui.git
index c3009a2..aedfbab 100644 (file)
@@ -3,9 +3,9 @@ FROM confluentinc/cp-kafka-connect:${VERSION}
 USER root
 COPY cruise-control /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
 ENV ZOOKEEPER_CONNECT=localhost:2181
-ENV CORS_ORIGIN=localhost:8080
-RUN echo -e '#!/bin/bash\n sed -ie "s+^bootstrap\.servers=.*$+bootstrap.servers=${BOOTSTRAP_SERVERS}+;s+^zookeeper\.connect=.*$+zookeeper.connect=${ZOOKEEPER_CONNECT}+;s+^webserver\.http\.cors\.enabled=.*$+webserver.http.cors.enabled=true+;s+webserver\.http\.cors\.origin=.*+webserver.http.cors.origin=${CORS_ORIGIN}+" config/cruisecontrol.properties\nexec ./kafka-cruise-control-start.sh "$@"' > run.sh; chmod a+x run.sh
+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" ]
index c4be44b..7268bc9 100755 (executable)
@@ -11,4 +11,3 @@ git submodule update --init cruise-control || exit 1
 (cd cruise-control; ./gradlew jar) || exit 1
 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 build -t juplo/cruise-control-ui cruise-control-ui
diff --git a/docker/cruise-control-ui b/docker/cruise-control-ui
deleted file mode 160000 (submodule)
index b1208a6..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit b1208a6f020c21ff967297814c2e893eed3f3183
index eb93bac..38094bd 100644 (file)
@@ -107,7 +107,6 @@ services:
     environment:
       BOOTSTRAP_SERVERS: kafka-1:9092,kafka-2:9092,kafka-3:9092
       ZOOKEEPER_CONNECT: zookeeper:2181/
-      CORS_ORIGIN: http://localhost:9080
     ports:
       - "9090:9090"
 
@@ -180,27 +179,28 @@ services:
                        --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 \
+          && echo Das Topic \'test\' wurde erfolgreich angelegt: \
+          && kafka-topics --bootstrap-server kafka:9092 --describe --topic test
+          kafka-topics --bootstrap-server kafka:9092 \
+                       --delete \
+                       --if-exists \
+                       --topic __CruiseControlMetrics
           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
+          && echo Das Topic \'__CruiseControlMetrics\' wurde erfolgreich angelegt: \
+          && kafka-topics --bootstrap-server kafka:9092 --describe --topic __CruiseControlMetrics
+        fi \
+        && date > INITIALIZED
     stop_grace_period: 0s
     depends_on:
       - cli
@@ -238,13 +238,6 @@ services:
       - kafka-2
       - kafka-3
 
-  cruise-control-ui:
-    image: juplo/cruise-control-ui
-    volumes:
-      - ./config.csv:/usr/share/nginx/html/static/config.csv
-    ports:
-      - "9080:80"
-
 volumes:
   zookeeper-data:
   zookeeper-log: