Skip to content
Permalink
Browse files

Add support for setting up nova-spicehtml5proxy

Add a new service 'n-spice' which is off by default, but can
be enabled to turn on SPICE support in the Nova libvirt driver.
Also if neither n-novnc or n-xvnc are enabled, then disable
VNC support. This allows running in a SPICE only environment.

The spice-html5 repo will be checked out to support the Horizon
client integration

Change-Id: If74fad33a7b491450afd823758d35b06ebe72cb9
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
  • Loading branch information...
berrange committed Jan 3, 2013
1 parent 3edddd1 commit d10e12f1335492550d558d56c510fdf8ce55a9dc
Showing with 38 additions and 6 deletions.
  1. +1 −0 files/rpms/n-spice
  2. +2 −1 lib/nova
  3. +31 −5 stack.sh
  4. +4 −0 stackrc
@@ -0,0 +1 @@
numpy
@@ -551,13 +551,14 @@ function start_nova() {
screen_it n-sch "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-scheduler"
screen_it n-novnc "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-novncproxy --config-file $NOVA_CONF --web $NOVNC_DIR"
screen_it n-xvnc "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-xvpvncproxy --config-file $NOVA_CONF"
screen_it n-spice "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-spicehtml5proxy --config-file $NOVA_CONF --web $SPICE_DIR"
screen_it n-cauth "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-consoleauth"
}

# stop_nova() - Stop running processes (non-screen)
function stop_nova() {
# Kill the nova screen windows
for serv in n-api n-cpu n-crt n-net n-sch n-novnc n-xvnc n-cauth n-cond; do
for serv in n-api n-cpu n-crt n-net n-sch n-novnc n-xvnc n-cauth n-cond n-spice; do
screen -S $SCREEN_NAME -p $serv -X kill
done
}
@@ -313,6 +313,7 @@ source $TOP_DIR/lib/baremetal
HORIZON_DIR=$DEST/horizon
OPENSTACKCLIENT_DIR=$DEST/python-openstackclient
NOVNC_DIR=$DEST/noVNC
SPICE_DIR=$DEST/spice-html5
SWIFT3_DIR=$DEST/swift3

# Should cinder perform secure deletion of volumes?
@@ -716,6 +717,10 @@ if is_service_enabled n-novnc; then
# a websockets/html5 or flash powered VNC console for vm instances
git_clone $NOVNC_REPO $NOVNC_DIR $NOVNC_BRANCH
fi
if is_service_enabled n-spice; then
# a websockets/html5 or flash powered SPICE console for vm instances
git_clone $SPICE_REPO $SPICE_DIR $SPICE_BRANCH
fi
if is_service_enabled horizon; then
# dashboard
install_horizon
@@ -1008,17 +1013,38 @@ if is_service_enabled nova; then
iniset $NOVA_CONF DEFAULT novncproxy_base_url "$NOVNCPROXY_URL"
XVPVNCPROXY_URL=${XVPVNCPROXY_URL:-"http://$SERVICE_HOST:6081/console"}
iniset $NOVA_CONF DEFAULT xvpvncproxy_base_url "$XVPVNCPROXY_URL"
SPICEHTML5PROXY_URL=${SPICEHTML5PROXY_URL:-"http://$SERVICE_HOST:6082/spice_auto.html"}
iniset $NOVA_CONF spice html5proxy_base_url "$SPICEHTML5PROXY_URL"
fi
if [ "$VIRT_DRIVER" = 'xenserver' ]; then
VNCSERVER_PROXYCLIENT_ADDRESS=${VNCSERVER_PROXYCLIENT_ADDRESS=169.254.0.1}
else
VNCSERVER_PROXYCLIENT_ADDRESS=${VNCSERVER_PROXYCLIENT_ADDRESS=127.0.0.1}
fi
# Address on which instance vncservers will listen on compute hosts.
# For multi-host, this should be the management ip of the compute host.
VNCSERVER_LISTEN=${VNCSERVER_LISTEN=127.0.0.1}
iniset $NOVA_CONF DEFAULT vncserver_listen "$VNCSERVER_LISTEN"
iniset $NOVA_CONF DEFAULT vncserver_proxyclient_address "$VNCSERVER_PROXYCLIENT_ADDRESS"

if is_service_enabled n-novnc || is_service_enabled n-xvnc ; then
# Address on which instance vncservers will listen on compute hosts.
# For multi-host, this should be the management ip of the compute host.
VNCSERVER_LISTEN=${VNCSERVER_LISTEN=127.0.0.1}
iniset $NOVA_CONF DEFAULT vnc_enabled true
iniset $NOVA_CONF DEFAULT vncserver_listen "$VNCSERVER_LISTEN"
iniset $NOVA_CONF DEFAULT vncserver_proxyclient_address "$VNCSERVER_PROXYCLIENT_ADDRESS"
else
iniset $NOVA_CONF DEFAULT vnc_enabled false
fi

if is_service_enabled n-spice; then
# Address on which instance spiceservers will listen on compute hosts.
# For multi-host, this should be the management ip of the compute host.
SPICESERVER_PROXYCLIENT_ADDRESS=${SPICESERVER_PROXYCLIENT_ADDRESS=127.0.0.1}
SPICESERVER_LISTEN=${SPICESERVER_LISTEN=127.0.0.1}
iniset $NOVA_CONF spice enabled true
iniset $NOVA_CONF spice server_listen "$SPICESERVER_LISTEN"
iniset $NOVA_CONF spice server_proxyclient_address "$SPICESERVER_PROXYCLIENT_ADDRESS"
else
iniset $NOVA_CONF spice enabled false
fi

iniset $NOVA_CONF DEFAULT ec2_dmz_host "$EC2_DMZ_HOST"
iniset_rpc_backend nova $NOVA_CONF DEFAULT
iniset $NOVA_CONF DEFAULT glance_api_servers "$GLANCE_HOSTPORT"
@@ -78,6 +78,10 @@ KEYSTONE_BRANCH=master
NOVNC_REPO=https://github.com/kanaka/noVNC.git
NOVNC_BRANCH=master

# a websockets/html5 or flash powered SPICE console for vm instances
SPICE_REPO=http://anongit.freedesktop.org/git/spice/spice-html5.git
SPICE_BRANCH=master

# django powered web control panel for openstack
HORIZON_REPO=${GIT_BASE}/openstack/horizon.git
HORIZON_BRANCH=master

0 comments on commit d10e12f

Please sign in to comment.
You can’t perform that action at this time.