How to setup multi-nodes cluster in windows by config file?

hi Couchbase team,

In our cluster, there’s our own service management way, so we don’t want to use the default windows service to manage the couchbase server.

Is there any portable version for the Couchbase server with start command? And how to setup the multi-node cluster by using config file?

Thanks,
-Jason

#1 - are you asking for the Couchbase Server binary to be started as a standalone binary and not through ‘net.exe’?
I haven’t played with it but looking at the service_start.bat file, it runs ‘erlsrv.exe’ with a couple of arguments. I don’t know how you manage service but if whatever you use can run a batch or an exe with arguments then that should do the trick?

#2 I’ve never looked into using a config file but it’s pretty straightforward to achieve this with the command line. You basically need to run

couchbase-cli cluster-init

against the first node then iterate

couchbase-cli server-add

for each node to add.
Optionaly if you load data, you can trigger a rebalance with:

couchbase-cli rebalance

and

couchbase-cli bucket-create

to create bucket(s).

Full documentation for the various verbs here:
http://developer.couchbase.com/documentation/server/current/cli/cbcli-intro.html

Hope this helps.

Thanks for your suggestion.

Yes, that’s what I want. Actually I’ve copied the command line from from the running service process just like below and it works, but still need to install the Couchbase to a directory first, then copy it to the same directory in other machines, otherwise, a lot of files are needed to be changed, so is there an easy to extract it from the install .exe?

FYI, our cluster management system can automatically monitor each .exe program, if it stops, will restart it. And when repair the machine, like hard-image, will copy the deployment image and run the specified .exe.

erl.exe -service_event ErlSrv_CouchbaseServer -nohup -name babysitter_of_ns_1@127.0.0.1 -hidden +A 16 +P 327680 -env ERL_FULLSWEEP_AFTER 512 -env ERL_MAX_PORTS 10000 -pa …/lib/couchdb/plugins/gc-couchbase-1.0.0/ebin …/lib/couchdb/plugins/vtree-0.1.0/ebin …/lib/couchdb/plugins/wkb-1.2.0/ebin -sasl -setcookie nocookie -ns_server config_path ‘…/etc/couchbase/static_config’ -couch_ini …/etc/couchdb/default.ini …/etc/couchdb/local.ini …/etc/couchdb/default.d/geocouch.ini …/etc/couchdb/default.d/capi.ini …/etc/runtime.ini -kernel inet_dist_listen_min 21100 inet_dist_listen_max 21299 -run ns_babysitter_bootstrap override_resolver –

In our cluster, all the machines are homogeneous, and cannot make sure which one starts first, so it’s hard to find the first one and BTW it should be SPoF.

Is there a command for all the machines to do something like cluster-init/join which means if it’s first, cluster-init; otherwise, server-add?

Thanks,
-Jason

Not that I know of, my best guess is that logic would have to be implemented though a script with a if/else or some flag to keep track of whether or not this is a create or a add.