Merge "bugfix: storperf timeout in ci"
[yardstick.git] / yardstick / resources / scripts / install / storperf.bash
1 #!/bin/bash
2
3 ##############################################################################
4 # Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
5 #
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Apache License, Version 2.0
8 # which accompanies this distribution, and is available at
9 # http://www.apache.org/licenses/LICENSE-2.0
10 ##############################################################################
11
12 # StorPerf plugin installation script
13 # After installation, it will run StorPerf container on Jump Host
14 # Requirements:
15 #     1. docker has been installed on the Jump Host
16 #     2. Openstack environment file for storperf, '~/storperf_admin-rc', is ready.
17
18 set -e
19
20 mkdir -p /tmp/storperf-yardstick
21
22 docker pull opnfv/storperf
23
24 STORPERF_DIR=/tmp/storperf-yardstick/carbon
25 docker run -t \
26 --env-file ~/storperf_admin-rc \
27 -p 5000:5000 -p 8000:8000 \
28 -v $STORPERF_DIR:/opt/graphite/storage/whisper \
29 --name storperf-yardstick opnfv/storperf &
30
31 chown www-data:www-data $STORPERF_DIR