-
Notifications
You must be signed in to change notification settings - Fork 332
/
Copy pathrest-cluster-addnodes.dita
46 lines (37 loc) · 2.11 KB
/
rest-cluster-addnodes.dita
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference xml:lang="en-us" id="rest-cluster-add-nodes">
<title>Adding Nodes to Clusters</title>
<shortdesc>Nodes are added to clusters with the <codeph>POST /controller/addNode</codeph> HTTP method and URI.</shortdesc>
<refbody>
<section><title>Syntax</title>
<p>This is a REST request made to a Couchbase Server cluster to add a server node to the
cluster with a service: kv (data), index or n1ql (query). If you add a node with no services
specified, the kv (the Data Service) will be enabled by default. A new node is added with
the RESTful endpoint <codeph>server_ip:port/controller/addNode</codeph>. The administrative
username and password parameters are required.</p>
<codeblock>curl -u [admin]:[password]
[localhost]:8091/controller/addNode
-d hostname=[IPaddress] user=[admin] password=[password] services=[kv|index|n1ql|fts]</codeblock>
<p>After adding a node to the cluster, remember to rebalance the cluster. See <xref
href="rest-cluster-rebalance.dita#rest-cluster-rebalance-nodes"/> for details.</p>
</section>
<section><title>HTTP method and URI</title>
<codeblock>POST /controller/addNode</codeblock>
</section>
<section><title>Example</title>
<p>The following example request adds a server node, 10.2.2.64, to the cluster at
10.2.2.60:8091. The POST method, <codeph>controller/addNode</codeph>, IP address for the
new server, and administrative credentials are provided. Since the POST method is the
default, it is not required in the request.</p>
<codeblock>curl -u Administrator:password \
10.2.2.60:8091/controller/addNode \
-d 'hostname=10.2.2.64&user=Administrator&password=password&services=n1ql'</codeblock>
</section>
<section><title>Response</title>
<p>If successful, Couchbase Server responds:</p>
<codeblock>HTTP/1.1 200 OK
{"otpNode":"ns_1@10.4.2.6"}</codeblock>
</section>
</refbody>
</reference>