docker-compose up -d peter ute franz beate klaus
docker-compose run --name transferlog --rm kafka kafka-console-consumer --bootstrap-server kafka:9093 --topic transfers &
+
while ! [[ $(http 0:8091/actuator/health 2> /dev/null | jq -r .status ) =~ "UP" ]]; do echo "Waiting for peter..."; sleep 1; done
+while ! [[ $(http 0:8092/actuator/health 2> /dev/null | jq -r .status ) =~ "UP" ]]; do echo "Waiting for ute..."; sleep 1; done
+while ! [[ $(http 0:8093/actuator/health 2> /dev/null | jq -r .status ) =~ "UP" ]]; do echo "Waiting for franz..."; sleep 1; done
+while ! [[ $(http 0:8094/actuator/health 2> /dev/null | jq -r .status ) =~ "UP" ]]; do echo "Waiting for beate..."; sleep 1; done
+while ! [[ $(http 0:8095/actuator/health 2> /dev/null | jq -r .status ) =~ "UP" ]]; do echo "Waiting for klaus..."; sleep 1; done
+echo '{"id":1,"payer":1,"payee":2, "amount":10}' | http -v :8091/transfers
+echo '{"id":1,"payer":1,"payee":2, "amount":10}' | http -v :8091/transfers
+echo '{"id":1,"payer":1,"payee":2, "amount":10}' | http -v :8091/transfers
echo '{"id":1,"payer":1,"payee":2, "amount":10}' | http -v :8091/transfers
http --follow :8091/transfers/1
http -v :8091/transfers id=2 payer=2 payee=1 amount=5
http --follow :8091/transfers/2
http -v :8091/transfers id=12 payer=2 payee=1 amount=5
http -v :8091/transfers id=21 payer=2 payee=1 amount=5
+http -v :8091/transfers id=9 payer=2 payee=1 amount=5
http -v :8091/transfers id=7 payer=2 payee=1 amount=5
http -v :8091/transfers id=9 payer=2 payee=1 amount=5
+http -v :8091/transfers id=9 payer=2 payee=1 amount=5
+http -v :8091/transfers id=9 payer=2 payee=1 amount=5
http -v :8091/transfers id=13 payer=2 payee=1 amount=5
http -v :8091/transfers id=31 payer=2 payee=1 amount=5
+http -v :8091/transfers id=31 payer=2 payee=1 amount=5
http -v --follow :8091/transfers/12
http -v --follow :8091/transfers/21
http -v --follow :8091/transfers/7
http -v --follow :8091/transfers/31
docker-compose restart peter ute franz beate klaus
+
while ! [[ $(http 0:8091/actuator/health 2> /dev/null | jq -r .status ) =~ "UP" ]]; do echo "Waiting for peter..."; sleep 1; done
+while ! [[ $(http 0:8092/actuator/health 2> /dev/null | jq -r .status ) =~ "UP" ]]; do echo "Waiting for ute..."; sleep 1; done
+while ! [[ $(http 0:8093/actuator/health 2> /dev/null | jq -r .status ) =~ "UP" ]]; do echo "Waiting for franz..."; sleep 1; done
+while ! [[ $(http 0:8094/actuator/health 2> /dev/null | jq -r .status ) =~ "UP" ]]; do echo "Waiting for beate..."; sleep 1; done
+while ! [[ $(http 0:8095/actuator/health 2> /dev/null | jq -r .status ) =~ "UP" ]]; do echo "Waiting for klaus..."; sleep 1; done
+
http -v --follow :8091/transfers/1
http -v --follow :8091/transfers/2
http -v --follow :8091/transfers/12
--topic transfers
peter:
- image: juplo/payment-service-demo--transfer:2.0.0
- ports:
- - 8091:8080
+ image: juplo/payment-service-demo--transfer:2.1.0
environment:
- juplo.transfer.bootstrap-servers: kafka:9093
+ server.port: 8091
juplo.transfer.group-instance-id: peter
+ juplo.transfer.local-state-store-path: /var/lib/app/peter.bin
+ juplo.transfer.state-store-interval: 20
juplo.transfer.instance-id-uri-mapping.peter: http://localhost:8091
juplo.transfer.instance-id-uri-mapping.ute: http://localhost:8092
juplo.transfer.instance-id-uri-mapping.franz: http://localhost:8093
juplo.transfer.instance-id-uri-mapping.beate: http://localhost:8094
juplo.transfer.instance-id-uri-mapping.klaus: http://localhost:8095
+ volumes:
+ - data:/var/lib/app
+ network_mode: host
depends_on:
- zookeeper
- kafka
ute:
- image: juplo/payment-service-demo--transfer:2.0.0
- ports:
- - 8092:8080
+ image: juplo/payment-service-demo--transfer:2.1.0
environment:
- juplo.transfer.bootstrap-servers: kafka:9093
+ server.port: 8092
juplo.transfer.group-instance-id: ute
+ juplo.transfer.local-state-store-path: /var/lib/app/ute.bin
+ juplo.transfer.state-store-interval: 20
juplo.transfer.instance-id-uri-mapping.peter: http://localhost:8091
juplo.transfer.instance-id-uri-mapping.ute: http://localhost:8092
juplo.transfer.instance-id-uri-mapping.franz: http://localhost:8093
juplo.transfer.instance-id-uri-mapping.beate: http://localhost:8094
juplo.transfer.instance-id-uri-mapping.klaus: http://localhost:8095
+ volumes:
+ - data:/var/lib/app
+ network_mode: host
depends_on:
- zookeeper
- kafka
franz:
- image: juplo/payment-service-demo--transfer:2.0.0
- ports:
- - 8093:8080
+ image: juplo/payment-service-demo--transfer:2.1.0
environment:
- juplo.transfer.bootstrap-servers: kafka:9093
+ server.port: 8093
juplo.transfer.group-instance-id: franz
+ juplo.transfer.local-state-store-path: /var/lib/app/franz.bin
+ juplo.transfer.state-store-interval: 20
juplo.transfer.instance-id-uri-mapping.peter: http://localhost:8091
juplo.transfer.instance-id-uri-mapping.ute: http://localhost:8092
juplo.transfer.instance-id-uri-mapping.franz: http://localhost:8093
juplo.transfer.instance-id-uri-mapping.beate: http://localhost:8094
juplo.transfer.instance-id-uri-mapping.klaus: http://localhost:8095
+ volumes:
+ - data:/var/lib/app
+ network_mode: host
depends_on:
- zookeeper
- kafka
beate:
- image: juplo/payment-service-demo--transfer:2.0.0
- ports:
- - 8094:8080
+ image: juplo/payment-service-demo--transfer:2.1.0
environment:
- juplo.transfer.bootstrap-servers: kafka:9093
+ server.port: 8094
juplo.transfer.group-instance-id: beate
+ juplo.transfer.local-state-store-path: /var/lib/app/beate.bin
+ juplo.transfer.state-store-interval: 20
juplo.transfer.instance-id-uri-mapping.peter: http://localhost:8091
juplo.transfer.instance-id-uri-mapping.ute: http://localhost:8092
juplo.transfer.instance-id-uri-mapping.franz: http://localhost:8093
juplo.transfer.instance-id-uri-mapping.beate: http://localhost:8094
juplo.transfer.instance-id-uri-mapping.klaus: http://localhost:8095
+ volumes:
+ - data:/var/lib/app
+ network_mode: host
depends_on:
- zookeeper
- kafka
klaus:
- image: juplo/payment-service-demo--transfer:2.0.0
- ports:
- - 8095:8080
+ image: juplo/payment-service-demo--transfer:2.1.0
environment:
- juplo.transfer.bootstrap-servers: kafka:9093
+ server.port: 8095
juplo.transfer.group-instance-id: klaus
+ juplo.transfer.local-state-store-path: /var/lib/app/klaus.bin
+ juplo.transfer.state-store-interval: 20
juplo.transfer.instance-id-uri-mapping.peter: http://localhost:8091
juplo.transfer.instance-id-uri-mapping.ute: http://localhost:8092
juplo.transfer.instance-id-uri-mapping.franz: http://localhost:8093
juplo.transfer.instance-id-uri-mapping.beate: http://localhost:8094
juplo.transfer.instance-id-uri-mapping.klaus: http://localhost:8095
+ volumes:
+ - data:/var/lib/app
+ network_mode: host
depends_on:
- zookeeper
- kafka
+
+volumes:
+ data: