projects
/
demos
/
kafka
/
training
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implementierung vereinfacht & an Spring-Beispiele angepasst
[demos/kafka/training]
/
README.sh
diff --git
a/README.sh
b/README.sh
index
8b568c9
..
b140be9
100755
(executable)
--- a/
README.sh
+++ b/
README.sh
@@
-1,6
+1,6
@@
#!/bin/bash
#!/bin/bash
-IMAGE=juplo/
rest-producer
:1.0-SNAPSHOT
+IMAGE=juplo/
sumup-gateway--springified
:1.0-SNAPSHOT
if [ "$1" = "cleanup" ]
then
if [ "$1" = "cleanup" ]
then
@@
-9,91
+9,37
@@
then
exit
fi
exit
fi
-docker-compose up -d zookeeper kafka cli
+docker-compose up -d zookeeper kafka-1 kafka-2 kafka-3 cli
+docker-compose rm -svf gateway gateway-0 gateway-1
if [[
$(docker image ls -q $IMAGE) == "" ||
"$1" = "build"
]]
then
if [[
$(docker image ls -q $IMAGE) == "" ||
"$1" = "build"
]]
then
- mvn install || exit
+ mvn
clean
install || exit
else
echo "Using image existing images:"
docker image ls $IMAGE
fi
echo "Waiting for the Kafka-Cluster to become ready..."
else
echo "Using image existing images:"
docker image ls $IMAGE
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 exec cli cub kafka-ready -b kafka:9092
3
60 > /dev/null 2>&1 || exit 1
docker-compose up setup
docker-compose up setup
+docker-compose up -d gateway gateway-0 gateway-1 consumer
-docker-compose up -d
+while ! [[ $(http 0:8082/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for gateway..."; sleep 1; done
-sleep 15
-http :8081/status
-http :8082/status
-http :8083/status
-http :8084/status
-http :8085/status
-http :8000/seen
+echo 666 | http -v :8082/peter
+echo 666 | http -v :8082/klaus
+echo foo | http -v :8082/foo
-http post :8081/stop
-http :8081/status
-http :8082/status
-http :8083/status
-http :8084/status
-http :8085/status
-http :8000/seen
-http post :8081/start
+while ! [[ $(http 0:8080/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for gateway-0..."; sleep 1; done
+while ! [[ $(http 0:8081/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for gateway-1..."; sleep 1; done
-sleep 1
-http :8081/status
-http :8082/status
-http :8083/status
-http :8084/status
-http :8085/status
-http :8000/seen
-sleep 1
-http :8081/status
-http :8082/status
-http :8083/status
-http :8084/status
-http :8085/status
-http :8000/seen
-sleep 1
-http :8081/status
-http :8082/status
-http :8083/status
-http :8084/status
-http :8085/status
-http :8000/seen
-sleep 1
-http :8081/status
-http :8082/status
-http :8083/status
-http :8084/status
-http :8085/status
-http :8000/seen
-sleep 1
-http :8081/status
-http :8082/status
-http :8083/status
-http :8084/status
-http :8085/status
-http :8000/seen
+echo 66 | http -v :8080/peter
+echo 66 | http -v :8081/klaus
-http post :8081/stop
-http :8081/status
-http post :8082/stop
-http :8082/status
-http post :8083/stop
-http :8083/status
-http post :8084/stop
-http :8084/status
-http post :8085/stop
-http :8085/status
-
-http :8000/seen
-http post :8000/stop
-
-docker-compose logs producer
+docker-compose stop consumer
+docker-compose logs consumer