diff options
| author | Mihai Prica <prica.mihai@gmail.com> | 2013-06-11 14:47:55 +0300 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-08-28 18:41:56 -0400 |
| commit | 6ca32d280bb519097b3356037aff5c76a7c11b7a (patch) | |
| tree | 1a4542e36617d88b71f8d13c7623b6fca54f9296 /meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb | |
| parent | b72360be0414ce6f9c7dba877617ef336034109d (diff) | |
| download | meta-cloud-services-6ca32d280bb519097b3356037aff5c76a7c11b7a.tar.gz | |
python-cinder: added 2013.1.1
-Added configuration files with necessary credentials;
-Added initscript to start cinder-api and cinder-volume;
Signed-off-by: Mihai Prica <prica.mihai@gmail.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb b/meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb new file mode 100644 index 0000000..54edc47 --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-cinder_2013.1.1.bb | |||
| @@ -0,0 +1,101 @@ | |||
| 1 | DESCRIPTION = "OpenStack Block storage service" | ||
| 2 | HOMEPAGE = "https://launchpad.net/cinder" | ||
| 3 | SECTION = "devel/python" | ||
| 4 | LICENSE = "Apache-2.0" | ||
| 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2" | ||
| 6 | |||
| 7 | PR = "r0" | ||
| 8 | SRCNAME = "cinder" | ||
| 9 | |||
| 10 | SRC_URI = "https://launchpad.net/${SRCNAME}/grizzly/${PV}/+download/${SRCNAME}-${PV}.tar.gz \ | ||
| 11 | file://cinder.conf \ | ||
| 12 | file://api-paste.ini \ | ||
| 13 | file://cinder.init \ | ||
| 14 | " | ||
| 15 | |||
| 16 | SRC_URI[md5sum] = "8fbfbd8aad5f1a6d5e2a239b7801966d" | ||
| 17 | SRC_URI[sha256sum] = "c4d7f508f404b555242abc638901a39b02d4345c2d101a0aaad52fec1143ec2a" | ||
| 18 | |||
| 19 | S = "${WORKDIR}/${SRCNAME}-${PV}" | ||
| 20 | |||
| 21 | inherit setuptools update-rc.d | ||
| 22 | |||
| 23 | do_install_append() { | ||
| 24 | CINDER_CONF_DIR=${D}${sysconfdir}/cinder | ||
| 25 | |||
| 26 | install -d ${CINDER_CONF_DIR} | ||
| 27 | |||
| 28 | install -m 600 ${WORKDIR}/cinder.conf ${CINDER_CONF_DIR}/ | ||
| 29 | install -m 600 ${WORKDIR}/api-paste.ini ${CINDER_CONF_DIR}/ | ||
| 30 | install -m 600 ${S}/etc/cinder/policy.json ${CINDER_CONF_DIR}/ | ||
| 31 | |||
| 32 | if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
| 33 | install -d ${D}${sysconfdir}/init.d | ||
| 34 | sed 's:@suffix@:api:' < ${WORKDIR}/cinder.init >${WORKDIR}/cinder-api.init.sh | ||
| 35 | install -m 0755 ${WORKDIR}/cinder-api.init.sh ${D}${sysconfdir}/init.d/cinder-api | ||
| 36 | sed 's:@suffix@:volume:' < ${WORKDIR}/cinder.init >${WORKDIR}/cinder-volume.init.sh | ||
| 37 | install -m 0755 ${WORKDIR}/cinder-volume.init.sh ${D}${sysconfdir}/init.d/cinder-volume | ||
| 38 | fi | ||
| 39 | } | ||
| 40 | |||
| 41 | pkg_postinst_${SRCNAME} () { | ||
| 42 | if [ "x$D" != "x" ]; then | ||
| 43 | exit 1 | ||
| 44 | fi | ||
| 45 | |||
| 46 | # quick fix | ||
| 47 | /etc/rpm-postinsts/postgresql | ||
| 48 | |||
| 49 | sudo -u postgres createdb cinder | ||
| 50 | cinder-manage db sync | ||
| 51 | echo "include /etc/cinder/data/volumes/*" >> /etc/tgt/targets.conf | ||
| 52 | } | ||
| 53 | |||
| 54 | PACKAGES += "${SRCNAME} ${SRCNAME}-api ${SRCNAME}-volume" | ||
| 55 | |||
| 56 | FILES_${PN} = "${libdir}/*" | ||
| 57 | |||
| 58 | FILES_${SRCNAME}-api = "${bindir}/cinder-api \ | ||
| 59 | ${sysconfdir}/init.d/cinder-api" | ||
| 60 | |||
| 61 | FILES_${SRCNAME}-volume = "${bindir}/cinder-volume \ | ||
| 62 | ${sysconfdir}/init.d/cinder-volume" | ||
| 63 | |||
| 64 | FILES_${SRCNAME} = "${bindir}/* \ | ||
| 65 | ${sysconfdir}/${SRCNAME}/* " | ||
| 66 | |||
| 67 | RDEPENDS_${PN} += "lvm2 \ | ||
| 68 | python-sqlalchemy \ | ||
| 69 | python-amqplib \ | ||
| 70 | python-anyjson \ | ||
| 71 | python-eventlet \ | ||
| 72 | python-kombu \ | ||
| 73 | python-lxml \ | ||
| 74 | python-routes \ | ||
| 75 | python-webob \ | ||
| 76 | python-greenlet \ | ||
| 77 | python-lockfile \ | ||
| 78 | python-pastedeploy \ | ||
| 79 | python-paste \ | ||
| 80 | python-sqlalchemy-migrate \ | ||
| 81 | python-stevedore \ | ||
| 82 | python-suds \ | ||
| 83 | python-paramiko \ | ||
| 84 | python-babel \ | ||
| 85 | python-iso8601 \ | ||
| 86 | python-setuptools-git \ | ||
| 87 | python-glanceclient \ | ||
| 88 | python-keystoneclient \ | ||
| 89 | python-swiftclient \ | ||
| 90 | python-oslo.config \ | ||
| 91 | " | ||
| 92 | |||
| 93 | RDEPENDS_${SRCNAME} = "${PN} \ | ||
| 94 | postgresql postgresql-client python-psycopg2 tgt" | ||
| 95 | |||
| 96 | RDEPENDS_${SRCNAME}-api = "${SRCNAME}" | ||
| 97 | RDEPENDS_${SRCNAME}-volume = "${SRCNAME}" | ||
| 98 | |||
| 99 | INITSCRIPT_PACKAGES = "${SRCNAME}-api ${SRCNAME}-volume" | ||
| 100 | INITSCRIPT_NAME_${SRCNAME}-api = "cinder-api" | ||
| 101 | INITSCRIPT_NAME_${SRCNAME}-volume = "cinder-volume" | ||
