summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/samples/store-cluster
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/proxy-conf1
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/proxy-ssl-conf5
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/server-ssl-conf6
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/server-test7
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/ssl-start42
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/start12
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/tunnel-ssl-conf6
7 files changed, 42 insertions, 37 deletions
diff --git a/sca-cpp/trunk/samples/store-cluster/proxy-conf b/sca-cpp/trunk/samples/store-cluster/proxy-conf
index 5a61f13399..b60e7ba7f9 100755
--- a/sca-cpp/trunk/samples/store-cluster/proxy-conf
+++ b/sca-cpp/trunk/samples/store-cluster/proxy-conf
@@ -26,6 +26,7 @@ set -x
../../modules/http/httpd-conf $root sca-store.com $port/80 $root/htdocs
../../modules/http/vhost-conf $root
../../modules/http/proxy-conf $root
+../../modules/http/httpd-event-conf $root
# Aggregate proxy balancer logs
category=`basename $root`
diff --git a/sca-cpp/trunk/samples/store-cluster/proxy-ssl-conf b/sca-cpp/trunk/samples/store-cluster/proxy-ssl-conf
index 3379a3c789..fc329f0d18 100755
--- a/sca-cpp/trunk/samples/store-cluster/proxy-ssl-conf
+++ b/sca-cpp/trunk/samples/store-cluster/proxy-ssl-conf
@@ -24,11 +24,12 @@ sslport=$3
set -x
# Configure an SSL-enabled proxy balancer
-../../modules/http/httpd-conf $root sca-store.com $port/80 $root/htdocs
+../../modules/http/httpd-conf $root sca-store.com $port $root/htdocs
../../modules/http/vhost-conf $root
../../modules/http/proxy-conf $root
+../../modules/http/httpd-event-conf $root
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/httpd-ssl-conf $root $sslport
../../modules/http/vhost-ssl-conf $root
../../modules/http/proxy-ssl-conf $root
diff --git a/sca-cpp/trunk/samples/store-cluster/server-ssl-conf b/sca-cpp/trunk/samples/store-cluster/server-ssl-conf
index 8799fbdf6d..70662daab2 100755
--- a/sca-cpp/trunk/samples/store-cluster/server-ssl-conf
+++ b/sca-cpp/trunk/samples/store-cluster/server-ssl-conf
@@ -24,14 +24,13 @@ sslport=$3
set -x
# Configure an SSL-enabled app server
-../../modules/http/httpd-conf $root sca-store.com $port/80 htdocs
+../../modules/http/httpd-conf $root sca-store.com $port htdocs
../../modules/http/vhost-conf $root
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/httpd-ssl-conf $root $sslport
../../modules/http/vhost-ssl-conf $root
-#../../modules/http/basic-auth-conf $root
../../modules/oauth/oauth-conf $root
../../modules/oauth/oauth-memcached-conf $root localhost 11211
../../modules/oauth/oauth-memcached-conf $root localhost 11212
@@ -41,6 +40,7 @@ tar -C tmp/ssl -c `../../modules/http/ssl-cert-find tmp/ssl` | tar -C $root -x
../../modules/openid/openid-memcached-conf $root localhost 11211
../../modules/openid/openid-memcached-conf $root localhost 11212
../../modules/openid/openid-memcached-conf $root localhost 11213
+../../modules/http/open-auth-conf $root
../../modules/server/server-conf $root
../../modules/python/python-conf $root
diff --git a/sca-cpp/trunk/samples/store-cluster/server-test b/sca-cpp/trunk/samples/store-cluster/server-test
index 7f6ff4ead6..68856f530e 100755
--- a/sca-cpp/trunk/samples/store-cluster/server-test
+++ b/sca-cpp/trunk/samples/store-cluster/server-test
@@ -17,6 +17,9 @@
# specific language governing permissions and limitations
# under the License.
+# For this test to work, add the test domain to your etc/hosts as follows:
+# 127.0.0.1 sca-store.com joe.sca-store.com joe.sca-store.com
+
echo "Testing..."
here=`readlink -f $0`; here=`dirname $here`
curl_prefix=`cat $here/../../modules/http/curl.prefix`
@@ -25,10 +28,6 @@ curl_prefix=`cat $here/../../modules/http/curl.prefix`
./start
sleep 2
-# For this test to work, add the test domain to your etc/hosts as follows:
-# 127.0.0.1 sca-store.com joe.sca-store.com joe.sca-store.com
-# then run ../../ubuntu/ip-redirect-all 80 8091
-
# Test HTTP GET
$curl_prefix/bin/curl http://joe.sca-store.com/ 2>/dev/null >tmp/index.html
diff tmp/index.html htdocs/domains/joe/index.html
diff --git a/sca-cpp/trunk/samples/store-cluster/ssl-start b/sca-cpp/trunk/samples/store-cluster/ssl-start
index 13a462bd49..f80bb075d6 100755
--- a/sca-cpp/trunk/samples/store-cluster/ssl-start
+++ b/sca-cpp/trunk/samples/store-cluster/ssl-start
@@ -19,15 +19,29 @@
set -x
+# Redirect traffic from ports 80, 443 and 444 to proxy1
+sudo ../../ubuntu/ip-redirect-all 80 8090
+sudo ../../ubuntu/ip-redirect-all 443 8091
+sudo ../../ubuntu/ip-redirect-all 444 8092
+
+# Redirect traffic from ports 80, 443 and 444 to proxy2
+#sudo ../../ubuntu/ip-redirect-all 80 8093
+#sudo ../../ubuntu/ip-redirect-all 443 8094
+#sudo ../../ubuntu/ip-redirect-all 444 8095
+
+# Redirect traffic from ports 119 and 563 to tunnel
+sudo ../../ubuntu/ip-redirect-all 119 8119
+sudo ../../ubuntu/ip-redirect-all 563 8563
+
# Generate SSL certificates
../../modules/http/ssl-ca-conf tmp/ssl sca-store.com
-../../modules/http/ssl-cert-conf tmp/ssl sca-store.com server
+../../modules/http/ssl-cert-conf tmp/ssl localhost server
../../modules/http/ssl-cert-conf tmp/ssl *.sca-store.com vhost
../../modules/http/ssl-cert-conf tmp/ssl sca-store.com proxy
-../../modules/http/ssl-cert-conf tmp/ssl sca-store.com tunnel
+../../modules/http/ssl-cert-conf tmp/ssl localhost tunnel
# Start an SSL tunnel
-./tunnel-ssl-conf tmp/tunnel 8119 8563
+./tunnel-ssl-conf tmp/tunnel 8119/119 8563/563
../../modules/http/httpd-start tmp/tunnel
sleep 1
@@ -74,20 +88,20 @@ sleep 1
../../modules/http/httpd-start tmp/sqldb3
# Start three app servers
-./server-ssl-conf tmp/server1 8101 8441
+./server-ssl-conf tmp/server1 8101/80 8441/443
../../modules/http/httpd-start tmp/server1
sleep 1
-./server-ssl-conf tmp/server2 8102 8442
+./server-ssl-conf tmp/server2 8102/80 8442/443
../../modules/http/httpd-start tmp/server2
sleep 1
-./server-ssl-conf tmp/server3 8103 8443
+./server-ssl-conf tmp/server3 8103/80 8443/443
../../modules/http/httpd-start tmp/server3
sleep 1
# Start two proxy balancers
-./proxy-ssl-conf tmp/proxy1 8091 8093
+./proxy-ssl-conf tmp/proxy1 8090/80 8091/443
../../modules/http/proxy-member-conf tmp/proxy1 localhost 8101
../../modules/http/proxy-ssl-member-conf tmp/proxy1 localhost 8441
../../modules/http/proxy-member-conf tmp/proxy1 localhost 8102
@@ -96,7 +110,7 @@ sleep 1
../../modules/http/proxy-ssl-member-conf tmp/proxy1 localhost 8443
../../modules/http/httpd-start tmp/proxy1
-./proxy-ssl-conf tmp/proxy2 8092 8094
+./proxy-ssl-conf tmp/proxy2 8093/80 8094/443
../../modules/http/proxy-member-conf tmp/proxy2 localhost 8101
../../modules/http/proxy-ssl-member-conf tmp/proxy2 localhost 8441
../../modules/http/proxy-member-conf tmp/proxy2 localhost 8102
@@ -105,15 +119,3 @@ sleep 1
../../modules/http/proxy-ssl-member-conf tmp/proxy2 localhost 8443
../../modules/http/httpd-start tmp/proxy2
-# Redirect traffic from ports 80 and 443 to proxy1
-#sudo ../../ubuntu/ip-redirect-all 80 8091
-#sudo ../../ubuntu/ip-redirect-all 443 8093
-
-# Redirect traffic from ports 80 and 443 to proxy2
-#sudo ../../ubuntu/ip-redirect-all 80 8092
-#sudo ../../ubuntu/ip-redirect-all 443 8094
-
-# Redirect traffic from ports 119 and 563 to tunnel
-#sudo ../../ubuntu/ip-redirect-all 119 8119
-#sudo ../../ubuntu/ip-redirect-all 563 8563
-
diff --git a/sca-cpp/trunk/samples/store-cluster/start b/sca-cpp/trunk/samples/store-cluster/start
index 98293d3f98..67434d6a0e 100755
--- a/sca-cpp/trunk/samples/store-cluster/start
+++ b/sca-cpp/trunk/samples/store-cluster/start
@@ -19,6 +19,12 @@
set -x
+# Redirect traffic from port 80 to proxy1
+sudo ../../ubuntu/ip-redirect-all 80 8090
+
+# Redirect traffic from port 80 to proxy2
+#sudo ../../ubuntu/ip-redirect-all 80 8091
+
# Start scribe logging
../../components/log/scribed-central-conf tmp/monitor
../../components/log/scribed-client-conf tmp/monitor localhost
@@ -71,9 +77,3 @@ sleep 1
../../modules/http/proxy-member-conf tmp/proxy2 localhost 8103
../../modules/http/httpd-start tmp/proxy2
-# Redirect traffic from port 80 to proxy1
-#sudo ../../ubuntu/ip-redirect-all 80 8090
-
-# Redirect traffic from port 80 to proxy2
-#sudo ../../ubuntu/ip-redirect-all 80 8091
-
diff --git a/sca-cpp/trunk/samples/store-cluster/tunnel-ssl-conf b/sca-cpp/trunk/samples/store-cluster/tunnel-ssl-conf
index ef3074691a..7a9a8ad305 100755
--- a/sca-cpp/trunk/samples/store-cluster/tunnel-ssl-conf
+++ b/sca-cpp/trunk/samples/store-cluster/tunnel-ssl-conf
@@ -24,7 +24,9 @@ sslport=$3
set -x
# Configure an SSL-enabled tunnel server
-../../modules/http/httpd-conf $root sca-store.com $port/119 $root/htdocs
+../../modules/http/httpd-conf $root sca-store.com $port $root/htdocs
+../../modules/http/httpd-event-conf $root
tar -C tmp/ssl -c `../../modules/http/ssl-cert-find tmp/ssl` | tar -C $root -x
-../../modules/http/httpd-ssl-conf $root $sslport/563
+../../modules/http/httpd-ssl-conf $root $sslport
+../../modules/http/cert-auth-conf $root