Add ability to switch database driver
Also added mysqlconnector packages into default installation. blueprint enable-mysql-connector Change-Id: Ib2cda7cb183dc8f0ff4759cc6e9ecab469fd121c
This commit is contained in:
parent
735f4d340f
commit
cbea3447c7
@ -6,6 +6,7 @@ sqlite3
|
||||
python-pysqlite2
|
||||
python-sqlalchemy
|
||||
python-mysqldb
|
||||
python-mysql.connector
|
||||
python-webob
|
||||
python-greenlet
|
||||
python-routes
|
||||
|
@ -15,6 +15,7 @@ python-kombu
|
||||
python-eventlet
|
||||
python-sqlalchemy
|
||||
python-mysqldb
|
||||
python-mysql.connector
|
||||
python-pyudev
|
||||
python-qpid # dist:precise
|
||||
dnsmasq-base
|
||||
|
@ -6,6 +6,7 @@ parted
|
||||
iputils-arping
|
||||
mysql-server # NOPRIME
|
||||
python-mysqldb
|
||||
python-mysql.connector
|
||||
python-xattr # needed for glance which is needed for nova --- this shouldn't be here
|
||||
python-lxml # needed for glance which is needed for nova --- this shouldn't be here
|
||||
gawk
|
||||
|
@ -10,5 +10,6 @@ python-devel
|
||||
python-greenlet
|
||||
python-lxml
|
||||
python-mysql
|
||||
python-mysql.connector
|
||||
python-pysqlite
|
||||
sqlite3
|
||||
|
@ -10,6 +10,7 @@ python-greenlet
|
||||
python-iso8601
|
||||
python-kombu
|
||||
python-mysql
|
||||
python-mysql.connector
|
||||
python-Paste
|
||||
python-PasteDeploy
|
||||
python-pyudev
|
||||
|
@ -35,6 +35,7 @@ python-lockfile
|
||||
python-lxml # needed for glance which is needed for nova --- this shouldn't be here
|
||||
python-mox
|
||||
python-mysql
|
||||
python-mysql.connector
|
||||
python-numpy # needed by websockify for spice console
|
||||
python-paramiko
|
||||
python-sqlalchemy-migrate
|
||||
|
@ -4,6 +4,7 @@ dnsmasq-utils # for dhcp_release
|
||||
ebtables
|
||||
iptables
|
||||
iputils
|
||||
mysql-connector-python
|
||||
mysql-server # NOPRIME
|
||||
openvswitch # NOPRIME
|
||||
python-boto
|
||||
|
@ -15,6 +15,7 @@ libvirt-python # NOPRIME
|
||||
libxml2-python
|
||||
numpy # needed by websockify for spice console
|
||||
m2crypto
|
||||
mysql-connector-python
|
||||
mysql-server # NOPRIME
|
||||
parted
|
||||
polkit
|
||||
|
10
lib/database
10
lib/database
@ -89,7 +89,7 @@ function initialize_database_backends {
|
||||
# a multi-node DevStack installation.
|
||||
|
||||
# NOTE: Don't specify ``/db`` in this string so we can use it for multiple services
|
||||
BASE_SQL_CONN=${BASE_SQL_CONN:-${DATABASE_TYPE}://$DATABASE_USER:$DATABASE_PASSWORD@$DATABASE_HOST}
|
||||
BASE_SQL_CONN=${BASE_SQL_CONN:-$(get_database_type)://$DATABASE_USER:$DATABASE_PASSWORD@$DATABASE_HOST}
|
||||
|
||||
return 0
|
||||
}
|
||||
@ -120,6 +120,14 @@ function database_connection_url {
|
||||
database_connection_url_$DATABASE_TYPE $db
|
||||
}
|
||||
|
||||
function get_database_type {
|
||||
if [[ -n "${SQLALCHEMY_DATABASE_DRIVER}" ]]; then
|
||||
echo "${DATABASE_TYPE}+${SQLALCHEMY_DATABASE_DRIVER}"
|
||||
else
|
||||
echo "${DATABASE_TYPE}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# Restore xtrace
|
||||
$XTRACE
|
||||
|
12
stackrc
12
stackrc
@ -52,6 +52,18 @@ if [[ -z "$ENABLED_SERVICES" ]]; then
|
||||
ENABLED_SERVICES+=,rabbit,tempest,mysql
|
||||
fi
|
||||
|
||||
# SQLAlchemy supports multiple database drivers for each database server
|
||||
# type. For example, deployer may use MySQLdb, MySQLConnector, or oursql
|
||||
# to access MySQL database.
|
||||
#
|
||||
# When defined, the variable controls which database driver is used to
|
||||
# connect to database server. Otherwise using default driver defined for
|
||||
# each database type.
|
||||
#
|
||||
# You can find the list of currently supported drivers for each database
|
||||
# type at: http://docs.sqlalchemy.org/en/rel_0_9/core/engines.html
|
||||
# SQLALCHEMY_DATABASE_DRIVER="mysqldb"
|
||||
|
||||
# Global toggle for enabling services under mod_wsgi. If this is set to
|
||||
# ``True`` all services that use HTTPD + mod_wsgi as the preferred method of
|
||||
# deployment, will be deployed under Apache. If this is set to ``False`` all
|
||||
|
Loading…
Reference in New Issue
Block a user