From 151704f0d80acd493ed1ce2fb664a2ceb29811c6 Mon Sep 17 00:00:00 2001 From: Mihai Prica Date: Tue, 11 Jun 2013 14:23:20 +0300 Subject: python-glance: Changed DB backend to postgresql Signed-off-by: Mihai Prica --- .../recipes-devtools/python/python-glance/glance-api.conf | 10 +++++----- .../recipes-devtools/python/python-glance/glance-registry.conf | 8 ++++---- meta-openstack/recipes-devtools/python/python-glance_2013.1.bb | 4 ++++ 3 files changed, 13 insertions(+), 9 deletions(-) (limited to 'meta-openstack/recipes-devtools/python') diff --git a/meta-openstack/recipes-devtools/python/python-glance/glance-api.conf b/meta-openstack/recipes-devtools/python/python-glance/glance-api.conf index 433306e..a3382ef 100644 --- a/meta-openstack/recipes-devtools/python/python-glance/glance-api.conf +++ b/meta-openstack/recipes-devtools/python/python-glance/glance-api.conf @@ -47,8 +47,8 @@ backlog = 4096 # registry server. Any valid SQLAlchemy connection string is fine. # See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine #sql_connection = mysql:///root:@localhost/glance?charset=utf8 -sql_connection = sqlite:////etc/glance/glance.db - +#sql_connection = sqlite:////etc/glance/glance.db +sql_connection = postgresql://nova:nova@localhost/glance # Period in seconds after which SQLAlchemy should reestablish its connection # to the database. @@ -343,9 +343,9 @@ image_cache_dir = /var/lib/glance/image_cache/ auth_host = 127.0.0.1 auth_port = 35357 auth_protocol = http -admin_tenant_name = %SERVICE_TENANT_NAME% -admin_user = %SERVICE_USER% -admin_password = %SERVICE_PASSWORD% +admin_tenant_name = service +admin_user = admin +admin_password = password [paste_deploy] # Name of the paste configuration file that defines the available pipelines diff --git a/meta-openstack/recipes-devtools/python/python-glance/glance-registry.conf b/meta-openstack/recipes-devtools/python/python-glance/glance-registry.conf index d7d8fd0..e751109 100644 --- a/meta-openstack/recipes-devtools/python/python-glance/glance-registry.conf +++ b/meta-openstack/recipes-devtools/python/python-glance/glance-registry.conf @@ -25,7 +25,7 @@ backlog = 4096 # SQLAlchemy connection string for the reference implementation # registry server. Any valid SQLAlchemy connection string is fine. # See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine -sql_connection = sqlite:////etc/glance/glance.db +sql_connection = postgresql://nova:nova@localhost/glance # Period in seconds after which SQLAlchemy should reestablish its connection # to the database. @@ -75,9 +75,9 @@ limit_param_default = 25 auth_host = 127.0.0.1 auth_port = 35357 auth_protocol = http -admin_tenant_name = %SERVICE_TENANT_NAME% -admin_user = %SERVICE_USER% -admin_password = %SERVICE_PASSWORD% +admin_tenant_name = service +admin_user = admin +admin_password = password [paste_deploy] # Name of the paste configuration file that defines the available pipelines diff --git a/meta-openstack/recipes-devtools/python/python-glance_2013.1.bb b/meta-openstack/recipes-devtools/python/python-glance_2013.1.bb index 2847d42..a912a4e 100644 --- a/meta-openstack/recipes-devtools/python/python-glance_2013.1.bb +++ b/meta-openstack/recipes-devtools/python/python-glance_2013.1.bb @@ -37,6 +37,8 @@ do_install_append() { install -d ${GLANCE_CONF_DIR}/images install -d ${D}${localstatedir}/lib/glance/image_cache + install -d ${D}${localstatedir}/log/${SRCNAME} + # Create the sqlite database touch ${GLANCE_CONF_DIR}/glance.db } @@ -46,8 +48,10 @@ pkg_postinst_${PN} () { exit 1 fi + mkdir /var/log/glance # Needed when using a MySQL backend # mysql -u root -e "CREATE DATABASE glance CHARACTER SET utf8;" + sudo -u postgres createdb glance glance-manage db_sync } -- cgit v1.2.3-54-g00ecf