name: kafka
version: '0.10.1'
summary: A distributed streaming platform.
description: |
  Kafka™ is used for building real-time data pipelines and streaming apps. It
  is horizontally scalable, fault-tolerant, wicked fast, and runs in 
  production in thousands of companies.
grade: stable
confinement: strict

apps:
  zookeeper:
    command: snap_run ${SNAP}/bin/zookeeper-server-start.sh ${SNAP_DATA}/config/zookeeper.properties
    daemon: simple
    plugs: [network-bind]

  server:
    command: snap_run ${SNAP}/bin/kafka-server-start.sh ${SNAP_DATA}/config/server.properties
    daemon: simple
    plugs: [network-bind]
    
  topics:
    command: snap_run ${SNAP}/bin/kafka-topics.sh
    plugs: [network, network-bind]
    
  console-producer:
    command: snap_run ${SNAP}/bin/kafka-console-producer.sh
    plugs: [network]
    
  console-consumer:
    command: snap_run ${SNAP}/bin/kafka-console-consumer.sh
    plugs: [network]


parts:
  tarball:
    plugin: dump
    source: http://apache.mirror.gtcomm.net/kafka/0.10.1.0/kafka_2.11-0.10.1.0.tgz
    organize:
      ./kafka_2.11-0.10.1.0: ./

  java:
    plugin: nil
    stage-packages:
      - default-jre-headless

  launcher:
    plugin: dump
    source: ./


