couchdb-setup.git
17 months agoMerge branch 'fix/node-count' of https://github.com/apache/couchdb-setup master 1.0.1
Joan Touzet [Sun, 30 Jul 2017 21:15:08 +0000 (17:15 -0400)] 
Merge branch 'fix/node-count' of https://github.com/apache/couchdb-setup

17 months agofix: make sure cluster setups do not exceed n=3 by default fix/node-count 14/head
Jan Lehnardt [Sun, 30 Jul 2017 08:07:46 +0000 (10:07 +0200)] 
fix: make sure cluster setups do not exceed n=3 by default

Single node setups want an n=1 setting, but that is the only
time the number of nodes and the number of replicas is linked.

In larger clusters, the values should not be the same. This
patch ensures that for clusters >3 nodes, we do not have to
tell the users to set node_count to 3 in the _cluster_setup
API.

More context for this in https://issues.apache.org/jira/browse/COUCHDB-2594

18 months agoMerge branch '593-setup-single-node' of https://github.com/apache/couchdb-setup 1.0.0
Joan Touzet [Sun, 16 Jul 2017 16:32:41 +0000 (12:32 -0400)] 
Merge branch '593-setup-single-node' of https://github.com/apache/couchdb-setup

18 months agochore: better log output 13/head
Jan Lehnardt [Sun, 16 Jul 2017 15:45:13 +0000 (17:45 +0200)] 
chore: better log output

18 months agochore: whitespace
Jan Lehnardt [Sun, 16 Jul 2017 15:44:51 +0000 (17:44 +0200)] 
chore: whitespace

18 months agofix typo/compilation error
Jan Lehnardt [Sun, 16 Jul 2017 15:24:55 +0000 (17:24 +0200)] 
fix typo/compilation error

18 months agoaddress comments from rnewson
Joan Touzet [Tue, 11 Jul 2017 23:04:46 +0000 (16:04 -0700)] 
address comments from rnewson

18 months agoAdd new enable_single_node action for cluster_setup endpoint
Joan Touzet [Mon, 10 Jul 2017 23:31:17 +0000 (16:31 -0700)] 
Add new enable_single_node action for cluster_setup endpoint

18 months agoAdd support for new ensure_dbs_exist option to GET, POST/finish_cluster
Joan Touzet [Mon, 10 Jul 2017 20:52:45 +0000 (13:52 -0700)] 
Add support for new ensure_dbs_exist option to GET, POST/finish_cluster

Addresses apache/couchdb:593

19 months agoMerge remote-tracking branch 'asf/salt-distribution'
Jan Lehnardt [Sat, 3 Jun 2017 09:48:56 +0000 (11:48 +0200)] 
Merge remote-tracking branch 'asf/salt-distribution'

* asf/salt-distribution:
  fix cluster setup: use same admin pq salt on all nodes

19 months agoMerge remote-tracking branch 'adrienverge/COUCHDB-3119'
Jan Lehnardt [Sat, 3 Jun 2017 09:46:34 +0000 (11:46 +0200)] 
Merge remote-tracking branch 'adrienverge/COUCHDB-3119'

* adrienverge/COUCHDB-3119:
  add_node: Don't fail if node name != "couchdb" or "node1"

19 months agoFixed some minor errors in the documentation.
Guillaume Belrose [Tue, 19 Jan 2016 07:19:45 +0000 (09:19 +0200)] 
Fixed some minor errors in the documentation.

19 months agoMerge remote-tracking branch 'robertkowalski/2594-2598-number-of-nodes'
Jan Lehnardt [Sat, 3 Jun 2017 09:38:30 +0000 (11:38 +0200)] 
Merge remote-tracking branch 'robertkowalski/2594-2598-number-of-nodes'

* robertkowalski/2594-2598-number-of-nodes:
  fix wording
  use config:setineger/3
  require nodecount on setup

19 months agofix cluster setup: use same admin pq salt on all nodes salt-distribution 12/head
Jan Lehnardt [Sat, 20 May 2017 12:56:00 +0000 (14:56 +0200)] 
fix cluster setup: use same admin pq salt on all nodes

2 years agofeat: cassim is off for now
Jan Lehnardt [Thu, 15 Sep 2016 08:13:11 +0000 (10:13 +0200)] 
feat: cassim is off for now

2 years agoadd_node: Don't fail if node name != "couchdb" or "node1" 11/head
Adrien VergĂ© [Thu, 1 Sep 2016 20:31:57 +0000 (22:31 +0200)] 
add_node: Don't fail if node name != "couchdb" or "node1"

Adding nodes to a cluster fails if the node names (the `name` of
`name@hostname` in vm.args) is different from "couchdb".
The code currently infers this name from the port: "node1" if 15984,
"node2" if 25984, "node3" if 35984, "couchdb" otherwise. No other
possibility.

This is not suited for a production set-up, where multiple servers could
have different names.

This patch fixes this problem by adding an optional "name" option to the
"add_node" command:

  POST /_cluster_setup
  {
    "action": "add_node",
    "username": "root",
    "password": "******",
    "host": "production-server.com",
    "port": 5984,
    "name": "node5"
  }

This fixes: COUCHDB-3119

3 years agoReturn HTTP 405 for unsupported request method 9/head
Alexander Shorin [Mon, 12 Oct 2015 15:10:41 +0000 (18:10 +0300)] 
Return HTTP 405 for unsupported request method

3 years agoReturn HTTP 200 on GET
Alexander Shorin [Mon, 12 Oct 2015 15:09:29 +0000 (18:09 +0300)] 
Return HTTP 200 on GET

3 years agoPass supervisor's children to couch_epi 8/head
ILYA Khlopotov [Tue, 29 Sep 2015 20:05:41 +0000 (13:05 -0700)] 
Pass supervisor's children to couch_epi

3 years agoUpdate to new couch_epi API
ILYA Khlopotov [Mon, 28 Sep 2015 17:30:26 +0000 (10:30 -0700)] 
Update to new couch_epi API

3 years agofix enable_cluster_http for admin-party clusters
Robert Kowalski [Wed, 16 Sep 2015 13:05:39 +0000 (15:05 +0200)] 
fix enable_cluster_http for admin-party clusters

PR: #7
PR-URL: https://github.com/apache/couchdb-setup/pull/7
Reviewed-By: Robert Newson <rnewson@apache.org>
3 years agoconfigure the right http interface
Robert Newson [Mon, 14 Sep 2015 11:39:49 +0000 (12:39 +0100)] 
configure the right http interface

3 years agofix wording 4/head
Robert Kowalski [Fri, 24 Jul 2015 16:46:49 +0000 (18:46 +0200)] 
fix wording

3 years agouse config:setineger/3
Robert Kowalski [Fri, 24 Jul 2015 14:10:41 +0000 (16:10 +0200)] 
use config:setineger/3

3 years agorequire nodecount on setup
Robert Kowalski [Fri, 24 Jul 2015 13:38:46 +0000 (15:38 +0200)] 
require nodecount on setup

when setting up a node, require the nodecount from the user. when
setting up a cluster, they will probably know it, if not the ui
other interfaces can count it easily for them. this will remove
the warning for a non matching nodecount for the user, and it
is easy to implement in uis and cli clients (e.g. a wizard for
fauxton or cli client like nmo).

once clusterwide setup lands this gets obviously superfluous.

COUCHDB-2598

This closes COUCHDB-2594

3 years agoadd catch-all clause for url_handler
Robert Newson [Tue, 21 Jul 2015 13:23:30 +0000 (14:23 +0100)] 
add catch-all clause for url_handler

3 years agoUse dynamic handlers
Robert Newson [Tue, 21 Jul 2015 13:15:23 +0000 (14:15 +0100)] 
Use dynamic handlers

3 years agouse couch_log instead of io:format
Robert Kowalski [Tue, 23 Jun 2015 09:42:12 +0000 (11:42 +0200)] 
use couch_log instead of io:format

PR: #2
PR-URL: https://github.com/apache/couchdb-setup/pull/2
Reviewed-By: Jan Lehnardt <jan@apache.org>
Reviewed-By: Alexander Shorin <kxepal@apache.org>
3 years agowhitespace fix
Robert Kowalski [Tue, 26 May 2015 00:41:54 +0000 (02:41 +0200)] 
whitespace fix

PR: #2
PR-URL: https://github.com/apache/couchdb-setup/pull/2
Reviewed-By: Jan Lehnardt <jan@apache.org>
Reviewed-By: Alexander Shorin <kxepal@apache.org>
3 years agocluster_enable: add remote_node feature
Robert Kowalski [Tue, 26 May 2015 00:33:50 +0000 (02:33 +0200)] 
cluster_enable: add remote_node feature

this feature makes it easier to setup a cluster for browser
applications like fauxton as browsers follow the same-origin
policy. Before this PR you had to open the wizard in Fauxton on
all three nodes and enter your data there, which was quite
confusing and hard to explain. Now you can stay in the same tab
at the same address.

This PR enables three new params in the body:

`remote_node`:

ip of the remote node where we want to send the `enable_cluster`
request

`remote_current_user`:

the current admin username of the remote node

`remote_current_password`:

the current admin password of the remote node

To test, I run:

```
rm -rf dev/lib/ && ./dev/run --no-join --admin=a:b
```

and then run the test script:

```
./src/setup/test/t-frontend-setup.sh
```

COUCHDB-2598

PR: #2
PR-URL: https://github.com/apache/couchdb-setup/pull/2
Reviewed-By: Jan Lehnardt <jan@apache.org>
Reviewed-By: Alexander Shorin <kxepal@apache.org>
3 years agoCreate _global_changes database on cluster setup
Alexander Shorin [Sat, 18 Apr 2015 19:41:39 +0000 (22:41 +0300)] 
Create _global_changes database on cluster setup

3 years agofix tests
Robert Kowalski [Sun, 5 Apr 2015 00:34:18 +0000 (02:34 +0200)] 
fix tests

3 years agoUse _nodes db
Alexander Shorin [Sat, 4 Apr 2015 19:52:15 +0000 (22:52 +0300)] 
Use _nodes db

3 years agoRename cassim db to _metadata
Alexander Shorin [Thu, 26 Feb 2015 19:29:43 +0000 (22:29 +0300)] 
Rename cassim db to _metadata

This closes #1

COUCHDB-2619
COUCHDB-2620

4 years agoFix LICENSE indention
Alexander Shorin [Mon, 22 Dec 2014 15:12:46 +0000 (18:12 +0300)] 
Fix LICENSE indention

4 years agoRemove error-handling clause
Robert Newson [Tue, 25 Nov 2014 11:55:35 +0000 (11:55 +0000)] 
Remove error-handling clause

The error tuple returned is not tested by the caller so it serves only
to crash the binary comprehension in an obscure way.

4 years agoR14 compatibility
Robert Newson [Tue, 25 Nov 2014 11:54:28 +0000 (11:54 +0000)] 
R14 compatibility

4 years agoshow cluster finished state
Jan Lehnardt [Sat, 15 Nov 2014 19:25:44 +0000 (20:25 +0100)] 
show cluster finished state

4 years agohandle GET cluster state
Jan Lehnardt [Fri, 14 Nov 2014 11:19:25 +0000 (12:19 +0100)] 
handle GET cluster state

4 years agohash admin passwords, more resilient port parsing
Jan Lehnardt [Thu, 13 Nov 2014 17:19:10 +0000 (18:19 +0100)] 
hash admin passwords, more resilient port parsing

4 years agoadd testing instructions to readme
Jan Lehnardt [Fri, 7 Nov 2014 16:58:41 +0000 (17:58 +0100)] 
add testing instructions to readme

4 years agoadd license header
Jan Lehnardt [Fri, 7 Nov 2014 14:44:58 +0000 (15:44 +0100)] 
add license header

4 years agos/_cassim/cassim/ for the time being
Jan Lehnardt [Fri, 7 Nov 2014 14:43:04 +0000 (15:43 +0100)] 
s/_cassim/cassim/ for the time being

4 years agoadd some more testing
Jan Lehnardt [Fri, 7 Nov 2014 14:35:06 +0000 (15:35 +0100)] 
add some more testing

4 years agoadd finish cluster routine
Jan Lehnardt [Fri, 7 Nov 2014 14:34:54 +0000 (15:34 +0100)] 
add finish cluster routine

4 years agoadd simple test script
Jan Lehnardt [Fri, 7 Nov 2014 14:01:52 +0000 (15:01 +0100)] 
add simple test script

4 years agowip: full receive feature, setup now works yay
Jan Lehnardt [Fri, 7 Nov 2014 14:01:29 +0000 (15:01 +0100)] 
wip: full receive feature, setup now works yay

4 years agowip: implement setup handling
Jan Lehnardt [Thu, 6 Nov 2014 16:33:43 +0000 (17:33 +0100)] 
wip: implement setup handling

4 years agomroe formatting
Jan Lehnardt [Fri, 31 Oct 2014 16:54:29 +0000 (17:54 +0100)] 
mroe formatting

4 years agoformatting & clarification
Jan Lehnardt [Fri, 31 Oct 2014 16:54:06 +0000 (17:54 +0100)] 
formatting & clarification

4 years agoformatting
Jan Lehnardt [Fri, 31 Oct 2014 16:52:53 +0000 (17:52 +0100)] 
formatting

4 years agoremove leftover
Jan Lehnardt [Fri, 31 Oct 2014 16:48:12 +0000 (17:48 +0100)] 
remove leftover

4 years agoadd license
Jan Lehnardt [Fri, 31 Oct 2014 16:48:02 +0000 (17:48 +0100)] 
add license

4 years agoadd action hints
Jan Lehnardt [Fri, 31 Oct 2014 16:47:48 +0000 (17:47 +0100)] 
add action hints

4 years agohack for storing erlang cookie value on new nodes
Jan Lehnardt [Fri, 31 Oct 2014 16:38:44 +0000 (17:38 +0100)] 
hack for storing erlang cookie value on new nodes

4 years agoadd delete_node API
Jan Lehnardt [Fri, 31 Oct 2014 16:36:21 +0000 (17:36 +0100)] 
add delete_node API

4 years agoadd note about skipping a step if the node is already setup
Jan Lehnardt [Fri, 31 Oct 2014 16:22:06 +0000 (17:22 +0100)] 
add note about skipping a step if the node is already setup

4 years agoadd the plan to readme
Jan Lehnardt [Fri, 31 Oct 2014 16:14:43 +0000 (17:14 +0100)] 
add the plan to readme

4 years agoadd Apache License stanza everywhere
Jan Lehnardt [Fri, 31 Oct 2014 16:06:43 +0000 (17:06 +0100)] 
add Apache License stanza everywhere

4 years agoadd basic action handling
Jan Lehnardt [Fri, 31 Oct 2014 16:06:08 +0000 (17:06 +0100)] 
add basic action handling

4 years agoadd http stub
Jan Lehnardt [Fri, 31 Oct 2014 14:54:25 +0000 (15:54 +0100)] 
add http stub

4 years agoadd ignore
Jan Lehnardt [Fri, 31 Oct 2014 14:41:59 +0000 (15:41 +0100)] 
add ignore

4 years agoadd bootstrap
Jan Lehnardt [Fri, 31 Oct 2014 14:41:27 +0000 (15:41 +0100)] 
add bootstrap

4 years agomake it so
Jan Lehnardt [Fri, 31 Oct 2014 14:37:29 +0000 (15:37 +0100)] 
make it so