summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python
diff options
context:
space:
mode:
authorMihai Prica <prica.mihai@gmail.com>2013-06-11 14:23:20 +0300
committerBruce Ashfield <bruce.ashfield@windriver.com>2013-08-28 18:41:56 -0400
commit151704f0d80acd493ed1ce2fb664a2ceb29811c6 (patch)
treef389c0a6d74cd14454deb45924aaa28684250625 /meta-openstack/recipes-devtools/python
parent8a8b1add7b923c477de79e1cf139824da95eea91 (diff)
downloadmeta-cloud-services-151704f0d80acd493ed1ce2fb664a2ceb29811c6.tar.gz
python-glance: Changed DB backend to postgresql
Signed-off-by: Mihai Prica <prica.mihai@gmail.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python')
-rw-r--r--meta-openstack/recipes-devtools/python/python-glance/glance-api.conf10
-rw-r--r--meta-openstack/recipes-devtools/python/python-glance/glance-registry.conf8
-rw-r--r--meta-openstack/recipes-devtools/python/python-glance_2013.1.bb4
3 files changed, 13 insertions, 9 deletions
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
47# registry server. Any valid SQLAlchemy connection string is fine. 47# registry server. Any valid SQLAlchemy connection string is fine.
48# See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine 48# See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine
49#sql_connection = mysql:///root:@localhost/glance?charset=utf8 49#sql_connection = mysql:///root:@localhost/glance?charset=utf8
50sql_connection = sqlite:////etc/glance/glance.db 50#sql_connection = sqlite:////etc/glance/glance.db
51 51sql_connection = postgresql://nova:nova@localhost/glance
52 52
53# Period in seconds after which SQLAlchemy should reestablish its connection 53# Period in seconds after which SQLAlchemy should reestablish its connection
54# to the database. 54# to the database.
@@ -343,9 +343,9 @@ image_cache_dir = /var/lib/glance/image_cache/
343auth_host = 127.0.0.1 343auth_host = 127.0.0.1
344auth_port = 35357 344auth_port = 35357
345auth_protocol = http 345auth_protocol = http
346admin_tenant_name = %SERVICE_TENANT_NAME% 346admin_tenant_name = service
347admin_user = %SERVICE_USER% 347admin_user = admin
348admin_password = %SERVICE_PASSWORD% 348admin_password = password
349 349
350[paste_deploy] 350[paste_deploy]
351# Name of the paste configuration file that defines the available pipelines 351# 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
25# SQLAlchemy connection string for the reference implementation 25# SQLAlchemy connection string for the reference implementation
26# registry server. Any valid SQLAlchemy connection string is fine. 26# registry server. Any valid SQLAlchemy connection string is fine.
27# See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine 27# See: http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/connections.html#sqlalchemy.create_engine
28sql_connection = sqlite:////etc/glance/glance.db 28sql_connection = postgresql://nova:nova@localhost/glance
29 29
30# Period in seconds after which SQLAlchemy should reestablish its connection 30# Period in seconds after which SQLAlchemy should reestablish its connection
31# to the database. 31# to the database.
@@ -75,9 +75,9 @@ limit_param_default = 25
75auth_host = 127.0.0.1 75auth_host = 127.0.0.1
76auth_port = 35357 76auth_port = 35357
77auth_protocol = http 77auth_protocol = http
78admin_tenant_name = %SERVICE_TENANT_NAME% 78admin_tenant_name = service
79admin_user = %SERVICE_USER% 79admin_user = admin
80admin_password = %SERVICE_PASSWORD% 80admin_password = password
81 81
82[paste_deploy] 82[paste_deploy]
83# Name of the paste configuration file that defines the available pipelines 83# 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() {
37 install -d ${GLANCE_CONF_DIR}/images 37 install -d ${GLANCE_CONF_DIR}/images
38 install -d ${D}${localstatedir}/lib/glance/image_cache 38 install -d ${D}${localstatedir}/lib/glance/image_cache
39 39
40 install -d ${D}${localstatedir}/log/${SRCNAME}
41
40 # Create the sqlite database 42 # Create the sqlite database
41 touch ${GLANCE_CONF_DIR}/glance.db 43 touch ${GLANCE_CONF_DIR}/glance.db
42} 44}
@@ -46,8 +48,10 @@ pkg_postinst_${PN} () {
46 exit 1 48 exit 1
47 fi 49 fi
48 50
51 mkdir /var/log/glance
49 # Needed when using a MySQL backend 52 # Needed when using a MySQL backend
50 # mysql -u root -e "CREATE DATABASE glance CHARACTER SET utf8;" 53 # mysql -u root -e "CREATE DATABASE glance CHARACTER SET utf8;"
54 sudo -u postgres createdb glance
51 glance-manage db_sync 55 glance-manage db_sync
52} 56}
53 57