summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/samples/store-cluster
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--sca-cpp/trunk/samples/store-cluster/Makefile.am2
-rw-r--r--sca-cpp/trunk/samples/store-cluster/domains/jane/store.composite39
-rw-r--r--sca-cpp/trunk/samples/store-cluster/domains/joe/store.composite39
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/proxy-ssl-conf5
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/server-conf4
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/server-ssl-conf5
-rw-r--r--sca-cpp/trunk/samples/store-cluster/shared/shared.composite62
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/stop11
8 files changed, 86 insertions, 81 deletions
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 @@
<service name="Total">
<t:binding.jsonrpc uri="total"/>
</service>
- <reference name="cache" target="Cache"/>
+ <reference name="cache" target="http://sca-store.com/cache"/>
</component>
<component name="CurrencyConverter">
@@ -61,41 +61,4 @@
</service>
</component>
- <component name="Cache">
- <implementation.cpp path="../../../../components/cache" library="libfrontcache"/>
- <service name="Cache">
- <t:binding.atom uri="cache"/>
- </service>
- <reference name="l1reader" target="Memcache"/>
- <reference name="l1writer" target="Memcache"/>
- <reference name="l2reader" target="Standbydb"/>
- <reference name="l2writer" target="Masterdb"/>
- </component>
-
- <component name="Memcache">
- <implementation.cpp path="../../../../components/cache" library="libmemcache"/>
- <service name="Memcache">
- <t:binding.atom uri="memcache"/>
- </service>
- <property name="servers">localhost:11211,localhost:11212,localhost:11213</property>
- </component>
-
- <component name="Masterdb">
- <implementation.cpp path="../../../../components/sqldb" library="libsqldb"/>
- <property name="conninfo">host=localhost port=5432 dbname=db</property>
- <property name="table">store</property>
- <service name="Masterdb">
- <t:binding.atom uri="masterdb"/>
- </service>
- </component>
-
- <component name="Standbydb">
- <implementation.cpp path="../../../../components/sqldb" library="libsqldb"/>
- <property name="conninfo">host=localhost port=5433 dbname=db</property>
- <property name="table">store</property>
- <service name="Standbydb">
- <t:binding.atom uri="standbydb"/>
- </service>
- </component>
-
</composite>
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 @@
<service name="Total">
<t:binding.jsonrpc uri="total"/>
</service>
- <reference name="cache" target="Cache"/>
+ <reference name="cache" target="http://sca-store.com/cache"/>
</component>
<component name="CurrencyConverter">
@@ -61,41 +61,4 @@
</service>
</component>
- <component name="Cache">
- <implementation.cpp path="../../../../components/cache" library="libfrontcache"/>
- <service name="Cache">
- <t:binding.atom uri="cache"/>
- </service>
- <reference name="l1reader" target="Memcache"/>
- <reference name="l1writer" target="Memcache"/>
- <reference name="l2reader" target="Standbydb"/>
- <reference name="l2writer" target="Masterdb"/>
- </component>
-
- <component name="Memcache">
- <implementation.cpp path="../../../../components/cache" library="libmemcache"/>
- <service name="Memcache">
- <t:binding.atom uri="memcache"/>
- </service>
- <property name="servers">localhost:11211,localhost:11212,localhost:11213</property>
- </component>
-
- <component name="Masterdb">
- <implementation.cpp path="../../../../components/sqldb" library="libsqldb"/>
- <property name="conninfo">host=localhost port=5432 dbname=db</property>
- <property name="table">store</property>
- <service name="Masterdb">
- <t:binding.atom uri="masterdb"/>
- </service>
- </component>
-
- <component name="Standbydb">
- <implementation.cpp path="../../../../components/sqldb" library="libsqldb"/>
- <property name="conninfo">host=localhost port=5434 dbname=db</property>
- <property name="table">store</property>
- <service name="Standbydb">
- <t:binding.atom uri="standbydb"/>
- </service>
- </component>
-
</composite>
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 <<EOF
+# Configure SCA Composite
+SCAContribution `pwd`/shared/
+SCAComposite shared.composite
+
# Configure SCA Composite for mass dynamic virtual hosting
SCAVirtualContribution `pwd`/domains/
SCAVirtualComposite store.composite
diff --git a/sca-cpp/trunk/samples/store-cluster/server-ssl-conf b/sca-cpp/trunk/samples/store-cluster/server-ssl-conf
index 39fe830f19..13d0caa253 100755
--- a/sca-cpp/trunk/samples/store-cluster/server-ssl-conf
+++ b/sca-cpp/trunk/samples/store-cluster/server-ssl-conf
@@ -27,11 +27,16 @@ sslport=$3
tar -C tmp/ssl -c `../../modules/http/ssl-cert-find tmp/ssl` | tar -C $root -x
../../modules/http/httpd-ssl-conf $root $sslport/443
../../modules/http/vhost-ssl-conf $root
+#../../modules/http/httpd-auth-conf $root
../../modules/openid/openid-conf $root
../../modules/openid/openid-step2-conf $root
../../modules/server/server-conf $root
../../modules/python/python-conf $root
cat >>$root/conf/httpd.conf <<EOF
+# Configure SCA Composite
+SCAContribution `pwd`/shared/
+SCAComposite shared.composite
+
# Configure SCA Composite for mass dynamic virtual hosting
SCAVirtualContribution `pwd`/domains/
SCAVirtualComposite store.composite
diff --git a/sca-cpp/trunk/samples/store-cluster/shared/shared.composite b/sca-cpp/trunk/samples/store-cluster/shared/shared.composite
new file mode 100644
index 0000000000..714668af3a
--- /dev/null
+++ b/sca-cpp/trunk/samples/store-cluster/shared/shared.composite
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:t="http://tuscany.apache.org/xmlns/sca/1.1"
+ targetNamespace="http://shared"
+ name="shared">
+
+ <component name="Cache">
+ <implementation.cpp path="../../../components/cache" library="libfrontcache"/>
+ <service name="Cache">
+ <t:binding.atom uri="cache"/>
+ </service>
+ <reference name="l1reader" target="Memcache"/>
+ <reference name="l1writer" target="Memcache"/>
+ <reference name="l2reader" target="Standbydb"/>
+ <reference name="l2writer" target="Masterdb"/>
+ </component>
+
+ <component name="Memcache">
+ <implementation.cpp path="../../../components/cache" library="libmemcache"/>
+ <service name="Memcache">
+ <t:binding.atom uri="memcache"/>
+ </service>
+ <property name="servers">localhost:11211,localhost:11212,localhost:11213</property>
+ </component>
+
+ <component name="Masterdb">
+ <implementation.cpp path="../../../components/sqldb" library="libsqldb"/>
+ <property name="conninfo">host=localhost port=5432 dbname=db</property>
+ <property name="table">store</property>
+ <service name="Masterdb">
+ <t:binding.atom uri="masterdb"/>
+ </service>
+ </component>
+
+ <component name="Standbydb">
+ <implementation.cpp path="../../../components/sqldb" library="libsqldb"/>
+ <property name="conninfo">host=localhost port=5433 dbname=db</property>
+ <property name="table">store</property>
+ <service name="Standbydb">
+ <t:binding.atom uri="standbydb"/>
+ </service>
+ </component>
+
+</composite>
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