You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by gw...@apache.org on 2015/11/10 01:37:01 UTC
kafka git commit: KAFKA-2773: Fixed broken vagrant provision scripts
for static zk/broker cluster
Repository: kafka
Updated Branches:
refs/heads/trunk 83eaf3284 -> c6b93fa50
KAFKA-2773: Fixed broken vagrant provision scripts for static zk/broker cluster
Author: Geoff Anderson <ge...@confluent.io>
Reviewers: Ewen Cheslack-Postava
Closes #454 from granders/KAFKA-2773-vagrant-fix
Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/c6b93fa5
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/c6b93fa5
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/c6b93fa5
Branch: refs/heads/trunk
Commit: c6b93fa50de97c2fe79d5db98823a811c6743f69
Parents: 83eaf32
Author: Geoff Anderson <ge...@confluent.io>
Authored: Mon Nov 9 16:36:42 2015 -0800
Committer: Gwen Shapira <cs...@gmail.com>
Committed: Mon Nov 9 16:36:42 2015 -0800
----------------------------------------------------------------------
vagrant/broker.sh | 7 ++++---
vagrant/zk.sh | 13 +++++++------
2 files changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kafka/blob/c6b93fa5/vagrant/broker.sh
----------------------------------------------------------------------
diff --git a/vagrant/broker.sh b/vagrant/broker.sh
index bc040c9..954157a 100644
--- a/vagrant/broker.sh
+++ b/vagrant/broker.sh
@@ -24,13 +24,14 @@ PUBLIC_ADDRESS=$2
PUBLIC_ZOOKEEPER_ADDRESSES=$3
JMX_PORT=$4
-cd /opt/kafka
+kafka_dir=/opt/kafka-trunk
+cd $kafka_dir
sed \
-e 's/broker.id=0/'broker.id=$BROKER_ID'/' \
-e 's/#advertised.host.name=<hostname routable by clients>/'advertised.host.name=$PUBLIC_ADDRESS'/' \
-e 's/zookeeper.connect=localhost:2181/'zookeeper.connect=$PUBLIC_ZOOKEEPER_ADDRESSES'/' \
- /opt/kafka/config/server.properties > /opt/kafka/config/server-$BROKER_ID.properties
+ $kafka_dir/config/server.properties > $kafka_dir/config/server-$BROKER_ID.properties
echo "Killing server"
bin/kafka-server-stop.sh || true
@@ -40,4 +41,4 @@ if [[ -n $JMX_PORT ]]; then
export JMX_PORT=$JMX_PORT
export KAFKA_JMX_OPTS="-Djava.rmi.server.hostname=$PUBLIC_ADDRESS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false "
fi
-bin/kafka-server-start.sh /opt/kafka/config/server-$BROKER_ID.properties 1>> /tmp/broker.log 2>> /tmp/broker.log &
+bin/kafka-server-start.sh $kafka_dir/config/server-$BROKER_ID.properties 1>> /tmp/broker.log 2>> /tmp/broker.log &
http://git-wip-us.apache.org/repos/asf/kafka/blob/c6b93fa5/vagrant/zk.sh
----------------------------------------------------------------------
diff --git a/vagrant/zk.sh b/vagrant/zk.sh
index 6fc4b7c..dcc4810 100644
--- a/vagrant/zk.sh
+++ b/vagrant/zk.sh
@@ -23,14 +23,15 @@ ZKID=$1
NUM_ZK=$2
JMX_PORT=$3
-cd /opt/kafka
+kafka_dir=/opt/kafka-trunk
+cd $kafka_dir
-cp /opt/kafka/config/zookeeper.properties /opt/kafka/config/zookeeper-$ZKID.properties
-echo "initLimit=5" >> /opt/kafka/config/zookeeper-$ZKID.properties
-echo "syncLimit=2" >> /opt/kafka/config/zookeeper-$ZKID.properties
-echo "quorumListenOnAllIPs=true" >> /opt/kafka/config/zookeeper-$ZKID.properties
+cp $kafka_dir/config/zookeeper.properties $kafka_dir/config/zookeeper-$ZKID.properties
+echo "initLimit=5" >> $kafka_dir/config/zookeeper-$ZKID.properties
+echo "syncLimit=2" >> $kafka_dir/config/zookeeper-$ZKID.properties
+echo "quorumListenOnAllIPs=true" >> $kafka_dir/config/zookeeper-$ZKID.properties
for i in `seq 1 $NUM_ZK`; do
- echo "server.${i}=zk${i}:2888:3888" >> /opt/kafka/config/zookeeper-$ZKID.properties
+ echo "server.${i}=zk${i}:2888:3888" >> $kafka_dir/config/zookeeper-$ZKID.properties
done
mkdir -p /tmp/zookeeper