Setup auf KRAFT umgestellt
[demos/kafka/training] / README.sh
index 2845ab1..f5bd509 100755 (executable)
--- a/README.sh
+++ b/README.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-IMAGE=juplo/sumup-adder:1.0-SNAPSHOT
+IMAGE=juplo/supersimple-consumer:1.0-SNAPSHOT
 
 if [ "$1" = "cleanup" ]
 then
@@ -9,14 +9,15 @@ then
   exit
 fi
 
-docker-compose up -d zookeeper kafka-1 kafka-2 kafka-3 cli mongo express
+docker-compose rm -svf consumer
+docker-compose up -d kafka-1 kafka-2 kafka-3 cli
 
 if [[
   $(docker image ls -q $IMAGE) == "" ||
   "$1" = "build"
 ]]
 then
-  docker-compose rm -svf adder
+  docker-compose rm -svf consumer
   mvn clean install || exit
 else
   echo "Using image existing images:"
@@ -26,19 +27,14 @@ fi
 echo "Waiting for the Kafka-Cluster to become ready..."
 docker-compose exec cli cub kafka-ready -b kafka:9092 1 60 > /dev/null 2>&1 || exit 1
 docker-compose up setup
-docker-compose up -d gateway requests adder
+docker-compose up -d gateway requests-1 requests-2 consumer
 
 while ! [[ $(http 0:8080/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for gateway..."; sleep 1; done
-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
+while ! [[ $(http 0:8081/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for requests-1..."; sleep 1; done
+while ! [[ $(http 0:8082/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for requests-2..."; sleep 1; done
 
-echo 66  | http -v :8080/foo
-echo 666 | http -v :8080/bar
+echo 6 | http -v :8080/peter
 
-sleep 5
+sleep 10
 
-http -v :8082/state
-http -v :8082/state/foo
-http -v :8082/state/bar
-
-docker-compose logs adder
+docker-compose logs consumer