-
1. Re: Adding standalone zookeeper servers into ensemble
iocanel Apr 24, 2013 1:58 PM (in response to carnold86)I don't think that there is any documentation around that, as this is not a really explored area.
I'll try to work an example. Till then you could setup your zookeeper ensemble manually and have fabric join it.
-
2. Re: Adding standalone zookeeper servers into ensemble
carnold86 Apr 24, 2013 2:05 PM (in response to iocanel)Hmm, never thought about working the problem the other way (having fabric join an existing ensemble), that might work just as well or better. How can you configure fabric to join/use an existing ensemble rather than using it's own?
-
3. Re: Adding standalone zookeeper servers into ensemble
iocanel Apr 24, 2013 2:41 PM (in response to carnold86)Using the command fabric:join and passing the zookeeper url as an argument you can have a container join an existing fabric.
In earlier releases of fabric it was quite trivial to join any zookeeper cluster. Nowdays its more complex. You could try though something like that:
In a fresh container:
>features:install fabric-zookeeper-commands
>fabric:join --zookeeper-password <anything> <url to zookeeper e.g. somehost:2181>
At this point you will be connected to zookeeper but no profiles or any kind of configuration will be available to you. So you'll have to create them manually.
1. Add The ensemble configuration entries
>zk:create -r zk:create -r /fabric/configs/ensemble
>zk:set zk:create -r /fabric/configs/ensemble 0000
>zk:create zk:create -r /fabric/configs/url
>zk:set /fabric/configs/ensemble/ulr <zookeeper url>
>zk:create -r /fabric/configs/ensemble/0000
>zk:set zk:create -r /fabric/configs/ensemble ""
>zk:create zk:create -r /fabric/configs/ensemble/profiles
2. Import the profiles
So you'll need to load the profiles:
>fabric:import fabric/import
You may want to also add entries for authentication under /fabric/authentication or remove the fabric-jaas feature from your profiles if you don't want to use zookeeper backed jaas realm.
Note: This setup is experimental and not recommended for production.
-
4. Re: Adding standalone zookeeper servers into ensemble
carnold86 Apr 24, 2013 5:50 PM (in response to iocanel)Yeah, I got the feeling like I'm going into somewhat "uncharted" waters here. The above configuration is less than ideal, having to manually configure things that fabric assumes should be there seems brittle/dependant on fabric's configuration. I'm also guessing this setup would void the use of normal ensemble:add/remove commands as well (since fabric doesn't have any control of zookeeper). Thinking at a higher level, maybe I started the question a little too fine grained - what we're trying to do is use the fabric registry zookeeper to store some of our own data (integration information for applications like object translations, etc...). Along with this was the idea was to add zookeeper observers on the application servers (or embedded in the applications themselves) for faster access to the data. I guess a better first question would be: is re-using the fabric registry zookeeper to store our own data recommended/supported and if so are there any best-practices about this?
-
5. Re: Adding standalone zookeeper servers into ensemble
iocanel Apr 26, 2013 10:50 AM (in response to carnold86)Reusing the fabric managed zookeeper should be possible.
Fabric stores all its configuration under the /fabric znode, so the rest of the tree is available for you to use.
-
6. Re: Adding standalone zookeeper servers into ensemble
carnold86 Apr 26, 2013 3:31 PM (in response to iocanel)Ok, thanks. After tinkering around for a little bit, I have two questions:
1) After creating some new data in the zookeeper tree, if I use any of the fabric ensemble edit commands (add/remove) any non-fabric data is lost. Is this something that I can/should open a bug against?
2) Back to my intial question, it seems possible to find a way to add standalone zookeeper servers into the ensemble but it sounds like this is an untested/experimental configuration. Is supporting these kinds of configurations on a roadmap for a future release?
-
7. Re: Adding standalone zookeeper servers into ensemble
iocanel Apr 28, 2013 3:28 PM (in response to carnold86)1) The fabric:ensemble-add / ensemble-remove commands should only be used when setting up your fabric and its not a good idea to use them once you have your cluster running. So I'd suggest to setup your ensemble first and then add any extra data.
2) The original idea was to be able to do it. And it is doeable, but requires quite a few manual steps. If there's interest in this kind of setups we could work on minimizing the steps for setting it up.
-
8. Re: Adding standalone zookeeper servers into ensemble
carnold86 Apr 29, 2013 1:47 PM (in response to iocanel)That makes sense. Thanks for your help on this.
-
9. Re: Adding standalone zookeeper servers into ensemble
carnold86 May 1, 2013 11:15 AM (in response to iocanel)So, I was poking around the zookeeper jira and ran into this: https://issues.apache.org/jira/browse/ZOOKEEPER-107. It looks like zookeeper will be supporting elastic ensemble configuration at 3.5.0. Is it planned to pick this version up in the next Fabric/Fuse release (if zk is released before then) and if so would there be plans to rework the fabric:ensemble commands to use this new funcationality?
-
10. Re: Adding standalone zookeeper servers into ensemble
iocanel May 2, 2013 5:14 AM (in response to carnold86)This is a really interesting feature which is greatly anticipated.
It could help Fabric in a lot of different ways, so the intention is to explore the possibilities of reusing this.