Add kafka projects

pull/108/head
Baohua Yang 2017-09-15 13:31:23 +08:00
parent a7094526f0
commit f05796a998
2 changed files with 51 additions and 0 deletions

16
kafka/README.md 100644
View File

@ -0,0 +1,16 @@
# Kakfa
This project provides several useful Docker-Compose script to help quickly bootup a Kakfa network, and do simple testing with create topic, send&recv msg.
Currently we support Kakfa 0.11.*.
If you're not familiar with Docker, can have a look at these books (in CN):
* [Docker Practice](https://github.com/yeasy/docker_practice)
## Start
```bash
$ docker-compose up -d
$ docker exec -it cli bash
```

View File

@ -0,0 +1,35 @@
# The minimal kafka service
# github.com/yeasy/docker-compose-files
# * zk: zk node for kafka
# * kafka: kafka service, will default to connect to zookeeper
# * cli: client to test kafka service
version: '2'
services:
zookeeper:
image: yeasy/kafka:latest
container_name: zookeeper
hostname: zookeeper
ports:
- "2181:2181" # zk connection port
command: bash -c 'bash /tmp/start_zk.sh'
kafka: # kafka service
image: yeasy/kafka:latest
container_name: kafka
hostname: kafka
ports:
- "9092:9092"
depends_on:
- zookeeper
command: bash -c 'bash /tmp/start_kafka.sh'
cli: # used for testing kafka cmds, see /tmp/*.sh
image: yeasy/kafka:latest
container_name: cli
hostname: cli
environment:
- ZK_HOST=zookeeper # zk host to connect to
command: bash -c 'while true; do sleep 20170915; done'