exit
fi
+docker-compose stop adder
+docker-compose rm -svf mongo
docker-compose up -d zookeeper kafka-1 kafka-2 kafka-3 cli mongo express
if [[
]]
then
docker-compose rm -svf adder
- mvn clean install || exit
+ mvn -D skipTests clean install || exit
else
echo "Using image existing images:"
docker image ls $IMAGE
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
-docker-compose up -d peter ute franz beate klaus uschi
+docker-compose up -d peter
+while [[ "$(http :8082/results | jq -r .)" == "{}" ]]; do echo "Waiting for some results to show up..."; done
http -v :8082/results
sleep 3
http -v :8082/results
-
+http :8082/results/peter | jq .[].sum | uniq
docker-compose kill -s 9 adder
docker-compose up -d adder
-sleep 3
-docker-compose kill -s 9 peter ute franz beate klaus uschi
-http -v :8082/results
+docker-compose kill -s 9 peter
+while ! [[ $(http 0:8082/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for adder..."; sleep 1; done
+while [[ "$(http :8082/results | jq -r .)" == "{}" ]]; do echo "Waiting for some results to show up..."; sleep 1; done
+http :8082/results/peter | jq .[].sum | uniq
server.port: 8080
sumup.adder.bootstrap-server: kafka:9092
sumup.adder.client-id: adder
+ sumup.adder.commit-interval: 3s
spring.data.mongodb.uri: mongodb://juplo:training@mongo:27017
spring.data.mongodb.database: juplo
+ logging.level.org.apache.kafka.clients.consumer: DEBUG
peter:
image: juplo/toolbox
bash -c "
while [[ true ]];
do
- echo 666 | http -v gateway:8080/peter;
- sleep 1;
+ echo 6666 | http -v gateway:8080/peter;
done
"
ute: