From 61ae7c166c59f6dae28e9f9437cfe4468c600808 Mon Sep 17 00:00:00 2001 From: Peter Feiner Date: Fri, 15 Nov 2013 10:42:30 -0500 Subject: [PATCH] support memcache for keystone token backend Change-Id: I0c85a64932c39264b73cff4f9d952d0dbdf49e5b --- lib/keystone | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/keystone b/lib/keystone index 4353ebab1c..0521bd3eac 100644 --- a/lib/keystone +++ b/lib/keystone @@ -190,6 +190,8 @@ function configure_keystone() { if [[ "$KEYSTONE_TOKEN_BACKEND" = "sql" ]]; then iniset $KEYSTONE_CONF token driver keystone.token.backends.sql.Token + elif [[ "$KEYSTONE_TOKEN_BACKEND" = "memcache" ]]; then + iniset $KEYSTONE_CONF token driver keystone.token.backends.memcache.Token else iniset $KEYSTONE_CONF token driver keystone.token.backends.kvs.Token fi @@ -350,6 +352,17 @@ function install_keystone() { if is_service_enabled ldap; then install_ldap fi + if [[ "$KEYSTONE_TOKEN_BACKEND" = "memcache" ]]; then + # Install memcached and the memcache Python library that keystone uses. + # Unfortunately the Python library goes by different names in the .deb + # and .rpm circles. + install_package memcached + if is_ubuntu; then + install_package python-memcache + else + install_package python-memcached + fi + fi git_clone $KEYSTONE_REPO $KEYSTONE_DIR $KEYSTONE_BRANCH setup_develop $KEYSTONE_DIR if is_apache_enabled_service key; then