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-10-30 00:14:31 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2013-11-25 15:25:34 -0500
commit0a962a285a529def3d3649544214bc36c9292d18 (patch)
treebea41c69fd5d0f8186ddf47bf2c08d756a8e323a /meta-openstack/recipes-devtools/python/python-nova_2013.1.3.bb
parent8dc56b2f821762f2051cee4bf5b4123e821ae212 (diff)
downloadmeta-cloud-services-0a962a285a529def3d3649544214bc36c9292d18.tar.gz
nova: uprev to havana release version
This commit uprevs the nova component to the havana release version, and switches the build from tarballs to using the git repository. No other runtime changes are made at this point.` 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.bb213
1 files changed, 0 insertions, 213 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
deleted file mode 100644
index 5fb6f3f..0000000
--- a/meta-openstack/recipes-devtools/python/python-nova_2013.1.3.bb
+++ /dev/null
@@ -1,213 +0,0 @@
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
12FILESEXTRAPATHS := "${THISDIR}/${PN}"
13
14SRC_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
18SRC_URI += "file://nova-all \
19 file://nova-compute \
20 file://nova-consoleauth \
21 file://nova-novncproxy \
22 file://nova.conf \
23 file://openrc \
24 "
25
26SRC_URI[md5sum] = "6215982b9ed08b9042e088470d60a0a6"
27SRC_URI[sha256sum] = "f7c25186920daccb16867c5fd272318beb8cc076e5a55f79b5906618ef2724f4"
28
29S = "${WORKDIR}/${SRCNAME}-${PV}"
30
31inherit update-rc.d setuptools identity hosts useradd
32
33do_install_append() {
34 if [ ! -f "${WORKDIR}/nova.conf" ]; then
35 return
36 fi
37
38 TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME}
39 NOVA_CONF_DIR=${D}/${sysconfdir}/nova
40
41 install -d ${NOVA_CONF_DIR}
42 install -m 600 ${S}/etc/nova/policy.json ${NOVA_CONF_DIR}/
43
44 # Deploy filters to /etc/nova/rootwrap.d
45 install -m 755 -d ${NOVA_CONF_DIR}/rootwrap.d
46 install -m 600 ${S}/etc/nova/rootwrap.d/*.filters ${NOVA_CONF_DIR}/rootwrap.d
47 chown -R root:root ${NOVA_CONF_DIR}/rootwrap.d
48 chmod 644 ${NOVA_CONF_DIR}/rootwrap.d
49
50 # Set up rootwrap.conf, pointing to /etc/nova/rootwrap.d
51 install -m 644 ${S}/etc/nova/rootwrap.conf ${NOVA_CONF_DIR}/
52 sed -e "s:^filters_path=.*$:filters_path=${sysconfdir}/nova/rootwrap.d:" \
53 -i ${NOVA_CONF_DIR}/rootwrap.conf
54 chown root:root $NOVA_CONF_DIR/rootwrap.conf
55
56 # Set up the rootwrap sudoers for nova
57 install -d ${D}${sysconfdir}/sudoers.d
58 touch ${D}${sysconfdir}/sudoers.d/nova-rootwrap
59 chmod 0440 ${D}${sysconfdir}/sudoers.d/nova-rootwrap
60 chown root:root ${D}${sysconfdir}/sudoers.d/nova-rootwrap
61 echo "root ALL=(root) NOPASSWD: ${bindir}/nova-rootwrap" > \
62 ${D}${sysconfdir}/sudoers.d/nova-rootwrap
63
64 # Configuration options
65 sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \
66 ${TEMPLATE_CONF_DIR}/api-paste.ini > ${WORKDIR}/api-paste.ini
67 sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${WORKDIR}/api-paste.ini
68 sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \
69 -i ${WORKDIR}/api-paste.ini
70 sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${WORKDIR}/api-paste.ini
71
72 sed -e "s:%DB_USER%:${DB_USER}:g" -i ${WORKDIR}/nova.conf
73 sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${WORKDIR}/nova.conf
74
75 sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${WORKDIR}/nova.conf
76 sed -e "s:%CONTROLLER_HOST%:${CONTROLLER_HOST}:g" -i ${WORKDIR}/nova.conf
77
78 sed -e "s:%COMPUTE_IP%:${COMPUTE_IP}:g" -i ${WORKDIR}/nova.conf
79 sed -e "s:%COMPUTE_HOST%:${COMPUTE_HOST}:g" -i ${WORKDIR}/nova.conf
80
81 sed -e "s:%OS_PASSWORD%:${ADMIN_PASSWORD}:g" -i ${WORKDIR}/openrc
82 sed -e "s:%SERVICE_TOKEN%:${SERVICE_TOKEN}:g" -i ${WORKDIR}/openrc
83
84 sed -e "s:%CONTROLLER_IP%:${CONTROLLER_IP}:g" -i ${WORKDIR}/openrc
85 sed -e "s:%CONTROLLER_HOST%:${CONTROLLER_HOST}:g" -i ${WORKDIR}/openrc
86
87 # Copy the configuration file
88 install -m 664 ${WORKDIR}/nova.conf ${NOVA_CONF_DIR}/nova.conf
89 install -m 664 ${WORKDIR}/api-paste.ini ${NOVA_CONF_DIR}
90 install -m 664 ${WORKDIR}/openrc ${NOVA_CONF_DIR}
91
92 install -d ${NOVA_CONF_DIR}/instances
93
94 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
95 install -d ${D}${sysconfdir}/init.d
96 install -m 0755 ${WORKDIR}/nova-all ${D}${sysconfdir}/init.d/nova-all
97 install -m 0755 ${WORKDIR}/nova-compute ${D}${sysconfdir}/init.d/nova-compute
98 install -m 0755 ${WORKDIR}/nova-consoleauth ${D}${sysconfdir}/init.d/nova-consoleauth
99 install -m 0755 ${WORKDIR}/nova-novncproxy ${D}${sysconfdir}/init.d/nova-novncproxy
100 fi
101}
102
103pkg_postinst_${SRCNAME}-controller () {
104 if [ "x$D" != "x" ]; then
105 exit 1
106 fi
107
108 # This is to make sure postgres is configured and running
109 if ! pidof postmaster > /dev/null; then
110 /etc/init.d/postgresql-init
111 /etc/init.d/postgresql start
112 sleep 5
113 fi
114
115 sudo -u postgres createdb nova
116 sleep 2
117 nova-manage db sync
118}
119
120pkg_postinst_${SRCNAME}-common () {
121 if [ "x$D" != "x" ]; then
122 exit 1
123 fi
124
125 if [ -d /home/root ]; then
126 echo "source /etc/nova/openrc" > /home/root/.bashrc
127 else
128 echo "source /etc/nova/openrc" > /root/.bashrc
129 fi
130}
131
132USERADD_PACKAGES = "${PN}"
133GROUPADD_PARAM_${PN} = "--system nova"
134USERADD_PARAM_${PN} = "--system --home /var/lib/nova -g nova \
135 --no-create-home --shell /bin/false nova"
136
137PACKAGES += " ${SRCNAME}-common ${SRCNAME}-compute ${SRCNAME}-controller"
138PACKAGES += " ${SRCNAME}-consoleauth"
139PACKAGES += " ${SRCNAME}-novncproxy"
140
141
142FILES_${PN} = "${libdir}/*"
143
144FILES_${SRCNAME}-common = "${bindir}/nova-manage \
145 ${bindir}/nova-rootwrap \
146 ${sysconfdir}/${SRCNAME}/* \
147 ${sysconfdir}/sudoers.d"
148
149FILES_${SRCNAME}-compute = "${bindir}/nova-compute \
150 ${sysconfdir}/init.d/nova-compute"
151
152FILES_${SRCNAME}-controller = "${bindir}/* \
153 ${sysconfdir}/init.d/nova-all "
154
155FILES_${SRCNAME}-consoleauth = " \
156 ${sysconfdir}/init.d/nova-consoleauth \
157"
158FILES_${SRCNAME}-novncproxy = " \
159 ${sysconfdir}/init.d/nova-novncproxy \
160"
161
162RDEPENDS_${PN} = " python-modules \
163 python-misc \
164 python-argparse \
165 python-amqplib \
166 python-anyjson \
167 python-babel \
168 python-boto \
169 python-cinderclient \
170 python-cheetah \
171 python-eventlet \
172 python-feedparser \
173 python-glanceclient \
174 python-greenlet \
175 python-httplib2 \
176 python-iso8601 \
177 python-kombu \
178 python-lxml \
179 python-netaddr \
180 python-oslo.config \
181 python-paste \
182 python-pastedeploy \
183 python-paramiko \
184 python-pyasn1 \
185 python-setuptools-git \
186 python-simplejson \
187 python-setuptools \
188 python-sqlalchemy \
189 python-sqlalchemy-migrate \
190 python-stevedore \
191 python-suds \
192 python-quantumclient \
193 python-routes \
194 python-webob \
195 python-websockify \
196 "
197
198RDEPENDS_${SRCNAME}-common = "${PN} openssl openssl-misc libxml2 libxslt \
199 iptables curl dnsmasq sudo procps"
200
201RDEPENDS_${SRCNAME}-controller = "${PN} ${SRCNAME}-common \
202 ${SRCNAME}-consoleauth \
203 ${SRCNAME}-novncproxy \
204 postgresql postgresql-client python-psycopg2"
205
206RDEPENDS_${SRCNAME}-compute = "${PN} ${SRCNAME}-common \
207 qemu libvirt libvirt-libvirtd libvirt-python libvirt-virsh"
208
209INITSCRIPT_PACKAGES = "${SRCNAME}-compute ${SRCNAME}-controller ${SRCNAME}-consoleauth ${SRCNAME}-novncproxy"
210INITSCRIPT_NAME_${SRCNAME}-controller = "nova-all"
211INITSCRIPT_NAME_${SRCNAME}-compute = "nova-compute"
212INITSCRIPT_NAME_${SRCNAME}-consoleauth = "nova-consoleauth"
213INITSCRIPT_NAME_${SRCNAME}-novncproxy = "nova-novncproxy"