diff options
author | Amy Fong <amy.fong@windriver.com> | 2014-03-20 15:46:59 -0400 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-03-24 16:46:05 -0400 |
commit | 6423ced4885488dbe8cc05249d7d16cbcfe750c2 (patch) | |
tree | 490a3a3f27fc71f40c63a457988dfdd2840d1702 /meta-openstack | |
parent | 37cc0a34722fe53b8b532694ac686bbb995fe665 (diff) | |
download | meta-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')
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 | |||
7 | NOVA_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 | ||
22 | ENABLED=true | 22 | ENABLED=true |
23 | 23 | ||
24 | if test -f /etc/default/nova-novncproxy; then | 24 | if test -f /etc/default/nova-consoleproxy; then |
25 | . /etc/default/nova-novncproxy | 25 | . /etc/default/nova-consoleproxy |
26 | fi | ||
27 | |||
28 | # default to novnc | ||
29 | if [ -z "${NOVA_CONSOLE_PROXY_TYPE}" ] ; then | ||
30 | NOVA_CONSOLE_PROXY_TYPE="novnc" | ||
31 | fi | ||
32 | |||
33 | if ! [ "${NOVA_CONSOLE_PROXY_TYPE}" = "novnc" ] ; then | ||
34 | exit 0 | ||
26 | fi | 35 | fi |
27 | 36 | ||
28 | mkdir -p /var/run/nova | 37 | mkdir -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 | |||
16 | set -e | ||
17 | |||
18 | NAME=nova-spicehtml5proxy | ||
19 | DESC="OpenStack Compute Spice HTML5 Proxy" | ||
20 | SCRIPTNAME=/etc/init.d/$NAME | ||
21 | DAEMON=/usr/bin/nova-spicehtml5proxy | ||
22 | DAEMON_ARGS="" | ||
23 | PIDFILE=/var/run/nova/$NAME.pid | ||
24 | |||
25 | ENABLED=true | ||
26 | |||
27 | if test -f /etc/default/nova-consoleproxy; then | ||
28 | . /etc/default/nova-consoleproxy | ||
29 | fi | ||
30 | |||
31 | if ! [ "${NOVA_CONSOLE_PROXY_TYPE}" = "spicehtml5" ] ; then | ||
32 | exit 0 | ||
33 | fi | ||
34 | |||
35 | mkdir -p /var/run/nova | ||
36 | chown nova:root /var/run/nova/ | ||
37 | |||
38 | mkdir -p /var/lock/nova | ||
39 | chown nova:root /var/lock/nova/ | ||
40 | |||
41 | . /lib/lsb/init-functions | ||
42 | |||
43 | export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" | ||
44 | export TMPDIR=/var/lib/nova/tmp | ||
45 | |||
46 | if ! [ -x ${DAEMON} ] ; then | ||
47 | exit 0 | ||
48 | fi | ||
49 | |||
50 | status() | ||
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 | |||
62 | case "$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 | ;; | ||
89 | esac | ||
90 | |||
91 | exit 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/ | |||
24 | libvirt_images_type = %LIBVIRT_IMAGES_TYPE% | 24 | libvirt_images_type = %LIBVIRT_IMAGES_TYPE% |
25 | 25 | ||
26 | #VNC | 26 | #VNC |
27 | vnc_enabled = true | 27 | vnc_enabled = false |
28 | vncserver_listen = %COMPUTE_IP% | 28 | vncserver_listen = %COMPUTE_IP% |
29 | novncproxy_base_url=http://%CONTROLLER_IP%:6080/vnc_auto.html | 29 | novncproxy_base_url=http://%CONTROLLER_IP%:6080/vnc_auto.html |
30 | vncserver_proxyclient_address=%COMPUTE_IP% | 30 | vncserver_proxyclient_address=%COMPUTE_IP% |
@@ -68,3 +68,11 @@ libvirt_images_rbd_pool=cinder-volumes | |||
68 | libvirt_images_rbd_ceph_conf=/etc/ceph/ceph.conf | 68 | libvirt_images_rbd_ceph_conf=/etc/ceph/ceph.conf |
69 | rbd_user=cinder-volume | 69 | rbd_user=cinder-volume |
70 | #rbd_secret_uuid= | 70 | #rbd_secret_uuid= |
71 | |||
72 | [spice] | ||
73 | agent_enabled=True | ||
74 | enabled=True | ||
75 | html5proxy_base_url=http://%CONTROLLER_IP%:6082/spice_auto.html | ||
76 | keymap=en-us | ||
77 | server_listen=%COMPUTE_IP% | ||
78 | server_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 | " |
28 | SRCREV="afc9e4e23327fb566e8ade2c0c06c90d369c9e29" | 30 | SRCREV="afc9e4e23327fb566e8ade2c0c06c90d369c9e29" |
29 | PV="2013.2.2+git${SRCPV}" | 31 | PV="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 | ||
121 | pkg_postinst_${SRCNAME}-setup () { | 126 | pkg_postinst_${SRCNAME}-setup () { |
@@ -156,6 +161,7 @@ PACKAGES += " ${SRCNAME}-tests" | |||
156 | PACKAGES += " ${SRCNAME}-setup ${SRCNAME}-common ${SRCNAME}-compute ${SRCNAME}-controller" | 161 | PACKAGES += " ${SRCNAME}-setup ${SRCNAME}-common ${SRCNAME}-compute ${SRCNAME}-controller" |
157 | PACKAGES += " ${SRCNAME}-consoleauth" | 162 | PACKAGES += " ${SRCNAME}-consoleauth" |
158 | PACKAGES += " ${SRCNAME}-novncproxy" | 163 | PACKAGES += " ${SRCNAME}-novncproxy" |
164 | PACKAGES += " ${SRCNAME}-spicehtml5proxy" | ||
159 | PACKAGES += " ${SRCNAME}-network" | 165 | PACKAGES += " ${SRCNAME}-network" |
160 | PACKAGES += " ${SRCNAME}-scheduler" | 166 | PACKAGES += " ${SRCNAME}-scheduler" |
161 | PACKAGES += " ${SRCNAME}-cert" | 167 | PACKAGES += " ${SRCNAME}-cert" |
@@ -185,6 +191,10 @@ FILES_${SRCNAME}-consoleauth = " \ | |||
185 | FILES_${SRCNAME}-novncproxy = " \ | 191 | FILES_${SRCNAME}-novncproxy = " \ |
186 | ${sysconfdir}/init.d/nova-novncproxy \ | 192 | ${sysconfdir}/init.d/nova-novncproxy \ |
187 | " | 193 | " |
194 | FILES_${SRCNAME}-spicehtml5proxy = " \ | ||
195 | ${sysconfdir}/init.d/nova-spicehtml5proxy \ | ||
196 | ${sysconfdir}/default/nova-consoleproxy \ | ||
197 | " | ||
188 | FILES_${SRCNAME}-network = " \ | 198 | FILES_${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 | ||
250 | RDEPENDS_${SRCNAME}-common = "${PN} openssl openssl-misc libxml2 libxslt \ | 261 | RDEPENDS_${SRCNAME}-common = "${PN} openssl openssl-misc libxml2 libxslt \ |
@@ -253,6 +264,7 @@ RDEPENDS_${SRCNAME}-common = "${PN} openssl openssl-misc libxml2 libxslt \ | |||
253 | RDEPENDS_${SRCNAME}-controller = "${PN} ${SRCNAME}-common \ | 264 | RDEPENDS_${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" |
265 | RDEPENDS_${SRCNAME}-setup = "postgresql sudo ${SRCNAME}-common" | 277 | RDEPENDS_${SRCNAME}-setup = "postgresql sudo ${SRCNAME}-common" |
266 | 278 | ||
267 | INITSCRIPT_PACKAGES = "${SRCNAME}-compute ${SRCNAME}-consoleauth ${SRCNAME}-novncproxy" | 279 | INITSCRIPT_PACKAGES = "${SRCNAME}-compute ${SRCNAME}-consoleauth ${SRCNAME}-novncproxy ${SRCNAME}-spicehtml5proxy" |
268 | INITSCRIPT_PACKAGES += "${SRCNAME}-network ${SRCNAME}-scheduler ${SRCNAME}-cert ${SRCNAME}-conductor" | 280 | INITSCRIPT_PACKAGES += "${SRCNAME}-network ${SRCNAME}-scheduler ${SRCNAME}-cert ${SRCNAME}-conductor" |
269 | INITSCRIPT_PACKAGES += "${SRCNAME}-api" | 281 | INITSCRIPT_PACKAGES += "${SRCNAME}-api" |
270 | 282 | ||
@@ -291,3 +303,5 @@ INITSCRIPT_PARAMS_${SRCNAME}-consoleauth = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | |||
291 | INITSCRIPT_NAME_${SRCNAME}-novncproxy = "nova-novncproxy" | 303 | INITSCRIPT_NAME_${SRCNAME}-novncproxy = "nova-novncproxy" |
292 | INITSCRIPT_PARAMS_${SRCNAME}-novncproxy = "${OS_DEFAULT_INITSCRIPT_PARAMS}" | 304 | INITSCRIPT_PARAMS_${SRCNAME}-novncproxy = "${OS_DEFAULT_INITSCRIPT_PARAMS}" |
293 | 305 | ||
306 | INITSCRIPT_NAME_${SRCNAME}-spicehtml5proxy = "nova-spicehtml5proxy" | ||
307 | INITSCRIPT_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 @@ | |||
1 | HOMEPAGE = "http://www.spice-space.org/page/Html5" | ||
2 | SUMMARY = "Prototype Spice Javascript client" | ||
3 | DESCRIPTION = "\ | ||
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 | " | ||
14 | LICENSE = "GPLv3 & LGPLv3" | ||
15 | LIC_FILES_CHKSUM = "\ | ||
16 | file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ | ||
17 | file://COPYING.LESSER;md5=e6a600fd5e1d9cbde2d983680233ad02" | ||
18 | |||
19 | # Version is based on checkout 0.1.4" | ||
20 | PV = "0.1.4" | ||
21 | SRCREV = "19ade3cf38cc5f5b61fd038f5ce5f4cdb080e9ca" | ||
22 | SRC_URI = "git://anongit.freedesktop.org/spice/spice-html5" | ||
23 | |||
24 | S = "${WORKDIR}/git" | ||
25 | |||
26 | RDEPENDS = "python-websockify" | ||
27 | |||
28 | do_install() { | ||
29 | oe_runmake DESTDIR="${D}" datadir="${D}/${datadir}" install | ||
30 | } | ||