OpenStack library for messaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

setup-test-env-kafka.sh 591B

1234567891011121314151617181920
  1. #!/bin/bash
  2. set -e
  3. . tools/functions.sh
  4. SCALA_VERSION=${SCALA_VERSION:-"2.12"}
  5. KAFKA_VERSION=${KAFKA_VERSION:-"2.0.0"}
  6. if [[ -z "$(which kafka-server-start)" ]] && [[ -z $(which kafka-server-start.sh) ]]; then
  7. DATADIR=$(mktemp -d /tmp/OSLOMSG-KAFKA.XXXXX)
  8. trap "clean_exit $DATADIR" EXIT
  9. tarball=kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz
  10. wget http://www.apache.org/dist/kafka/${KAFKA_VERSION}/$tarball -O $DATADIR/$tarball
  11. tar -xzf $DATADIR/$tarball -C $DATADIR
  12. export PATH=$DATADIR/kafka_${SCALA_VERSION}-${KAFKA_VERSION}/bin:$PATH
  13. fi
  14. pifpaf run kafka -- $*