From: Kai Moritz Date: Wed, 17 Aug 2022 16:37:55 +0000 (+0200) Subject: README.sh-Skript zur Demonstration des Setups überarbeitet X-Git-Tag: sumup-adder---lvm-2-tage~10^2~1 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=40c2e597c8b695fe3d5e2675ce0c1a975b0065bd;p=demos%2Fkafka%2Ftraining README.sh-Skript zur Demonstration des Setups überarbeitet --- diff --git a/README.sh b/README.sh index 2845ab1..05178a3 100755 --- a/README.sh +++ b/README.sh @@ -32,13 +32,15 @@ while ! [[ $(http 0:8080/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Wait while ! [[ $(http 0:8081/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for requests..."; sleep 1; done while ! [[ $(http 0:8082/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for adder..."; sleep 1; done -echo 66 | http -v :8080/foo -echo 666 | http -v :8080/bar +docker-compose up -d peter ute franz beate klaus uschi -sleep 5 +http -v :8082/results +sleep 3 +http -v :8082/results -http -v :8082/state -http -v :8082/state/foo -http -v :8082/state/bar +docker-compose kill -s 9 adder -docker-compose logs adder +docker-compose up -d adder +sleep 3 +docker-compose kill -s 9 peter ute franz beate klaus uschi +http -v :8082/results diff --git a/docker-compose.yml b/docker-compose.yml index fec5bca..ba2566e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -86,7 +86,7 @@ services: kafka-topics --bootstrap-server kafka:9092 --delete --if-exists --topic in kafka-topics --bootstrap-server kafka:9092 --delete --if-exists --topic out kafka-topics --bootstrap-server kafka:9092 --create --topic in --partitions 2 --replication-factor 3 --config min.insync.replicas=2 - kafka-topics --bootstrap-server kafka:9092 --create --topic out --partitions 1 --replication-factor 1 + kafka-topics --bootstrap-server kafka:9092 --create --topic out --partitions 2 --replication-factor 3 --config min.insync.replicas=2 kafka-topics --bootstrap-server kafka:9092 --describe --topic in kafka-topics --bootstrap-server kafka:9092 --describe --topic out " @@ -124,3 +124,64 @@ services: sumup.adder.client-id: adder spring.data.mongodb.uri: mongodb://juplo:training@mongo:27017 spring.data.mongodb.database: juplo + + peter: + image: juplo/toolbox + command: > + bash -c " + while [[ true ]]; + do + echo 666 | http -v gateway:8080/peter; + sleep 1; + done + " + ute: + image: juplo/toolbox + command: > + bash -c " + while [[ true ]]; + do + echo 666 | http -v gateway:8080/ute; + sleep 2; + done + " + franz: + image: juplo/toolbox + command: > + bash -c " + while [[ true ]]; + do + echo 666 | http -v gateway:8080/franz; + sleep 3; + done + " + beate: + image: juplo/toolbox + command: > + bash -c " + while [[ true ]]; + do + echo 666 | http -v gateway:8080/beate; + sleep 4; + done + " + klaus: + image: juplo/toolbox + command: > + bash -c " + while [[ true ]]; + do + echo 666 | http -v gateway:8080/klaus; + sleep 5; + done + " + uschi: + image: juplo/toolbox + command: > + bash -c " + while [[ true ]]; + do + echo 666 | http -v gateway:8080/uschi; + sleep 6; + done + "