Add kafka projects
parent
a7094526f0
commit
f05796a998
|
@ -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
|
||||
```
|
|
@ -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'
|
Loading…
Reference in New Issue