-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Ievgenii Shepeliuk
committed
Sep 10, 2017
1 parent
39b1b76
commit 3345e96
Showing
6 changed files
with
81 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
= ConstructR-ZooKeeper | ||
|
||
image:https://travis-ci.org/typesafehub/constructr-zookeeper.svg?branch=master[Build Status,link=https://travis-ci.org/typesafehub/constructr-zookeeper] | ||
|
||
This library enables to use https://zookeeper.apache.org/[ZooKeeper] as cluster coordinator in a https://github.com/hseeberger/constructr[ConstructR] based node. | ||
|
||
https://github.com/hseeberger/constructr[ConstructR] aims at cluster bootstrapping (construction) by using a coordination service and provides etcd as the default one. By means of this library, you will be able to use https://zookeeper.apache.org/[ZooKeeper] as coordination service instead. | ||
|
||
You will need to add the following dependency in your `build.sbt` in addition to the core ConstructR ones: | ||
|
||
[source] | ||
---- | ||
libraryDependencies += "com.lightbend.constructr" %% "constructr-coordination-zookeeper" % "0.3.3" | ||
---- | ||
|
||
== Configuration | ||
|
||
Check https://github.com/hseeberger/constructr#coordination[this section] in ConstructR for general information about configuration. | ||
|
||
Check link:constructr-coordination-zookeeper/src/main/resources/reference.conf[reference.conf] for ZooKeeper related configuration. | ||
|
||
=== Configuring ZK cluster nodes | ||
|
||
The default configuration tries to establish a connection to ZooKeeper on `localhost:2181`. | ||
|
||
Override the `constructr.coordination.nodes` configuration to specify another ZooKeeper node: | ||
|
||
[source] | ||
---- | ||
constructr.coordination.nodes = ["10.10.10.10:2181"] | ||
---- | ||
|
||
The format per node `ip:port`. | ||
|
||
You are also able to connect to a multi-node cluster by specifying multiple nodes, separated by a comma: | ||
|
||
[source] | ||
---- | ||
constructr.coordination.nodes = ["10.10.10.10:2181", "10.10.10.11:2181", "10.10.10.12:2181"] | ||
---- | ||
|
||
Additionally, comma separated connection string format is supported | ||
|
||
[source] | ||
---- | ||
constructr.coordination.nodes = "10.10.10.10:2181,10.10.10.11:2181,10.10.10.12:2181" | ||
---- | ||
|
||
== Testing | ||
|
||
Run tests: | ||
|
||
$ sbt test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters