Support for Eventuate Local
This commit is contained in:
@@ -6,6 +6,12 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
DOCKER_COMPOSE="docker-compose -p event-sourcing-examples"
|
||||
|
||||
if [ "$1" = "-f" ] ; then
|
||||
shift;
|
||||
DOCKER_COMPOSE="$DOCKER_COMPOSE -f ${1?}"
|
||||
shift
|
||||
fi
|
||||
|
||||
if [ "$1" = "--use-existing" ] ; then
|
||||
shift;
|
||||
else
|
||||
@@ -13,6 +19,7 @@ else
|
||||
${DOCKER_COMPOSE?} rm -v --force
|
||||
fi
|
||||
|
||||
|
||||
${DOCKER_COMPOSE?} up -d mongodb
|
||||
|
||||
if [ -z "$DOCKER_HOST_IP" ] ; then
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
apply plugin: VerifyMongoDBConfigurationPlugin
|
||||
apply plugin: VerifyEventStoreEnvironmentPlugin
|
||||
apply plugin: EventuateDependencyPlugin
|
||||
|
||||
apply plugin: 'spring-boot'
|
||||
|
||||
@@ -10,9 +11,6 @@ dependencies {
|
||||
compile "org.springframework.boot:spring-boot-starter-web"
|
||||
compile "org.springframework.boot:spring-boot-starter-actuator"
|
||||
|
||||
|
||||
compile "io.eventuate.client.java:eventuate-client-java-http-stomp-spring:$eventuateClientVersion"
|
||||
|
||||
testCompile "org.springframework.boot:spring-boot-starter-test"
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
apply plugin: VerifyMongoDBConfigurationPlugin
|
||||
apply plugin: VerifyEventStoreEnvironmentPlugin
|
||||
apply plugin: EventuateDependencyPlugin
|
||||
|
||||
apply plugin: 'spring-boot'
|
||||
|
||||
@@ -10,8 +11,6 @@ dependencies {
|
||||
compile "org.springframework.boot:spring-boot-starter-web"
|
||||
compile "org.springframework.boot:spring-boot-starter-actuator"
|
||||
|
||||
compile "io.eventuate.client.java:eventuate-client-java-http-stomp-spring:$eventuateClientVersion"
|
||||
|
||||
testCompile project(":testutil")
|
||||
testCompile "org.springframework.boot:spring-boot-starter-test"
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'spring-boot'
|
||||
apply plugin: EventuateDependencyPlugin
|
||||
|
||||
dependencies {
|
||||
compile project(":common-auth-web")
|
||||
@@ -7,9 +8,6 @@ dependencies {
|
||||
compile "org.apache.httpcomponents:httpclient:4.5"
|
||||
compile "org.apache.httpcomponents:fluent-hc:4.5.1"
|
||||
|
||||
compile "io.eventuate.client.java:eventuate-client-java-spring:$eventuateClientVersion"
|
||||
compile "io.eventuate.client.java:eventuate-client-java-http-stomp-spring:$eventuateClientVersion"
|
||||
|
||||
compile "org.springframework.boot:spring-boot-starter-web:$springBootVersion"
|
||||
compile "org.springframework.boot:spring-boot-starter-actuator:$springBootVersion"
|
||||
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
|
||||
class EventuateDependencyPlugin implements Plugin<Project> {
|
||||
|
||||
@Override
|
||||
void apply(Project project) {
|
||||
project.dependencies {
|
||||
if (project.hasProperty("eventuateLocal"))
|
||||
compile "io.eventuate.local.java:eventuate-local-java-jdbc:${project.eventuateLocalVersion}"
|
||||
else
|
||||
compile "io.eventuate.client.java:eventuate-client-java-http-stomp-spring:${project.eventuateClientVersion}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ apply plugin: VerifyMongoDBConfigurationPlugin
|
||||
apply plugin: VerifyEventStoreEnvironmentPlugin
|
||||
|
||||
apply plugin: 'spring-boot'
|
||||
apply plugin: EventuateDependencyPlugin
|
||||
|
||||
dependencies {
|
||||
compile project(":customers-command-side-web")
|
||||
@@ -10,8 +11,6 @@ dependencies {
|
||||
compile "org.springframework.boot:spring-boot-starter-web"
|
||||
compile "org.springframework.boot:spring-boot-starter-actuator"
|
||||
|
||||
compile "io.eventuate.client.java:eventuate-client-java-http-stomp-spring:$eventuateClientVersion"
|
||||
|
||||
testCompile project(":testutil-customers")
|
||||
testCompile "org.springframework.boot:spring-boot-starter-test"
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
apply plugin: VerifyMongoDBConfigurationPlugin
|
||||
apply plugin: VerifyEventStoreEnvironmentPlugin
|
||||
apply plugin: EventuateDependencyPlugin
|
||||
|
||||
apply plugin: 'spring-boot'
|
||||
|
||||
@@ -10,8 +11,6 @@ dependencies {
|
||||
compile "org.springframework.boot:spring-boot-starter-web"
|
||||
compile "org.springframework.boot:spring-boot-starter-actuator"
|
||||
|
||||
compile "io.eventuate.client.java:eventuate-client-java-http-stomp-spring:$eventuateClientVersion"
|
||||
|
||||
testCompile project(":testutil-customers")
|
||||
testCompile project(":customers-command-side-service")
|
||||
testCompile "org.springframework.boot:spring-boot-starter-test"
|
||||
|
||||
111
java-spring/docker-compose-eventuate-local.yml
Normal file
111
java-spring/docker-compose-eventuate-local.yml
Normal file
@@ -0,0 +1,111 @@
|
||||
apigateway:
|
||||
image: java:openjdk-8u91-jdk
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ./api-gateway-service/build/libs:/app
|
||||
command: java -jar /app/api-gateway-service.jar --accounts.commandside.service.host=accountscommandside --transactions.commandside.service.host=transactionscommandside --accounts.queryside.service.host=accountsqueryside --customers.commandside.service.host=customerscommandside --customers.queryside.service.host=customersqueryside
|
||||
ports:
|
||||
- "8080:8080"
|
||||
links:
|
||||
- accountscommandside
|
||||
- transactionscommandside
|
||||
- accountsqueryside
|
||||
- customerscommandside
|
||||
- customersqueryside
|
||||
- mongodb
|
||||
environment:
|
||||
SPRING_DATASOURCE_URL:
|
||||
SPRING_DATASOURCE_USERNAME:
|
||||
SPRING_DATASOURCE_PASSWORD:
|
||||
SPRING_DATASOURCE_DRIVER_CLASS_NAME:
|
||||
EVENTUATELOCAL_AGGREGATESTORE_BOOTSTRAP_SERVERS:
|
||||
SPRING_DATA_MONGODB_URI: mongodb://mongodb/mydb
|
||||
|
||||
accountscommandside:
|
||||
image: java:openjdk-8u91-jdk
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ./accounts-command-side-service/build/libs:/app
|
||||
command: java -jar /app/accounts-command-side-service.jar
|
||||
ports:
|
||||
- "8085:8080"
|
||||
environment:
|
||||
SPRING_DATASOURCE_URL:
|
||||
SPRING_DATASOURCE_USERNAME:
|
||||
SPRING_DATASOURCE_PASSWORD:
|
||||
SPRING_DATASOURCE_DRIVER_CLASS_NAME:
|
||||
EVENTUATELOCAL_AGGREGATESTORE_BOOTSTRAP_SERVERS:
|
||||
|
||||
transactionscommandside:
|
||||
image: java:openjdk-8u91-jdk
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ./transactions-command-side-service/build/libs:/app
|
||||
command: java -jar /app/transactions-command-side-service.jar
|
||||
ports:
|
||||
- "8082:8080"
|
||||
environment:
|
||||
SPRING_DATASOURCE_URL:
|
||||
SPRING_DATASOURCE_USERNAME:
|
||||
SPRING_DATASOURCE_PASSWORD:
|
||||
SPRING_DATASOURCE_DRIVER_CLASS_NAME:
|
||||
EVENTUATELOCAL_AGGREGATESTORE_BOOTSTRAP_SERVERS:
|
||||
|
||||
|
||||
accountsqueryside:
|
||||
image: java:openjdk-8u91-jdk
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ./accounts-query-side-service/build/libs:/app
|
||||
command: java -jar /app/accounts-query-side-service.jar
|
||||
ports:
|
||||
- "8081:8080"
|
||||
links:
|
||||
- mongodb
|
||||
environment:
|
||||
SPRING_DATASOURCE_URL:
|
||||
SPRING_DATASOURCE_USERNAME:
|
||||
SPRING_DATASOURCE_PASSWORD:
|
||||
SPRING_DATASOURCE_DRIVER_CLASS_NAME:
|
||||
EVENTUATELOCAL_AGGREGATESTORE_BOOTSTRAP_SERVERS:
|
||||
SPRING_DATA_MONGODB_URI: mongodb://mongodb/mydb
|
||||
|
||||
customerscommandside:
|
||||
image: java:openjdk-8u91-jdk
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ./customers-command-side-service/build/libs:/app
|
||||
command: java -jar /app/customers-command-side-service.jar
|
||||
ports:
|
||||
- "8083:8080"
|
||||
environment:
|
||||
SPRING_DATASOURCE_URL:
|
||||
SPRING_DATASOURCE_USERNAME:
|
||||
SPRING_DATASOURCE_PASSWORD:
|
||||
SPRING_DATASOURCE_DRIVER_CLASS_NAME:
|
||||
EVENTUATELOCAL_AGGREGATESTORE_BOOTSTRAP_SERVERS:
|
||||
|
||||
customersqueryside:
|
||||
image: java:openjdk-8u91-jdk
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ./customers-query-side-service/build/libs:/app
|
||||
command: java -jar /app/customers-query-side-service.jar
|
||||
ports:
|
||||
- "8084:8080"
|
||||
links:
|
||||
- mongodb
|
||||
environment:
|
||||
SPRING_DATASOURCE_URL:
|
||||
SPRING_DATASOURCE_USERNAME:
|
||||
SPRING_DATASOURCE_PASSWORD:
|
||||
SPRING_DATASOURCE_DRIVER_CLASS_NAME:
|
||||
EVENTUATELOCAL_AGGREGATESTORE_BOOTSTRAP_SERVERS:
|
||||
SPRING_DATA_MONGODB_URI: mongodb://mongodb/mydb
|
||||
|
||||
mongodb:
|
||||
image: mongo:3.0.4
|
||||
hostname: mongodb
|
||||
command: mongod --smallfiles
|
||||
ports:
|
||||
- "27017:27017"
|
||||
@@ -6,4 +6,5 @@ eventuateMavenRepoUrl=http://mavenrepo.eventuate.io/release
|
||||
springBootVersion=1.3.5.RELEASE
|
||||
|
||||
eventuateClientVersion=0.2.0.RELEASE
|
||||
eventuateLocalVersion=0.1.0.RELEASE
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
apply plugin: 'spring-boot'
|
||||
apply plugin: EventuateDependencyPlugin
|
||||
|
||||
apply plugin: VerifyEventStoreEnvironmentPlugin
|
||||
|
||||
@@ -9,8 +10,6 @@ dependencies {
|
||||
compile "org.springframework.boot:spring-boot-starter-web"
|
||||
compile "org.springframework.boot:spring-boot-starter-actuator"
|
||||
|
||||
compile "io.eventuate.client.java:eventuate-client-java-http-stomp-spring:$eventuateClientVersion"
|
||||
|
||||
testCompile "org.springframework.boot:spring-boot-starter-test"
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user