#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:
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.
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?
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.