Permalink
Browse files

added rules

zk_start_s
and
zk_stop_s
which start and stop a single zk Server on port
2181. The creation of the servers directorys and stuff is
included in the configuration of the normal servers and
therefore always performed if those are started and the other way
round.

i hope that
fixes #1871
  • Loading branch information...
1 parent 12fc911 commit 847a2e0234999b84cfe369cd50f1f7e20eaa2a96 Marco committed May 4, 2011
Showing with 19 additions and 0 deletions.
  1. +12 −0 Makefile
  2. +7 −0 configs/zoosingle.cfg
View
@@ -31,11 +31,19 @@ testen:
./rebar ct
sleep 5
+
+
zk_start: zk_config
./zookeeper/zoo1/bin/zkServer.sh start zoo.cfg
./zookeeper/zoo2/bin/zkServer.sh start zoo.cfg
./zookeeper/zoo3/bin/zkServer.sh start zoo.cfg
+zk_start_s: zk_config
+ ./zookeeper/zoosingle/bin/zkServer.sh start zoo.cfg
+
+zk_stop_s:
+ ./zookeeper/zoosingle/bin/zkServer.sh stop
+
zk_stop:
./zookeeper/zoo1/bin/zkServer.sh stop
./zookeeper/zoo2/bin/zkServer.sh stop
@@ -45,20 +53,24 @@ zk_config: zk_clone
mkdir -p ./zookeeper/data/zoo1
mkdir -p ./zookeeper/data/zoo2
mkdir -p ./zookeeper/data/zoo3
+ mkdir -p ./zookeeper/data/zoosingle
echo 1 > ./zookeeper/data/zoo1/myid
echo 2 > ./zookeeper/data/zoo2/myid
echo 3 > ./zookeeper/data/zoo3/myid
cp ./configs/zoo1.cfg ./zookeeper/zoo1/conf/zoo.cfg
cp ./configs/zoo2.cfg ./zookeeper/zoo2/conf/zoo.cfg
cp ./configs/zoo3.cfg ./zookeeper/zoo3/conf/zoo.cfg
+ cp ./configs/zoosingle.cfg ./zookeeper/zoosingle/conf/zoo.cfg
zk_clone: ${ZK_DIR}
mkdir -p ./zookeeper/zoo1
mkdir -p ./zookeeper/zoo2
mkdir -p ./zookeeper/zoo3
+ mkdir -p ./zookeeper/zoosingle
cp -r -f ${ZK_DIR}/* ./zookeeper/zoo1
cp -r -f ${ZK_DIR}/* ./zookeeper/zoo2
cp -r -f ${ZK_DIR}/* ./zookeeper/zoo3
+ cp -r -f ${ZK_DIR}/* ./zookeeper/zoosingle
${ZK_DIR}: ${ZK_ARCHIVE}
tar xzf $<
View
@@ -0,0 +1,7 @@
+tickTime=2000
+initLimit=10
+syncLimit=5
+dataDir=zookeeper/data/zoosingle
+clientPort=2181
+
+

0 comments on commit 847a2e0

Please sign in to comment.