From: Kai Moritz Date: Sat, 4 Feb 2023 09:20:55 +0000 (+0100) Subject: WIP X-Git-Url: https://juplo.de/gitweb/?p=demos%2Fkafka%2Fwordcount;a=commitdiff_plain;h=refs%2Fheads%2Fmaster;hp=827cd286933a1af205ee9fb9224f94373518158e WIP --- diff --git a/.gitmodules b/.gitmodules index ae65594..b8abc8d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -26,3 +26,6 @@ path = fortune url = ./ branch = fortune +[submodule "splitter"] + path = splitter + url = ./ diff --git a/README.sh b/README.sh index 4b5f557..25e36da 100755 --- a/README.sh +++ b/README.sh @@ -1,9 +1,10 @@ #!/bin/bash FORTUNE=juplo/wordcount--fortune:1.0.0 -RECORDER=juplo/wordcount--recorder:1.0.1 +RECORDER=juplo/wordcount--recorder:1.1.0 USERS=juplo/wordcount--users:1.0.4 -COUNTER=juplo/wordcount--counter:1.0.1 +SPLITTER=juplo/wordcount--splitter:1.1.4 +COUNTER=juplo/wordcount--counter:1.2.4 TOP10=juplo/wordcount--top10:1.0.1 QUERY=juplo/wordcount--query:1.0.4 @@ -13,6 +14,7 @@ then docker image rm $FORTUNE docker image rm $RECORDER docker image rm $USERS + docker image rm $SPLITTER docker image rm $COUNTER docker image rm $TOP10 docker image rm $QUERY @@ -23,6 +25,7 @@ if [[ $(docker image ls -q $FORTUNE) == "" || $(docker image ls -q $RECORDER) == "" || $(docker image ls -q $USERS) == "" || + $(docker image ls -q $SPLITTER) == "" || $(docker image ls -q $COUNTER) == "" || $(docker image ls -q $TOP10) == "" || $(docker image ls -q $QUERY) == "" || @@ -30,10 +33,11 @@ if [[ ]] then mvn clean package || exit - docker-compose rm -svf recorder users counter top10 query + docker-compose rm -svf recorder users splitter counter top10 query ( cd fortune; ./README.sh $FORTUNE; ) mvn -f recorder/pom.xml docker:build mvn -f users/pom.xml docker:build + mvn -f splitter/pom.xml docker:build mvn -f counter/pom.xml docker:build mvn -f top10/pom.xml docker:build mvn -f query/pom.xml docker:build @@ -42,6 +46,7 @@ else docker image ls $FORTUNE docker image ls $RECORDER docker image ls $USERS + docker image ls $SPLITTER docker image ls $COUNTER docker image ls $TOP10 docker image ls $QUERY @@ -80,7 +85,7 @@ http -v query.localhost/bart http -v query.localhost/nerd http -v query.localhost/riddler -docker-compose up -d --scale query=5 query +// docker-compose up -d --scale query=5 query http -v --follow query.localhost/bart sleep 1 http -v --follow query.localhost/bart diff --git a/counter b/counter index b1623c2..dd4d5dd 160000 --- a/counter +++ b/counter @@ -1 +1 @@ -Subproject commit b1623c2b645c614424ceec3bc71008c900d82115 +Subproject commit dd4d5ddb60f7ca495d65d49f93eb4c07e0d03e22 diff --git a/docker-compose.yml b/docker-compose.yml index 87338db..1c5bfc4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -40,7 +40,7 @@ services: - "/var/run/docker.sock:/var/run/docker.sock:ro" recorder: - image: juplo/wordcount--recorder:1.0.1 + image: juplo/wordcount--recorder:1.1.0 labels: - "traefik.enable=true" - "traefik.http.routers.recorder.rule=Host(`recorder.localhost`)" @@ -61,8 +61,19 @@ services: depends_on: - kafka + splitter: + image: juplo/wordcount--splitter:1.1.4 + labels: + - "traefik.enable=true" + - "traefik.http.routers.splitter.rule=Host(`splitter.localhost`)" + - "traefik.http.routers.splitter.entrypoints=web" + environment: + juplo.wordcount.splitter.bootstrap-server: kafka:9092 + depends_on: + - kafka + counter: - image: juplo/wordcount--counter:1.0.1 + image: juplo/wordcount--counter:1.2.4 labels: - "traefik.enable=true" - "traefik.http.routers.counter.rule=Host(`counter.localhost`)" @@ -134,10 +145,11 @@ services: image: juplo/toolbox command: bash -c " cub kafka-ready -b kafka:9092 1 60 ; - kafka-topics --bootstrap-server kafka:9092 --create --partitions 10 --topic recordings ; - kafka-topics --bootstrap-server kafka:9092 --create --partitions 10 --topic users ; - kafka-topics --bootstrap-server kafka:9092 --create --partitions 10 --topic countings ; - kafka-topics --bootstrap-server kafka:9092 --create --partitions 10 --topic top10 ; + kafka-topics --bootstrap-server kafka:9092 --create --partitions 10 --if-not-exists --topic recordings ; + kafka-topics --bootstrap-server kafka:9092 --create --partitions 10 --if-not-exists --topic users ; + kafka-topics --bootstrap-server kafka:9092 --create --partitions 10 --if-not-exists --topic words ; + kafka-topics --bootstrap-server kafka:9092 --create --partitions 10 --if-not-exists --topic countings ; + kafka-topics --bootstrap-server kafka:9092 --create --partitions 10 --if-not-exists --topic top10 ; sleep infinity" akhq: @@ -155,8 +167,3 @@ services: docker-kafka-server: properties: bootstrap.servers: "kafka:9092" - -networks: - default: - external: - name: trion diff --git a/fortune b/fortune index 5dd5c42..dde18ef 160000 --- a/fortune +++ b/fortune @@ -1 +1 @@ -Subproject commit 5dd5c422829ceac252d5c13d0022acff40f76185 +Subproject commit dde18ef24d54bb988ad458ad6e12ed99fbc53061 diff --git a/pom.xml b/pom.xml index 606ca8b..e116624 100644 --- a/pom.xml +++ b/pom.xml @@ -5,13 +5,14 @@ de.juplo.kafka.wordcount docker pom - 1.0.1 + 1.0.2 Docker-Compose Setup Docker-Compose Setup for the multiuser-wordcount example recorder users + splitter counter top10 query diff --git a/recorder b/recorder index c5700c2..22615ba 160000 --- a/recorder +++ b/recorder @@ -1 +1 @@ -Subproject commit c5700c2117f6c445278f272572c8b5732bf53bbf +Subproject commit 22615ba45bd7697e041eb10f88166cd2074de305 diff --git a/splitter b/splitter new file mode 160000 index 0000000..2b48657 --- /dev/null +++ b/splitter @@ -0,0 +1 @@ +Subproject commit 2b48657cac59447a359a9ce52c250bf25a559cbc diff --git a/users b/users index 097a537..58563cd 160000 --- a/users +++ b/users @@ -1 +1 @@ -Subproject commit 097a537e42272d105354a708e5138abf5488b28a +Subproject commit 58563cdc022363375c00ac580672f7daa22f6453