summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-glance_git.bb
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2014-05-07 00:14:10 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-05-07 00:14:10 -0400
commit7b1c8e1d5d37ce4a88ca90ff949fe86ff0d45315 (patch)
tree1bf84f236fa4f8d6645f99e11a85f11d7da48406 /meta-openstack/recipes-devtools/python/python-glance_git.bb
parent3e625d7fc1342a4c02d7d5c6e7797fe89fce5983 (diff)
downloadmeta-cloud-services-7b1c8e1d5d37ce4a88ca90ff949fe86ff0d45315.tar.gz
glance: update to stable/icehouse
Updating glance to the icehouse release. Changes include: - patch glance to not load ALL backend modules, only the ones defined in the glance configuration. Without this patch, we must have support for all backends, even if we don't use them. To avoid including support for unused backends .. we prefer to only load used ones. - Add a variable GLANCE_KNOWN_STORES to the recipe, which will be copied into the glance configuration to enable the loading of supported options (as modifed by the first patch). - Change "sql_connection" to the new "connection" directive - Change the "notifier_strategy" to the new "notification_driver" Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-glance_git.bb')
-rw-r--r--meta-openstack/recipes-devtools/python/python-glance_git.bb21
1 files changed, 16 insertions, 5 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-glance_git.bb b/meta-openstack/recipes-devtools/python/python-glance_git.bb
index d2f5f21..54aaca2 100644
--- a/meta-openstack/recipes-devtools/python/python-glance_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-glance_git.bb
@@ -7,18 +7,25 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
7PR = "r0" 7PR = "r0"
8SRCNAME = "glance" 8SRCNAME = "glance"
9 9
10SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/havana \ 10SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/icehouse \
11 file://0001-glance-store-only-load-known-stores-not-all-stores.patch \
11 file://glance.init \ 12 file://glance.init \
12 " 13 "
13 14
14SRCREV="1690a739cd94efe6cb2af8e794a4acdf59de54cd" 15SRCREV="556eebb7780b55af87c0fe49b76593f833ea189a"
15PV="2013.2.2+git${SRCPV}" 16PV="2014.1+git${SRCPV}"
16 17
17S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"
18 19
19inherit setuptools update-rc.d identity default_configs 20inherit setuptools update-rc.d identity default_configs
20 21
21GLANCE_DEFAULT_STORE ?= "file" 22GLANCE_DEFAULT_STORE ?= "file"
23GLANCE_KNOWN_STORES ?= "glance.store.rbd.Store,\
24 glance.store.swift.Store,\
25 glance.store.cinder.Store,\
26 glance.store.filesystem.Store,\
27 glance.store.http.Store"
28
22 29
23do_install_append() { 30do_install_append() {
24 TEMPLATE_CONF_DIR=${S}${sysconfdir} 31 TEMPLATE_CONF_DIR=${S}${sysconfdir}
@@ -31,14 +38,14 @@ do_install_append() {
31 sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${WORKDIR}/glance-$file.conf 38 sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${WORKDIR}/glance-$file.conf
32 sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \ 39 sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \
33 -i ${WORKDIR}/glance-$file.conf 40 -i ${WORKDIR}/glance-$file.conf
34 sed -e "s#^sql_conn.*#sql_connection = postgresql://${DB_USER}:${DB_PASSWORD}@localhost/glance#g" \ 41 sed -e "s!^#connection =.*!connection = postgresql://${DB_USER}:${DB_PASSWORD}@localhost/glance!g" \
35 -i ${WORKDIR}/glance-$file.conf 42 -i ${WORKDIR}/glance-$file.conf
36 done 43 done
37 sed -e "s:^filesystem_store_datadir =.*:filesystem_store_datadir = ${sysconfdir}/${SRCNAME}/images/:g" \ 44 sed -e "s:^filesystem_store_datadir =.*:filesystem_store_datadir = ${sysconfdir}/${SRCNAME}/images/:g" \
38 -i ${WORKDIR}/glance-api.conf 45 -i ${WORKDIR}/glance-api.conf
39 46
40 # send samples to rabbitmq for ceilometer integration 47 # send samples to rabbitmq for ceilometer integration
41 sed -e "s:^notifier_strategy = noop:notifier_strategy = rabbit:g" \ 48 sed -e "s:^# notification_driver = noop:notification_driver = rabbit:g" \
42 -i ${WORKDIR}/glance-api.conf 49 -i ${WORKDIR}/glance-api.conf
43 50
44 sed 's:^default_store =.*:default_store = ${GLANCE_DEFAULT_STORE}:g' -i ${WORKDIR}/glance-api.conf 51 sed 's:^default_store =.*:default_store = ${GLANCE_DEFAULT_STORE}:g' -i ${WORKDIR}/glance-api.conf
@@ -47,6 +54,9 @@ do_install_append() {
47 sed 's:^swift_store_key =.*:swift_store_key = ${SERVICE_PASSWORD}:g' -i ${WORKDIR}/glance-api.conf 54 sed 's:^swift_store_key =.*:swift_store_key = ${SERVICE_PASSWORD}:g' -i ${WORKDIR}/glance-api.conf
48 sed 's:^swift_store_create_container_on_put =.*:swift_store_create_container_on_put = True:g' -i ${WORKDIR}/glance-api.conf 55 sed 's:^swift_store_create_container_on_put =.*:swift_store_create_container_on_put = True:g' -i ${WORKDIR}/glance-api.conf
49 56
57 # multi line match, replace the known stores with the ones we support.
58 sed '1!N; s:#known_stores = glance.store.*\n.*#.*glance.store.http.*:known_stores = ${GLANCE_KNOWN_STORES}:g' -i ${WORKDIR}/glance-api.conf
59
50 install -d ${GLANCE_CONF_DIR} 60 install -d ${GLANCE_CONF_DIR}
51 install -m 600 ${WORKDIR}/glance-registry.conf ${GLANCE_CONF_DIR}/ 61 install -m 600 ${WORKDIR}/glance-registry.conf ${GLANCE_CONF_DIR}/
52 install -m 600 ${WORKDIR}/glance-api.conf ${GLANCE_CONF_DIR}/ 62 install -m 600 ${WORKDIR}/glance-api.conf ${GLANCE_CONF_DIR}/
@@ -55,6 +65,7 @@ do_install_append() {
55 install -m 600 ${S}/etc/glance-registry-paste.ini ${GLANCE_CONF_DIR}/ 65 install -m 600 ${S}/etc/glance-registry-paste.ini ${GLANCE_CONF_DIR}/
56 install -m 600 ${S}/etc/glance-api-paste.ini ${GLANCE_CONF_DIR}/ 66 install -m 600 ${S}/etc/glance-api-paste.ini ${GLANCE_CONF_DIR}/
57 install -m 600 ${S}/etc/policy.json ${GLANCE_CONF_DIR}/ 67 install -m 600 ${S}/etc/policy.json ${GLANCE_CONF_DIR}/
68 install -m 600 ${S}/etc/schema-image.json ${GLANCE_CONF_DIR}/
58 69
59 install -d ${GLANCE_CONF_DIR}/images 70 install -d ${GLANCE_CONF_DIR}/images
60 install -d ${D}${localstatedir}/lib/glance/image_cache 71 install -d ${D}${localstatedir}/lib/glance/image_cache