X-Git-Url: https://juplo.de/gitweb/?a=blobdiff_plain;f=README.sh;h=34a35ef3bcd65a5b842ec89c72eaf2ef78e623f0;hb=ce92719ebd18b3c34a3aa8ca60cf67f6c3fbd8b2;hp=9f884c85eb7e702b82d9cfaf77d317f2deaa05d6;hpb=ee0cd3f9feba20dff95d9eef6fb7b654909da604;p=demos%2Fkafka%2Ftraining diff --git a/README.sh b/README.sh index 9f884c8..34a35ef 100755 --- a/README.sh +++ b/README.sh @@ -1,6 +1,6 @@ #!/bin/bash -IMAGE=juplo/sumup-adder:1.0-SNAPSHOT +IMAGE=juplo/sumup-adder-json:1.0-SNAPSHOT if [ "$1" = "cleanup" ] then @@ -9,7 +9,7 @@ then exit fi -docker-compose stop adder-1 adder-2 +docker-compose rm -svf adder-1 adder-2 docker-compose rm -svf mongo docker-compose up -d zookeeper kafka-1 kafka-2 kafka-3 cli mongo express @@ -19,7 +19,7 @@ if [[ ]] then docker-compose rm -svf adder-1 adder-2 - mvn -D skipTests clean install || exit + mvn clean install || exit else echo "Using image existing images:" docker image ls $IMAGE @@ -39,18 +39,22 @@ while ! [[ $(http 0:8092/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Wait docker-compose up -d peter klaus while [[ "$(http :8091/results | jq -r .)" == "{}" ]]; do echo "Waiting for some results to show up on adder-1..."; sleep 1; done -http -v :8091/results +http -v --pretty none -S :8091/results +echo while [[ "$(http :8092/results | jq -r .)" == "{}" ]]; do echo "Waiting for some results to show up on adder-2..."; sleep 1; done -http -v :8092/results +http -v --pretty none -S :8092/results +echo sleep 3 echo "Resultate für adder-1" -http -v :8091/results +http -v --pretty none -S :8091/results +echo echo "Resultate für peter von adder-1" http :8091/results/peter | jq .[].sum | uniq echo "Resultate für klaus von adder-1" http :8091/results/klaus | jq .[].sum | uniq echo "Resultate für adder-2" -http -v :8092/results +http -v --pretty none -S :8092/results +echo echo "Resultate für peter von adder-2" http :8092/results/peter | jq .[].sum | uniq echo "Resultate für klaus von adder-2" @@ -59,7 +63,8 @@ http :8092/results/klaus | jq .[].sum | uniq docker-compose stop adder-1 sleep 1 echo "Resultate für adder-2" -http -v :8092/results +http -v --pretty none -S :8092/results +echo echo "Resultate für peter von adder-2" http :8092/results/peter | jq .[].sum | uniq echo "Resultate für klaus von adder-2" @@ -70,7 +75,8 @@ docker-compose start adder-1 while ! [[ $(http 0:8091/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for adder-1..."; sleep 1; done while [[ "$(http :8091/results | jq -r .)" == "{}" ]]; do echo "Waiting for some results to show up on adder-1..."; sleep 1; done echo "Resultate für adder-1" -http -v :8091/results +http -v --pretty none -S :8091/results +echo echo "Resultate für peter von adder-1" http :8091/results/peter | jq .[].sum | uniq echo "Resultate für klaus von adder-1" @@ -79,6 +85,12 @@ http :8091/results/klaus | jq .[].sum | uniq docker-compose start adder-2 while ! [[ $(http 0:8092/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for adder-2..."; sleep 1; done while [[ "$(http :8092/results | jq -r .)" == "{}" ]]; do echo "Waiting for some results to show up on adder-2..."; sleep 1; done +echo "Resultate für adder-1" +http -v --pretty none -S :8091/results +echo +echo "Resultate für adder-2" +http -v --pretty none -S :8092/results +echo echo "Resultate für peter von adder-1" http :8091/results/peter | jq .[].sum | uniq echo "Resultate für klaus von adder-1"