Option for installing spice-html5 and novnc from packages

The novnc and spice-html5 is installed from git repository by default,
but not from an openstack* repository.

In order to add vnc/spice proxy related gating tests they should be installed
from packages.

New boolean variables added to control the installation source:
NOVNC_FROM_PACKAGE and SPICE_FROM_PACKAGE

Related changes:
https://review.openstack.org/#/c/51790/
https://review.openstack.org/#/c/50822/

Change-Id: I1e55fd99edd30876924a13160afb74ff3e97c485
This commit is contained in:
Attila Fazekas 2013-10-29 08:23:43 +01:00
parent 00b6706ec2
commit 5a35e73b34
2 changed files with 24 additions and 15 deletions

View File

@ -73,9 +73,6 @@ SCHEDULER=${SCHEDULER:-nova.scheduler.filter_scheduler.FilterScheduler}
QEMU_CONF=/etc/libvirt/qemu.conf QEMU_CONF=/etc/libvirt/qemu.conf
NOVNC_DIR=$DEST/noVNC
SPICE_DIR=$DEST/spice-html5
# Set default defaults here as some hypervisor drivers override these # Set default defaults here as some hypervisor drivers override these
PUBLIC_INTERFACE_DEFAULT=br100 PUBLIC_INTERFACE_DEFAULT=br100
GUEST_INTERFACE_DEFAULT=eth0 GUEST_INTERFACE_DEFAULT=eth0
@ -590,6 +587,28 @@ function install_nova() {
install_nova_hypervisor install_nova_hypervisor
fi fi
if is_service_enabled n-novnc; then
# a websockets/html5 or flash powered VNC console for vm instances
if trueorfalse True "$NOVNC_FROM_PACKAGE"; then
NOVNC_WEB_DIR=/usr/share/novnc
install_package novnc
else
NOVNC_WEB_DIR=$DEST/noVNC
git_clone $NOVNC_REPO $NOVNC_WEB_DIR $NOVNC_BRANCH
fi
fi
if is_service_enabled n-spice; then
# a websockets/html5 or flash powered SPICE console for vm instances
if trueorfalse True "$SPICE_FROM_PACKAGE"; then
SPICE_WEB_DIR=/usr/share/spice-html5
install_package spice-html5
else
SPICE_WEB_DIR=$DEST/spice-html5
git_clone $SPICE_REPO $SPICE_WEB_DIR $SPICE_BRANCH
fi
fi
git_clone $NOVA_REPO $NOVA_DIR $NOVA_BRANCH git_clone $NOVA_REPO $NOVA_DIR $NOVA_BRANCH
setup_develop $NOVA_DIR setup_develop $NOVA_DIR
sudo install -D -m 0644 -o $STACK_USER {$NOVA_DIR/tools/,/etc/bash_completion.d/}nova-manage.bash_completion sudo install -D -m 0644 -o $STACK_USER {$NOVA_DIR/tools/,/etc/bash_completion.d/}nova-manage.bash_completion
@ -658,9 +677,9 @@ function start_nova_rest() {
screen_it n-sch "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-scheduler --config-file $compute_cell_conf" screen_it n-sch "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-scheduler --config-file $compute_cell_conf"
screen_it n-api-meta "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-api-metadata --config-file $compute_cell_conf" screen_it n-api-meta "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-api-metadata --config-file $compute_cell_conf"
screen_it n-novnc "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-novncproxy --config-file $api_cell_conf --web $NOVNC_DIR" screen_it n-novnc "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-novncproxy --config-file $api_cell_conf --web $NOVNC_WEB_DIR"
screen_it n-xvnc "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-xvpvncproxy --config-file $api_cell_conf" screen_it n-xvnc "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-xvpvncproxy --config-file $api_cell_conf"
screen_it n-spice "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-spicehtml5proxy --config-file $api_cell_conf --web $SPICE_DIR" screen_it n-spice "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-spicehtml5proxy --config-file $api_cell_conf --web $SPICE_WEB_DIR"
screen_it n-cauth "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-consoleauth --config-file $api_cell_conf" screen_it n-cauth "cd $NOVA_DIR && $NOVA_BIN_DIR/nova-consoleauth --config-file $api_cell_conf"
# Starting the nova-objectstore only if swift3 service is not enabled. # Starting the nova-objectstore only if swift3 service is not enabled.

View File

@ -694,16 +694,6 @@ if is_service_enabled nova; then
configure_nova configure_nova
fi fi
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 if is_service_enabled horizon; then
# dashboard # dashboard
install_horizon install_horizon