Running Eventuate Local services

Eventuate Local consists of several services: Zookeeper, Kafka, MySQL and the CDC Service. The easiest way to run these services is using Docker Compose. You can use this docker-compose.yml (github version) file.

zookeeper:
  image: eventuateio/eventuateio-local-zookeeper:0.10.0
  ports:
    - 2181:2181
    - 2888:2888
    - 3888:3888


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

mysql:
  image: eventuateio/eventuateio-local-mysql:0.10.0
  ports:
    - 3306:3306
  environment:
    - MYSQL_ROOT_PASSWORD=rootpassword
    - MYSQL_USER=mysqluser
    - MYSQL_PASSWORD=mysqlpw


cdcservice:
  image: eventuateio/eventuateio-local-cdc-service:0.10.0
  ports:
    - "8099:8080"
  links:
    - mysql
    - kafka
    - zookeeper
  environment:
    SPRING_DATASOURCE_URL: jdbc:mysql://mysql/eventuate
    SPRING_DATASOURCE_USERNAME: mysqluser
    SPRING_DATASOURCE_PASSWORD: mysqlpw
    SPRING_DATASOURCE_DRIVER_CLASS_NAME: com.mysql.jdbc.Driver
    EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS: kafka:9092
    EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING: zookeeper:2181
    EVENTUATELOCAL_CDC_DB_USER_NAME: root
    EVENTUATELOCAL_CDC_DB_PASSWORD: rootpassword

You might also find this script (github version) useful to setting environment variables:

if [ -z "$DOCKER_HOST_IP" ] ; then
    if [ -z "$DOCKER_HOST" ] ; then
      export DOCKER_HOST_IP=`hostname`
    else
      echo using ${DOCKER_HOST?}
      XX=${DOCKER_HOST%\:*}
      export DOCKER_HOST_IP=${XX#tcp\:\/\/}
    fi
fi

echo DOCKER_HOST_IP is $DOCKER_HOST_IP

export SPRING_DATASOURCE_URL=jdbc:mysql://${DOCKER_HOST_IP}/eventuate
export SPRING_DATASOURCE_USERNAME=mysqluser
export SPRING_DATASOURCE_PASSWORD=mysqlpw
export SPRING_DATASOURCE_DRIVER_CLASS_NAME=com.mysql.jdbc.Driver
export EVENTUATELOCAL_KAFKA_BOOTSTRAP_SERVERS=$DOCKER_HOST_IP:9092
export EVENTUATELOCAL_CDC_DB_USER_NAME=root
export EVENTUATELOCAL_CDC_DB_PASSWORD=rootpassword
export EVENTUATELOCAL_ZOOKEEPER_CONNECTION_STRING=$DOCKER_HOST_IP:2181

echo SPRING_DATASOURCE_URL=$SPRING_DATASOURCE_URL



Stay in touch
Copyright © 2016 Eventuate, Inc • All rights reserved.