summaryrefslogtreecommitdiffstats
path: root/meta-openstack
diff options
context:
space:
mode:
authorAmy Fong <amy.fong@windriver.com>2014-03-20 15:46:59 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-03-24 16:46:05 -0400
commit6423ced4885488dbe8cc05249d7d16cbcfe750c2 (patch)
tree490a3a3f27fc71f40c63a457988dfdd2840d1702 /meta-openstack
parent37cc0a34722fe53b8b532694ac686bbb995fe665 (diff)
downloadmeta-cloud-services-6423ced4885488dbe8cc05249d7d16cbcfe750c2.tar.gz
OpenStack: add SPICE console support
Package spice-html5 Modify python-nova to add infrastructure for nova-spicehtml5proxy support. Note: spice is the default Signed-off-by: Amy Fong <amy.fong@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack')
-rw-r--r--meta-openstack/recipes-devtools/python/python-nova/nova-consoleproxy7
-rw-r--r--meta-openstack/recipes-devtools/python/python-nova/nova-novncproxy13
-rw-r--r--meta-openstack/recipes-devtools/python/python-nova/nova-spicehtml5proxy91
-rw-r--r--meta-openstack/recipes-devtools/python/python-nova/nova.conf10
-rw-r--r--meta-openstack/recipes-devtools/python/python-nova_git.bb16
-rw-r--r--meta-openstack/recipes-support/spice-html5/spice-html5_git.bb30
6 files changed, 163 insertions, 4 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-nova/nova-consoleproxy b/meta-openstack/recipes-devtools/python/python-nova/nova-consoleproxy
new file mode 100644
index 0000000..12aa2b2
--- /dev/null
+++ b/meta-openstack/recipes-devtools/python/python-nova/nova-consoleproxy
@@ -0,0 +1,7 @@
1# The below switch enables you to select which type of console proxy daemon you
2# wish to start at boot time. Possible values are:
3# - spicehtml5
4# - xenvnc
5# - novnc
6
7NOVA_CONSOLE_PROXY_TYPE=spicehtml5
diff --git a/meta-openstack/recipes-devtools/python/python-nova/nova-novncproxy b/meta-openstack/recipes-devtools/python/python-nova/nova-novncproxy
index c976194..f2b2f22 100644
--- a/meta-openstack/recipes-devtools/python/python-nova/nova-novncproxy
+++ b/meta-openstack/recipes-devtools/python/python-nova/nova-novncproxy
@@ -21,8 +21,17 @@ PIDFILE=/var/run/nova/nova-novncproxy.pid
21 21
22ENABLED=true 22ENABLED=true
23 23
24if test -f /etc/default/nova-novncproxy; then 24if test -f /etc/default/nova-consoleproxy; then
25 . /etc/default/nova-novncproxy 25 . /etc/default/nova-consoleproxy
26fi
27
28# default to novnc
29if [ -z "${NOVA_CONSOLE_PROXY_TYPE}" ] ; then
30 NOVA_CONSOLE_PROXY_TYPE="novnc"
31fi
32
33if ! [ "${NOVA_CONSOLE_PROXY_TYPE}" = "novnc" ] ; then
34 exit 0
26fi 35fi
27 36
28mkdir -p /var/run/nova 37mkdir -p /var/run/nova
diff --git a/meta-openstack/recipes-devtools/python/python-nova/nova-spicehtml5proxy b/meta-openstack/recipes-devtools/python/python-nova/nova-spicehtml5proxy
new file mode 100644
index 0000000..d58f71e
--- /dev/null
+++ b/meta-openstack/recipes-devtools/python/python-nova/nova-spicehtml5proxy
@@ -0,0 +1,91 @@
1#! /bin/sh
2### BEGIN INIT INFO
3# Provides: nova-spicehtml5proxy
4# Required-Start: $remote_fs $syslog
5# Required-Stop: $remote_fs $syslog
6# Should-Start: libvirt-bin
7# Should-Stop: libvirt-bin
8# Default-Start: 2 3 4 5
9# Default-Stop: 0 1 6
10# Short-Description: nova-spicehtml5proxy service
11# Description: Provides spice html5 proxy services for the openstack
12# cloud computing system
13### END INIT INFO
14
15
16set -e
17
18NAME=nova-spicehtml5proxy
19DESC="OpenStack Compute Spice HTML5 Proxy"
20SCRIPTNAME=/etc/init.d/$NAME
21DAEMON=/usr/bin/nova-spicehtml5proxy
22DAEMON_ARGS=""
23PIDFILE=/var/run/nova/$NAME.pid
24
25ENABLED=true
26
27if test -f /etc/default/nova-consoleproxy; then
28 . /etc/default/nova-consoleproxy
29fi
30
31if ! [ "${NOVA_CONSOLE_PROXY_TYPE}" = "spicehtml5" ] ; then
32 exit 0
33fi
34
35mkdir -p /var/run/nova
36chown nova:root /var/run/nova/
37
38mkdir -p /var/lock/nova
39chown nova:root /var/lock/nova/
40
41. /lib/lsb/init-functions
42
43export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
44export TMPDIR=/var/lib/nova/tmp
45
46if ! [ -x ${DAEMON} ] ; then
47 exit 0
48fi
49
50status()
51{
52 pid=`cat $PIDFILE 2>/dev/null`
53 if [ -n "$pid" ]; then
54 if ps -p $pid >&- ; then
55 echo "$DESC is running"
56 return
57 fi
58 fi
59 echo "$DESC is not running"
60}
61
62case "$1" in
63 start)
64 test "$ENABLED" = "true" || exit 0
65 echo "Starting $DESC" "$NAME"
66 start-stop-daemon --start -b -m --pidfile $PIDFILE --exec ${DAEMON} -- ${DAEMON_ARGS}
67 log_end_msg $?
68 ;;
69 stop)
70 test "$ENABLED" = "true" || exit 0
71 echo "Stopping $DESC" "$NAME"
72 start-stop-daemon --stop --oknodo --pidfile ${PIDFILE}
73 log_end_msg $?
74 ;;
75 restart|force-reload|reload)
76 test "$ENABLED" = "true" || exit 1
77 $0 stop
78 sleep 1
79 $0 start
80 ;;
81 status)
82 test "$ENABLED" = "true" || exit 0
83 status
84 ;;
85 *)
86 echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|status|reload|status}"
87 exit 1
88 ;;
89esac
90
91exit 0
diff --git a/meta-openstack/recipes-devtools/python/python-nova/nova.conf b/meta-openstack/recipes-devtools/python/python-nova/nova.conf
index 8aaf41a..42dc47a 100644
--- a/meta-openstack/recipes-devtools/python/python-nova/nova.conf
+++ b/meta-openstack/recipes-devtools/python/python-nova/nova.conf
@@ -24,7 +24,7 @@ state_path=/var/run/nova/
24libvirt_images_type = %LIBVIRT_IMAGES_TYPE% 24libvirt_images_type = %LIBVIRT_IMAGES_TYPE%
25 25
26#VNC 26#VNC
27vnc_enabled = true 27vnc_enabled = false
28vncserver_listen = %COMPUTE_IP% 28vncserver_listen = %COMPUTE_IP%
29novncproxy_base_url=http://%CONTROLLER_IP%:6080/vnc_auto.html 29novncproxy_base_url=http://%CONTROLLER_IP%:6080/vnc_auto.html
30vncserver_proxyclient_address=%COMPUTE_IP% 30vncserver_proxyclient_address=%COMPUTE_IP%
@@ -68,3 +68,11 @@ libvirt_images_rbd_pool=cinder-volumes
68libvirt_images_rbd_ceph_conf=/etc/ceph/ceph.conf 68libvirt_images_rbd_ceph_conf=/etc/ceph/ceph.conf
69rbd_user=cinder-volume 69rbd_user=cinder-volume
70#rbd_secret_uuid= 70#rbd_secret_uuid=
71
72[spice]
73agent_enabled=True
74enabled=True
75html5proxy_base_url=http://%CONTROLLER_IP%:6082/spice_auto.html
76keymap=en-us
77server_listen=%COMPUTE_IP%
78server_proxyclient_address=%COMPUTE_IP%
diff --git a/meta-openstack/recipes-devtools/python/python-nova_git.bb b/meta-openstack/recipes-devtools/python/python-nova_git.bb
index 523102a..427c167 100644
--- a/meta-openstack/recipes-devtools/python/python-nova_git.bb
+++ b/meta-openstack/recipes-devtools/python/python-nova_git.bb
@@ -22,8 +22,10 @@ SRC_URI += "file://nova-all \
22 file://nova.init \ 22 file://nova.init \
23 file://nova-consoleauth \ 23 file://nova-consoleauth \
24 file://nova-novncproxy \ 24 file://nova-novncproxy \
25 file://nova-spicehtml5proxy \
25 file://nova.conf \ 26 file://nova.conf \
26 file://openrc \ 27 file://openrc \
28 file://nova-consoleproxy \
27 " 29 "
28SRCREV="afc9e4e23327fb566e8ade2c0c06c90d369c9e29" 30SRCREV="afc9e4e23327fb566e8ade2c0c06c90d369c9e29"
29PV="2013.2.2+git${SRCPV}" 31PV="2013.2.2+git${SRCPV}"
@@ -108,6 +110,7 @@ do_install_append() {
108 install -m 0755 ${WORKDIR}/nova-all ${D}${sysconfdir}/init.d/nova-all 110 install -m 0755 ${WORKDIR}/nova-all ${D}${sysconfdir}/init.d/nova-all
109 install -m 0755 ${WORKDIR}/nova-consoleauth ${D}${sysconfdir}/init.d/nova-consoleauth 111 install -m 0755 ${WORKDIR}/nova-consoleauth ${D}${sysconfdir}/init.d/nova-consoleauth
110 install -m 0755 ${WORKDIR}/nova-novncproxy ${D}${sysconfdir}/init.d/nova-novncproxy 112 install -m 0755 ${WORKDIR}/nova-novncproxy ${D}${sysconfdir}/init.d/nova-novncproxy
113 install -m 0755 ${WORKDIR}/nova-spicehtml5proxy ${D}${sysconfdir}/init.d/nova-spicehtml5proxy
111 114
112 for binary in api compute network scheduler cert conductor; do 115 for binary in api compute network scheduler cert conductor; do
113 sed "s:@suffix@:$binary:" < ${WORKDIR}/nova.init >${WORKDIR}/nova-$binary.init.sh 116 sed "s:@suffix@:$binary:" < ${WORKDIR}/nova.init >${WORKDIR}/nova-$binary.init.sh
@@ -116,6 +119,8 @@ do_install_append() {
116 fi 119 fi
117 120
118 cp run_tests.sh ${NOVA_CONF_DIR} 121 cp run_tests.sh ${NOVA_CONF_DIR}
122
123 install -D -o nova -m 664 ${WORKDIR}/nova-consoleproxy ${D}${sysconfdir}/default/nova-consoleproxy
119} 124}
120 125
121pkg_postinst_${SRCNAME}-setup () { 126pkg_postinst_${SRCNAME}-setup () {
@@ -156,6 +161,7 @@ PACKAGES += " ${SRCNAME}-tests"
156PACKAGES += " ${SRCNAME}-setup ${SRCNAME}-common ${SRCNAME}-compute ${SRCNAME}-controller" 161PACKAGES += " ${SRCNAME}-setup ${SRCNAME}-common ${SRCNAME}-compute ${SRCNAME}-controller"
157PACKAGES += " ${SRCNAME}-consoleauth" 162PACKAGES += " ${SRCNAME}-consoleauth"
158PACKAGES += " ${SRCNAME}-novncproxy" 163PACKAGES += " ${SRCNAME}-novncproxy"
164PACKAGES += " ${SRCNAME}-spicehtml5proxy"
159PACKAGES += " ${SRCNAME}-network" 165PACKAGES += " ${SRCNAME}-network"
160PACKAGES += " ${SRCNAME}-scheduler" 166PACKAGES += " ${SRCNAME}-scheduler"
161PACKAGES += " ${SRCNAME}-cert" 167PACKAGES += " ${SRCNAME}-cert"
@@ -185,6 +191,10 @@ FILES_${SRCNAME}-consoleauth = " \
185FILES_${SRCNAME}-novncproxy = " \ 191FILES_${SRCNAME}-novncproxy = " \
186 ${sysconfdir}/init.d/nova-novncproxy \ 192 ${sysconfdir}/init.d/nova-novncproxy \
187" 193"
194FILES_${SRCNAME}-spicehtml5proxy = " \
195 ${sysconfdir}/init.d/nova-spicehtml5proxy \
196 ${sysconfdir}/default/nova-consoleproxy \
197"
188FILES_${SRCNAME}-network = " \ 198FILES_${SRCNAME}-network = " \
189 ${sysconfdir}/init.d/nova-network \ 199 ${sysconfdir}/init.d/nova-network \
190" 200"
@@ -245,6 +255,7 @@ RDEPENDS_${PN} = " libvirt \
245 python-webob \ 255 python-webob \
246 python-websockify \ 256 python-websockify \
247 python-pbr \ 257 python-pbr \
258 spice-html5 \
248 " 259 "
249 260
250RDEPENDS_${SRCNAME}-common = "${PN} openssl openssl-misc libxml2 libxslt \ 261RDEPENDS_${SRCNAME}-common = "${PN} openssl openssl-misc libxml2 libxslt \
@@ -253,6 +264,7 @@ RDEPENDS_${SRCNAME}-common = "${PN} openssl openssl-misc libxml2 libxslt \
253RDEPENDS_${SRCNAME}-controller = "${PN} ${SRCNAME}-common \ 264RDEPENDS_${SRCNAME}-controller = "${PN} ${SRCNAME}-common \
254 ${SRCNAME}-consoleauth \ 265 ${SRCNAME}-consoleauth \
255 ${SRCNAME}-novncproxy \ 266 ${SRCNAME}-novncproxy \
267 ${SRCNAME}-spicehtml5proxy \
256 ${SRCNAME}-network \ 268 ${SRCNAME}-network \
257 ${SRCNAME}-scheduler \ 269 ${SRCNAME}-scheduler \
258 ${SRCNAME}-cert \ 270 ${SRCNAME}-cert \
@@ -264,7 +276,7 @@ RDEPENDS_${SRCNAME}-compute = "${PN} ${SRCNAME}-common \
264 qemu libvirt libvirt-libvirtd libvirt-python libvirt-virsh" 276 qemu libvirt libvirt-libvirtd libvirt-python libvirt-virsh"
265RDEPENDS_${SRCNAME}-setup = "postgresql sudo ${SRCNAME}-common" 277RDEPENDS_${SRCNAME}-setup = "postgresql sudo ${SRCNAME}-common"
266 278
267INITSCRIPT_PACKAGES = "${SRCNAME}-compute ${SRCNAME}-consoleauth ${SRCNAME}-novncproxy" 279INITSCRIPT_PACKAGES = "${SRCNAME}-compute ${SRCNAME}-consoleauth ${SRCNAME}-novncproxy ${SRCNAME}-spicehtml5proxy"
268INITSCRIPT_PACKAGES += "${SRCNAME}-network ${SRCNAME}-scheduler ${SRCNAME}-cert ${SRCNAME}-conductor" 280INITSCRIPT_PACKAGES += "${SRCNAME}-network ${SRCNAME}-scheduler ${SRCNAME}-cert ${SRCNAME}-conductor"
269INITSCRIPT_PACKAGES += "${SRCNAME}-api" 281INITSCRIPT_PACKAGES += "${SRCNAME}-api"
270 282
@@ -291,3 +303,5 @@ INITSCRIPT_PARAMS_${SRCNAME}-consoleauth = "${OS_DEFAULT_INITSCRIPT_PARAMS}"
291INITSCRIPT_NAME_${SRCNAME}-novncproxy = "nova-novncproxy" 303INITSCRIPT_NAME_${SRCNAME}-novncproxy = "nova-novncproxy"
292INITSCRIPT_PARAMS_${SRCNAME}-novncproxy = "${OS_DEFAULT_INITSCRIPT_PARAMS}" 304INITSCRIPT_PARAMS_${SRCNAME}-novncproxy = "${OS_DEFAULT_INITSCRIPT_PARAMS}"
293 305
306INITSCRIPT_NAME_${SRCNAME}-spicehtml5proxy = "nova-spicehtml5proxy"
307INITSCRIPT_PARAMS_${SRCNAME}-spicehtml5proxy = "${OS_DEFAULT_INITSCRIPT_PARAMS}"
diff --git a/meta-openstack/recipes-support/spice-html5/spice-html5_git.bb b/meta-openstack/recipes-support/spice-html5/spice-html5_git.bb
new file mode 100644
index 0000000..1905da2
--- /dev/null
+++ b/meta-openstack/recipes-support/spice-html5/spice-html5_git.bb
@@ -0,0 +1,30 @@
1HOMEPAGE = "http://www.spice-space.org/page/Html5"
2SUMMARY = "Prototype Spice Javascript client"
3DESCRIPTION = "\
4 Spice Web client which runs entirely within a modern browser. It is \
5 limited in function, a bit slow, and lacks support for many features of \
6 Spice (audio, video, agents just to name a few). \
7 . \
8 The Simple Protocol for Independent Computing Environments (SPICE) is \
9 a remote display system built for virtual environments which allows \
10 you to view a computing 'desktop' environment not only on the machine \
11 where it is running, but from anywhere on the Internet and from a wide \
12 variety of machine architectures. \
13 "
14LICENSE = "GPLv3 & LGPLv3"
15LIC_FILES_CHKSUM = "\
16 file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
17 file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02"
18
19# Version is based on checkout 0.1.4"
20PV = "0.1.4"
21SRCREV = "19ade3cf38cc5f5b61fd038f5ce5f4cdb080e9ca"
22SRC_URI = "git://anongit.freedesktop.org/spice/spice-html5"
23
24S = "${WORKDIR}/git"
25
26RDEPENDS = "python-websockify"
27
28do_install() {
29 oe_runmake DESTDIR="${D}" datadir="${D}/${datadir}" install
30}