summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools
diff options
context:
space:
mode:
authorBruce Ashfield <bruce.ashfield@windriver.com>2013-11-18 14:28:38 -0500
committerBruce Ashfield <bruce.ashfield@windriver.com>2013-11-25 15:25:38 -0500
commit73d5afa1581566b00ae116034c958ab85f5b35fd (patch)
treef58ce4186f9c5eb03250b5e2fad42933ca35ae8f /meta-openstack/recipes-devtools
parent7b5bba81e957c4107c02f71b0d41b0a3f035385f (diff)
downloadmeta-cloud-services-73d5afa1581566b00ae116034c958ab85f5b35fd.tar.gz
nova: generate per-service initscripts
Rather than use the catch-all "nova-all" initscript, we switch to one initscript per-service. The old nova-all is still installed, but not linked as an initscript, so it can be used as a fallback. In addition to per-service initscripts, we switch to generating those initscripts from a common template script. Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools')
-rw-r--r--meta-openstack/recipes-devtools/python/python-nova/nova.init (renamed from meta-openstack/recipes-devtools/python/python-nova/nova-compute)11
-rw-r--r--meta-openstack/recipes-devtools/python/python-nova_git.bb54
2 files changed, 55 insertions, 10 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-nova/nova-compute b/meta-openstack/recipes-devtools/python/python-nova/nova.init
index 024b099..3a2bbac 100644
--- a/meta-openstack/recipes-devtools/python/python-nova/nova-compute
+++ b/meta-openstack/recipes-devtools/python/python-nova/nova.init
@@ -6,13 +6,14 @@
6# Required-Stop: $remote_fs $syslog 6# Required-Stop: $remote_fs $syslog
7# Default-Start: 3 5 7# Default-Start: 3 5
8# Default-Stop: 0 1 2 6 8# Default-Stop: 0 1 2 6
9# Short-Description: OpenStack Compute (Nova) - compute 9# Short-Description: OpenStack Compute (Nova) - @suffix@
10# Description: OpenStack Compute (Nova) - compute 10# Description: OpenStack Compute (Nova) - @suffix@
11### END INIT INFO 11### END INIT INFO
12 12
13DESC="nova-compute" 13SUFFIX="@suffix@"
14DAEMON="/usr/bin/nova-compute" 14DESC="nova-@suffix@"
15PIDFILE="/var/run/nova-compute.pid" 15DAEMON="/usr/bin/nova-$SUFFIX"
16PIDFILE="/var/run/nova-$SUFFIX.pid"
16 17
17start () 18start ()
18{ 19{
diff --git a/meta-openstack/recipes-devtools/python/python-nova_git.bb b/meta-openstack/recipes-devtools/python/python-nova_git.bb
index 24e2ed7..6a9c53e 100644
--- a/meta-openstack/recipes-devtools/python/python-nova_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-nova_git.bb
@@ -16,7 +16,7 @@ SRC_URI = "git://github.com/openstack/${SRCNAME}.git;branch=stable/havana \
16 " 16 "
17 17
18SRC_URI += "file://nova-all \ 18SRC_URI += "file://nova-all \
19 file://nova-compute \ 19 file://nova.init \
20 file://nova-consoleauth \ 20 file://nova-consoleauth \
21 file://nova-novncproxy \ 21 file://nova-novncproxy \
22 file://nova.conf \ 22 file://nova.conf \
@@ -92,10 +92,16 @@ do_install_append() {
92 92
93 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then 93 if ${@base_contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
94 install -d ${D}${sysconfdir}/init.d 94 install -d ${D}${sysconfdir}/init.d
95
96 # nova-all is installed (and packaged), but not used as an initscript by default
95 install -m 0755 ${WORKDIR}/nova-all ${D}${sysconfdir}/init.d/nova-all 97 install -m 0755 ${WORKDIR}/nova-all ${D}${sysconfdir}/init.d/nova-all
96 install -m 0755 ${WORKDIR}/nova-compute ${D}${sysconfdir}/init.d/nova-compute
97 install -m 0755 ${WORKDIR}/nova-consoleauth ${D}${sysconfdir}/init.d/nova-consoleauth 98 install -m 0755 ${WORKDIR}/nova-consoleauth ${D}${sysconfdir}/init.d/nova-consoleauth
98 install -m 0755 ${WORKDIR}/nova-novncproxy ${D}${sysconfdir}/init.d/nova-novncproxy 99 install -m 0755 ${WORKDIR}/nova-novncproxy ${D}${sysconfdir}/init.d/nova-novncproxy
100
101 for binary in api compute network scheduler cert conductor; do
102 sed "s:@suffix@:$binary:" < ${WORKDIR}/nova.init >${WORKDIR}/nova-$binary.init.sh
103 install -m 0755 ${WORKDIR}/nova-$binary.init.sh ${D}${sysconfdir}/init.d/nova-$binary
104 done
99 fi 105 fi
100} 106}
101 107
@@ -136,7 +142,11 @@ USERADD_PARAM_${PN} = "--system --home /var/lib/nova -g nova \
136PACKAGES += " ${SRCNAME}-common ${SRCNAME}-compute ${SRCNAME}-controller" 142PACKAGES += " ${SRCNAME}-common ${SRCNAME}-compute ${SRCNAME}-controller"
137PACKAGES += " ${SRCNAME}-consoleauth" 143PACKAGES += " ${SRCNAME}-consoleauth"
138PACKAGES += " ${SRCNAME}-novncproxy" 144PACKAGES += " ${SRCNAME}-novncproxy"
139 145PACKAGES += " ${SRCNAME}-network"
146PACKAGES += " ${SRCNAME}-scheduler"
147PACKAGES += " ${SRCNAME}-cert"
148PACKAGES += " ${SRCNAME}-conductor"
149PACKAGES += " ${SRCNAME}-api"
140 150
141FILES_${PN} = "${libdir}/*" 151FILES_${PN} = "${libdir}/*"
142 152
@@ -157,6 +167,21 @@ FILES_${SRCNAME}-consoleauth = " \
157FILES_${SRCNAME}-novncproxy = " \ 167FILES_${SRCNAME}-novncproxy = " \
158 ${sysconfdir}/init.d/nova-novncproxy \ 168 ${sysconfdir}/init.d/nova-novncproxy \
159" 169"
170FILES_${SRCNAME}-network = " \
171 ${sysconfdir}/init.d/nova-network \
172"
173FILES_${SRCNAME}-scheduler = " \
174 ${sysconfdir}/init.d/nova-scheduler \
175"
176FILES_${SRCNAME}-cert = " \
177 ${sysconfdir}/init.d/nova-cert \
178"
179FILES_${SRCNAME}-conductor = " \
180 ${sysconfdir}/init.d/nova-conductor \
181"
182FILES_${SRCNAME}-api = " \
183 ${sysconfdir}/init.d/nova-api \
184"
160 185
161RDEPENDS_${PN} = " python-modules \ 186RDEPENDS_${PN} = " python-modules \
162 python-misc \ 187 python-misc \
@@ -202,13 +227,32 @@ RDEPENDS_${SRCNAME}-common = "${PN} openssl openssl-misc libxml2 libxslt \
202RDEPENDS_${SRCNAME}-controller = "${PN} ${SRCNAME}-common \ 227RDEPENDS_${SRCNAME}-controller = "${PN} ${SRCNAME}-common \
203 ${SRCNAME}-consoleauth \ 228 ${SRCNAME}-consoleauth \
204 ${SRCNAME}-novncproxy \ 229 ${SRCNAME}-novncproxy \
230 ${SRCNAME}-network \
231 ${SRCNAME}-scheduler \
232 ${SRCNAME}-cert \
233 ${SRCNAME}-conductor \
234 ${SRCNAME}-api \
205 postgresql postgresql-client python-psycopg2" 235 postgresql postgresql-client python-psycopg2"
206 236
207RDEPENDS_${SRCNAME}-compute = "${PN} ${SRCNAME}-common \ 237RDEPENDS_${SRCNAME}-compute = "${PN} ${SRCNAME}-common \
208 qemu libvirt libvirt-libvirtd libvirt-python libvirt-virsh" 238 qemu libvirt libvirt-libvirtd libvirt-python libvirt-virsh"
209 239
210INITSCRIPT_PACKAGES = "${SRCNAME}-compute ${SRCNAME}-controller ${SRCNAME}-consoleauth ${SRCNAME}-novncproxy" 240INITSCRIPT_PACKAGES = "${SRCNAME}-compute ${SRCNAME}-consoleauth ${SRCNAME}-novncproxy"
211INITSCRIPT_NAME_${SRCNAME}-controller = "nova-all" 241INITSCRIPT_PACKAGES += "${SRCNAME}-network ${SRCNAME}-scheduler ${SRCNAME}-cert ${SRCNAME}-conductor"
242INITSCRIPT_PACKAGES += "${SRCNAME}-api"
243
244# nova-all can replace: network, scheduler, cert, conductor and api.
245# by default we go for the more granular initscripts, but this is left
246# in case nova-all is desired.
247# INITSCRIPT_PACKAGES += "${SRCNAME}-controller"
248# INITSCRIPT_NAME_${SRCNAME}-controller = "nova-all"
249INITSCRIPT_NAME_${SRCNAME}-network = "nova-network"
250INITSCRIPT_NAME_${SRCNAME}-scheduler = "nova-scheduler"
251INITSCRIPT_NAME_${SRCNAME}-cert = "nova-cert"
252INITSCRIPT_NAME_${SRCNAME}-conductor = "nova-conductor"
253INITSCRIPT_NAME_${SRCNAME}-api = "nova-api"
254
212INITSCRIPT_NAME_${SRCNAME}-compute = "nova-compute" 255INITSCRIPT_NAME_${SRCNAME}-compute = "nova-compute"
213INITSCRIPT_NAME_${SRCNAME}-consoleauth = "nova-consoleauth" 256INITSCRIPT_NAME_${SRCNAME}-consoleauth = "nova-consoleauth"
214INITSCRIPT_NAME_${SRCNAME}-novncproxy = "nova-novncproxy" 257INITSCRIPT_NAME_${SRCNAME}-novncproxy = "nova-novncproxy"
258