A new redis driver has landed in Zaqar. This patch adds support for that
driver to Zaqar's lib.
Change-Id: I97629a303c55ee098e3bfbc534bfb05ccab94649
| ... | ... |
@@ -125,11 +125,27 @@ function configure_zaqar {
|
| 125 | 125 |
iniset $ZAQAR_CONF drivers storage mongodb |
| 126 | 126 |
iniset $ZAQAR_CONF 'drivers:storage:mongodb' uri mongodb://localhost:27017/zaqar |
| 127 | 127 |
configure_mongodb |
| 128 |
+ elif [ "$ZAQAR_BACKEND" = 'redis' ] ; then |
|
| 129 |
+ iniset $ZAQAR_CONF drivers storage redis |
|
| 130 |
+ iniset $ZAQAR_CONF 'drivers:storage:redis' uri redis://localhost:6379 |
|
| 131 |
+ configure_redis |
|
| 128 | 132 |
fi |
| 129 | 133 |
|
| 130 | 134 |
cleanup_zaqar |
| 131 | 135 |
} |
| 132 | 136 |
|
| 137 |
+function configure_redis {
|
|
| 138 |
+ if is_ubuntu; then |
|
| 139 |
+ install_package redis-server |
|
| 140 |
+ elif is_fedora; then |
|
| 141 |
+ install_package redis |
|
| 142 |
+ else |
|
| 143 |
+ exit_distro_not_supported "redis installation" |
|
| 144 |
+ fi |
|
| 145 |
+ |
|
| 146 |
+ install_package python-redis |
|
| 147 |
+} |
|
| 148 |
+ |
|
| 133 | 149 |
function configure_mongodb {
|
| 134 | 150 |
# Set nssize to 2GB. This increases the number of namespaces supported |
| 135 | 151 |
# # per database. |