From c3302d1371bfc97e88f952d94589ae79ab61eaf8 Mon Sep 17 00:00:00 2001 From: Mihai Prica Date: Fri, 17 May 2013 17:41:58 +0300 Subject: python-nova: added 2013.1 The configuration files are populated with default options. Signed-off-by: Mihai Prica --- .../recipes-devtools/python/python-nova/nova.conf | 48 ++++++++ .../recipes-devtools/python/python-nova_2013.1.bb | 122 +++++++++++++++++++++ 2 files changed, 170 insertions(+) create mode 100644 meta-openstack/recipes-devtools/python/python-nova/nova.conf create mode 100644 meta-openstack/recipes-devtools/python/python-nova_2013.1.bb diff --git a/meta-openstack/recipes-devtools/python/python-nova/nova.conf b/meta-openstack/recipes-devtools/python/python-nova/nova.conf new file mode 100644 index 0000000..a1632a0 --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-nova/nova.conf @@ -0,0 +1,48 @@ +[DEFAULT] +firewall_driver = nova.virt.libvirt.firewall.IptablesFirewallDriver +compute_driver = libvirt.LibvirtDriver +libvirt_type = kvm +libvirt_cpu_mode = none +default_floating_pool = public +fixed_range = +force_dhcp_release = True +dhcpbridge_flagfile = /etc/nova/nova.conf +dhcpbridge_flagfile = /etc/nova/nova.conf +compute_scheduler_driver = nova.scheduler.filter_scheduler.FilterScheduler +rootwrap_config = /etc/nova/rootwrap.conf +api_paste_config = /etc/nova/api-paste.ini +allow_resize_to_same_host = true +auth_strategy = keystone +instances_path = /etc/nova/instances +debug = True +verbose = True +my_ip = 127.0.0.1 + +#VNC +vnc_enabled = true +vncserver_listen = 0.0.0.0 + +#Network +flat_interface = eth0 +flat_network_bridge = br1 +vlan_interface = eth0 +public_interface = br1 +network_manager = nova.network.manager.FlatDHCPManager +fixed_range= +force_dhcp_release=False +dhcpbridge=/usr/bin/nova-dhcpbridge + +#Database configuration +#Sample MySQL configuration +#sql_connection = mysql://root:@localhost/nova?charset=utf8 + +#Sample Sqlite configuration +sql_connection = sqlite:////etc/nova/nova.db + +#Messaging system +#fake_rabbit=true +#Sample Qpid configuration +rpc_backend=nova.rpc.impl_qpid +qpid_hostname=localhost +qpid_broker=5672 + diff --git a/meta-openstack/recipes-devtools/python/python-nova_2013.1.bb b/meta-openstack/recipes-devtools/python/python-nova_2013.1.bb new file mode 100644 index 0000000..94a342f --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-nova_2013.1.bb @@ -0,0 +1,122 @@ +DESCRIPTION = "Nova is a cloud computing fabric controller" +HOMEPAGE = "https://launchpad.net/nova" +SECTION = "devel/python" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2" + +DEPENDS = "sudo" + +PR = "r0" +SRCNAME = "nova" + +SRC_URI = "https://launchpad.net/${SRCNAME}/grizzly/${PV}/+download/${SRCNAME}-${PV}.tar.gz \ + file://nova.conf" + + +SRC_URI[md5sum] = "38022353c398ce38c4e220d1d18b5916" +SRC_URI[sha256sum] = "db7f5259d848358bf14105d5833869ec145f643312e6bc0adef0050120fe3e07" + +S = "${WORKDIR}/${SRCNAME}-${PV}" + +inherit setuptools useradd + +do_install_append() { + + NOVA_CONF_DIR=${D}/${sysconfdir}/nova + + install -d ${NOVA_CONF_DIR} + install -m 600 ${S}/etc/nova/policy.json ${NOVA_CONF_DIR}/ + + # Deploy filters to /etc/nova/rootwrap.d + install -m 755 -d ${NOVA_CONF_DIR}/rootwrap.d + install -m 600 ${S}/etc/nova/rootwrap.d/*.filters ${NOVA_CONF_DIR}/rootwrap.d + chown -R root:root ${NOVA_CONF_DIR}/rootwrap.d + chmod 644 ${NOVA_CONF_DIR}/rootwrap.d + + # Set up rootwrap.conf, pointing to /etc/nova/rootwrap.d + install -m 644 ${S}/etc/nova/rootwrap.conf ${NOVA_CONF_DIR}/ + sed -e "s:^filters_path=.*$:filters_path=${NOVA_CONF_DIR}/rootwrap.d:" -i ${NOVA_CONF_DIR}/rootwrap.conf + chown root:root $NOVA_CONF_DIR/rootwrap.conf + + # Set up the rootwrap sudoers for nova + install -d ${D}${sysconfdir}/sudoers.d + touch ${D}${sysconfdir}/sudoers.d/nova-rootwrap + chmod 0440 ${D}${sysconfdir}/sudoers.d/nova-rootwrap + chown root:root ${D}${sysconfdir}/sudoers.d/nova-rootwrap + echo "root ALL=(root) NOPASSWD: nova-rootwrap" > ${D}${sysconfdir}/sudoers.d/nova-rootwrap + + # Get the sample configuration file in place + install -m 664 ${S}/etc/nova/api-paste.ini ${NOVA_CONF_DIR} + + #Copy the configuration file + install -m 664 ${WORKDIR}/nova.conf ${NOVA_CONF_DIR}/nova.conf + + # Create the sqlite database + touch ${NOVA_CONF_DIR}/nova.db + install -d ${NOVA_CONF_DIR}/instances +} + +inherit useradd + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM_${PN} = "--system nova" +USERADD_PARAM_${PN} = "--system --home /var/lib/nova -g nova \ + --no-create-home --shell /bin/false nova" + +pkg_postinst_${PN} () { + if [ "x$D" != "x" ]; then + exit 1 + fi + + # Needed when using a MySQL backend + # mysql -u root -e "CREATE DATABASE nova CHARACTER SET latin1;" + nova-manage db sync +} + +PACKAGECONFIG ??= "sqlite" + +PACKAGECONFIG[sqlite] = ",,,sqlite3" +PACKAGECONFIG[mysql] = ",,,mysql5-server mysql5-client mysql-python libmysqlclient" + +FILES_${PN} += "${sysconfdir}/${SRCNAME}/* \ + ${sysconfdir}/sudoers.d " + +RDEPENDS_${PN} = "openssl openssl-misc libxml2 libxslt iptables curl dnsmasq sudo procps\ + qemu libvirt libvirt-libvirtd libvirt-python libvirt-virsh \ + python-modules \ + python-misc \ + python-argparse \ + libvirt-python \ + libvirt-libvirtd \ + python-amqplib \ + python-anyjson \ + python-babel \ + python-boto \ + python-cinderclient \ + python-cheetah \ + python-eventlet \ + python-feedparser \ + python-glanceclient \ + python-greenlet \ + python-httplib2 \ + python-iso8601 \ + python-kombu \ + python-lxml \ + python-netaddr \ + python-oslo.config \ + python-paste \ + python-pastedeploy \ + python-paramiko \ + python-pyasn1 \ + python-setuptools-git \ + python-simplejson \ + python-setuptools \ + python-sqlalchemy \ + python-sqlalchemy-migrate \ + python-stevedore \ + python-suds \ + python-quantumclient \ + python-routes \ + python-webob \ + python-websockify \ + " -- cgit v1.2.3-54-g00ecf