couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [23/27] couchdb commit: updated refs/heads/1843-feature-bigcouch to 465d1ad
Date Mon, 03 Feb 2014 13:00:02 GMT
Add dev cluster scripts and HAProxy config


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/5d7c38ee
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/5d7c38ee
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/5d7c38ee

Branch: refs/heads/1843-feature-bigcouch
Commit: 5d7c38ee6e9ba56f169d271eae085a57a91b6479
Parents: e3a0be4
Author: Russell Branca <chewbranca@gmail.com>
Authored: Mon Dec 23 14:34:07 2013 -0800
Committer: Robert Newson <rnewson@apache.org>
Committed: Mon Feb 3 12:54:10 2014 +0000

----------------------------------------------------------------------
 rel/boot_dev_cluster.sh | 27 +++++++++++++++++++++++++++
 rel/haproxy.cfg         | 33 +++++++++++++++++++++++++++++++++
 2 files changed, 60 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/5d7c38ee/rel/boot_dev_cluster.sh
----------------------------------------------------------------------
diff --git a/rel/boot_dev_cluster.sh b/rel/boot_dev_cluster.sh
new file mode 100755
index 0000000..4559141
--- /dev/null
+++ b/rel/boot_dev_cluster.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+# Make log directory
+mkdir -p ./rel/logs/
+
+# Start each node
+./rel/dev1/bin/couchdb > ./rel/logs/couchdb1.log 2>&1 &
+DB1_PID=$!
+
+./rel/dev2/bin/couchdb > ./rel/logs/couchdb2.log 2>&1 &
+DB2_PID=$!
+
+./rel/dev3/bin/couchdb > ./rel/logs/couchdb3.log 2>&1 &
+DB3_PID=$!
+
+/usr/local/sbin/haproxy -f rel/haproxy.cfg > ./rel/logs/haproxy.log 2>&1 &
+HP_PID=$!
+
+sleep 2
+
+# Connect the cluster
+curl localhost:15986/nodes/dev2@127.0.0.1 -X PUT -d '{}'
+curl localhost:15986/nodes/dev3@127.0.0.1 -X PUT -d '{}'
+
+trap "kill $DB1_PID $DB2_PID $DB3_PID $HP_PID" SIGINT SIGTERM SIGHUP
+
+wait

http://git-wip-us.apache.org/repos/asf/couchdb/blob/5d7c38ee/rel/haproxy.cfg
----------------------------------------------------------------------
diff --git a/rel/haproxy.cfg b/rel/haproxy.cfg
new file mode 100644
index 0000000..eb72363
--- /dev/null
+++ b/rel/haproxy.cfg
@@ -0,0 +1,33 @@
+global
+        maxconn 512
+        spread-checks 5
+
+defaults
+        mode http
+        log global
+        monitor-uri /_haproxy_health_check
+        option log-health-checks
+        option httplog
+        balance roundrobin
+        option forwardfor
+        option redispatch
+        retries 4
+        option http-server-close
+        timeout client 150000
+        timeout server 3600000
+        timeout connect 500
+
+        stats enable
+        stats scope .
+        stats uri /_stats
+
+frontend http-in
+         # This requires HAProxy 1.5.x
+         # bind *:$HAPROXY_PORT
+         bind *:5984
+         default_backend couchdbs
+
+backend couchdbs
+        server couchdb1 127.0.0.1:15984 check inter 5s
+        server couchdb2 127.0.0.1:25984 check inter 5s
+        server couchdb3 127.0.0.1:35984 check inter 5s


Mime
View raw message