diff options
author | Morgan Richomme <morgan.richomme@orange.com> | 2016-10-17 17:00:32 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2016-10-17 17:00:32 +0000 |
commit | cf29e20418012f850d0fa18de5bd24a49f819886 (patch) | |
tree | 2e8d152156d055e5f5d1fe2030de1f7b1a76532b /dashboard/install.sh | |
parent | 00557743a6618c2b5321c7ed0d1eede9a2c6e64a (diff) | |
parent | f2e764a50b598eced8806fc0da1b3a21b7d91ec3 (diff) |
Merge "project-ize kibana_dashboard"
Diffstat (limited to 'dashboard/install.sh')
-rwxr-xr-x | dashboard/install.sh | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/dashboard/install.sh b/dashboard/install.sh new file mode 100755 index 0000000..9fd60d9 --- /dev/null +++ b/dashboard/install.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +usage=" +Script to install dashboard automatically. +This script should be run under root. + +usage: + bash $(basename "$0") [-h|--help] [-t <test_name>] + +where: + -h|--help show this help text + -p|--project project dashboard + <project_name>" + +# Parse parameters +while [[ $# > 0 ]] + do + key="$1" + case $key in + -h|--help) + echo "$usage" + exit 0 + shift + ;; + -p|--project) + PROJECT="$2" + shift + ;; + *) + echo "unknown option $1 $2" + exit 1 + ;; + esac + shift # past argument or value +done + +if [[ $(whoami) != "root" ]]; then + echo "Error: This script must be run as root!" + exit 1 +fi + +if [ -z ${PROJECT+x} ]; then + echo "project must be specified" + exit 1 +fi + +if [ $PROJECT != "functest" ] && [ $PROJECT != "qtip" ];then + echo "unsupported project $PROJECT" + exit 1 +fi + +cp -f dashboard/$PROJECT/format.py dashboard/mongo2elastic +cp -f dashboard/$PROJECT/testcases.yaml etc/ +python setup.py install |