summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-nova_2013.1.3.bb
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2013-08-13 13:39:11 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2013-08-28 18:41:59 -0400
commitd0d32a8d2a642910e54a6b4f8c0fb9be9aa14dcf (patch)
tree93674eef6cbf3dc910be621ff55b9f8f9f60f870 /meta-openstack/recipes-devtools/python/python-nova_2013.1.3.bb
parent631c93f0b5499dcfc1fb8f95c25125655d4f9163 (diff)
downloadmeta-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.bb173
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 @@
1DESCRIPTION = "Nova is a cloud computing fabric controller"
2HOMEPAGE = "https://launchpad.net/nova"
3SECTION = "devel/python"
4LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=1dece7821bf3fd70fe1309eaa37d52a2"
6
7DEPENDS = "sudo"
8
9PR = "r0"
10SRCNAME = "nova"
11
12SRC_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 "
18SRC_URI[md5sum] = "6215982b9ed08b9042e088470d60a0a6"
19SRC_URI[sha256sum] = "f7c25186920daccb16867c5fd272318beb8cc076e5a55f79b5906618ef2724f4"
20
21S = "${WORKDIR}/${SRCNAME}-${PV}"
22
23inherit setuptools useradd update-rc.d identity
24
25do_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
80USERADD_PACKAGES = "${PN}"
81GROUPADD_PARAM_${PN} = "--system nova"
82USERADD_PARAM_${PN} = "--system --home /var/lib/nova -g nova \
83 --no-create-home --shell /bin/false nova"
84
85PACKAGES += "${SRCNAME}-common ${SRCNAME}-compute ${SRCNAME}-controller"
86
87pkg_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
95pkg_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
113FILES_${PN} = "${libdir}/*"
114
115FILES_${SRCNAME}-common = " ${bindir}/nova-manage \
116 ${bindir}/nova-rootwrap \
117 ${sysconfdir}/${SRCNAME}/* \
118 ${sysconfdir}/sudoers.d"
119
120FILES_${SRCNAME}-compute = "${bindir}/nova-compute \
121 ${sysconfdir}/init.d/nova-compute"
122
123FILES_${SRCNAME}-controller = "${bindir}/* \
124 ${sysconfdir}/init.d/nova-all"
125
126RDEPENDS_${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
162RDEPENDS_${SRCNAME}-common = "${PN} openssl openssl-misc libxml2 libxslt \
163 iptables curl dnsmasq sudo procps"
164
165RDEPENDS_${SRCNAME}-compute = "${PN} nova-common \
166 qemu libvirt libvirt-libvirtd libvirt-python libvirt-virsh"
167
168RDEPENDS_${SRCNAME}-controller = "${PN} nova-common \
169 postgresql postgresql-client python-psycopg2"
170
171INITSCRIPT_PACKAGES = "${SRCNAME}-compute ${SRCNAME}-controller"
172INITSCRIPT_NAME_${SRCNAME}-compute = "nova-compute"
173INITSCRIPT_NAME_${SRCNAME}-controller = "nova-all"