From 697c70a88a663da11b8cfdfb8ea4e7c5c4aac72d Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Mon, 5 Sep 2022 18:37:56 +0200 Subject: [PATCH] WIP --- README.sh | 14 ++++++++------ docker-compose.yml | 16 ++++++++-------- pom.xml | 4 ++-- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/README.sh b/README.sh index 25b8f62..3da5bbe 100755 --- a/README.sh +++ b/README.sh @@ -1,6 +1,6 @@ #!/bin/bash -IMAGE=juplo/sumup-gateway:1.0-SNAPSHOT +IMAGE=juplo/sumup-gateway--springified:1.0-SNAPSHOT if [ "$1" = "cleanup" ] then @@ -16,7 +16,7 @@ if [[ "$1" = "build" ]] then - docker-compose rm -svf gateway + docker-compose rm -svf gateway gateway-0 gateway-1 mvn clean install || exit else echo "Using image existing images:" @@ -26,15 +26,17 @@ fi echo "Waiting for the Kafka-Cluster to become ready..." 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 -d gateway +docker-compose up -d gateway gateway-0 gateway-1 while ! [[ $(http 0:8080/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for gateway..."; sleep 1; done docker-compose up -d consumer -echo foo | http -v :8080/bar -echo 66 | http -v :8080/foo +echo foo | http -v :8082/peter +echo bar | http -v :8082/klaus + +echo FOO | http -v :8080/peter +echo BAR | http -v :8081/klaus -docker-compose logs gateway docker-compose stop consumer docker-compose logs consumer diff --git a/docker-compose.yml b/docker-compose.yml index 5400911..f4b271f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -74,33 +74,33 @@ services: command: sleep infinity gateway-partition-0: - image: juplo/sumup-gateway-springified:1.0-SNAPSHOT + image: juplo/sumup-gateway--springified:1.0-SNAPSHOT ports: - 8080:8080 environment: server.port: 8080 spring-kafka.bootstrap-servers: kafka:9092 - spring.kafka.client-id: gateway-partition-0 + spring.kafka.client-id: gateway-0 sumup.gateway.partition: 0 - gateway-partition-0: - image: juplo/sumup-gateway-springified:1.0-SNAPSHOT + gateway-0: + image: juplo/sumup-gateway--springified:1.0-SNAPSHOT ports: - 8081:8080 environment: server.port: 8080 spring-kafka.bootstrap-servers: kafka:9092 - spring.kafka.client-id: gateway-partition-1 + spring.kafka.client-id: gateway-1 sumup.gateway.partition: 1 - gateway-hashed: - image: juplo/sumup-gateway-springified:1.0-SNAPSHOT + gateway: + image: juplo/sumup-gateway--springified:1.0-SNAPSHOT ports: - 8082:8080 environment: server.port: 8080 spring-kafka.bootstrap-servers: kafka:9092 - spring.kafka.client-id: gateway-hashed + spring.kafka.client-id: gateway consumer: image: juplo/toolbox diff --git a/pom.xml b/pom.xml index 2fa762f..b216f97 100644 --- a/pom.xml +++ b/pom.xml @@ -12,9 +12,9 @@ de.juplo.kafka - sumup-gateway + sumup-gateway--springified REST Gateway for the SumUp-Services - A simple REST-Gateway to talk to the Sumup-Services + A simple REST-Gateway to talk to the Sumup-Services. This is the springified version! 1.0-SNAPSHOT -- 2.20.1