From b625b4c4c3d299e3830951304f468a5399828b51 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Thu, 3 Oct 2013 00:20:31 -0400 Subject: nova: add novnc console proxy support With this commit the appropriate daemons are started on a control node boot to support horizon console access via the novnc proxy. Additionally, the proper nova configuration is set for boh the control and compute nodes for out of the box console connectivity between the compute, control and horizone interface. Signed-off-by: Bruce Ashfield --- .../python/python-nova/nova-novncproxy | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 meta-openstack/recipes-devtools/python/python-nova/nova-novncproxy (limited to 'meta-openstack/recipes-devtools/python/python-nova/nova-novncproxy') diff --git a/meta-openstack/recipes-devtools/python/python-nova/nova-novncproxy b/meta-openstack/recipes-devtools/python/python-nova/nova-novncproxy new file mode 100644 index 0000000..76cd1df --- /dev/null +++ b/meta-openstack/recipes-devtools/python/python-nova/nova-novncproxy @@ -0,0 +1,72 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: nova-novncproxy +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Should-Start: libvirt-bin +# Should-Stop: libvirt-bin +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: nova-novncproxy service +# Description: Provides vnc proxy services for the openstack +# cloud computing system +### END INIT INFO + + +set -e + +DAEMON=/usr/bin/nova-novncproxy +DAEMON_ARGS="" +PIDFILE=/var/run/nova/nova-novncproxy.pid + +ENABLED=true + +if test -f /etc/default/nova-novncproxy; then + . /etc/default/nova-novncproxy +fi + +mkdir -p /var/run/nova +chown nova:root /var/run/nova/ + +mkdir -p /var/lock/nova +chown nova:root /var/lock/nova/ + +. /lib/lsb/init-functions + +export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" +export TMPDIR=/var/lib/nova/tmp + +if ! [ -x ${DAEMON} ] ; then + exit 0 +fi + +case "$1" in + start) + test "$ENABLED" = "true" || exit 0 + echo "Starting nova vnc proxy" "nova-novncproxy" + start-stop-daemon --start -b -m --pidfile $PIDFILE --exec ${DAEMON} -- ${DAEMON_ARGS} + log_end_msg $? + ;; + stop) + test "$ENABLED" = "true" || exit 0 + echo "Stopping nova vnc proxy" "nova-novncproxy" + start-stop-daemon --stop --oknodo --pidfile ${PIDFILE} + log_end_msg $? + ;; + restart|force-reload) + test "$ENABLED" = "true" || exit 1 + $0 stop + sleep 1 + $0 start + ;; + status) + test "$ENABLED" = "true" || exit 0 + status_of_proc -p $PIDFILE $DAEMON nova-novncproxy && exit 0 || exit $? + ;; + *) + echo "Usage: /etc/init.d/nova-novncproxy {start|stop|restart|force-reload|status}" + exit 1 + ;; +esac + +exit 0 -- cgit v1.2.3-54-g00ecf