cluster-init

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, defaults to 8091.
--cluster-ramsize=RAMSIZEMB Per node RAM quota in megabytes for the Data service. This is a required parameter.
--cluster-index-ramsize=RAMSIZEMB

Per node RAM quota in megabytes for the Index service, defaults to 512 MB.

--cluster-fts-ramsize=RAMSIZEMB Per node RAM quota in megabytes for the Search service, defaults to 256 MB.
--index-storage-setting=SETTING Index storage type [default, memopt].
--services=data,index,query,fts Services that first node in the cluster runs, defaults to 'data'.

Examples

To set up a cluster with a username, password, port, and RAM quota separately for the Index service, Data service, and Search 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 \
--cluster-fts-ramsize=RAMSIZEMB //per node search service ram quota in MB \
--index-storage-setting=SETTING //index storage type [default, memopt] \
--services=data,index,query,fts //services that server runs

The following example sets up a cluster with a user name, password, port, RAM quota for the data, index, and search services, and the index storage mode set to memory-optimized:

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