[openstack-nova/el6] add upstart jobs for RHEL6

Alan Pevec apevec at fedoraproject.org
Fri Jun 22 23:05:13 UTC 2012


commit e3ab30316b6ca2efd1546f666843f103a7a053dc
Author: Alan Pevec <apevec at redhat.com>
Date:   Sat Jun 23 00:46:38 2012 +0200

    add upstart jobs for RHEL6
    
    alternative to sysv initscript, only one can be enabled!
    Disable sysv initscripts, before using upstart jobs:
    
     service $SERVICE stop
     chkconfig $SERVICE off
    
    Install upstart job:
    
     cp /usr/share/nova/$SERVICE.upstart \
        /etc/init/$SERVICE.conf
     initctl reload-configuration
     initctl start $SERVICE

 openstack-nova-api.upstart          |    8 ++++++++
 openstack-nova-cert.upstart         |    8 ++++++++
 openstack-nova-compute.upstart      |    8 ++++++++
 openstack-nova-console.upstart      |    8 ++++++++
 openstack-nova-consoleauth.upstart  |    8 ++++++++
 openstack-nova-metadata-api.upstart |    8 ++++++++
 openstack-nova-network.upstart      |    8 ++++++++
 openstack-nova-objectstore.upstart  |    8 ++++++++
 openstack-nova-scheduler.upstart    |    8 ++++++++
 openstack-nova-volume.upstart       |    8 ++++++++
 openstack-nova-xvpvncproxy.upstart  |    8 ++++++++
 openstack-nova.spec                 |   25 +++++++++++++++++++++++++
 12 files changed, 113 insertions(+), 0 deletions(-)
---
diff --git a/openstack-nova-api.upstart b/openstack-nova-api.upstart
new file mode 100644
index 0000000..183e357
--- /dev/null
+++ b/openstack-nova-api.upstart
@@ -0,0 +1,8 @@
+description "OpenStack Nova API Server"
+
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [S016]
+
+respawn
+
+exec su -s /bin/sh -c "exec /usr/bin/nova-api --config-file /etc/nova/nova.conf --logfile /var/log/nova/api.log" nova
diff --git a/openstack-nova-cert.upstart b/openstack-nova-cert.upstart
new file mode 100644
index 0000000..6fd31f7
--- /dev/null
+++ b/openstack-nova-cert.upstart
@@ -0,0 +1,8 @@
+description "OpenStack Nova Cert Server"
+
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [S016]
+
+respawn
+
+exec su -s /bin/sh -c "exec /usr/bin/nova-cert --config-file /etc/nova/nova.conf --logfile /var/log/nova/cert.log" nova
diff --git a/openstack-nova-compute.upstart b/openstack-nova-compute.upstart
new file mode 100644
index 0000000..911532c
--- /dev/null
+++ b/openstack-nova-compute.upstart
@@ -0,0 +1,8 @@
+description "OpenStack Nova Compute Server"
+
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [S016]
+
+respawn
+
+exec su -s /bin/sh -c "exec /usr/bin/nova-compute --config-file /etc/nova/nova.conf --logfile /var/log/nova/compute.log" nova
diff --git a/openstack-nova-console.upstart b/openstack-nova-console.upstart
new file mode 100644
index 0000000..b6b42a1
--- /dev/null
+++ b/openstack-nova-console.upstart
@@ -0,0 +1,8 @@
+description "OpenStack Nova Console Proxy Server"
+
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [S016]
+
+respawn
+
+exec su -s /bin/sh -c "exec /usr/bin/nova-console --config-file /etc/nova/nova.conf --logfile /var/log/nova/console.log" nova
diff --git a/openstack-nova-consoleauth.upstart b/openstack-nova-consoleauth.upstart
new file mode 100644
index 0000000..495b91e
--- /dev/null
+++ b/openstack-nova-consoleauth.upstart
@@ -0,0 +1,8 @@
+description "OpenStack Nova VNC console auth Server"
+
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [S016]
+
+respawn
+
+exec su -s /bin/sh -c "exec /usr/bin/nova-consoleauth --config-file /etc/nova/nova.conf --logfile /var/log/nova/consoleauth.log" nova
diff --git a/openstack-nova-metadata-api.upstart b/openstack-nova-metadata-api.upstart
new file mode 100644
index 0000000..9cdece4
--- /dev/null
+++ b/openstack-nova-metadata-api.upstart
@@ -0,0 +1,8 @@
+description "OpenStack Nova Metadata API Server"
+
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [S016]
+
+respawn
+
+exec su -s /bin/sh -c "exec /usr/bin/nova-api-metadata --config-file /etc/nova/nova.conf --logfile /var/log/nova/metadata-api.log" nova
diff --git a/openstack-nova-network.upstart b/openstack-nova-network.upstart
new file mode 100644
index 0000000..4ff9c40
--- /dev/null
+++ b/openstack-nova-network.upstart
@@ -0,0 +1,8 @@
+description "OpenStack Nova Network Server"
+
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [S016]
+
+respawn
+
+exec su -s /bin/sh -c "exec /usr/bin/nova-network --config-file /etc/nova/nova.conf --logfile /var/log/nova/network.log" nova
diff --git a/openstack-nova-objectstore.upstart b/openstack-nova-objectstore.upstart
new file mode 100644
index 0000000..ded9c99
--- /dev/null
+++ b/openstack-nova-objectstore.upstart
@@ -0,0 +1,8 @@
+description "OpenStack Nova Objectstore Server"
+
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [S016]
+
+respawn
+
+exec su -s /bin/sh -c "exec /usr/bin/nova-objectstore --config-file /etc/nova/nova.conf --logfile /var/log/nova/objectstore.log" nova
diff --git a/openstack-nova-scheduler.upstart b/openstack-nova-scheduler.upstart
new file mode 100644
index 0000000..185cc24
--- /dev/null
+++ b/openstack-nova-scheduler.upstart
@@ -0,0 +1,8 @@
+description "OpenStack Nova Scheduler Server"
+
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [S016]
+
+respawn
+
+exec su -s /bin/sh -c "exec /usr/bin/nova-scheduler --config-file /etc/nova/nova.conf --logfile /var/log/nova/scheduler.log" nova
diff --git a/openstack-nova-volume.upstart b/openstack-nova-volume.upstart
new file mode 100644
index 0000000..9533e55
--- /dev/null
+++ b/openstack-nova-volume.upstart
@@ -0,0 +1,8 @@
+description "OpenStack Nova Volume Server"
+
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [S016]
+
+respawn
+
+exec su -s /bin/sh -c "exec /usr/bin/nova-volume --config-file /etc/nova/nova.conf --logfile /var/log/nova/volume.log" nova
diff --git a/openstack-nova-xvpvncproxy.upstart b/openstack-nova-xvpvncproxy.upstart
new file mode 100644
index 0000000..2f7a8df
--- /dev/null
+++ b/openstack-nova-xvpvncproxy.upstart
@@ -0,0 +1,8 @@
+description "OpenStack Nova XVP VncProxy Server"
+
+start on stopped rc RUNLEVEL=[2345]
+stop on runlevel [S016]
+
+respawn
+
+exec su -s /bin/sh -c "exec /usr/bin/nova-xvpvncproxy --config-file /etc/nova/nova.conf --logfile /var/log/nova/xvpvncproxy.log" nova
diff --git a/openstack-nova.spec b/openstack-nova.spec
index 0fde61d..0362129 100644
--- a/openstack-nova.spec
+++ b/openstack-nova.spec
@@ -13,17 +13,28 @@ Source1:          nova.conf
 Source6:          nova.logrotate
 
 Source10:         openstack-nova-api.init
+Source100:        openstack-nova-api.upstart
 Source11:         openstack-nova-cert.init
+Source110:        openstack-nova-cert.upstart
 Source12:         openstack-nova-compute.init
+Source120:        openstack-nova-compute.upstart
 Source13:         openstack-nova-network.init
+Source130:        openstack-nova-network.upstart
 Source14:         openstack-nova-objectstore.init
+Source140:        openstack-nova-objectstore.upstart
 Source15:         openstack-nova-scheduler.init
+Source150:        openstack-nova-scheduler.upstart
 Source16:         openstack-nova-volume.init
+Source160:        openstack-nova-volume.upstart
 Source17:         openstack-nova-direct-api.init
 Source18:         openstack-nova-xvpvncproxy.init
+Source180:        openstack-nova-xvpvncproxy.upstart
 Source19:         openstack-nova-console.init
+Source190:        openstack-nova-console.upstart
 Source24:         openstack-nova-consoleauth.init
+Source240:        openstack-nova-consoleauth.upstart
 Source25:         openstack-nova-metadata-api.init
+Source250:        openstack-nova-metadata-api.upstart
 
 Source20:         nova-sudoers
 Source21:         nova-polkit.pkla
@@ -269,6 +280,19 @@ install -p -D -m 644 nova/virt/libvirt.xml.template %{buildroot}%{_datarootdir}/
 install -p -D -m 644 nova/virt/interfaces.template %{buildroot}%{_datarootdir}/nova/interfaces.template
 install -p -D -m 644 %{SOURCE22} %{buildroot}%{_datarootdir}/nova/interfaces.template
 
+# Install upstart jobs examples
+install -p -m 644 %{SOURCE100} %{buildroot}%{_datadir}/nova/
+install -p -m 644 %{SOURCE110} %{buildroot}%{_datadir}/nova/
+install -p -m 644 %{SOURCE120} %{buildroot}%{_datadir}/nova/
+install -p -m 644 %{SOURCE130} %{buildroot}%{_datadir}/nova/
+install -p -m 644 %{SOURCE140} %{buildroot}%{_datadir}/nova/
+install -p -m 644 %{SOURCE150} %{buildroot}%{_datadir}/nova/
+install -p -m 644 %{SOURCE160} %{buildroot}%{_datadir}/nova/
+install -p -m 644 %{SOURCE180} %{buildroot}%{_datadir}/nova/
+install -p -m 644 %{SOURCE190} %{buildroot}%{_datadir}/nova/
+install -p -m 644 %{SOURCE240} %{buildroot}%{_datadir}/nova/
+install -p -m 644 %{SOURCE250} %{buildroot}%{_datadir}/nova/
+
 install -d -m 755 %{buildroot}%{_sysconfdir}/polkit-1/localauthority/50-local.d
 install -p -D -m 644 %{SOURCE21} %{buildroot}%{_sysconfdir}/polkit-1/localauthority/50-local.d/50-nova.pkla
 
@@ -369,6 +393,7 @@ fi
 * Fri Jun 22 2012 Pádraig Brady <P at draigBrady.com> - 2012.1.1-1
 - Update to essex stable release 2012.1.1
 - Improve performance and stability of file injection
+- add upstart jobs, alternative to sysv initscripts
 
 * Fri Jun 15 2012 Pádraig Brady <P at draigBrady.com> - 2012.1-12
 - update performance and stability fixes from essex stable


More information about the scm-commits mailing list