From b70da6b982209e43079708df1da43ae4054f3d80 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Sun, 22 Aug 2010 05:02:05 +0000 Subject: Refactor store-cluster sample components to allow vhosts to share common cache and database components. Minor fixes to config scripts and wiring code to get that combination working. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@987844 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/trunk/samples/store-cluster/Makefile.am | 2 +- .../store-cluster/domains/jane/store.composite | 39 +------------- .../store-cluster/domains/joe/store.composite | 39 +------------- sca-cpp/trunk/samples/store-cluster/proxy-ssl-conf | 5 ++ sca-cpp/trunk/samples/store-cluster/server-conf | 4 ++ .../trunk/samples/store-cluster/server-ssl-conf | 5 ++ .../samples/store-cluster/shared/shared.composite | 62 ++++++++++++++++++++++ sca-cpp/trunk/samples/store-cluster/stop | 11 ++-- 8 files changed, 86 insertions(+), 81 deletions(-) create mode 100644 sca-cpp/trunk/samples/store-cluster/shared/shared.composite (limited to 'sca-cpp/trunk/samples/store-cluster') diff --git a/sca-cpp/trunk/samples/store-cluster/Makefile.am b/sca-cpp/trunk/samples/store-cluster/Makefile.am index 2f18d95983..f5e8c988eb 100644 --- a/sca-cpp/trunk/samples/store-cluster/Makefile.am +++ b/sca-cpp/trunk/samples/store-cluster/Makefile.am @@ -24,7 +24,7 @@ if WANT_QUEUE dist_sample_SCRIPTS = start stop ssl-start ssl-stop proxy-conf proxy-ssl-conf server-conf server-ssl-conf tunnel-ssl-conf sqldb-master-conf sqldb-standby-conf sampledir = $(prefix)/samples/store-cluster -nobase_dist_sample_DATA = htdocs/*.html htdocs/domains/*/*.html domains/*/*.py domains/*/*.composite +nobase_dist_sample_DATA = htdocs/*.html htdocs/domains/*/*.html domains/*/*.py domains/*/*.composite shared/*.composite dist_noinst_SCRIPTS = server-test #TESTS = server-test diff --git a/sca-cpp/trunk/samples/store-cluster/domains/jane/store.composite b/sca-cpp/trunk/samples/store-cluster/domains/jane/store.composite index 85d6aa3a9b..eeb5387588 100644 --- a/sca-cpp/trunk/samples/store-cluster/domains/jane/store.composite +++ b/sca-cpp/trunk/samples/store-cluster/domains/jane/store.composite @@ -51,7 +51,7 @@ - + @@ -61,41 +61,4 @@ - - - - - - - - - - - - - - - - - localhost:11211,localhost:11212,localhost:11213 - - - - - host=localhost port=5432 dbname=db - store - - - - - - - - host=localhost port=5433 dbname=db - store - - - - - diff --git a/sca-cpp/trunk/samples/store-cluster/domains/joe/store.composite b/sca-cpp/trunk/samples/store-cluster/domains/joe/store.composite index ca7815d573..eeb5387588 100644 --- a/sca-cpp/trunk/samples/store-cluster/domains/joe/store.composite +++ b/sca-cpp/trunk/samples/store-cluster/domains/joe/store.composite @@ -51,7 +51,7 @@ - + @@ -61,41 +61,4 @@ - - - - - - - - - - - - - - - - - localhost:11211,localhost:11212,localhost:11213 - - - - - host=localhost port=5432 dbname=db - store - - - - - - - - host=localhost port=5434 dbname=db - store - - - - - diff --git a/sca-cpp/trunk/samples/store-cluster/proxy-ssl-conf b/sca-cpp/trunk/samples/store-cluster/proxy-ssl-conf index cddadc95f4..d2a12e3ca0 100755 --- a/sca-cpp/trunk/samples/store-cluster/proxy-ssl-conf +++ b/sca-cpp/trunk/samples/store-cluster/proxy-ssl-conf @@ -30,3 +30,8 @@ tar -C tmp/ssl -c `../../modules/http/ssl-cert-find tmp/ssl` | tar -C $root -x ../../modules/http/vhost-ssl-conf $root ../../modules/http/proxy-ssl-conf $root +# Aggregate proxy balancer logs +category=`basename $root` +../../components/log/scribe-tail-start $category $root/logs/error_log +../../components/log/scribe-tail-start $category $root/logs/access_log + diff --git a/sca-cpp/trunk/samples/store-cluster/server-conf b/sca-cpp/trunk/samples/store-cluster/server-conf index 66b9639eeb..a2aa7dbad9 100755 --- a/sca-cpp/trunk/samples/store-cluster/server-conf +++ b/sca-cpp/trunk/samples/store-cluster/server-conf @@ -26,6 +26,10 @@ port=$2 ../../modules/server/server-conf $root ../../modules/python/python-conf $root cat >>$root/conf/httpd.conf <>$root/conf/httpd.conf < + + + + + + + + + + + + + + + + + + + + localhost:11211,localhost:11212,localhost:11213 + + + + + host=localhost port=5432 dbname=db + store + + + + + + + + host=localhost port=5433 dbname=db + store + + + + + + diff --git a/sca-cpp/trunk/samples/store-cluster/stop b/sca-cpp/trunk/samples/store-cluster/stop index 4a6de4ffd7..b2fa11b7c4 100755 --- a/sca-cpp/trunk/samples/store-cluster/stop +++ b/sca-cpp/trunk/samples/store-cluster/stop @@ -19,10 +19,6 @@ set -x -../../components/sqldb/pgsql-stop tmp/server2 -../../components/sqldb/pgsql-stop tmp/server3 -../../components/sqldb/pgsql-stop tmp/server1 - ../../modules/http/httpd-stop tmp/server1 ../../modules/http/httpd-stop tmp/server2 ../../modules/http/httpd-stop tmp/server3 @@ -34,6 +30,13 @@ set -x ../../components/cache/memcached-stop 11212 ../../components/cache/memcached-stop 11213 +../../components/sqldb/pgsql-stop tmp/sqldb3 +../../modules/http/httpd-stop tmp/sqldb3 +../../components/sqldb/pgsql-stop tmp/sqldb2 +../../modules/http/httpd-stop tmp/sqldb2 +../../components/sqldb/pgsql-stop tmp/sqldb1 +../../modules/http/httpd-stop tmp/sqldb1 + ../../components/log/scribed-client-stop tmp/monitor ../../components/log/scribed-central-stop tmp/monitor ../../components/log/scribe-tail-stop tmp -- cgit v1.2.3