diff options
-rw-r--r-- | meta-openstack/recipes-devtools/python/python-nova/nova.conf | 48 | ||||
-rw-r--r-- | meta-openstack/recipes-devtools/python/python-nova_2013.1.bb | 122 |
2 files changed, 170 insertions, 0 deletions
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 @@ | |||
1 | [DEFAULT] | ||
2 | firewall_driver = nova.virt.libvirt.firewall.IptablesFirewallDriver | ||
3 | compute_driver = libvirt.LibvirtDriver | ||
4 | libvirt_type = kvm | ||
5 | libvirt_cpu_mode = none | ||
6 | default_floating_pool = public | ||
7 | fixed_range = | ||
8 | force_dhcp_release = True | ||
9 | dhcpbridge_flagfile = /etc/nova/nova.conf | ||
10 | dhcpbridge_flagfile = /etc/nova/nova.conf | ||
11 | compute_scheduler_driver = nova.scheduler.filter_scheduler.FilterScheduler | ||
12 | rootwrap_config = /etc/nova/rootwrap.conf | ||
13 | api_paste_config = /etc/nova/api-paste.ini | ||
14 | allow_resize_to_same_host = true | ||
15 | auth_strategy = keystone | ||
16 | instances_path = /etc/nova/instances | ||
17 | debug = True | ||
18 | verbose = True | ||
19 | my_ip = 127.0.0.1 | ||
20 | |||
21 | #VNC | ||
22 | vnc_enabled = true | ||
23 | vncserver_listen = 0.0.0.0 | ||
24 | |||
25 | #Network | ||
26 | flat_interface = eth0 | ||
27 | flat_network_bridge = br1 | ||
28 | vlan_interface = eth0 | ||
29 | public_interface = br1 | ||
30 | network_manager = nova.network.manager.FlatDHCPManager | ||
31 | fixed_range= | ||
32 | force_dhcp_release=False | ||
33 | dhcpbridge=/usr/bin/nova-dhcpbridge | ||
34 | |||
35 | #Database configuration | ||
36 | #Sample MySQL configuration | ||
37 | #sql_connection = mysql://root:@localhost/nova?charset=utf8 | ||
38 | |||
39 | #Sample Sqlite configuration | ||
40 | sql_connection = sqlite:////etc/nova/nova.db | ||
41 | |||
42 | #Messaging system | ||
43 | #fake_rabbit=true | ||
44 | #Sample Qpid configuration | ||
45 | rpc_backend=nova.rpc.impl_qpid | ||
46 | qpid_hostname=localhost | ||
47 | qpid_broker=5672 | ||
48 | |||
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 @@ | |||
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 | |||
15 | |||
16 | SRC_URI[md5sum] = "38022353c398ce38c4e220d1d18b5916" | ||
17 | SRC_URI[sha256sum] = "db7f5259d848358bf14105d5833869ec145f643312e6bc0adef0050120fe3e07" | ||
18 | |||
19 | S = "${WORKDIR}/${SRCNAME}-${PV}" | ||
20 | |||
21 | inherit setuptools useradd | ||
22 | |||
23 | do_install_append() { | ||
24 | |||
25 | NOVA_CONF_DIR=${D}/${sysconfdir}/nova | ||
26 | |||
27 | install -d ${NOVA_CONF_DIR} | ||
28 | install -m 600 ${S}/etc/nova/policy.json ${NOVA_CONF_DIR}/ | ||
29 | |||
30 | # Deploy filters to /etc/nova/rootwrap.d | ||
31 | install -m 755 -d ${NOVA_CONF_DIR}/rootwrap.d | ||
32 | install -m 600 ${S}/etc/nova/rootwrap.d/*.filters ${NOVA_CONF_DIR}/rootwrap.d | ||
33 | chown -R root:root ${NOVA_CONF_DIR}/rootwrap.d | ||
34 | chmod 644 ${NOVA_CONF_DIR}/rootwrap.d | ||
35 | |||
36 | # Set up rootwrap.conf, pointing to /etc/nova/rootwrap.d | ||
37 | install -m 644 ${S}/etc/nova/rootwrap.conf ${NOVA_CONF_DIR}/ | ||
38 | sed -e "s:^filters_path=.*$:filters_path=${NOVA_CONF_DIR}/rootwrap.d:" -i ${NOVA_CONF_DIR}/rootwrap.conf | ||
39 | chown root:root $NOVA_CONF_DIR/rootwrap.conf | ||
40 | |||
41 | # Set up the rootwrap sudoers for nova | ||
42 | install -d ${D}${sysconfdir}/sudoers.d | ||
43 | touch ${D}${sysconfdir}/sudoers.d/nova-rootwrap | ||
44 | chmod 0440 ${D}${sysconfdir}/sudoers.d/nova-rootwrap | ||
45 | chown root:root ${D}${sysconfdir}/sudoers.d/nova-rootwrap | ||
46 | echo "root ALL=(root) NOPASSWD: nova-rootwrap" > ${D}${sysconfdir}/sudoers.d/nova-rootwrap | ||
47 | |||
48 | # Get the sample configuration file in place | ||
49 | install -m 664 ${S}/etc/nova/api-paste.ini ${NOVA_CONF_DIR} | ||
50 | |||
51 | #Copy the configuration file | ||
52 | install -m 664 ${WORKDIR}/nova.conf ${NOVA_CONF_DIR}/nova.conf | ||
53 | |||
54 | # Create the sqlite database | ||
55 | touch ${NOVA_CONF_DIR}/nova.db | ||
56 | install -d ${NOVA_CONF_DIR}/instances | ||
57 | } | ||
58 | |||
59 | inherit useradd | ||
60 | |||
61 | USERADD_PACKAGES = "${PN}" | ||
62 | GROUPADD_PARAM_${PN} = "--system nova" | ||
63 | USERADD_PARAM_${PN} = "--system --home /var/lib/nova -g nova \ | ||
64 | --no-create-home --shell /bin/false nova" | ||
65 | |||
66 | pkg_postinst_${PN} () { | ||
67 | if [ "x$D" != "x" ]; then | ||
68 | exit 1 | ||
69 | fi | ||
70 | |||
71 | # Needed when using a MySQL backend | ||
72 | # mysql -u root -e "CREATE DATABASE nova CHARACTER SET latin1;" | ||
73 | nova-manage db sync | ||
74 | } | ||
75 | |||
76 | PACKAGECONFIG ??= "sqlite" | ||
77 | |||
78 | PACKAGECONFIG[sqlite] = ",,,sqlite3" | ||
79 | PACKAGECONFIG[mysql] = ",,,mysql5-server mysql5-client mysql-python libmysqlclient" | ||
80 | |||
81 | FILES_${PN} += "${sysconfdir}/${SRCNAME}/* \ | ||
82 | ${sysconfdir}/sudoers.d " | ||
83 | |||
84 | RDEPENDS_${PN} = "openssl openssl-misc libxml2 libxslt iptables curl dnsmasq sudo procps\ | ||
85 | qemu libvirt libvirt-libvirtd libvirt-python libvirt-virsh \ | ||
86 | python-modules \ | ||
87 | python-misc \ | ||
88 | python-argparse \ | ||
89 | libvirt-python \ | ||
90 | libvirt-libvirtd \ | ||
91 | python-amqplib \ | ||
92 | python-anyjson \ | ||
93 | python-babel \ | ||
94 | python-boto \ | ||
95 | python-cinderclient \ | ||
96 | python-cheetah \ | ||
97 | python-eventlet \ | ||
98 | python-feedparser \ | ||
99 | python-glanceclient \ | ||
100 | python-greenlet \ | ||
101 | python-httplib2 \ | ||
102 | python-iso8601 \ | ||
103 | python-kombu \ | ||
104 | python-lxml \ | ||
105 | python-netaddr \ | ||
106 | python-oslo.config \ | ||
107 | python-paste \ | ||
108 | python-pastedeploy \ | ||
109 | python-paramiko \ | ||
110 | python-pyasn1 \ | ||
111 | python-setuptools-git \ | ||
112 | python-simplejson \ | ||
113 | python-setuptools \ | ||
114 | python-sqlalchemy \ | ||
115 | python-sqlalchemy-migrate \ | ||
116 | python-stevedore \ | ||
117 | python-suds \ | ||
118 | python-quantumclient \ | ||
119 | python-routes \ | ||
120 | python-webob \ | ||
121 | python-websockify \ | ||
122 | " | ||