Search:

Search all manuals
Search this manual
Manual
Couchbase Server Manual 2.0
Community Wiki and Resources
Download Couchbase Server 2.0
Couchbase Developer Guide 2.0
Client Libraries
Couchbase Server Forum
Additional Resources
Community Wiki
Community Forums
Couchbase SDKs
Parent Section
8.7 Managing Clusters
Chapter Sections
Chapters

8.7.3. Joining a Node into a Cluster

This is a REST request made to an individual Couchbase node to add that node to a given cluster. You cannot merge two clusters together into a single cluster using the REST API, however, you can add a single node to an existing cluster. You will need to provide several parameters to add a node to a cluster:

shell> curl -u admin:password -d clusterMemberHostIp=192.168.0.1 \
    -d clusterMemberPort=8091 \
    -d user=admin -d password=admin123
    http://localhost:8091/node/controller/doJoinCluster

The following arguments are required:

Table 8.4. REST API — Cluster Joining Arguments

ArgumentDescription
clusterMemberHostIpHostname or IP address to a member of the cluster the node receiving this POST will be joining
clusterMemberPortPort number for the RESTful interface to the system

If your cluster requires credentials, you will need to provide the following parameters in your request:

Table 8.5. REST API — Cluster Joining Additional Arguments

ArgumentDescription
userAdministration user
passwordPassword associated with the Administration user

HTTP Request
POST /node/controller/doJoinCluster
Host: localhost:8091
Authorization: Basic xxxxxxxxxxxx
Accept: */*
Content-Length: xxxxxxxxxx
Content-Type: application/x-www-form-urlencoded
clusterMemberHostIp=192.168.0.1&clusterMemberPort=8091&user=admin&password=admin123
HTTP Response
200 OK with Location header pointing to pool details of pool just joined - successful join
400 Bad Request - missing parameters, etc.
401 Unauthorized - credentials required, but not supplied
403 Forbidden bad credentials - invalid credentials