Skip to content

Commit

Permalink
add ability to start zookeeper and kafka using docker-compose
Browse files Browse the repository at this point in the history
- easing testability (especially for admin subproject, which requires both a running zookeeper and a running kafka instance). Embedded subproject just relies on a running zookeeper.
- necessary to run tests on travis
  • Loading branch information
Dr. Christian Betz committed Sep 13, 2017
1 parent 1ed2187 commit 87b1966
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ services:
before_install:
- docker pull wurstmeister/zookeeper
- docker pull wurstmeister/kafka
- docker run -d -p 127.0.0.1:2181:2181 wurstmeister/zookeeper
- docker run -d -p 127.0.0.1:9092:9092 wurstmeister/kafka
- docker-compose up -d
- docker ps -a

jdk:
Expand Down
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: "2"
services:
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181:2181"
kafka:
image: wurstmeister/kafka
ports:
- "9092:9092"
environment:
- "KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181"
- "KAFKA_ADVERTISED_PORT=9092"
- "KAFKA_ADVERTISED_HOST_NAME=127.0.0.1"

0 comments on commit 87b1966

Please sign in to comment.