# Creates the following container setup:
# collectd -> Kafka -> kafka-influxdb -> InfluxDB
zookeeper:
  image: wurstmeister/zookeeper
  ports:
    - "2181:2181"
kafka:
  image: wurstmeister/kafka
  ports:
    - "9092:9092"
  links:
    - zookeeper:zk
  volumes:
    - /var/run/docker.sock:/var/run/docker.sock
  environment:
    KAFKA_ADVERTISED_HOST_NAME: 192.168.99.101
    KAFKA_CREATE_TOPICS: "metrics:1:1"
    KAFKA_ZOOKEEPER_CONNECT: "zk"
influxdb:
  image: tutum/influxdb:0.9
  environment:
    PRE_CREATE_DB: "metrics"
  volumes:
    - ./contrib/influxdb/config.toml:/config/config.toml
  ports:
   - "2003"
   - "8083"
   - "8086"
logstash:
  build: .
  dockerfile: Dockerfile-Logstash
  # Uncomment the following three lines for interactive mode:
  # entrypoint: /bin/bash
  # stdin_open: true
  # tty: true
  links:
    - zookeeper:zk
    - kafka:kafka
    - influxdb:influxdb

# Creates the following container setup:
# collectd -> Kafka -> kafka-influxdb -> InfluxDB
zookeeper:
  image: wurstmeister/zookeeper
  ports:
    - "2181:2181"
kafka:
  image: wurstmeister/kafka
  ports:
    - "9092:9092"
  links:
    - zookeeper:zk
  volumes:
    - /var/run/docker.sock:/var/run/docker.sock
  environment:
    KAFKA_CREATE_TOPICS: "metrics:1:1"
    KAFKA_ZOOKEEPER_CONNECT: "zk"
influxdb:
  image: tutum/influxdb:0.9
  environment:
    PRE_CREATE_DB: "metrics"
  volumes:
    - ./contrib/influxdb/config.toml:/config/config.toml
  ports:
   - "2003"
   - "8083"
   - "8086"
logstash:
  build: .
  dockerfile: Dockerfile-Logstash
  # Uncomment the following three lines for interactive mode:
  # entrypoint: /bin/bash
  # stdin_open: true
  # tty: true
  links:
    - zookeeper:zk
    - kafka:kafka
    - influxdb:influxdb

Remove Kafka advertised hostname as it can be set automatically now by the Docker image
Remove Kafka advertised hostname as it can be set automatically now by the Docker image
