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

Commit

Permalink
upgrade to kafka 0.10.1.0 (#60)
Browse files Browse the repository at this point in the history
* KAFKA_VERSION 0.10.1.0

* adjustment for kafka 10 config change
  • Loading branch information
eugenemi authored and dflemstr committed Dec 8, 2016
1 parent e28dcf6 commit fc8cdbd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
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
12 changes: 10 additions & 2 deletions kafka/scripts/start-kafka.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,19 @@ 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
if grep -q "^advertised.host.name" $KAFKA_HOME/config/server.properties; then
sed -r -i "s/#(advertised.host.name)=(.*)/\1=$ADVERTISED_HOST/g" $KAFKA_HOME/config/server.properties
else
echo "advertised.host.name=$ADVERTISED_HOST" >> $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
if grep -q "^advertised.port" $KAFKA_HOME/config/server.properties; then
sed -r -i "s/#(advertised.port)=(.*)/\1=$ADVERTISED_PORT/g" $KAFKA_HOME/config/server.properties
else
echo "advertised.port=$ADVERTISED_PORT" >> $KAFKA_HOME/config/server.properties
fi
fi

# Set the zookeeper chroot
Expand Down

0 comments on commit fc8cdbd

Please sign in to comment.