Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Kafka 0.10.1.0 #58

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion kafka/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM java:openjdk-8-jre

ENV DEBIAN_FRONTEND noninteractive
ENV SCALA_VERSION 2.11
ENV KAFKA_VERSION 0.8.2.1
ENV KAFKA_VERSION 0.10.1.0
ENV KAFKA_HOME /opt/kafka_"$SCALA_VERSION"-"$KAFKA_VERSION"

# Install Kafka, Zookeeper and other needed things
Expand Down
15 changes: 10 additions & 5 deletions kafka/scripts/start-kafka.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,17 @@ fi
# Set the external host and port
if [ ! -z "$ADVERTISED_HOST" ]; then
echo "advertised host: $ADVERTISED_HOST"
sed -r -i "s/#(advertised.host.name)=(.*)/\1=$ADVERTISED_HOST/g" $KAFKA_HOME/config/server.properties
fi
if [ ! -z "$ADVERTISED_PORT" ]; then
echo "advertised port: $ADVERTISED_PORT"
sed -r -i "s/#(advertised.port)=(.*)/\1=$ADVERTISED_PORT/g" $KAFKA_HOME/config/server.properties
#sed -r -i "s/#(advertised.host.name)=(.*)/\1=$ADVERTISED_HOST/g" $KAFKA_HOME/config/server.properties
if [ -z "$ADVERTISED_PORT" ]; then
sed -r -i "s/#(advertised.listeners)=(PLAINTEXT:\/\/)([^:]*)(:[0-9]*)/\1=\2${ADVERTISED_HOST}\4/g" $KAFKA_HOME/config/server.properties
else
sed -r -i "s/#(advertised.listeners)=(PLAINTEXT:\/\/)([^:]*)(:[0-9]*)/\1=\2${ADVERTISED_HOST}:${ADVERTISED_PORT}/g" $KAFKA_HOME/config/server.properties
fi
fi
# if [ ! -z "$ADVERTISED_PORT" ]; then
# echo "advertised port: $ADVERTISED_PORT"
# sed -r -i "s/#(advertised.port)=(.*)/\1=$ADVERTISED_PORT/g" $KAFKA_HOME/config/server.properties
# fi

# Set the zookeeper chroot
if [ ! -z "$ZK_CHROOT" ]; then
Expand Down