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

[GitHub] wohali closed pull request #219: Fix _cluster_setup api | couchdb node name changes | verify cluster setup

wohali closed pull request #219: Fix _cluster_setup api | couchdb node name changes | verify cluster setup  
URL: https://github.com/apache/couchdb-documentation/pull/219
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services