boot_cluster.sh 629 B

1234567891011121314151617181920
  1. #!/bin/sh
  2. set -ex
  3. vagrant/run_toxiproxy.sh &
  4. while ! nc -q 1 localhost 2181 </dev/null; do echo "Waiting"; sleep 1; done
  5. while ! nc -q 1 localhost 9092 </dev/null; do echo "Waiting"; sleep 1; done
  6. for i in 1 2 3 4 5; do
  7. KAFKA_PORT=`expr $i + 9090`
  8. cd ${KAFKA_INSTALL_ROOT}/kafka-${KAFKA_PORT} && bin/zookeeper-server-start.sh -daemon config/zookeeper.properties
  9. done
  10. while ! nc -q 1 localhost 21805 </dev/null; do echo "Waiting"; sleep 1; done
  11. for i in 1 2 3 4 5; do
  12. KAFKA_PORT=`expr $i + 9090`
  13. cd ${KAFKA_INSTALL_ROOT}/kafka-${KAFKA_PORT} && bin/kafka-server-start.sh -daemon config/server.properties
  14. done