update kafka, add 2.1.1, 2.2.0, update README

This commit is contained in:
2019-04-15 20:24:13 +08:00
parent fed0d6a0e9
commit 0a000bdcd9
7 changed files with 200 additions and 1 deletions

21
kafka/2.2.0/start_kafka.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
: ${EXTRA_CONF_DIR:=/config/kafka}
## Overide default configuration files
if [ -d "$EXTRA_CONF_DIR" ]; then
cp $EXTRA_CONF_DIR/* /usr/local/kafka/config
fi
if ! [[ -z "${BROKER_ID}" ]]; then
sed -i '/broker.id=/d' /usr/local/kafka/config/server.properties
echo "broker.id=$BROKER_ID" >> /usr/local/kafka/config/server.properties
fi
if ! [[ -z "${ZOOKEEPER_CONNECT}" ]]; then
sed -i '/zookeeper.connect=/d' /usr/local/kafka/config/server.properties
echo "zookeeper.connect=$ZOOKEEPER_CONNECT" >> /usr/local/kafka/config/server.properties
fi
bash /usr/local/kafka/bin/kafka-server-start.sh /usr/local/kafka/config/server.properties