From 37fb7bb944bd5ef97493314091f043b4c801e6bc Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Thu, 21 Oct 2021 22:12:14 +0200 Subject: [PATCH 1/6] The splitting of the recorded sentences is done by a separate service --- .gitmodules | 3 +++ README.sh | 9 +++++++-- counter | 2 +- docker-compose.yml | 22 +++++++++++++++++----- pom.xml | 3 ++- splitter | 1 + 6 files changed, 31 insertions(+), 9 deletions(-) create mode 160000 splitter 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..db1dde9 100755 --- a/README.sh +++ b/README.sh @@ -3,7 +3,8 @@ FORTUNE=juplo/wordcount--fortune:1.0.0 RECORDER=juplo/wordcount--recorder:1.0.1 USERS=juplo/wordcount--users:1.0.4 -COUNTER=juplo/wordcount--counter:1.0.1 +SPLITTER=juplo/wordcount--splitter:1.0.0 +COUNTER=juplo/wordcount--counter:1.1.0 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 diff --git a/counter b/counter index b1623c2..fe04994 160000 --- a/counter +++ b/counter @@ -1 +1 @@ -Subproject commit b1623c2b645c614424ceec3bc71008c900d82115 +Subproject commit fe049944648d9675ffe66b586b6bf860fbac696f diff --git a/docker-compose.yml b/docker-compose.yml index 87338db..a0a05c7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -61,8 +61,19 @@ services: depends_on: - kafka + splitter: + image: juplo/wordcount--splitter:1.0.0 + 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.1.0 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: 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/splitter b/splitter new file mode 160000 index 0000000..3bc3ef7 --- /dev/null +++ b/splitter @@ -0,0 +1 @@ +Subproject commit 3bc3ef7ceb76e7643e1e373293cfdc78f870838a -- 2.20.1 From 8dd448b347a6819bf3c27a92c0478196438356b1 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Thu, 2 Feb 2023 21:54:26 +0100 Subject: [PATCH 2/6] Removed unfunctional test in service `users` --- users | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users b/users index 097a537..58563cd 160000 --- a/users +++ b/users @@ -1 +1 @@ -Subproject commit 097a537e42272d105354a708e5138abf5488b28a +Subproject commit 58563cdc022363375c00ac580672f7daa22f6453 -- 2.20.1 From 1670963363613fab30b0bfcb61e3cfa983afa16f Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Thu, 2 Feb 2023 21:55:01 +0100 Subject: [PATCH 3/6] Removed dependency to external network `trion` --- docker-compose.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index a0a05c7..c02465a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -167,8 +167,3 @@ services: docker-kafka-server: properties: bootstrap.servers: "kafka:9092" - -networks: - default: - external: - name: trion -- 2.20.1 From 5c03ae138298b856b59d97b0d3e6a8da18430b85 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Thu, 2 Feb 2023 22:13:43 +0100 Subject: [PATCH 4/6] Service `fortune` aktualisiert: 21.04 -> 22.04 (LTS) --- fortune | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fortune b/fortune index 5dd5c42..dde18ef 160000 --- a/fortune +++ b/fortune @@ -1 +1 @@ -Subproject commit 5dd5c422829ceac252d5c13d0022acff40f76185 +Subproject commit dde18ef24d54bb988ad458ad6e12ed99fbc53061 -- 2.20.1 From 1d8af593dfe7ec0e067916bcf08107352d708561 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 17 Jun 2023 10:55:08 +0200 Subject: [PATCH 5/6] Deactivated scale-up for service query in `README.sh` --- README.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.sh b/README.sh index db1dde9..ba50a69 100755 --- a/README.sh +++ b/README.sh @@ -85,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 -- 2.20.1 From 6fc784b2d22003d5c951b476ce061dbd45cf12dd Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sat, 4 Feb 2023 10:20:55 +0100 Subject: [PATCH 6/6] WIP --- README.sh | 6 +++--- counter | 2 +- docker-compose.yml | 6 +++--- recorder | 2 +- splitter | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.sh b/README.sh index ba50a69..25e36da 100755 --- a/README.sh +++ b/README.sh @@ -1,10 +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 -SPLITTER=juplo/wordcount--splitter:1.0.0 -COUNTER=juplo/wordcount--counter:1.1.0 +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 diff --git a/counter b/counter index fe04994..dd4d5dd 160000 --- a/counter +++ b/counter @@ -1 +1 @@ -Subproject commit fe049944648d9675ffe66b586b6bf860fbac696f +Subproject commit dd4d5ddb60f7ca495d65d49f93eb4c07e0d03e22 diff --git a/docker-compose.yml b/docker-compose.yml index c02465a..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`)" @@ -62,7 +62,7 @@ services: - kafka splitter: - image: juplo/wordcount--splitter:1.0.0 + image: juplo/wordcount--splitter:1.1.4 labels: - "traefik.enable=true" - "traefik.http.routers.splitter.rule=Host(`splitter.localhost`)" @@ -73,7 +73,7 @@ services: - kafka counter: - image: juplo/wordcount--counter:1.1.0 + image: juplo/wordcount--counter:1.2.4 labels: - "traefik.enable=true" - "traefik.http.routers.counter.rule=Host(`counter.localhost`)" 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 index 3bc3ef7..2b48657 160000 --- a/splitter +++ b/splitter @@ -1 +1 @@ -Subproject commit 3bc3ef7ceb76e7643e1e373293cfdc78f870838a +Subproject commit 2b48657cac59447a359a9ce52c250bf25a559cbc -- 2.20.1