A newer version of this documentation is available.

View Latest

cluster-init

Sets the user name, password, port, RAM size and services for a cluster.

Syntax

The basic syntax is:

couchbase-cli cluster-init -c [host]:8091 -u [admin] -p [password]
   --cluster-username=USER
   --cluster-index-ramsize=RAMSIZEMB
   --cluster-password=PASSWORD
   --cluster-port=PORT
   --cluster-ramsize=RAMSIZEMB
   --services=data,index,query

Description

The cluster-init defines the cluster settings: user name, password, cluster port, RAM size and services.

Options

The following are the command options:

Table 1. cluster-init options
Option Description

--cluster-username=USER

New administrative username

--cluster-index-ramsize=RAMSIZEMB

Per node RAM quota in MB for the Index service

--cluster-password=PASSWORD

New administrator’s password

--cluster-port=PORT

New cluster REST/http port

--cluster-ramsize=RAMSIZEMB

Per node RAM quota in MB for the Data service

--services=data,index,query

Services that Couchbase Server runs.

Examples

To set the cluster’s user name and password:

couchbase-cli cluster-init -c 192.168.0.1:8091 -u Administrator -p password \
--cluster-username=Admnin1 --cluster-password=Password1

To set up a cluster with a username, password, port, and RAM quota separately for the Index service and Data service:

couchbase-cli cluster-init OPTIONS: \
--cluster-username=USER //new admin username --cluster-password=PASSWORD //new admin password \
--cluster-port=PORT //new cluster REST/http port \
--cluster-ramsize=RAMSIZEMB //per node data service ram quota in MB \
--cluster-index-ramsize=RAMSIZEMB //per node index service ram quota in MB \
--services=data,index,query //services that server runs

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