summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docker/Dockerfile2
-rw-r--r--plugin/CI/storperf.yaml2
-rw-r--r--requirements.txt2
-rwxr-xr-xtests/ci/prepare_env.sh2
-rw-r--r--tests/ci/scp_storperf_files.sh (renamed from tests/ci/scp_storperf_admin-rc.sh)6
-rw-r--r--tests/opnfv/test_cases/opnfv_yardstick_tc074.yaml2
-rw-r--r--yardstick/resources/scripts/install/storperf.bash27
-rw-r--r--yardstick/resources/scripts/remove/storperf.bash20
8 files changed, 43 insertions, 20 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 96a5d774d..2c4270a09 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -22,6 +22,7 @@ ENV IMAGE_DIR /home/opnfv/images/
# Yardstick repo
ENV YARDSTICK_REPO_DIR ${REPOS_DIR}/yardstick
ENV RELENG_REPO_DIR ${REPOS_DIR}/releng
+ENV STORPERF_REPO_DIR ${REPOS_DIR}/storperf
RUN apt-get update && apt-get install -y git python-setuptools python-pip
RUN easy_install -U setuptools==30.0.0
@@ -32,6 +33,7 @@ RUN mkdir -p ${REPOS_DIR}
RUN git config --global http.sslVerify false
RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/yardstick ${YARDSTICK_REPO_DIR}
RUN git clone --depth 1 https://gerrit.opnfv.org/gerrit/releng ${RELENG_REPO_DIR}
+RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/storperf ${STORPERF_REPO_DIR}
WORKDIR ${YARDSTICK_REPO_DIR}
RUN ${YARDSTICK_REPO_DIR}/install.sh
diff --git a/plugin/CI/storperf.yaml b/plugin/CI/storperf.yaml
index 7ac920aa7..e144dd150 100644
--- a/plugin/CI/storperf.yaml
+++ b/plugin/CI/storperf.yaml
@@ -16,6 +16,6 @@ plugins:
name: storperf
deployment:
- ip: 192.168.200.1
+ ip: 192.168.10.6
user: root
password: root
diff --git a/requirements.txt b/requirements.txt
index f283b9921..85bd8b345 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -14,7 +14,7 @@ PyYAML==3.12
SQLAlchemy==1.1.4
ansible==2.2.2.0
appdirs==1.4.3
-backport-ipaddress==0.1
+backport-ipaddress==0.1; python_version <= '2.7'
chainmap==1.0.2
cliff==2.4.0
cmd2==0.6.9
diff --git a/tests/ci/prepare_env.sh b/tests/ci/prepare_env.sh
index e8f287bcd..3d9cc298f 100755
--- a/tests/ci/prepare_env.sh
+++ b/tests/ci/prepare_env.sh
@@ -63,7 +63,7 @@ $YARDSTICK_REPO_DIR/tests/ci/prepare_storperf_admin-rc.sh
# copy a admin-rc file for StorPerf integration to the deployment location
if [ "$NODE_NAME" == "huawei-pod1" ]; then
- bash $YARDSTICK_REPO_DIR/tests/ci/scp_storperf_admin-rc.sh
+ bash $YARDSTICK_REPO_DIR/tests/ci/scp_storperf_files.sh
fi
# Fetching id_rsa file from jump_server..."
diff --git a/tests/ci/scp_storperf_admin-rc.sh b/tests/ci/scp_storperf_files.sh
index 7c3896d88..234032cf1 100644
--- a/tests/ci/scp_storperf_admin-rc.sh
+++ b/tests/ci/scp_storperf_files.sh
@@ -13,4 +13,8 @@
ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
sshpass -p root scp 2>/dev/null $ssh_options ~/storperf_admin-rc \
- root@192.168.200.1:/root/ &> /dev/null
+ root@192.168.10.6:/root/ &> /dev/null
+sshpass -p root scp 2>/dev/null $ssh_options /home/opnfv/repos/storperf/docker-compose/docker-compose.yaml \
+ root@192.168.10.6:/root/ &> /dev/null
+sshpass -p root scp 2>/dev/null $ssh_options /home/opnfv/repos/storperf/docker-compose/nginx.conf \
+ root@192.168.10.6:/root/ &> /dev/null
diff --git a/tests/opnfv/test_cases/opnfv_yardstick_tc074.yaml b/tests/opnfv/test_cases/opnfv_yardstick_tc074.yaml
index 326fdf53b..5bd3f676f 100644
--- a/tests/opnfv/test_cases/opnfv_yardstick_tc074.yaml
+++ b/tests/opnfv/test_cases/opnfv_yardstick_tc074.yaml
@@ -14,7 +14,7 @@ description: >
StorPerf is a tool to measure block and object storage performance in an NFVI.
{% set public_network = public_network or "ext-net" %}
-{% set StorPerf_ip = StorPerf_ip or "192.168.200.1" %}
+{% set StorPerf_ip = StorPerf_ip or "192.168.10.6" %}
scenarios:
-
type: StorPerf
diff --git a/yardstick/resources/scripts/install/storperf.bash b/yardstick/resources/scripts/install/storperf.bash
index 9d20a5a8a..4974bacb1 100644
--- a/yardstick/resources/scripts/install/storperf.bash
+++ b/yardstick/resources/scripts/install/storperf.bash
@@ -12,20 +12,25 @@
# StorPerf plugin installation script
# After installation, it will run StorPerf container on Jump Host
# Requirements:
-# 1. docker has been installed on the Jump Host
-# 2. Openstack environment file for storperf, '~/storperf_admin-rc', is ready.
+# 1. docker and docker-compose have been installed on the Jump Host
+# 2. Openstack environment file for storperf, '~/storperf_admin-rc', is ready
+# 3. Jump Host must have internet connectivity for downloading docker image
+# 4. Jump Host has access to the OpenStack Controller API
+# 5. Enough OpenStack floating IPs must be available to match your agent count
+# 6. The following ports are exposed if you use the supplied docker-compose.yaml file:
+# * 5000 for StorPerf ReST API and Swagger UI
+# * 8000 for StorPerf's Graphite Web Server
set -e
-mkdir -p /tmp/storperf-yardstick
+WWW_DATA_UID=33
+WWW_DATA_GID=33
-docker pull opnfv/storperf
+export TAG=${DOCKER_TAG:-latest}
+export ENV_FILE=~/storperf_admin-rc
+export CARBON_DIR=~/carbon
-STORPERF_DIR=/tmp/storperf-yardstick/carbon
-docker run -t \
---env-file ~/storperf_admin-rc \
--p 5000:5000 -p 8000:8000 \
--v $STORPERF_DIR:/opt/graphite/storage/whisper \
---name storperf-yardstick opnfv/storperf &
+sudo install --owner=${WWW_DATA_UID} --group=${WWW_DATA_GID} -d "${CARBON_DIR}"
-chown www-data:www-data $STORPERF_DIR
+docker-compose -f ~/docker-compose.yaml pull
+docker-compose -f ~/docker-compose.yaml up -d
diff --git a/yardstick/resources/scripts/remove/storperf.bash b/yardstick/resources/scripts/remove/storperf.bash
index a8eb51c89..b241d1893 100644
--- a/yardstick/resources/scripts/remove/storperf.bash
+++ b/yardstick/resources/scripts/remove/storperf.bash
@@ -13,8 +13,20 @@
set -e
-docker stop storperf-yardstick
-docker rm -f storperf-yardstick
-docker rmi opnfv/storperf
+export TAG=${DOCKER_TAG:-latest}
+export ENV_FILE=~/storperf_admin-rc
+export CARBON_DIR=~/carbon
-rm -rf /tmp/storperf-yardstick
+rm -rf "${CARBON_DIR}"
+
+docker-compose down
+
+for container_name in storperf swagger-ui http-front-end
+do
+ container=$(docker ps -a -q -f name=$container_name)
+ if [[ ! -z $container ]]
+ then
+ echo "Stopping any existing $container_name container"
+ docker rm -fv $container
+ fi
+done