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] [options]

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 user name.

--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.

--cluster-index-ramsize=RAMSIZEMB

Per node RAM quota in MB for the index 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 user name, password, port, and RAM quota separately for the index service, data service, and query service, update the following command with appropriate values:

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

The following example sets up a cluster with a user name, password, port, RAM quota for the data, index, and query services:

couchbase-cli cluster-init -c 192.168.0.1:8091 \
--cluster-username=Administrator \
--cluster-password=password \
--cluster-port=8080 \
--services=data,index,query \
--cluster-ramsize=300
--cluster-index-ramsize=256