From: Kai Moritz Date: Mon, 9 Oct 2023 17:35:39 +0000 (+0200) Subject: UI für Cruise Control direkt mit in das Image eingebaut X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=df8a9504c296237646cf0ce6ca13fad5b21ac76c;p=demos%2Fkafka%2Ftraining UI für Cruise Control direkt mit in das Image eingebaut --- diff --git a/.gitmodules b/.gitmodules index 1fd9011..9807436 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ [submodule "cruise-control"] path = cruise-control url = https://github.com/linkedin/cruise-control.git -[submodule "cruise-control-ui"] - path = cruise-control-ui - url = https://github.com/linkedin/cruise-control-ui.git diff --git a/Dockerfile b/Dockerfile index c3009a2..aedfbab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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" ] diff --git a/README.sh b/README.sh index f0bd1a8..fa8a4c7 100755 --- a/README.sh +++ b/README.sh @@ -11,7 +11,6 @@ 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 build -t juplo/cruise-control-ui cruise-control-ui docker-compose -f docker/docker-compose.yml up --remove-orphans setup || exit 1 docker-compose -f docker/docker-compose.yml ps diff --git a/cruise-control-ui b/cruise-control-ui deleted file mode 160000 index b1208a6..0000000 --- a/cruise-control-ui +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b1208a6f020c21ff967297814c2e893eed3f3183 diff --git a/docker/config.csv b/docker/config.csv deleted file mode 100644 index 7b09636..0000000 --- a/docker/config.csv +++ /dev/null @@ -1 +0,0 @@ -dev,juplo,http://localhost:9090/kafkacruisecontrol/ diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index ffd4c1f..900001b 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -83,7 +83,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" @@ -215,13 +214,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" - producer: image: juplo/endless-stream-spring-producer:1.0-SNAPSHOT environment: