Skip to content

Commit

Permalink
eventuate-tram#12, eventuate-tram#11. Fixed dependencies, fixed maven…
Browse files Browse the repository at this point in the history
…, fixed circleci.
  • Loading branch information
dartartem committed Jul 8, 2019
1 parent c7381df commit 5c34410
Show file tree
Hide file tree
Showing 31 changed files with 109 additions and 198 deletions.
5 changes: 4 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ jobs:
- ~/.gradle
- ~/.m2
key: eventuate-tram-core-examples-basic-{{ checksum "gradle.properties" }}
- run: TERM=dumb ./build-and-test-all.sh
- run: TERM=dumb ./build-and-test-all-maven.sh
- run: TERM=dumb ./build-and-test-all-mysql-binlog-kafka.sh
- run: TERM=dumb ./build-and-test-all-mssql-polling-kafka.sh
- run: TERM=dumb ./build-and-test-all-postgres-wal-activemq.sh
- run: TERM=dumb ./build-and-test-all-postgres-wal-rabbitmq.sh
- store_test_results:
path: "*/build/test-results"
4 changes: 1 addition & 3 deletions _set-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,5 @@ fi

echo DOCKER_HOST_IP is $DOCKER_HOST_IP

export EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS=$DOCKER_HOST_IP:9092
export EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING=$DOCKER_HOST_IP:2181
export ACTIVEMQ_URL=tcp://${DOCKER_HOST_IP}:61616
export RABBITMQ_URL=${DOCKER_HOST_IP}

8 changes: 4 additions & 4 deletions build-and-test-all-maven.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

set -e

. ./set-env.sh
. ./set-env-mysql-binlog.sh

./mvnw clean compile

./mvnw -am -pl eventuate-tram-examples-in-memory test

docker-compose down -v
docker-compose -f docker-compose-mysql-binlog.yml down -v

docker-compose up -d
docker-compose -f docker-compose-mysql-binlog.yml up -d

./wait-for-mysql.sh

./mvnw -am -pl eventuate-tram-examples-jdbc-kafka test

docker-compose down -v
docker-compose -f docker-compose-mysql-binlog.yml down -v
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

set -e

export DATABASE=postgres
export DATABASE=mssql
export MODE=polling
export BROKER=kafka

. ./set-env-postgres-polling.sh
. ./set-env-mssql-polling.sh

./_build-and-test-all.sh
12 changes: 0 additions & 12 deletions build-and-test-all-mysql-binlog-activemq.sh

This file was deleted.

12 changes: 0 additions & 12 deletions build-and-test-all-mysql-binlog-rabbitmq.sh

This file was deleted.

12 changes: 0 additions & 12 deletions build-and-test-all-postgres-polling-activemq.sh

This file was deleted.

12 changes: 0 additions & 12 deletions build-and-test-all-postgres-polling-rabbitmq.sh

This file was deleted.

11 changes: 0 additions & 11 deletions build-and-test-all-postgres-wal-kafka.sh

This file was deleted.

2 changes: 1 addition & 1 deletion build-and-test-everything.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -o pipefail

SCRIPTS="./build-and-test-all-mysql-binlog-activemq.sh ./build-and-test-all-mysql-binlog-kafka.sh ./build-and-test-all-mysql-binlog-rabbitmq.sh ./build-and-test-all-postgres-polling-activemq.sh ./build-and-test-all-postgres-polling-kafka.sh ./build-and-test-all-postgres-polling-rabbitmq.sh ./build-and-test-all-postgres-wal-activemq.sh ./build-and-test-all-postgres-wal-kafka.sh ./build-and-test-all-postgres-wal-rabbitmq.sh"
SCRIPTS="./build-and-test-all-mysql-binlog-kafka.sh ./build-and-test-all-mssql-polling-kafka.sh ./build-and-test-all-postgres-wal-activemq.sh ./build-and-test-all-postgres-wal-rabbitmq.sh"


date > build-and-test-everything.log
Expand Down
47 changes: 47 additions & 0 deletions docker-compose-mssql-polling.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
version: '2'
services:
zookeeper:
image: eventuateio/eventuateio-local-zookeeper:0.30.2.RELEASE
ports:
- 2181:2181
- 2888:2888
- 3888:3888

kafka:
image: eventuateio/eventuateio-local-kafka:0.30.2.RELEASE
ports:
- 9092:9092
links:
- zookeeper
environment:
- ADVERTISED_HOST_NAME=${DOCKER_HOST_IP}
- KAFKA_HEAP_OPTS=-Xmx320m -Xms320m
- ZOOKEEPER_SERVERS=zookeeper:2181

mssql:
image: eventuateio/eventuate-mssql:0.4.0.RELEASE
ports:
- 1433:1433
environment:
SA_PASSWORD: Eventuate123!
ACCEPT_EULA: Y

cdcservice:
image: eventuateio/eventuate-tram-cdc-mysql-service:0.21.2.RELEASE
links:
- mssql
- kafka
- zookeeper
ports:
- "8099:8080"
environment:
SPRING_DATASOURCE_URL: jdbc:sqlserver://mssql:1433;databaseName=eventuate
SPRING_DATASOURCE_USERNAME: sa
SPRING_DATASOURCE_PASSWORD: Eventuate123!
SPRING_DATASOURCE_DRIVER_CLASS_NAME: com.microsoft.sqlserver.jdbc.SQLServerDriver
EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181
EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS: kafka:9092
EVENTUATELOCAL_CDC_DB_USER_NAME: root
EVENTUATELOCAL_CDC_DB_PASSWORD: rootpassword
EVENTUATELOCAL_CDC_READER_NAME: MsSqlReader
SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE}
18 changes: 0 additions & 18 deletions docker-compose-mysql-binlog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,6 @@ services:
- KAFKA_HEAP_OPTS=-Xmx320m -Xms320m
- ZOOKEEPER_SERVERS=zookeeper:2181

activemq:
image: webcenter/activemq:5.14.3
ports:
- 8161:8161
- 61616:61616
- 61613:61613
- 1883:1883
- 61614:61614

rabbitmq:
build: ./rabbitmq
ports:
- 5672:5672

mysql:
image: eventuateio/eventuate-tram-mysql:0.21.2.RELEASE
ports:
Expand All @@ -48,8 +34,6 @@ services:
depends_on:
- mysql
- kafka
- activemq
- rabbitmq
- zookeeper
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://mysql/eventuate
Expand All @@ -65,5 +49,3 @@ services:
EVENTUATELOCAL_CDC_MYSQL_BINLOG_CLIENT_UNIQUE_ID: 1234567890
EVENTUATELOCAL_CDC_READ_OLD_DEBEZIUM_DB_OFFSET_STORAGE_TOPIC: "false"
SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE}
ACTIVEMQ_URL: tcp://activemq:61616
RABBITMQ_URL: rabbitmq
69 changes: 0 additions & 69 deletions docker-compose-postgres-polling.yml

This file was deleted.

14 changes: 0 additions & 14 deletions docker-compose-postgres-wal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,6 @@ services:
- 2181:2181
- 2888:2888
- 3888:3888

kafka:
image: eventuateio/eventuateio-local-kafka:0.30.2.RELEASE
ports:
- 9092:9092
links:
- zookeeper
environment:
- ADVERTISED_HOST_NAME=${DOCKER_HOST_IP}
- KAFKA_HEAP_OPTS=-Xmx320m -Xms320m
- ZOOKEEPER_SERVERS=zookeeper:2181

activemq:
image: webcenter/activemq:5.14.3
ports:
Expand All @@ -44,7 +32,6 @@ services:
image: eventuateio/eventuate-tram-cdc-mysql-service:0.21.2.RELEASE
links:
- postgres
- kafka
- activemq
- rabbitmq
- zookeeper
Expand All @@ -57,7 +44,6 @@ services:
SPRING_DATASOURCE_TEST_ON_BORROW: "true"
SPRING_DATASOURCE_VALIDATION_QUERY: SELECT 1
SPRING_DATASOURCE_DRIVER_CLASS_NAME: org.postgresql.Driver
EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS: kafka:9092
EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181
EVENTUATELOCAL_CDC_READER_NAME: PostgresWalReader
SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE}
Expand Down
4 changes: 2 additions & 2 deletions eventuate-tram-examples-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<dependencies>
<dependency>
<groupId>io.eventuate.tram.core</groupId>
<artifactId>eventuate-tram-messaging</artifactId>
<artifactId>eventuate-tram-messaging-spring</artifactId>
<version>${eventuateTramVersion} </version>
</dependency>
<dependency>
Expand All @@ -23,7 +23,7 @@
</dependency>
<dependency>
<groupId>io.eventuate.tram.core</groupId>
<artifactId>eventuate-tram-events</artifactId>
<artifactId>eventuate-tram-events-spring</artifactId>
<version>${eventuateTramVersion} </version>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package io.eventuate.tram.examples.basic.commands;

import io.eventuate.tram.commands.consumer.*;
import io.eventuate.tram.commands.consumer.CommandHandlers;
import io.eventuate.tram.commands.consumer.CommandHandlersBuilder;
import io.eventuate.tram.commands.consumer.CommandMessage;
import io.eventuate.tram.commands.consumer.PathVariables;
import io.eventuate.tram.messaging.common.Message;

import static io.eventuate.tram.commands.consumer.CommandHandlerReplyBuilder.withSuccess;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package io.eventuate.tram.examples.basic.events;

import io.eventuate.tram.events.subscriber.DomainEventEnvelope;
import io.eventuate.tram.events.subscriber.DomainEventHandler;
import io.eventuate.tram.events.subscriber.DomainEventHandlers;
import io.eventuate.tram.events.subscriber.DomainEventHandlersBuilder;
import io.eventuate.tram.examples.basic.events.domain.AccountDebited;
Expand Down
2 changes: 1 addition & 1 deletion eventuate-tram-examples-jdbc-kafka/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies {

testCompile "io.eventuate.tram.core:eventuate-tram-jdbc-kafka:$eventuateTramVersion"
testCompile "io.eventuate.tram.core:eventuate-tram-jdbc-kafka-spring:$eventuateTramVersion"

testCompile project(":eventuate-tram-examples-common")
testCompile "org.springframework.boot:spring-boot-starter-test:$springBootVersion"
Expand Down
2 changes: 1 addition & 1 deletion eventuate-tram-examples-jdbc-kafka/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</dependency>
<dependency>
<groupId>io.eventuate.tram.core</groupId>
<artifactId>eventuate-tram-jdbc-kafka</artifactId>
<artifactId>eventuate-tram-jdbc-kafka-spring</artifactId>
<version>${eventuateTramVersion}</version>
<scope>test</scope>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.eventuate.tram.examples.basic.kafka.commands;

import io.eventuate.jdbckafka.TramJdbcKafkaConfiguration;
import io.eventuate.tram.examples.basic.commands.AbstractTramCommandTestConfiguration;
import io.eventuate.tram.jdbckafka.TramJdbcKafkaConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.eventuate.tram.examples.basic.kafka.events;

import io.eventuate.jdbckafka.TramJdbcKafkaConfiguration;
import io.eventuate.tram.examples.basic.events.AbstractTramEventTestConfiguration;
import io.eventuate.tram.jdbckafka.TramJdbcKafkaConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
Expand Down
Loading

0 comments on commit 5c34410

Please sign in to comment.