Server nodes

Server nodes

Managing server nodes in a cluster involve a variety of couchbase-cli tool commands.

Description

This section provides examples of miscellaneous couchbase-cli tool commands for cluster operations.

To list servers in a cluster:


couchbase-cli server-list -c 192.168.0.1:8091

To retrieve server information:

couchbase-cli server-info -c 192.168.0.1:8091

Example: Setting cluster parameters

The following example sets the username, password, port and ram quota:

couchbase-cli cluster-init -c 192.168.0.1:8091 
    --cluster-init-username=Administrator 
    --cluster-init-password=password 
    --cluster-init-port=8080 
    --cluster-init-ramsize=300

The following example changes the cluster username, password, port and ram quota:

couchbase-cli cluster-edit -c 192.168.0.1:8091 
    --cluster-username=Administrator 
    --cluster-password=password 
    --cluster-port=8080 
    --cluster-ramsize=300

Example: Setting data paths

To set a data path for an unprovisioned cluster:


couchbase-cli node-init -c 192.168.0.1:8091 
    --node-init-data-path=/tmp/data 
    --node-init-index-path=/tmp/index

To change the data path and hostname for an unprovisioned cluster:


couchbse-cli node-init -c 192.168.0.1:8091 
    --node-init-data-path=/tmp/data 
    --node-init-index-path=/tmp/index 
    --node-init-hostname=myhostname 
    -u Administrator -p password