Merge "Add support for redis to Zaqar's lib"

This commit is contained in:
Jenkins 2014-10-04 09:25:55 +00:00 committed by Gerrit Code Review
commit 608491c0f7
3 changed files with 20 additions and 0 deletions

View File

@ -1,3 +1,5 @@
python-pymongo
mongodb-server
pkg-config
redis-server # NOPRIME
python-redis # NOPRIME

View File

@ -1,3 +1,5 @@
selinux-policy-targeted
mongodb-server
pymongo
redis # NOPRIME
python-redis # NOPRIME

View File

@ -125,11 +125,27 @@ function configure_zaqar {
iniset $ZAQAR_CONF drivers storage mongodb
iniset $ZAQAR_CONF 'drivers:storage:mongodb' uri mongodb://localhost:27017/zaqar
configure_mongodb
elif [ "$ZAQAR_BACKEND" = 'redis' ] ; then
iniset $ZAQAR_CONF drivers storage redis
iniset $ZAQAR_CONF 'drivers:storage:redis' uri redis://localhost:6379
configure_redis
fi
cleanup_zaqar
}
function configure_redis {
if is_ubuntu; then
install_package redis-server
elif is_fedora; then
install_package redis
else
exit_distro_not_supported "redis installation"
fi
install_package python-redis
}
function configure_mongodb {
# Set nssize to 2GB. This increases the number of namespaces supported
# # per database.