You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Joe Black <jo...@valuphone.com> on 2016/09/21 02:11:38 UTC
Best way to setup a milt-node cluster without using the wizard
I’ve been using bigcouch now for about a year or so and I’m super excited to see those features finally merged into couchdb proper. I’m sure there are tons of nice updates and fixes I’ve been missing for awhile now.
So I just build a docker image for couchdb 2.0 and everything seems to be working fine, however I had a strange error about a missing _user db. Did some googling and found that I need to create these manually for a single-node, but the documentation about multi-node only says to use the wizard.
I don’t mean to be difficult but I don’t want to use a wizard, it’s nothing against the wizard at all, I just need to automate this process or it becomes completely unusable. How can I do this?
Also when doing local testing with a single node, I’ve seen several different replies regarding the commands that need to be run to initialize the system dbs.
Some of them only mention the _users db, some of them mention all three as such:
curl -X PUT http://localhost:5984/_users
curl -X PUT http://localhost:5984/_replicator
curl -X PUT http://127.0.0.1:5984/_global_changes
I even swear on one page I saw there were more to init, but I can’t seem to find where I saw that, so just curious on which of these need to be set since I’ll be bash scripting all of this.
Thanks and overall this looks like a great product already!
--
Joe Black
using _cluster_setup to initialize a new single node cluster
Posted by Joe Black <jo...@valuphone.com>.
I was experimenting with both multi node clusters and single node couchdb deployments the other day and found the following page which says that after starting a single node, you need to run the following:
http://docs.couchdb.org/en/2.0.0/install/index.html#single-node-setup
curl -X PUT http://127.0.0.1:5984/_users
curl -X PUT http://127.0.0.1:5984/_replicator
curl -X PUT http://127.0.0.1:5984/_global_changes
I created my own custom docker container for couchdb so tore down that container and tried the following on a new one instead of the above:
curl -X POST -H 'Content-Type: application/json' http://localhost:5984/_cluster_setup -d '{"action": "finish_cluster”}'
It would seem comparing the results of curling /_all_dbs are the same, but I’m curious if there are other differences that I could be unaware of that might bite me in the future.
Re: Best way to setup a milt-node cluster without using the wizard
Posted by Garren Smith <ga...@apache.org>.
Hi Joe,
I've added a section to the docs explaining how to do this
http://docs.couchdb.org/en/latest/cluster/setup.html?highlight=setup#the-cluster-setup-api
The setup wizard uses the same endpoint.
If you want some help with the command line. nmo can also help you with it
http://robertkowalski.github.io/nmo/cli/nmo-cluster.html
Cheers
Garren
On Wed, Sep 21, 2016 at 4:11 AM, Joe Black <jo...@valuphone.com> wrote:
> I’ve been using bigcouch now for about a year or so and I’m super excited
> to see those features finally merged into couchdb proper. I’m sure there
> are tons of nice updates and fixes I’ve been missing for awhile now.
>
> So I just build a docker image for couchdb 2.0 and everything seems to be
> working fine, however I had a strange error about a missing _user db. Did
> some googling and found that I need to create these manually for a
> single-node, but the documentation about multi-node only says to use the
> wizard.
>
> I don’t mean to be difficult but I don’t want to use a wizard, it’s
> nothing against the wizard at all, I just need to automate this process or
> it becomes completely unusable. How can I do this?
>
> Also when doing local testing with a single node, I’ve seen several
> different replies regarding the commands that need to be run to initialize
> the system dbs.
>
> Some of them only mention the _users db, some of them mention all three as
> such:
>
> curl -X PUT http://localhost:5984/_users
> curl -X PUT http://localhost:5984/_replicator
> curl -X PUT http://127.0.0.1:5984/_global_changes
>
> I even swear on one page I saw there were more to init, but I can’t seem
> to find where I saw that, so just curious on which of these need to be set
> since I’ll be bash scripting all of this.
>
> Thanks and overall this looks like a great product already!
>
> --
> Joe Black