Create stackviz element and script in nodepool

In order to get Stackviz running against tempest gate run data, it
will need to be pulled in its pre-built form (i.e. with npm deps
installed) from the nodepool images. This change adds a couple steps
to build Stackviz so that it is in a ready state for retrieval and use
on the logs server.

A future devstack-gate patch will pull the stackviz directory from the
nodepool images onto the logs server. This nodepool patch is required
first in order to prepare stackviz for download. Installing the npm
modules takes a considerable amount of time (~5-10 mins), so it is
best that this work is done on the images before gate jobs are run.

Depends-On: I383e5bf99f6e9e2c7d5fa5c894ef573fa06facd7
Change-Id: I75fdad6584ee237dd07e25148a27ff4df3a5efe1
This commit is contained in:
Austin Clark 2016-05-02 13:11:49 -06:00 committed by Tim Buckley
parent 0ec58fee0e
commit b96649ed81
5 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1 @@
Installs stackviz and builds npm dependencies for eventual transfer to the logs server.

View File

@ -0,0 +1,32 @@
#!/bin/bash
# Copyright (C) 2014 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
#
# See the License for the specific language governing permissions and
# limitations under the License.
# dib-lint: disable=setu setpipefail
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -e
STACKVIZ_DIR=/opt/stackviz
cp -r /opt/git/openstack/stackviz $STACKVIZ_DIR
cd $STACKVIZ_DIR
npm install
npm run prod
rm -rf node_modules/

View File

@ -0,0 +1,2 @@
nodejs:
npm:

View File

@ -0,0 +1,14 @@
{
"family": {
"debian": {
"nodejs": "nodejs-legacy"
},
"suse": {
"npm": "nodejs-npm"
}
},
"default": {
"nodejs": "nodejs",
"npm": "npm"
}
}

View File

@ -728,6 +728,7 @@ diskimages:
- cache-bindep
- growroot
- infra-package-needs
- stackviz
release: jessie
env-vars:
TMPDIR: /opt/dib_tmp
@ -763,6 +764,7 @@ diskimages:
- cache-bindep
- growroot
- infra-package-needs
- stackviz
release: trusty
env-vars:
TMPDIR: /opt/dib_tmp
@ -780,6 +782,7 @@ diskimages:
- cache-bindep
- growroot
- infra-package-needs
- stackviz
release: xenial
env-vars:
TMPDIR: /opt/dib_tmp
@ -798,6 +801,7 @@ diskimages:
- cache-bindep
- growroot
- infra-package-needs
- stackviz
env-vars:
TMPDIR: /opt/dib_tmp
DIB_IMAGE_CACHE: /opt/dib_cache
@ -814,6 +818,7 @@ diskimages:
- cache-bindep
- growroot
- infra-package-needs
- stackviz
release: 23
env-vars:
TMPDIR: /opt/dib_tmp