summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorBrad Anderson <brad@sankatygroup.com>2010-08-27 13:13:26 -0400
committerBrad Anderson <brad@sankatygroup.com>2010-08-27 13:13:26 -0400
commit9506c54a11510f0a8267269c9873674e826c2b01 (patch)
tree945d4f841a7749b1442435e0e26c569449535ce9 /README.md
parente6bc483b21ddd72e58b35f6baefbec982ed36ff2 (diff)
instructions for dev cluster
Diffstat (limited to 'README.md')
-rw-r--r--README.md25
1 files changed, 19 insertions, 6 deletions
diff --git a/README.md b/README.md
index 5e59004e..5c2ab65d 100644
--- a/README.md
+++ b/README.md
@@ -61,19 +61,32 @@ Note: see the rel/sv/README file for information on using runit to stop/start db
#### Joining a new node to the cluster
-First, dbcore listens on two ports. Defaults and explanations:
+To try a development cluster locally, try
+
+ make dev
+
+This will build a three-node cluster under the rel/ directory. Get the nodes running, like above, by doing the following (in separate terminals):
+
+ ./rel/dev1/bin/dbcore
+ ./rel/dev2/bin/dbcore
+ ./rel/dev3/bin/dbcore
+
+dbcore listens on two ports. Defaults and explanations:
* 5984 - front door, cluster-aware port, appears as a standalone CouchDB.
* 5986 - back door, single-node port, used for admin functions
-Next, once the first node is started, and assuming its hostname is 'node1_host' start dbcore on another node, with hostname 'node2_host'. Once it's started successfully, on node1_host, join the new node:
- curl -X PUT http://localhost:5986/nodes/dbcore@node2_host -d {}
+For the three-node dev cluster created with 'make dev' the ports are 15984 & 15986 for dev1, 25984 & 25986 for dev2, and 35984 & 35986 fro dev3. Now, once the nodes are started, and assuming the hostname is '127.0.0.1', join the dev2 node by sending this PUT to dev1's listening backend port:
+
+ curl -X PUT http://127.0.0.1:15986/nodes/dev2@127.0.0.1 -d {}
-To verify the two-node cluster has been linked properly, on either node, try:
- curl http://locahost:5984/_membership
+To verify the two-node cluster has been linked properly, on either node (via proper frontend port), try:
+ curl http://127.0.0.1:15984/_membership
You should see something similar to this:
- {"all_nodes":["dbcore@node1_host","dbcore@node2_host"],"cluster_nodes":["dbcore@node1_host","dbcore@node2_host"]}
+ {"all_nodes":["dev1@127.0.0.1","dev2@127.0.0.1"],"cluster_nodes":["dev1@127.0.0.1","dev2@127.0.0.1"]}
+
+Add node 3 to the cluster by sending a similar PUT to either of the first two nodes.
#### Now What?