summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-nova-controller_2013.1.3.bb
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2013-08-25 23:59:46 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2013-08-28 18:42:00 -0400
commit6e8b7c9fb262768cb89712948b9fadf461e472ba (patch)
treed29fc8dd1b43815e3892ab28b2c1a05333359ef3 /meta-openstack/recipes-devtools/python/python-nova-controller_2013.1.3.bb
parentec5aab41b280d719c14e1c5d88d09e7b38168bb3 (diff)
downloadmeta-cloud-services-6e8b7c9fb262768cb89712948b9fadf461e472ba.tar.gz
nova: split into explicit compute and controller recipes
To allow unique configuration of nova for compute and controller nodes, the nova class is split into two, but packaged largely the same way. The compute and controller classes are introduced to hold configuration values and operations that are used by the common packaging routines to customize and deploy. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-nova-controller_2013.1.3.bb')
-rw-r--r--meta-openstack/recipes-devtools/python/python-nova-controller_2013.1.3.bb52
1 files changed, 52 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-nova-controller_2013.1.3.bb b/meta-openstack/recipes-devtools/python/python-nova-controller_2013.1.3.bb
new file mode 100644
index 0000000..686c1d7
--- /dev/null
+++ b/meta-openstack/recipes-devtools/python/python-nova-controller_2013.1.3.bb
@@ -0,0 +1,52 @@
1include python-nova.inc
2
3PR = "r0"
4
5FILESEXTRAPATHS := "${THISDIR}/${PYTHON_PN}"
6
7SRC_URI += "file://nova-all \
8 file://nova.conf \
9 file://openrc \
10 "
11
12inherit controller update-rc.d
13
14PACKAGES = "${SRCNAME}-controller ${SRCNAME}-controller-misc"
15
16do_install_append() {
17 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
18 install -d ${D}${sysconfdir}/init.d
19 install -m 0755 ${WORKDIR}/nova-all ${D}${sysconfdir}/init.d/nova-all
20 fi
21}
22
23pkg_postinst_${SRCNAME}-controller () {
24 if [ "x$D" != "x" ]; then
25 exit 1
26 fi
27
28 # This is to make sure postgres is configured and running
29 if ! pidof postmaster > /dev/null; then
30 sudo -u postgres initdb -D /etc/postgresql/
31 /etc/init.d/postgresql start
32 sleep 0.2
33 sudo -u postgres psql -c "CREATE ROLE ${DB_USER} WITH SUPERUSER LOGIN PASSWORD '${DB_PASSWORD}'"
34 fi
35
36 sudo -u postgres createdb nova
37 nova-manage db sync
38}
39
40
41FILES_${SRCNAME}-controller = "${files_${SRCNAME}-controller}"
42
43# If the compute is built, so we package it out of the way
44FILES_${SRCNAME}-controller-misc = "${files_${SRCNAME}-compute} ${files_${SRCNAME}-common} ${files_${PYTHON_PN}}"
45
46RDEPENDS_${SRCNAME}-controller = "${PYTHON_PN} ${SRCNAME}-common \
47 postgresql postgresql-client python-psycopg2"
48
49RCONFLICTS_${SRCNAME}-controller = "${SRCNAME}-compute"
50
51INITSCRIPT_PACKAGES = "${SRCNAME}-controller"
52INITSCRIPT_NAME_${SRCNAME}-controller = "nova-all"