You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wo...@apache.org on 2018/03/20 18:50:55 UTC

[couchdb-documentation] branch master updated: Fix _cluster_setup api | couchdb node name changes | verify cluster setup (#219)

This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git


The following commit(s) were added to refs/heads/master by this push:
     new 40bae3a  Fix _cluster_setup api | couchdb node name changes | verify cluster setup   (#219)
40bae3a is described below

commit 40bae3ade1ade9206fdd2aebbedac45eed1d8556
Author: Raghav Tandon <ra...@users.noreply.github.com>
AuthorDate: Wed Mar 21 00:20:53 2018 +0530

    Fix _cluster_setup api | couchdb node name changes | verify cluster setup   (#219)
    
    * Fix cluster setup documentation for cluster_setup api and node name change in vm.args
---
 src/cluster/setup.rst | 50 ++++++++++++++++++++++++++++++++++++++++++++------
 1 file changed, 44 insertions(+), 6 deletions(-)

diff --git a/src/cluster/setup.rst b/src/cluster/setup.rst
index fe36336..d7fb40f 100644
--- a/src/cluster/setup.rst
+++ b/src/cluster/setup.rst
@@ -163,9 +163,14 @@ then to add nodes by IP address. To get more nodes, go through the same install
 procedure on other machines. Be sure to specify the total number of nodes you
 expect to add to the cluster before adding nodes.
 
-Before you can add nodes to form a cluster, you have to have them
-listen on a public IP address and set up an admin user. Do this, once
-per node:
+In file etc/vm.args change the the lineĀ ``-name couchdb@127.0.0.1`` to
+``-name couchdb@<this-nodes-ip-address| FQDN>`` for each node which defines
+the node and must be seperate for each node. For clustered setup, each node in
+system must have a unique name. Can also be a valid FQDN not necessarily the IP.
+
+Before you can add nodes to form a cluster, you must have them listening on an
+IP address accessible from the other nodes in the cluster.
+Do this once per node:
 
 .. code-block:: bash
 
@@ -211,12 +216,12 @@ requires all other nodes to be able to see it and vice versa.
 Set up will not work with unavailable nodes.
 The notion of "setup coordination node" will be gone once the setup is finished.
 From then on, the cluster will no longer have a "setup coordination node".
-To add a node run these two commands:
+To add a node run these commands for each node you want to add:
 
 .. code-block:: bash
 
     curl -X POST -H "Content-Type: application/json" http://admin:password@127.0.0.1:5984/_cluster_setup -d '{"action": "enable_cluster", "bind_address":"0.0.0.0", "username": "admin", "password":"password", "port": 15984, "node_count": "3", "remote_node": "<remote-node-ip>", "remote_current_user": "<remote-node-username>", "remote_current_password": "<remote-node-password>" }'
-    curl -X POST -H "Content-Type: application/json" http://admin:password@127.0.0.1:5984/_cluster_setup -d '{"action": "add_node", "host":"<remote-node-ip>", "port": "<remote-node-port>", "username": "admin", "password":"password"}'
+    curl -X POST -H "Content-Type: application/json" http://admin:password@127.0.0.1:5984/_cluster_setup -d '{"action": "add_node", "host":"<remote-node-ip>", "port": <remote-node-port>, "username": "admin", "password":"password"}'
 
 This will join the two nodes together.
 Keep running the above commands for each
@@ -227,7 +232,40 @@ following command to complete the setup and add the missing databases:
 
     curl -X POST -H "Content-Type: application/json" http://admin:password@127.0.0.1:5984/_cluster_setup -d '{"action": "finish_cluster"}'
 
-Your CouchDB cluster is now set up.
+Verify install:
+
+.. code-block:: bash
+
+    curl http://admin:password@127.0.0.1:5984/_cluster_setup
+
+Response:
+
+.. code-block:: bash
+
+    {"state":"cluster_finished"}
+
+Verify cluster nodes:
+
+.. code-block:: bash
+
+    curl http://admin:password@127.0.0.1:5984/_membership
+
+Response:
+
+.. code-block:: bash
+
+    {
+        "all_nodes": [
+            "couchdb@couch1",
+            "couchdb@couch2",
+        ],
+        "cluster_nodes": [
+            "couchdb@couch1",
+            "couchdb@couch2",
+        ]
+    }
+
+You CouchDB cluster is now set up.
 
 .. _HAProxy: http://haproxy.org/
 .. _example configuration for HAProxy: https://github.com/apache/couchdb/blob/master/rel/haproxy.cfg

-- 
To stop receiving notification emails like this one, please contact
wohali@apache.org.