Add PostgreSQL support to devstack
This patch adds an interface for supporting multiple database backend
types and implemnts support for PostgreSQL. It also adds a function,
use_exclusive_service, which serves as a base for enabling a service
that conflicts with other services. The use_database function uses it,
and it might also be useful for selecting messaging backends.
MySQL is still selected by default. Tested on Fedora 17 and Ubuntu
12.04 with MySQL and PostgreSQL. Implements blueprint postgresql-support
Change-Id: I4b1373e25676fd9a9809fe70cb4a6450a2479174
diff --git a/unstack.sh b/unstack.sh
index 42cb7af..6b34aa3 100755
--- a/unstack.sh
+++ b/unstack.sh
@@ -15,6 +15,9 @@
# Import common functions
source $TOP_DIR/functions
+# Import database library
+source $TOP_DIR/lib/database
+
# Load local configuration
source $TOP_DIR/stackrc
@@ -102,6 +105,10 @@
stop_service mysql
fi
+ if is_service_enabled postgresql; then
+ stop_service postgresql
+ fi
+
# Stop rabbitmq-server
if is_service_enabled rabbit; then
stop_service rabbitmq-server