X-Git-Url: http://juplo.de/gitweb/?a=blobdiff_plain;f=README.sh;h=a2d813d5d759af8c1463e543ebda5d1962288b5b;hb=e54f6036fecc54ea37001dae5f64d88502acfbe1;hp=81213c123abdc2a0b343bb964fcb58f2f535c587;hpb=5805651c16e07a0710b88c2822894941f67c313e;p=demos%2Fkafka%2Ftraining diff --git a/README.sh b/README.sh index 81213c1..a2d813d 100755 --- a/README.sh +++ b/README.sh @@ -1,6 +1,6 @@ #!/bin/bash -IMAGE=juplo/sumup-adder:1.0-SNAPSHOT +IMAGE=juplo/sumup-adder-springified:1.0-SNAPSHOT if [ "$1" = "cleanup" ] then @@ -74,24 +74,25 @@ http :8092/results/peter | jq .[].sum | uniq echo "Resultate für klaus von adder-2" http :8092/results/klaus | jq .[].sum | uniq -docker-compose stop adder-2 -while [[ "$(http :8091/results | jq -r '.[]|contains({peter})' | grep true)" != "true" ]]; do echo "Waiting for some results for peter to show up on adder-1..."; sleep 1; done -while [[ "$(http :8091/results | jq -r '.[]|contains({klaus})' | grep true)" != "true" ]]; do echo "Waiting for some results for klaus to show up on adder-1..."; sleep 1; done +docker-compose stop adder-1 +until [ $(http --check-status :8092/results/peter 2> /dev/null) ]; do echo "Waiting for some results for peter to show up on adder-2..."; sleep 1; done +until [ $(http --check-status :8092/results/klaus 2> /dev/null) ]; do echo "Waiting for some results for klaus to show up on adder-2..."; sleep 1; done -echo "Resultate für adder-1" -http -v --pretty none -S :8091/results +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" -http :8091/results/klaus | jq .[].sum | uniq +echo "Resultate für peter von adder-2" +http :8092/results/peter | jq .[].sum | uniq +echo "Resultate für klaus von adder-2" +http :8092/results/klaus | jq .[].sum | uniq -docker-compose kill -s 9 adder-1 +docker-compose kill -s 9 adder-2 docker-compose start adder-1 +docker-compose kill -s 9 peter klaus 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 '.[]|contains({peter})' | grep true)" != "true" ]]; do echo "Waiting for some results for peter to show up on adder-1..."; sleep 1; done -while [[ "$(http :8091/results | jq -r '.[]|contains({klaus})' | grep true)" != "true" ]]; do echo "Waiting for some results for klaus to show up on adder-1..."; sleep 1; done +until [ $(http --check-status :8091/results/peter 2> /dev/null) ]; do echo "Waiting for some results for peter to show up on adder-1..."; sleep 1; done +until [ $(http --check-status :8091/results/klaus 2> /dev/null) ]; do echo "Waiting for some results for klaus to show up on adder-1..."; sleep 1; done echo "Resultate für adder-1" http -v --pretty none -S :8091/results @@ -102,4 +103,9 @@ http :8091/results/peter | jq .[].sum | uniq echo "Resultate für klaus von adder-1" http :8091/results/klaus | jq .[].sum | uniq -docker-compose kill -s 9 peter klaus +sleep 5 + +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