summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-glance_2013.1.3.bb
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2013-08-13 13:39:11 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2013-08-28 18:41:59 -0400
commitd0d32a8d2a642910e54a6b4f8c0fb9be9aa14dcf (patch)
tree93674eef6cbf3dc910be621ff55b9f8f9f60f870 /meta-openstack/recipes-devtools/python/python-glance_2013.1.3.bb
parent631c93f0b5499dcfc1fb8f95c25125655d4f9163 (diff)
downloadmeta-cloud-services-d0d32a8d2a642910e54a6b4f8c0fb9be9aa14dcf.tar.gz
openstack: update to 2013.1.3 release
Updating cinder/glanc/swift/horizon/nova/keystone/quantum to the 2013.1.3 bugfix release. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-glance_2013.1.3.bb')
-rw-r--r--meta-openstack/recipes-devtools/python/python-glance_2013.1.3.bb124
1 files changed, 124 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-glance_2013.1.3.bb b/meta-openstack/recipes-devtools/python/python-glance_2013.1.3.bb
new file mode 100644
index 0000000..9bfd262
--- /dev/null
+++ b/meta-openstack/recipes-devtools/python/python-glance_2013.1.3.bb
@@ -0,0 +1,124 @@
1DESCRIPTION = "Services for discovering, registering and retrieving virtual machine images"
2HOMEPAGE = "http://glance.openstack.org/"
3SECTION = "devel/python"
4LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
6
7PR = "r0"
8SRCNAME = "glance"
9
10SRC_URI = "https://launchpad.net/glance/grizzly/${PV}/+download/${SRCNAME}-${PV}.tar.gz \
11 file://glance.init \
12 "
13
14SRC_URI[md5sum] = "f9ba3865ff2cf98caa471bd54173fecd"
15SRC_URI[sha256sum] = "642782416d790dfcb6d5bb85626dd5d48784ba8f3a53e7863ec13312e86cb209"
16
17S = "${WORKDIR}/${SRCNAME}-${PV}"
18
19inherit setuptools update-rc.d identity
20
21do_install_append() {
22 TEMPLATE_CONF_DIR=${S}${sysconfdir}
23 GLANCE_CONF_DIR=${D}${sysconfdir}/glance
24
25 for file in api registry cache
26 do
27 sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \
28 ${TEMPLATE_CONF_DIR}/glance-$file.conf > ${WORKDIR}/glance-$file.conf
29 sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${WORKDIR}/glance-$file.conf
30 sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \
31 -i ${WORKDIR}/glance-$file.conf
32 sed -e "s#^sql_conn.*#sql_connection = postgresql://${DB_USER}:${DB_PASSWORD}@localhost/glance#g" \
33 -i ${WORKDIR}/glance-$file.conf
34 done
35 sed -e "s:^filesystem_store_datadir =.*:filesystem_store_datadir = ${sysconfdir}/${SRCNAME}/images/:g" \
36 -i ${WORKDIR}/glance-api.conf
37
38 install -d ${GLANCE_CONF_DIR}
39 install -m 600 ${WORKDIR}/glance-registry.conf ${GLANCE_CONF_DIR}/
40 install -m 600 ${WORKDIR}/glance-api.conf ${GLANCE_CONF_DIR}/
41 install -m 600 ${WORKDIR}/glance-cache.conf ${GLANCE_CONF_DIR}/
42
43 install -m 600 ${S}/etc/glance-registry-paste.ini ${GLANCE_CONF_DIR}/
44 install -m 600 ${S}/etc/glance-api-paste.ini ${GLANCE_CONF_DIR}/
45 install -m 600 ${S}/etc/policy.json ${GLANCE_CONF_DIR}/
46
47 install -d ${GLANCE_CONF_DIR}/images
48 install -d ${D}${localstatedir}/lib/glance/image_cache
49
50 install -d ${D}${localstatedir}/log/${SRCNAME}
51
52 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
53 install -d ${D}${sysconfdir}/init.d
54 sed 's:@suffix@:api:' < ${WORKDIR}/glance.init >${WORKDIR}/glance-api.init.sh
55 install -m 0755 ${WORKDIR}/glance-api.init.sh ${D}${sysconfdir}/init.d/glance-api
56 sed 's:@suffix@:registry:' < ${WORKDIR}/glance.init >${WORKDIR}/glance-registry.init.sh
57 install -m 0755 ${WORKDIR}/glance-registry.init.sh ${D}${sysconfdir}/init.d/glance-registry
58 fi
59}
60
61pkg_postinst_${SRCNAME} () {
62 if [ "x$D" != "x" ]; then
63 exit 1
64 fi
65
66 # This is to make sure postgres is configured and running
67 if ! pidof postmaster > /dev/null; then
68 sudo -u postgres initdb -D /etc/postgresql/
69 /etc/init.d/postgresql start
70 sleep 0.2
71 sudo -u postgres psql -c "CREATE ROLE ${DB_USER} WITH SUPERUSER LOGIN PASSWORD '${DB_PASSWORD}'"
72 fi
73
74 mkdir /var/log/glance
75 sudo -u postgres createdb glance
76 glance-manage db_sync
77}
78
79PACKAGES += " ${SRCNAME} ${SRCNAME}-api ${SRCNAME}-registry"
80
81FILES_${PN} = "${libdir}/*"
82
83FILES_${SRCNAME} = "${bindir}/* \
84 ${sysconfdir}/${SRCNAME}/* \
85 ${localstatedir}/* \
86 "
87
88FILES_${SRCNAME}-api = "${bindir}/glance-api \
89 ${sysconfdir}/init.d/glance-api \
90 "
91
92FILES_${SRCNAME}-registry = "${bindir}/glance-registry \
93 ${sysconfdir}/init.d/glance-registry \
94 "
95
96RDEPENDS_${PN} += "python-greenlet \
97 python-sqlalchemy \
98 python-anyjson \
99 python-eventlet \
100 python-pastedeploy \
101 python-routes \
102 python-webob \
103 python-boto \
104 python-sqlalchemy-migrate \
105 python-httplib2 \
106 python-kombu \
107 python-iso8601 \
108 python-oslo.config \
109 python-lxml \
110 python-paste \
111 python-pycrypto \
112 python-jsonschema \
113 python-keystoneclient \
114 python-swiftclient \
115 "
116
117RDEPENDS_${SRCNAME} = "${PN} \
118 postgresql postgresql-client python-psycopg2"
119RDEPENDS_${SRCNAME}-api = "${SRCNAME}"
120RDEPENDS_${SRCNAME}-registry = "${SRCNAME}"
121
122INITSCRIPT_PACKAGES = "${SRCNAME}-api ${SRCNAME}-registry"
123INITSCRIPT_NAME_${SRCNAME}-api = "glance-api"
124INITSCRIPT_NAME_${SRCNAME}-registry = "glance-registry"