diff --git a/nodepool/elements/node-devstack/element-deps b/nodepool/elements/node-devstack/element-deps index 4ad866a5bc..0a3e2fcc7d 100644 --- a/nodepool/elements/node-devstack/element-deps +++ b/nodepool/elements/node-devstack/element-deps @@ -1,3 +1,4 @@ cache-devstack nodepool-base puppet +stackviz diff --git a/nodepool/elements/stackviz/README.rst b/nodepool/elements/stackviz/README.rst new file mode 100644 index 0000000000..57f3506871 --- /dev/null +++ b/nodepool/elements/stackviz/README.rst @@ -0,0 +1 @@ +Installs stackviz and builds npm dependencies for eventual transfer to the logs server. diff --git a/nodepool/elements/stackviz/install.d/89-prepare-stackviz b/nodepool/elements/stackviz/install.d/89-prepare-stackviz new file mode 100755 index 0000000000..bfc7adce7a --- /dev/null +++ b/nodepool/elements/stackviz/install.d/89-prepare-stackviz @@ -0,0 +1,35 @@ +#!/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 + +sudo npm install -g npm +sudo npm install -g gulp +npm install + +gulp prod + +rm -rf node_modules/ diff --git a/nodepool/elements/stackviz/package-installs.yaml b/nodepool/elements/stackviz/package-installs.yaml new file mode 100644 index 0000000000..632c547558 --- /dev/null +++ b/nodepool/elements/stackviz/package-installs.yaml @@ -0,0 +1,2 @@ +nodejs: +npm: diff --git a/nodepool/elements/stackviz/pkg-map.json b/nodepool/elements/stackviz/pkg-map.json new file mode 100644 index 0000000000..c1e0c8e752 --- /dev/null +++ b/nodepool/elements/stackviz/pkg-map.json @@ -0,0 +1,14 @@ +{ + "family": { + "debian": { + "nodejs": "nodejs-legacy" + }, + "suse": { + "npm": "nodejs-npm" + } + }, + "default": { + "nodejs": "nodejs", + "npm": "npm" + } +} diff --git a/nodepool/scripts/install_stackviz.sh b/nodepool/scripts/install_stackviz.sh new file mode 100755 index 0000000000..5f54cafee1 --- /dev/null +++ b/nodepool/scripts/install_stackviz.sh @@ -0,0 +1,41 @@ +#!/bin/bash -xe + +# Copyright (C) 2011-2013 OpenStack Foundation +# +# 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. + +HOSTNAME=$1 + +export SUDO='true' +export THIN='true' + +STACKVIZ_DIR=/opt/stackviz +cp -r /opt/git/openstack/stackviz $STACKVIZ_DIR + +cd $STACKVIZ_DIR + +if [ -f /usr/bin/apt-get ] ; then + sudo apt-get install nodejs npm nodejs-legacy +else + sudo yum install nodejs npm +fi + +sudo npm install -g npm +sudo npm install -g gulp +npm install + +gulp prod + +rm -rf node_modules/ diff --git a/nodepool/scripts/prepare_node_devstack.sh b/nodepool/scripts/prepare_node_devstack.sh index fe07c0ca04..c4abaf9ead 100755 --- a/nodepool/scripts/prepare_node_devstack.sh +++ b/nodepool/scripts/prepare_node_devstack.sh @@ -41,4 +41,7 @@ sudo chown -R jenkins:jenkins $TEMPEST_DIR/preseed-streams # Delete the venv after the script is called sudo rm -rf /opt/git/subunit2sql-env +# install stackviz and dependencies +./install_stackviz.sh + ./fix_grub_timeout.sh