.PHONY: confluent/kafka/* confluent/zookeeper/* confluent/registry/* confluent/start confluent/stop fmt vet errcheck test test/create_kafka_topics dependencies dependencies/* default: fmt vet errcheck test # Confluent platform tasks confluent/start: confluent/rest/start confluent/stop: confluent/rest/stop confluent/registry/stop confluent/kafka/stop confluent/zookeeper/stop # Download & extract tasks confluent/confluent.tgz: mkdir -p confluent && wget http://packages.confluent.io/archive/1.0/confluent-1.0-2.10.4.tar.gz -O confluent/confluent.tgz confluent/EXTRACTED: confluent/confluent.tgz tar xzf confluent/confluent.tgz -C confluent --strip-components 1 && mkdir confluent/logs && touch confluent/EXTRACTED # Zookeeper tasks confluent/zookeeper/start: confluent/EXTRACTED nohup confluent/bin/zookeeper-server-start confluent/etc/kafka/zookeeper.properties 2> confluent/logs/zookeeper.err > confluent/logs/zookeeper.out < /dev/null & while ! nc localhost 2181 confluent/logs/kafka.err > confluent/logs/kafka.out < /dev/null & while ! nc localhost 9092 confluent/logs/schema-registry.err > confluent/logs/schema-registry.out < /dev/null & while ! nc localhost 8081 confluent/logs/kafka-rest.err > confluent/logs/kafka-rest.out < /dev/null & while ! nc localhost 8082