summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-09-03 06:24:23 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2010-09-03 06:24:23 +0000
commit62d5e37461b84c52c6b40ea681bad90d375722b8 (patch)
tree3738af604b3012e22adfe7360f456156ced72ca7
parent21f05fa8f3880e033e664a005006d58616772869 (diff)
Configure mod-auth-openid to use memcached instead of sqlite. Remove dependencies on sqlite.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@992219 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--sca-cpp/trunk/components/cache/memcache.hpp4
-rw-r--r--sca-cpp/trunk/modules/openid/Makefile.am2
-rwxr-xr-xsca-cpp/trunk/modules/openid/openid-memcached-conf32
-rwxr-xr-xsca-cpp/trunk/modules/openid/start-test7
-rwxr-xr-xsca-cpp/trunk/modules/openid/stop-test2
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/proxy-conf2
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/proxy-ssl-conf2
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/server-conf2
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/server-ssl-conf8
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/sqldb-master-conf2
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/sqldb-standby-conf2
-rwxr-xr-xsca-cpp/trunk/samples/store-cluster/tunnel-ssl-conf2
-rwxr-xr-xsca-cpp/trunk/ubuntu/ubuntu-bin-all-image2
-rwxr-xr-xsca-cpp/trunk/ubuntu/ubuntu-install-all2
14 files changed, 65 insertions, 6 deletions
diff --git a/sca-cpp/trunk/components/cache/memcache.hpp b/sca-cpp/trunk/components/cache/memcache.hpp
index 1c71b220c7..a76af6b662 100644
--- a/sca-cpp/trunk/components/cache/memcache.hpp
+++ b/sca-cpp/trunk/components/cache/memcache.hpp
@@ -63,9 +63,7 @@ public:
addServers(servers);
}
- MemCached(const MemCached& c) : owner(false) {
- pool = c.pool;
- mc = c.mc;
+ MemCached(const MemCached& c) : owner(false), pool(c.pool), mc(c.mc) {
}
~MemCached() {
diff --git a/sca-cpp/trunk/modules/openid/Makefile.am b/sca-cpp/trunk/modules/openid/Makefile.am
index 158dd8902b..a613f2ef78 100644
--- a/sca-cpp/trunk/modules/openid/Makefile.am
+++ b/sca-cpp/trunk/modules/openid/Makefile.am
@@ -18,7 +18,7 @@
if WANT_OPENID
-dist_mod_SCRIPTS = openid-conf openid-step2-conf
+dist_mod_SCRIPTS = openid-conf openid-step2-conf openid-memcached-conf
moddir = $(prefix)/modules/openid
mod_DATA = openid.prefix
diff --git a/sca-cpp/trunk/modules/openid/openid-memcached-conf b/sca-cpp/trunk/modules/openid/openid-memcached-conf
new file mode 100755
index 0000000000..1dfbd3b502
--- /dev/null
+++ b/sca-cpp/trunk/modules/openid/openid-memcached-conf
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# 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.
+
+here=`readlink -f $0`; here=`dirname $here`
+mkdir -p $1
+root=`readlink -f $1`
+host=$2
+port=$3
+
+# Configure HTTPD mod_auth_openid module cache
+cat >>$root/conf/httpd.conf <<EOF
+# Generated by: openid-cache-conf $*
+AuthOpenIDMemcached $host:$port
+
+EOF
+
diff --git a/sca-cpp/trunk/modules/openid/start-test b/sca-cpp/trunk/modules/openid/start-test
index 67020cf701..55e7a13f26 100755
--- a/sca-cpp/trunk/modules/openid/start-test
+++ b/sca-cpp/trunk/modules/openid/start-test
@@ -18,12 +18,19 @@
# under the License.
# Setup
+../../components/cache/memcached-start 11212
+../../components/cache/memcached-start 11213
+
../../modules/http/ssl-ca-conf tmp localhost
../../modules/http/ssl-cert-conf tmp localhost
../../modules/http/httpd-conf tmp localhost 8090 htdocs
../../modules/http/httpd-ssl-conf tmp 8453
+
./openid-conf tmp
+./openid-memcached-conf tmp localhost 11212
+./openid-memcached-conf tmp localhost 11213
./openid-step2-conf tmp
+
../../modules/server/server-conf tmp
../../modules/server/scheme-conf tmp
cat >>tmp/conf/httpd.conf <<EOF
diff --git a/sca-cpp/trunk/modules/openid/stop-test b/sca-cpp/trunk/modules/openid/stop-test
index a468b0f407..a0587f8cb7 100755
--- a/sca-cpp/trunk/modules/openid/stop-test
+++ b/sca-cpp/trunk/modules/openid/stop-test
@@ -20,3 +20,5 @@
# Cleanup
../../modules/http/httpd-stop tmp
+../../components/cache/memcached-stop 11212
+../../components/cache/memcached-stop 11213
diff --git a/sca-cpp/trunk/samples/store-cluster/proxy-conf b/sca-cpp/trunk/samples/store-cluster/proxy-conf
index a72629d140..5a61f13399 100755
--- a/sca-cpp/trunk/samples/store-cluster/proxy-conf
+++ b/sca-cpp/trunk/samples/store-cluster/proxy-conf
@@ -20,6 +20,8 @@
root=$1
port=$2
+set -x
+
# Configure a proxy balancer
../../modules/http/httpd-conf $root sca-store.com $port/80 $root/htdocs
../../modules/http/vhost-conf $root
diff --git a/sca-cpp/trunk/samples/store-cluster/proxy-ssl-conf b/sca-cpp/trunk/samples/store-cluster/proxy-ssl-conf
index d2a12e3ca0..3379a3c789 100755
--- a/sca-cpp/trunk/samples/store-cluster/proxy-ssl-conf
+++ b/sca-cpp/trunk/samples/store-cluster/proxy-ssl-conf
@@ -21,6 +21,8 @@ root=$1
port=$2
sslport=$3
+set -x
+
# Configure an SSL-enabled proxy balancer
../../modules/http/httpd-conf $root sca-store.com $port/80 $root/htdocs
../../modules/http/vhost-conf $root
diff --git a/sca-cpp/trunk/samples/store-cluster/server-conf b/sca-cpp/trunk/samples/store-cluster/server-conf
index a2aa7dbad9..d274dd3d17 100755
--- a/sca-cpp/trunk/samples/store-cluster/server-conf
+++ b/sca-cpp/trunk/samples/store-cluster/server-conf
@@ -20,6 +20,8 @@
root=$1
port=$2
+set -x
+
# Configure an app server
../../modules/http/httpd-conf $root sca-store.com $port/80 htdocs
../../modules/http/vhost-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 13d0caa253..37a654b805 100755
--- a/sca-cpp/trunk/samples/store-cluster/server-ssl-conf
+++ b/sca-cpp/trunk/samples/store-cluster/server-ssl-conf
@@ -21,15 +21,23 @@ root=$1
port=$2
sslport=$3
+set -x
+
# Configure an SSL-enabled app server
../../modules/http/httpd-conf $root sca-store.com $port/80 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/vhost-ssl-conf $root
+
#../../modules/http/httpd-auth-conf $root
../../modules/openid/openid-conf $root
../../modules/openid/openid-step2-conf $root
+../../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/server/server-conf $root
../../modules/python/python-conf $root
cat >>$root/conf/httpd.conf <<EOF
diff --git a/sca-cpp/trunk/samples/store-cluster/sqldb-master-conf b/sca-cpp/trunk/samples/store-cluster/sqldb-master-conf
index f191b4eb3e..83f78be999 100755
--- a/sca-cpp/trunk/samples/store-cluster/sqldb-master-conf
+++ b/sca-cpp/trunk/samples/store-cluster/sqldb-master-conf
@@ -21,6 +21,8 @@ root=$1
port=$2
httpport=$3
+set -x
+
# Aggregate database server logs
category=`basename $root`
../../components/log/scribe-tail-start $category "sqldb" $root/logs/postgresql
diff --git a/sca-cpp/trunk/samples/store-cluster/sqldb-standby-conf b/sca-cpp/trunk/samples/store-cluster/sqldb-standby-conf
index a3f3808346..4998ead4b4 100755
--- a/sca-cpp/trunk/samples/store-cluster/sqldb-standby-conf
+++ b/sca-cpp/trunk/samples/store-cluster/sqldb-standby-conf
@@ -24,6 +24,8 @@ mhost=$4
mport=$5
mhttpport=$6
+set -x
+
# Aggregate database server logs
category=`basename $root`
../../components/log/scribe-tail-start $category "sqldb" $root/logs/postgresql
diff --git a/sca-cpp/trunk/samples/store-cluster/tunnel-ssl-conf b/sca-cpp/trunk/samples/store-cluster/tunnel-ssl-conf
index 1b70a5d2c8..ef3074691a 100755
--- a/sca-cpp/trunk/samples/store-cluster/tunnel-ssl-conf
+++ b/sca-cpp/trunk/samples/store-cluster/tunnel-ssl-conf
@@ -21,6 +21,8 @@ root=$1
port=$2
sslport=$3
+set -x
+
# Configure an SSL-enabled tunnel server
../../modules/http/httpd-conf $root sca-store.com $port/119 $root/htdocs
tar -C tmp/ssl -c `../../modules/http/ssl-cert-find tmp/ssl` | tar -C $root -x
diff --git a/sca-cpp/trunk/ubuntu/ubuntu-bin-all-image b/sca-cpp/trunk/ubuntu/ubuntu-bin-all-image
index aba33e79d3..85a6f382ad 100755
--- a/sca-cpp/trunk/ubuntu/ubuntu-bin-all-image
+++ b/sca-cpp/trunk/ubuntu/ubuntu-bin-all-image
@@ -53,7 +53,7 @@ sudo apt-get -y install python-dev
if [ "$?" != "0" ]; then
exit $?
fi
-sudo apt-get -y install libpcre3-dev libsqlite3-dev
+sudo apt-get -y install libpcre3-dev
if [ "$?" != "0" ]; then
exit $?
fi
diff --git a/sca-cpp/trunk/ubuntu/ubuntu-install-all b/sca-cpp/trunk/ubuntu/ubuntu-install-all
index 3689892aed..288e73ae9a 100755
--- a/sca-cpp/trunk/ubuntu/ubuntu-install-all
+++ b/sca-cpp/trunk/ubuntu/ubuntu-install-all
@@ -233,7 +233,7 @@ fi
cd $build
# Build Mod_auth_openid
-sudo apt-get -y install libpcre3-dev libsqlite3-dev
+sudo apt-get -y install libpcre3-dev
git clone git://github.com/jsdelfino/mod_auth_openid.git
cd mod_auth_openid
./autogen.sh