Hi Emmanuel, searching around there are many projects that try to setup a zookeeper ensemble into a docker, I did my try with this project, and even if zookeeper version was 3.4.6, may be could be interested in what I did.
https://github.com/signalfx/docker-zookeeper When I will have a little bit of spare time, I have to upgrade the project to the latest version. On Sat, Jul 25, 2015 at 1:14 AM, Alexander Shraer <[email protected]> wrote: > yes, see examples here: > http://zookeeper.apache.org/doc/trunk/zookeeperReconfig.html > > > reconfig -add server.5=125.23.63.23:1234:1235;1236 > > On Fri, Jul 24, 2015 at 4:08 PM, Emmanuel <[email protected]> wrote: > > > Thanks Alex > > > > Reconfigure is something I can do through command line, right? > > > > > > Emmanuel > > > > > > > > -------- Original message -------- > > From: Alexander Shraer <[email protected]> > > Date:07/24/2015 4:04 PM (GMT-08:00) > > To: [email protected] > > Subject: Re: starting a ZK cluster one node at a time > > > > Hi, > > > > When you're adding a node its config file should contain the current set > of > > servers + itself. This will allow it to boot and connect to the cluster > > (once it does, its config file is overwritten automatically with the > latest > > config of the cluster, which doesn't include the new node). Then, you > > should execute reconfig to logically add it to the cluster. This will add > > it to the config files at all servers. If you don't do this, the new node > > will not have voting rights. For example with 2 servers when you're > adding > > a 3rd, if you don't run a reconfig command then even though you have 3 > > servers any server failure of the original two servers will make your > > ensemble unavailalble. You can read the reconfig manual for details. > > > > > > Cheers, > > Alex > > > > On Fri, Jul 24, 2015 at 3:53 PM, Emmanuel <[email protected]> wrote: > > > > > Hello, > > > I am setting up ZK in docker. One of the issue is I don't know on what > > > host the node will be deployed, and what the IP will be, so I need to > > > configure dynamically. > > > with 3.5.0 it seems like i can update the quorum dynamically. Just > wanted > > > to confirm this flow would work: > > > - start container and configure the ZK node with its IP/ports in the > > > dynamic config file -> start zk node- start a second container linked > > > container, configure with the first node and the new node's info -> > start > > > second zk node. - start 3rd container, configure with previous nodes > info > > > and start zk server. > > > question: => will the first node update its config when the second > > > node/third node join? or does it need to receive some kind of signal > > (i.e. > > > run reconfig or some other command?) > > > I haven't tried but before I spent the time writing this, i'd like to > > > confirm it's possible.Will the config file alone get the ZK nodes to > find > > > each other, or do I need to run the > reconfig -file newconfig.cfg or > > > > reconfig -members server.1=125.23.63.23:2780 > > > :2783:participant;2791,server.2=125.23.63.24:2781 > > > :2784:participant;2792,server.3=125.23.63.25:2782 > :2785:participant;2793 > > > type of commands each time i add a node? > > > I hope this is a straight forward question to answer, or that there is > a > > > 'recommended' way to proceed when the IP of the node is only known at > > > launch. > > > Thanks for help. > > > > > >
