From: Kai Moritz Date: Sun, 13 Jun 2021 08:47:21 +0000 (+0200) Subject: WIP X-Git-Tag: wip-initialer-commit~1 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=abea9b5c5ff90b2db1ab7bd577d644c05a4dd37f;p=demos%2Fkafka%2Fdemos-kafka-payment-system-setup WIP --- diff --git a/README.sh b/README.sh deleted file mode 100755 index 1d5eb98..0000000 --- a/README.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash - -if [ "$1" = "cleanup" ] -then - docker-compose down - mvn clean - rm -rvf */src/main/java/de/trion/microservices/avro - exit -fi - -mvn package || exit 1 -if [ ! -e take-order/target/BUILD ] || [ "$(find take-order/target/classes/ -anewer take-order/target/BUILD | grep take-order/target/classes/de )" != "" ] -then - docker build -t trion/take-order-service:01 take-order - touch take-order/target/BUILD -fi -if [ "$1" = "build" ]; then exit; fi - -trap 'kill $(jobs -p)' EXIT - -docker container start toolbox -docker-compose up -d zookeeper kafka schema-registry - -while ! [[ $(zookeeper-shell zookeeper:2181 ls /brokers/ids 2> /dev/null) =~ 1001 ]]; do echo "Waiting for kafka..."; sleep 1; done - -kafka-topics --zookeeper zookeeper:2181 --if-not-exists --create --replication-factor 1 --partitions 5 --topic orders - -docker-compose up -d take-order - -kafka-avro-console-consumer --bootstrap-server kafka:9092 --topic orders & -while ! [[ $(http 0:8091/actuator/health 2> /dev/null) =~ "UP" ]]; do echo "Waiting for take-order..."; sleep 1; done - -http -v post 0:8091/orders Accept:*/* id=1 customerId=2 productId=234 quantity=5 -http -v post 0:8091/orders Accept:*/* id=1 customerId=2 productId=234 quantity= -http -v post 0:8091/orders Accept:*/* id=1 customerId=2 productId=234 quantity=-5 -http -v post 0:8091/orders Accept:*/* id=1 customerId=2 productId=-234 quantiyt=5 -http -v post 0:8091/orders Accept:*/* customerId=2 productId=234 quantity=5 diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 6ac7dd9..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,29 +0,0 @@ -version: '3.2' -services: - zookeeper: - image: confluentinc/cp-zookeeper:6.2.0 - ports: - - "2181:2181" - environment: - ZOOKEEPER_CLIENT_PORT: 2181 - - kafka: - image: confluentinc/cp-kafka:6.2.0 - ports: - - 9092:9092 - environment: - KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 - KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT - KAFKA_ADVERTISED_LISTENERS: INSIDE://kafka:9093,OUTSIDE://localhost:9092 - KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE - KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 - depends_on: - - zookeeper - - transfer: - image: juplo/transfer-service:mvp - ports: - - "8091:8080" - depends_on: - - zookeeper - - kafka diff --git a/pom.xml b/pom.xml deleted file mode 100644 index 43a1e8e..0000000 --- a/pom.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - 4.0.0 - - de.trion.kafka.payment - payment-bom - Payment System Example - 1.0.0 - pom - - - transfer - - -