diff options
| author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-08-13 13:39:11 -0400 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-08-28 18:41:59 -0400 |
| commit | d0d32a8d2a642910e54a6b4f8c0fb9be9aa14dcf (patch) | |
| tree | 93674eef6cbf3dc910be621ff55b9f8f9f60f870 /meta-openstack/recipes-devtools/python/python-nova_2013.1.3.bb | |
| parent | 631c93f0b5499dcfc1fb8f95c25125655d4f9163 (diff) | |
| download | meta-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-nova_2013.1.3.bb')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-nova_2013.1.3.bb | 173 |
1 files changed, 173 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-nova_2013.1.3.bb b/meta-openstack/recipes-devtools/python/python-nova_2013.1.3.bb new file mode 100644 index 0000000..95065fc --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-nova_2013.1.3.bb | |||
| @@ -0,0 +1,173 @@ | |||
| 1 | DESCRIPTION = "Nova is a cloud computing fabric controller" | ||
| 2 | HOMEPAGE = "https://launchpad.net/nova" | ||
| 3 | SECTION = "devel/python" | ||
| 4 | LICENSE = "Apache-2.0" | ||
| 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2" | ||
| 6 | |||
| 7 | DEPENDS = "sudo" | ||
| 8 | |||
| 9 | PR = "r0" | ||
| 10 | SRCNAME = "nova" | ||
| 11 | |||
| 12 | SRC_URI = "https://launchpad.net/${SRCNAME}/grizzly/${PV}/+download/${SRCNAME}-${PV}.tar.gz \ | ||
| 13 | file://nova.conf \ | ||
| 14 | file://nova-compute \ | ||
| 15 | file://nova-all \ | ||
| 16 | file://openrc \ | ||
| 17 | " | ||
| 18 | SRC_URI[md5sum] = "6215982b9ed08b9042e088470d60a0a6" | ||
| 19 | SRC_URI[sha256sum] = "f7c25186920daccb16867c5fd272318beb8cc076e5a55f79b5906618ef2724f4" | ||
| 20 | |||
| 21 | S = "${WORKDIR}/${SRCNAME}-${PV}" | ||
| 22 | |||
| 23 | inherit setuptools useradd update-rc.d identity | ||
| 24 | |||
| 25 | do_install_append() { | ||
| 26 | TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME} | ||
| 27 | NOVA_CONF_DIR=${D}/${sysconfdir}/nova | ||
| 28 | |||
| 29 | install -d ${NOVA_CONF_DIR} | ||
| 30 | install -m 600 ${S}/etc/nova/policy.json ${NOVA_CONF_DIR}/ | ||
| 31 | |||
| 32 | # Deploy filters to /etc/nova/rootwrap.d | ||
| 33 | install -m 755 -d ${NOVA_CONF_DIR}/rootwrap.d | ||
| 34 | install -m 600 ${S}/etc/nova/rootwrap.d/*.filters ${NOVA_CONF_DIR}/rootwrap.d | ||
| 35 | chown -R root:root ${NOVA_CONF_DIR}/rootwrap.d | ||
| 36 | chmod 644 ${NOVA_CONF_DIR}/rootwrap.d | ||
| 37 | |||
| 38 | # Set up rootwrap.conf, pointing to /etc/nova/rootwrap.d | ||
| 39 | install -m 644 ${S}/etc/nova/rootwrap.conf ${NOVA_CONF_DIR}/ | ||
| 40 | sed -e "s:^filters_path=.*$:filters_path=${NOVA_CONF_DIR}/rootwrap.d:" \ | ||
| 41 | -i ${NOVA_CONF_DIR}/rootwrap.conf | ||
| 42 | chown root:root $NOVA_CONF_DIR/rootwrap.conf | ||
| 43 | |||
| 44 | # Set up the rootwrap sudoers for nova | ||
| 45 | install -d ${D}${sysconfdir}/sudoers.d | ||
| 46 | touch ${D}${sysconfdir}/sudoers.d/nova-rootwrap | ||
| 47 | chmod 0440 ${D}${sysconfdir}/sudoers.d/nova-rootwrap | ||
| 48 | chown root:root ${D}${sysconfdir}/sudoers.d/nova-rootwrap | ||
| 49 | echo "root ALL=(root) NOPASSWD: ${bindir}/nova-rootwrap" > \ | ||
| 50 | ${D}${sysconfdir}/sudoers.d/nova-rootwrap | ||
| 51 | |||
| 52 | #Configuration options | ||
| 53 | sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \ | ||
| 54 | ${TEMPLATE_CONF_DIR}/api-paste.ini > ${WORKDIR}/api-paste.ini | ||
| 55 | sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${WORKDIR}/api-paste.ini | ||
| 56 | sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \ | ||
| 57 | -i ${WORKDIR}/api-paste.ini | ||
| 58 | |||
| 59 | sed -e "s:%DB_USER%:${DB_USER}:g" -i ${WORKDIR}/nova.conf | ||
| 60 | sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${WORKDIR}/nova.conf | ||
| 61 | |||
| 62 | sed -e "s:%OS_PASSWORD%:${ADMIN_PASSWORD}:g" -i ${WORKDIR}/openrc | ||
| 63 | sed -e "s:%SERVICE_TOKEN%:${SERVICE_TOKEN}:g" -i ${WORKDIR}/openrc | ||
| 64 | |||
| 65 | #Copy the configuration file | ||
| 66 | install -m 664 ${WORKDIR}/nova.conf ${NOVA_CONF_DIR}/nova.conf | ||
| 67 | install -m 664 ${WORKDIR}/api-paste.ini ${NOVA_CONF_DIR} | ||
| 68 | install -m 664 ${WORKDIR}/openrc ${NOVA_CONF_DIR} | ||
| 69 | |||
| 70 | install -d ${NOVA_CONF_DIR}/instances | ||
| 71 | |||
| 72 | if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | ||
| 73 | install -d ${D}${sysconfdir}/init.d | ||
| 74 | install -m 0755 ${WORKDIR}/nova-compute ${D}${sysconfdir}/init.d/nova-compute | ||
| 75 | install -m 0755 ${WORKDIR}/nova-all ${D}${sysconfdir}/init.d/nova-all | ||
| 76 | fi | ||
| 77 | |||
| 78 | } | ||
| 79 | |||
| 80 | USERADD_PACKAGES = "${PN}" | ||
| 81 | GROUPADD_PARAM_${PN} = "--system nova" | ||
| 82 | USERADD_PARAM_${PN} = "--system --home /var/lib/nova -g nova \ | ||
| 83 | --no-create-home --shell /bin/false nova" | ||
| 84 | |||
| 85 | PACKAGES += "${SRCNAME}-common ${SRCNAME}-compute ${SRCNAME}-controller" | ||
| 86 | |||
| 87 | pkg_postinst_${SRCNAME}-common () { | ||
| 88 | if [ "x$D" != "x" ]; then | ||
| 89 | exit 1 | ||
| 90 | fi | ||
| 91 | |||
| 92 | echo "source /etc/nova/openrc" > /home/root/.bashrc | ||
| 93 | } | ||
| 94 | |||
| 95 | pkg_postinst_${SRCNAME}-controller () { | ||
| 96 | if [ "x$D" != "x" ]; then | ||
| 97 | exit 1 | ||
| 98 | fi | ||
| 99 | |||
| 100 | # This is to make sure postgres is configured and running | ||
| 101 | if ! pidof postmaster > /dev/null; then | ||
| 102 | sudo -u postgres initdb -D /etc/postgresql/ | ||
| 103 | /etc/init.d/postgresql start | ||
| 104 | sleep 0.2 | ||
| 105 | sudo -u postgres psql -c "CREATE ROLE ${DB_USER} WITH SUPERUSER LOGIN PASSWORD '${DB_PASSWORD}'" | ||
| 106 | fi | ||
| 107 | |||
| 108 | sudo -u postgres createdb nova | ||
| 109 | nova-manage db sync | ||
| 110 | } | ||
| 111 | |||
| 112 | |||
| 113 | FILES_${PN} = "${libdir}/*" | ||
| 114 | |||
| 115 | FILES_${SRCNAME}-common = " ${bindir}/nova-manage \ | ||
| 116 | ${bindir}/nova-rootwrap \ | ||
| 117 | ${sysconfdir}/${SRCNAME}/* \ | ||
| 118 | ${sysconfdir}/sudoers.d" | ||
| 119 | |||
| 120 | FILES_${SRCNAME}-compute = "${bindir}/nova-compute \ | ||
| 121 | ${sysconfdir}/init.d/nova-compute" | ||
| 122 | |||
| 123 | FILES_${SRCNAME}-controller = "${bindir}/* \ | ||
| 124 | ${sysconfdir}/init.d/nova-all" | ||
| 125 | |||
| 126 | RDEPENDS_${PN} = " python-modules \ | ||
| 127 | python-misc \ | ||
| 128 | python-argparse \ | ||
| 129 | python-amqplib \ | ||
| 130 | python-anyjson \ | ||
| 131 | python-babel \ | ||
| 132 | python-boto \ | ||
| 133 | python-cinderclient \ | ||
| 134 | python-cheetah \ | ||
| 135 | python-eventlet \ | ||
| 136 | python-feedparser \ | ||
| 137 | python-glanceclient \ | ||
| 138 | python-greenlet \ | ||
| 139 | python-httplib2 \ | ||
| 140 | python-iso8601 \ | ||
| 141 | python-kombu \ | ||
| 142 | python-lxml \ | ||
| 143 | python-netaddr \ | ||
| 144 | python-oslo.config \ | ||
| 145 | python-paste \ | ||
| 146 | python-pastedeploy \ | ||
| 147 | python-paramiko \ | ||
| 148 | python-pyasn1 \ | ||
| 149 | python-setuptools-git \ | ||
| 150 | python-simplejson \ | ||
| 151 | python-setuptools \ | ||
| 152 | python-sqlalchemy \ | ||
| 153 | python-sqlalchemy-migrate \ | ||
| 154 | python-stevedore \ | ||
| 155 | python-suds \ | ||
| 156 | python-quantumclient \ | ||
| 157 | python-routes \ | ||
| 158 | python-webob \ | ||
| 159 | python-websockify \ | ||
| 160 | " | ||
| 161 | |||
| 162 | RDEPENDS_${SRCNAME}-common = "${PN} openssl openssl-misc libxml2 libxslt \ | ||
| 163 | iptables curl dnsmasq sudo procps" | ||
| 164 | |||
| 165 | RDEPENDS_${SRCNAME}-compute = "${PN} nova-common \ | ||
| 166 | qemu libvirt libvirt-libvirtd libvirt-python libvirt-virsh" | ||
| 167 | |||
| 168 | RDEPENDS_${SRCNAME}-controller = "${PN} nova-common \ | ||
| 169 | postgresql postgresql-client python-psycopg2" | ||
| 170 | |||
| 171 | INITSCRIPT_PACKAGES = "${SRCNAME}-compute ${SRCNAME}-controller" | ||
| 172 | INITSCRIPT_NAME_${SRCNAME}-compute = "nova-compute" | ||
| 173 | INITSCRIPT_NAME_${SRCNAME}-controller = "nova-all" | ||
