diff options
author | SerenaFeng <feng.xiaowei@zte.com.cn> | 2016-10-17 09:03:38 +0800 |
---|---|---|
committer | SerenaFeng <feng.xiaowei@zte.com.cn> | 2016-10-17 09:19:47 +0800 |
commit | 58d0476d664392ad321e6cdcc9b5a1196724743f (patch) | |
tree | fed241706efa294623a5f197a6bbde80c1de1ff8 /utils/test/dashboard/install.sh | |
parent | d9ab655653e2d343a8eac7560c50c6bed632a09f (diff) |
project-ize kibana_dashboard
JIRA: FUNCTEST-513
Change-Id: Id25dbea72b5945bc40f30c0a4b3ffe3898c3ab0b
Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'utils/test/dashboard/install.sh')
-rwxr-xr-x | utils/test/dashboard/install.sh | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/utils/test/dashboard/install.sh b/utils/test/dashboard/install.sh new file mode 100755 index 000000000..9fd60d916 --- /dev/null +++ b/utils/test/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 |