diff options
| author | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-10-04 00:26:04 -0400 |
|---|---|---|
| committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-10-04 00:26:04 -0400 |
| commit | 6806482a7ba6f020b0cff44b2b797eede2b702af (patch) | |
| tree | cfc7df9ca2c8e110ebe8a5b94c782c691b8f5878 /meta-openstack/recipes-devtools/python/python-nova.inc | |
| parent | ce230a25691dab2c8f3c7b9fc7ef37d548f8f90b (diff) | |
| download | meta-cloud-services-6806482a7ba6f020b0cff44b2b797eede2b702af.tar.gz | |
python-nova: unify controller and compute recipes
The split of compute and controller is no longer necesary, since configuration
inheritance is done with overriding layers, not split recipes.
This simplifies the build, and packaging of the recipe. Good riddance.
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-nova.inc')
| -rw-r--r-- | meta-openstack/recipes-devtools/python/python-nova.inc | 102 |
1 files changed, 0 insertions, 102 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-nova.inc b/meta-openstack/recipes-devtools/python/python-nova.inc deleted file mode 100644 index e520130..0000000 --- a/meta-openstack/recipes-devtools/python/python-nova.inc +++ /dev/null | |||
| @@ -1,102 +0,0 @@ | |||
| 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 | SRCNAME = "nova" | ||
| 10 | PYTHON_PN = "python-nova" | ||
| 11 | |||
| 12 | FILESEXTRAPATHS := "${THISDIR}/${PYTHON_PN}" | ||
| 13 | |||
| 14 | SRC_URI = "https://launchpad.net/${SRCNAME}/grizzly/${PV}/+download/${SRCNAME}-${PV}.tar.gz \ | ||
| 15 | file://0001-nova-api-paste.ini-make-controller-IP-configurable.patch \ | ||
| 16 | " | ||
| 17 | |||
| 18 | SRC_URI[md5sum] = "6215982b9ed08b9042e088470d60a0a6" | ||
| 19 | SRC_URI[sha256sum] = "f7c25186920daccb16867c5fd272318beb8cc076e5a55f79b5906618ef2724f4" | ||
| 20 | |||
| 21 | S = "${WORKDIR}/${SRCNAME}-${PV}" | ||
| 22 | |||
| 23 | inherit setuptools identity | ||
| 24 | |||
| 25 | do_install_append() { | ||
| 26 | |||
| 27 | if [ ! -f "${WORKDIR}/nova.conf" ]; then | ||
| 28 | return | ||
| 29 | fi | ||
| 30 | |||
| 31 | TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME} | ||
| 32 | NOVA_CONF_DIR=${D}/${sysconfdir}/nova | ||
| 33 | |||
| 34 | install -d ${NOVA_CONF_DIR} | ||
| 35 | install -m 600 ${S}/etc/nova/policy.json ${NOVA_CONF_DIR}/ | ||
| 36 | |||
| 37 | # Deploy filters to /etc/nova/rootwrap.d | ||
| 38 | install -m 755 -d ${NOVA_CONF_DIR}/rootwrap.d | ||
| 39 | install -m 600 ${S}/etc/nova/rootwrap.d/*.filters ${NOVA_CONF_DIR}/rootwrap.d | ||
| 40 | chown -R root:root ${NOVA_CONF_DIR}/rootwrap.d | ||
| 41 | chmod 644 ${NOVA_CONF_DIR}/rootwrap.d | ||
| 42 | |||
| 43 | # Set up rootwrap.conf, pointing to /etc/nova/rootwrap.d | ||
| 44 | install -m 644 ${S}/etc/nova/rootwrap.conf ${NOVA_CONF_DIR}/ | ||
| 45 | sed -e "s:^filters_path=.*$:filters_path=${sysconfdir}/nova/rootwrap.d:" \ | ||
| 46 | -i ${NOVA_CONF_DIR}/rootwrap.conf | ||
| 47 | chown root:root $NOVA_CONF_DIR/rootwrap.conf | ||
| 48 | |||
| 49 | # Set up the rootwrap sudoers for nova | ||
| 50 | install -d ${D}${sysconfdir}/sudoers.d | ||
| 51 | touch ${D}${sysconfdir}/sudoers.d/nova-rootwrap | ||
| 52 | chmod 0440 ${D}${sysconfdir}/sudoers.d/nova-rootwrap | ||
| 53 | chown root:root ${D}${sysconfdir}/sudoers.d/nova-rootwrap | ||
| 54 | echo "root ALL=(root) NOPASSWD: ${bindir}/nova-rootwrap" > \ | ||
| 55 | ${D}${sysconfdir}/sudoers.d/nova-rootwrap | ||
| 56 | |||
| 57 | # Configuration options | ||
| 58 | sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \ | ||
| 59 | ${TEMPLATE_CONF_DIR}/api-paste.ini > ${WORKDIR}/api-paste.ini | ||
| 60 | sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${WORKDIR}/api-paste.ini | ||
| 61 | sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \ | ||
| 62 | -i ${WORKDIR}/api-paste.ini | ||
| 63 | sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${WORKDIR}/api-paste.ini | ||
| 64 | |||
| 65 | sed -e "s:%DB_USER%:${DB_USER}:g" -i ${WORKDIR}/nova.conf | ||
| 66 | sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${WORKDIR}/nova.conf | ||
| 67 | |||
| 68 | sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${WORKDIR}/nova.conf | ||
| 69 | sed -e "s:%CONTROLLER_HOST%:${CONTROLLER_HOST}:g" -i ${WORKDIR}/nova.conf | ||
| 70 | |||
| 71 | sed -e "s:%COMPUTE_IP%:${COMPUTE_IP}:g" -i ${WORKDIR}/nova.conf | ||
| 72 | sed -e "s:%COMPUTE_HOST%:${COMPUTE_HOST}:g" -i ${WORKDIR}/nova.conf | ||
| 73 | |||
| 74 | sed -e "s:%OS_PASSWORD%:${ADMIN_PASSWORD}:g" -i ${WORKDIR}/openrc | ||
| 75 | sed -e "s:%SERVICE_TOKEN%:${SERVICE_TOKEN}:g" -i ${WORKDIR}/openrc | ||
| 76 | |||
| 77 | sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${WORKDIR}/openrc | ||
| 78 | sed -e "s:%CONTROLLER_HOST%:${CONTROLLER_HOST}:g" -i ${WORKDIR}/openrc | ||
| 79 | |||
| 80 | # Copy the configuration file | ||
| 81 | install -m 664 ${WORKDIR}/nova.conf ${NOVA_CONF_DIR}/nova.conf | ||
| 82 | install -m 664 ${WORKDIR}/api-paste.ini ${NOVA_CONF_DIR} | ||
| 83 | install -m 664 ${WORKDIR}/openrc ${NOVA_CONF_DIR} | ||
| 84 | |||
| 85 | install -d ${NOVA_CONF_DIR}/instances | ||
| 86 | } | ||
| 87 | |||
| 88 | # note the lowercase "files", these variables are used in the packaging | ||
| 89 | # recipes themselves. | ||
| 90 | files_${PYTHON_PN} = "${libdir}/*" | ||
| 91 | |||
| 92 | files_${SRCNAME}-common = " ${bindir}/nova-manage \ | ||
| 93 | ${bindir}/nova-rootwrap \ | ||
| 94 | ${sysconfdir}/sudoers.d" | ||
| 95 | |||
| 96 | files_${SRCNAME}-compute = " ${bindir}/nova-compute \ | ||
| 97 | ${sysconfdir}/${SRCNAME}/* \ | ||
| 98 | ${sysconfdir}/init.d/nova-compute" | ||
| 99 | |||
| 100 | files_${SRCNAME}-controller = " ${bindir}/* \ | ||
| 101 | ${sysconfdir}/${SRCNAME}/* \ | ||
| 102 | ${sysconfdir}/init.d/nova-all" \ No newline at end of file | ||
