summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-nova_2013.1.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.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.bb')
-rw-r--r--meta-openstack/recipes-devtools/python/python-nova_2013.1.bb174
1 files changed, 0 insertions, 174 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-nova_2013.1.bb b/meta-openstack/recipes-devtools/python/python-nova_2013.1.bb
deleted file mode 100644
index 5fd785c..0000000
--- a/meta-openstack/recipes-devtools/python/python-nova_2013.1.bb
+++ /dev/null
@@ -1,174 +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
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 "
18
19SRC_URI[md5sum] = "38022353c398ce38c4e220d1d18b5916"
20SRC_URI[sha256sum] = "db7f5259d848358bf14105d5833869ec145f643312e6bc0adef0050120fe3e07"
21
22S = "${WORKDIR}/${SRCNAME}-${PV}"
23
24inherit setuptools useradd update-rc.d identity
25
26do_install_append() {
27 TEMPLATE_CONF_DIR=${S}${sysconfdir}/${SRCNAME}
28 NOVA_CONF_DIR=${D}/${sysconfdir}/nova
29
30 install -d ${NOVA_CONF_DIR}
31 install -m 600 ${S}/etc/nova/policy.json ${NOVA_CONF_DIR}/
32
33 # Deploy filters to /etc/nova/rootwrap.d
34 install -m 755 -d ${NOVA_CONF_DIR}/rootwrap.d
35 install -m 600 ${S}/etc/nova/rootwrap.d/*.filters ${NOVA_CONF_DIR}/rootwrap.d
36 chown -R root:root ${NOVA_CONF_DIR}/rootwrap.d
37 chmod 644 ${NOVA_CONF_DIR}/rootwrap.d
38
39 # Set up rootwrap.conf, pointing to /etc/nova/rootwrap.d
40 install -m 644 ${S}/etc/nova/rootwrap.conf ${NOVA_CONF_DIR}/
41 sed -e "s:^filters_path=.*$:filters_path=${NOVA_CONF_DIR}/rootwrap.d:" \
42 -i ${NOVA_CONF_DIR}/rootwrap.conf
43 chown root:root $NOVA_CONF_DIR/rootwrap.conf
44
45 # Set up the rootwrap sudoers for nova
46 install -d ${D}${sysconfdir}/sudoers.d
47 touch ${D}${sysconfdir}/sudoers.d/nova-rootwrap
48 chmod 0440 ${D}${sysconfdir}/sudoers.d/nova-rootwrap
49 chown root:root ${D}${sysconfdir}/sudoers.d/nova-rootwrap
50 echo "root ALL=(root) NOPASSWD: ${bindir}/nova-rootwrap" > \
51 ${D}${sysconfdir}/sudoers.d/nova-rootwrap
52
53 #Configuration options
54 sed -e "s:%SERVICE_TENANT_NAME%:${SERVICE_TENANT_NAME}:g" \
55 ${TEMPLATE_CONF_DIR}/api-paste.ini > ${WORKDIR}/api-paste.ini
56 sed -e "s:%SERVICE_USER%:${SRCNAME}:g" -i ${WORKDIR}/api-paste.ini
57 sed -e "s:%SERVICE_PASSWORD%:${SERVICE_PASSWORD}:g" \
58 -i ${WORKDIR}/api-paste.ini
59
60 sed -e "s:%DB_USER%:${DB_USER}:g" -i ${WORKDIR}/nova.conf
61 sed -e "s:%DB_PASSWORD%:${DB_PASSWORD}:g" -i ${WORKDIR}/nova.conf
62
63 sed -e "s:%OS_PASSWORD%:${ADMIN_PASSWORD}:g" -i ${WORKDIR}/openrc
64 sed -e "s:%SERVICE_TOKEN%:${SERVICE_TOKEN}:g" -i ${WORKDIR}/openrc
65
66 #Copy the configuration file
67 install -m 664 ${WORKDIR}/nova.conf ${NOVA_CONF_DIR}/nova.conf
68 install -m 664 ${WORKDIR}/api-paste.ini ${NOVA_CONF_DIR}
69 install -m 664 ${WORKDIR}/openrc ${NOVA_CONF_DIR}
70
71 install -d ${NOVA_CONF_DIR}/instances
72
73 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
74 install -d ${D}${sysconfdir}/init.d
75 install -m 0755 ${WORKDIR}/nova-compute ${D}${sysconfdir}/init.d/nova-compute
76 install -m 0755 ${WORKDIR}/nova-all ${D}${sysconfdir}/init.d/nova-all
77 fi
78
79}
80
81USERADD_PACKAGES = "${PN}"
82GROUPADD_PARAM_${PN} = "--system nova"
83USERADD_PARAM_${PN} = "--system --home /var/lib/nova -g nova \
84 --no-create-home --shell /bin/false nova"
85
86PACKAGES += "${SRCNAME}-common ${SRCNAME}-compute ${SRCNAME}-controller"
87
88pkg_postinst_${SRCNAME}-common () {
89 if [ "x$D" != "x" ]; then
90 exit 1
91 fi
92
93 echo "source /etc/nova/openrc" > /home/root/.bashrc
94}
95
96pkg_postinst_${SRCNAME}-controller () {
97 if [ "x$D" != "x" ]; then
98 exit 1
99 fi
100
101 # This is to make sure postgres is configured and running
102 if ! pidof postmaster > /dev/null; then
103 sudo -u postgres initdb -D /etc/postgresql/
104 /etc/init.d/postgresql start
105 sleep 0.2
106 sudo -u postgres psql -c "CREATE ROLE ${DB_USER} WITH SUPERUSER LOGIN PASSWORD '${DB_PASSWORD}'"
107 fi
108
109 sudo -u postgres createdb nova
110 nova-manage db sync
111}
112
113
114FILES_${PN} = "${libdir}/*"
115
116FILES_${SRCNAME}-common = " ${bindir}/nova-manage \
117 ${bindir}/nova-rootwrap \
118 ${sysconfdir}/${SRCNAME}/* \
119 ${sysconfdir}/sudoers.d"
120
121FILES_${SRCNAME}-compute = "${bindir}/nova-compute \
122 ${sysconfdir}/init.d/nova-compute"
123
124FILES_${SRCNAME}-controller = "${bindir}/* \
125 ${sysconfdir}/init.d/nova-all"
126
127RDEPENDS_${PN} = " python-modules \
128 python-misc \
129 python-argparse \
130 python-amqplib \
131 python-anyjson \
132 python-babel \
133 python-boto \
134 python-cinderclient \
135 python-cheetah \
136 python-eventlet \
137 python-feedparser \
138 python-glanceclient \
139 python-greenlet \
140 python-httplib2 \
141 python-iso8601 \
142 python-kombu \
143 python-lxml \
144 python-netaddr \
145 python-oslo.config \
146 python-paste \
147 python-pastedeploy \
148 python-paramiko \
149 python-pyasn1 \
150 python-setuptools-git \
151 python-simplejson \
152 python-setuptools \
153 python-sqlalchemy \
154 python-sqlalchemy-migrate \
155 python-stevedore \
156 python-suds \
157 python-quantumclient \
158 python-routes \
159 python-webob \
160 python-websockify \
161 "
162
163RDEPENDS_${SRCNAME}-common = "${PN} openssl openssl-misc libxml2 libxslt \
164 iptables curl dnsmasq sudo procps"
165
166RDEPENDS_${SRCNAME}-compute = "${PN} nova-common \
167 qemu libvirt libvirt-libvirtd libvirt-python libvirt-virsh"
168
169RDEPENDS_${SRCNAME}-controller = "${PN} nova-common \
170 postgresql postgresql-client python-psycopg2"
171
172INITSCRIPT_PACKAGES = "${SRCNAME}-compute ${SRCNAME}-controller"
173INITSCRIPT_NAME_${SRCNAME}-compute = "nova-compute"
174INITSCRIPT_NAME_${SRCNAME}-controller = "nova-all"