Add support for installing novnc and spice-html5

Previously, these items would have needed to be bind-mounted in so the
console services could properly render these pages and provide the
console service.

Change-Id: I7fc1b9fd47da5a2a524237aa9b8e626dbc7d6a09
This commit is contained in:
Sam Yaple 2017-12-01 18:48:19 -05:00
parent 655d07ee50
commit d647991541
No known key found for this signature in database
GPG Key ID: 9329D8A45034DAB9
3 changed files with 24 additions and 0 deletions

View File

@ -16,6 +16,11 @@ ARG PYTHON3=no
ARG UID=42424
ARG GID=42424
ARG NOVNC_REPO=https://github.com/novnc/novnc
ARG NOVNC_REF=v1.0.0
ARG SPICE_REPO=https://github.com/SPICE/spice-html5
ARG SPICE_REF=spice-html5-0.1.6
COPY scripts /opt/loci/scripts
COPY bindep.txt pydep.txt /opt/loci/

View File

@ -55,6 +55,9 @@ if [[ "${PLUGIN}" == "no" ]]; then
$(dirname $0)/pip_install.sh ${PACKAGES[@]}
fi
if [[ ${PROJECT} == 'nova' ]]; then
$(dirname $0)/install_nova_console.sh
fi
$(dirname $0)/clone_project.sh
$(dirname $0)/pip_install.sh /tmp/${PROJECT} ${PIP_PACKAGES}
$(dirname $0)/install_packages.sh

16
scripts/install_nova_console.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
set -ex
# NOTE(SamYaple): Nova console is a special case. The html files needed to make
# this work exist only upstream. The "packaged" versions of these come only
# from openstack specific repos and they have hard requirements to a massive
# amount of packages. Installing from "source" is the only way to get these
# html files into the container. In total this adds less than a MB to the image
# size
mkdir /usr/share/novnc
git clone -b ${NOVNC_REF} --depth 1 ${NOVNC_REPO} /usr/share/novnc
mkdir /usr/share/spice-html5
git clone -b ${SPICE_REF} --depth 1 ${SPICE_REPO} /usr/share/spice-html5