summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormbeierl <mark.beierl@dell.com>2017-07-11 15:12:35 -0400
committermbeierl <mark.beierl@dell.com>2017-07-11 15:47:46 -0400
commit7602a54309adbe5c5346ee6befecc2e596976504 (patch)
tree60f15026780db30b0b8842ba1a1e2cc021e22625
parentfc09b37e95c19f820ec60db19d98c0dc3d670829 (diff)
Change all paths
Changes the paths of all source code so that it exists under the dockerfile location for each container. This way we can use COPY instead of git clone, as well as use the existing JJB. Change-Id: I883b2957d89659c164fff0a1ebc4d677c534796d JIRA: STORPERF-188 Signed-off-by: mbeierl <mark.beierl@dell.com>
-rwxr-xr-xci/setup.py43
-rwxr-xr-xci/verify.sh38
-rw-r--r--docker-compose/docker-compose.yaml29
-rw-r--r--docker/Dockerfile-httpfrontend25
-rw-r--r--docker/Dockerfile-master (renamed from docker/Dockerfile)56
-rw-r--r--docker/Dockerfile-reporting (renamed from reporting/docker/Dockerfile)13
-rw-r--r--docker/storperf-httpfrontend/html/index.html14
-rw-r--r--docker/storperf-httpfrontend/nginx.conf (renamed from docker-compose/nginx.conf)11
-rw-r--r--docker/storperf-master/requirements.pip (renamed from docker/requirements.pip)0
-rw-r--r--docker/storperf-master/rest_server.py (renamed from rest_server.py)4
-rw-r--r--docker/storperf-master/storperf/__init__.py (renamed from storperf/__init__.py)0
-rw-r--r--docker/storperf-master/storperf/carbon/__init__.py (renamed from storperf/carbon/__init__.py)0
-rw-r--r--docker/storperf-master/storperf/carbon/converter.py (renamed from storperf/carbon/converter.py)0
-rw-r--r--docker/storperf-master/storperf/carbon/emitter.py (renamed from storperf/carbon/emitter.py)0
-rw-r--r--docker/storperf-master/storperf/db/__init__.py (renamed from storperf/db/__init__.py)0
-rw-r--r--docker/storperf-master/storperf/db/configuration_db.py (renamed from storperf/db/configuration_db.py)0
-rw-r--r--docker/storperf-master/storperf/db/graphite_db.py (renamed from storperf/db/graphite_db.py)0
-rw-r--r--docker/storperf-master/storperf/db/job_db.py (renamed from storperf/db/job_db.py)0
-rw-r--r--docker/storperf-master/storperf/db/test_results_db.py (renamed from storperf/db/test_results_db.py)0
-rw-r--r--docker/storperf-master/storperf/fio/__init__.py (renamed from storperf/fio/__init__.py)0
-rw-r--r--docker/storperf-master/storperf/fio/fio_invoker.py (renamed from storperf/fio/fio_invoker.py)0
-rw-r--r--docker/storperf-master/storperf/logging.json (renamed from storperf/logging.json)0
-rw-r--r--docker/storperf-master/storperf/resources/hot/agent-group.yaml (renamed from storperf/resources/hot/agent-group.yaml)0
-rw-r--r--docker/storperf-master/storperf/resources/hot/storperf-agent.yaml (renamed from storperf/resources/hot/storperf-agent.yaml)0
-rw-r--r--docker/storperf-master/storperf/resources/ssh/storperf_rsa (renamed from storperf/resources/ssh/storperf_rsa)0
-rw-r--r--docker/storperf-master/storperf/resources/ssh/storperf_rsa.pub (renamed from storperf/resources/ssh/storperf_rsa.pub)0
-rw-r--r--docker/storperf-master/storperf/storperf_master.py (renamed from storperf/storperf_master.py)0
-rw-r--r--docker/storperf-master/storperf/test_executor.py (renamed from storperf/test_executor.py)0
-rw-r--r--docker/storperf-master/storperf/utilities/__init__.py (renamed from storperf/utilities/__init__.py)0
-rw-r--r--docker/storperf-master/storperf/utilities/data_handler.py (renamed from storperf/utilities/data_handler.py)0
-rw-r--r--docker/storperf-master/storperf/utilities/data_treatment.py (renamed from storperf/utilities/data_treatment.py)0
-rw-r--r--docker/storperf-master/storperf/utilities/dictionary.py (renamed from storperf/utilities/dictionary.py)0
-rw-r--r--docker/storperf-master/storperf/utilities/math.py (renamed from storperf/utilities/math.py)0
-rw-r--r--docker/storperf-master/storperf/utilities/steady_state.py (renamed from storperf/utilities/steady_state.py)0
-rw-r--r--docker/storperf-master/storperf/utilities/thread_gate.py (renamed from storperf/utilities/thread_gate.py)0
-rw-r--r--docker/storperf-master/storperf/workloads/__init__.py (renamed from storperf/workloads/__init__.py)0
-rw-r--r--docker/storperf-master/storperf/workloads/_base_workload.py (renamed from storperf/workloads/_base_workload.py)0
-rw-r--r--docker/storperf-master/storperf/workloads/_ssd_preconditioning.py (renamed from storperf/workloads/_ssd_preconditioning.py)0
-rw-r--r--docker/storperf-master/storperf/workloads/_warm_up.py (renamed from storperf/workloads/_warm_up.py)0
-rw-r--r--docker/storperf-master/storperf/workloads/rr.py (renamed from storperf/workloads/rr.py)0
-rw-r--r--docker/storperf-master/storperf/workloads/rs.py (renamed from storperf/workloads/rs.py)0
-rw-r--r--docker/storperf-master/storperf/workloads/rw.py (renamed from storperf/workloads/rw.py)0
-rw-r--r--docker/storperf-master/storperf/workloads/wr.py (renamed from storperf/workloads/wr.py)0
-rw-r--r--docker/storperf-master/storperf/workloads/ws.py (renamed from storperf/workloads/ws.py)0
-rw-r--r--docker/storperf-master/supervisord.conf (renamed from docker/supervisord.conf)11
-rw-r--r--docker/storperf-master/tests/__init__.py (renamed from tests/__init__.py)0
-rw-r--r--docker/storperf-master/tests/carbon_tests/__init__.py (renamed from tests/carbon_tests/__init__.py)0
-rw-r--r--docker/storperf-master/tests/carbon_tests/emitter_test.py (renamed from tests/carbon_tests/emitter_test.py)0
-rw-r--r--docker/storperf-master/tests/carbon_tests/json_to_carbon_test.py (renamed from tests/carbon_tests/json_to_carbon_test.py)0
-rw-r--r--docker/storperf-master/tests/db_tests/__init__.py (renamed from tests/db_tests/__init__.py)0
-rw-r--r--docker/storperf-master/tests/db_tests/configuration_db_test.py (renamed from tests/db_tests/configuration_db_test.py)14
-rw-r--r--docker/storperf-master/tests/db_tests/graphite_db_test.py (renamed from tests/db_tests/graphite_db_test.py)0
-rw-r--r--docker/storperf-master/tests/db_tests/job_db_test.py (renamed from tests/db_tests/job_db_test.py)7
-rw-r--r--docker/storperf-master/tests/fio_tests/__init__.py (renamed from tests/fio_tests/__init__.py)0
-rw-r--r--docker/storperf-master/tests/fio_tests/fio_invoker_test.py (renamed from tests/fio_tests/fio_invoker_test.py)0
-rw-r--r--docker/storperf-master/tests/storperf_master_test.py (renamed from tests/storperf_master_test.py)18
-rw-r--r--docker/storperf-master/tests/utilities_tests/__init__.py (renamed from tests/utilities_tests/__init__.py)0
-rw-r--r--docker/storperf-master/tests/utilities_tests/data_handler_test.py (renamed from tests/utilities_tests/data_handler_test.py)0
-rw-r--r--docker/storperf-master/tests/utilities_tests/data_treatment_test.py (renamed from tests/utilities_tests/data_treatment_test.py)0
-rw-r--r--docker/storperf-master/tests/utilities_tests/dictionary_test.py (renamed from tests/utilities_tests/dictionary_test.py)0
-rw-r--r--docker/storperf-master/tests/utilities_tests/math_average_test.py (renamed from tests/utilities_tests/math_average_test.py)0
-rw-r--r--docker/storperf-master/tests/utilities_tests/math_range_test.py (renamed from tests/utilities_tests/math_range_test.py)0
-rw-r--r--docker/storperf-master/tests/utilities_tests/math_slope_test.py (renamed from tests/utilities_tests/math_slope_test.py)0
-rw-r--r--docker/storperf-master/tests/utilities_tests/steady_state_test.py (renamed from tests/utilities_tests/steady_state_test.py)0
-rw-r--r--docker/storperf-master/tests/utilities_tests/thread_gate_test.py (renamed from tests/utilities_tests/thread_gate_test.py)0
-rw-r--r--docker/storperf-master/tests/workload_tests/__init__.py (renamed from tests/workload_tests/__init__.py)0
-rw-r--r--docker/storperf-master/tests/workload_tests/workload_subclass_test.py (renamed from tests/workload_tests/workload_subclass_test.py)0
-rw-r--r--docker/storperf-reporting/requirements.txt (renamed from reporting/docker/requirements.txt)0
-rw-r--r--docker/storperf-reporting/src/app.py38
-rw-r--r--docker/storperf-reporting/src/static/css/bootstrap.min.css (renamed from reporting/docker/src/static/css/bootstrap.min.css)0
-rw-r--r--docker/storperf-reporting/src/static/js/Chart.min.js (renamed from reporting/docker/src/static/js/Chart.min.js)0
-rw-r--r--docker/storperf-reporting/src/static/js/bootstrap.min.js (renamed from reporting/docker/src/static/js/bootstrap.min.js)0
-rw-r--r--docker/storperf-reporting/src/static/js/jquery-2.1.3.min.js (renamed from reporting/docker/src/static/js/jquery-2.1.3.min.js)0
-rw-r--r--docker/storperf-reporting/src/static/js/jquery.bootpag.min.js (renamed from reporting/docker/src/static/js/jquery.bootpag.min.js)0
-rw-r--r--docker/storperf-reporting/src/static/js/plotly-latest.min.js (renamed from reporting/docker/src/static/js/plotly-latest.min.js)0
-rw-r--r--docker/storperf-reporting/src/templates/index.html (renamed from reporting/docker/src/templates/index.html)0
-rw-r--r--docker/storperf-reporting/src/templates/plot_tables.html (renamed from reporting/docker/src/templates/plot_tables.html)0
-rw-r--r--reporting/docker/app.py9
-rw-r--r--reporting/docker/src/app.py28
79 files changed, 186 insertions, 172 deletions
diff --git a/ci/setup.py b/ci/setup.py
deleted file mode 100755
index d40ef9f..0000000
--- a/ci/setup.py
+++ /dev/null
@@ -1,43 +0,0 @@
-##############################################################################
-# Copyright (c) 2015 EMC and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-from setuptools import setup, find_packages
-
-
-setup(
- name="storperf",
- version="0.dev0",
- packages=find_packages(),
- include_package_data=True,
- package_data={
- 'storperf': [
- 'storperf/resources/hot/*'
- ]
- },
- url="https://www.opnfv.org",
- install_requires=["flask==0.10",
- "flask-restful==0.3.5",
- "flask-restful-swagger==0.19",
- "html2text==2016.1.8",
- "python-cinderclient==1.6.0",
- "python-glanceclient==1.1.0",
- "python-heatclient==0.8.0",
- "python-keystoneclient==1.6.0",
- "python-neutronclient==2.6.0",
- "python-novaclient==2.28.1",
- "pyyaml==3.10",
- "requests==2.13.0",
- "six==1.10.0"
- ],
- entry_points={
- 'console_scripts': [
- 'storperf=storperf.main:main',
- ],
- }
-)
diff --git a/ci/verify.sh b/ci/verify.sh
index feb84d2..cd5bbbb 100755
--- a/ci/verify.sh
+++ b/ci/verify.sh
@@ -45,19 +45,35 @@ pip install requests==2.13.0
pip install scp==0.10.2
pip install six==1.10.0
-python ci/setup.py develop
-
-flake8 storperf
+final_rc=0
+flake8 docker/storperf-*
flake8rc=$?
-nosetests --with-xunit \
- --with-coverage \
- --cover-package=storperf\
- --cover-xml \
- --cover-html \
- tests
-rc=$?
+for testdir in docker/storperf-*
+do
+ if [ -d $testdir/tests ]
+ then
+ cwd=$(pwd)
+ cd $testdir
+
+ nosetests --with-xunit \
+ --with-coverage \
+ --cover-package=storperf\
+ --cover-xml \
+ --cover-html \
+ tests
+ rc=$?
+ if [ $rc -ne 0 ]
+ then
+ final_rc=$rc
+ fi
+ cd $cwd
+ fi
+done
+
+cp ./docker/storperf-master/coverage.xml .
+cp ./docker/storperf-master/nosetests.xml .
deactivate
@@ -67,4 +83,4 @@ then
exit $flake8rc
fi
-exit $rc
+exit $final_rc
diff --git a/docker-compose/docker-compose.yaml b/docker-compose/docker-compose.yaml
index dbba825..7747506 100644
--- a/docker-compose/docker-compose.yaml
+++ b/docker-compose/docker-compose.yaml
@@ -1,25 +1,30 @@
version: '2'
services:
- storperf:
- container_name: "storperf"
- image: "opnfv/storperf:${TAG}"
+ storperf-master:
+ container_name: "storperf-master"
+ image: "opnfv/storperf-master:${TAG}"
ports:
- "8000:8000"
env_file: ${ENV_FILE}
volumes:
- ${CARBON_DIR}:/opt/graphite/storage/whisper
- swagger-ui:
- container_name: "swagger-ui"
+ storperf-reporting:
+ container_name: "storperf-reporting"
+ image: "opnfv/storperf-reporting:${TAG}"
+ ports:
+ - "5080:5000"
+
+ storperf-swaggerui:
+ container_name: "storperf-swaggerui"
image: "schickling/swagger-ui"
- http-front-end:
- container_name: "http-front-end"
- image: nginx:stable-alpine
+ storperf-httpfrontend:
+ container_name: "storperf-httpfrontend"
+ image: "opnfv/storperf-httpfrontend:${TAG}"
ports:
- "5000:5000"
- volumes:
- - ./nginx.conf:/etc/nginx/nginx.conf:ro
links:
- - storperf
- - swagger-ui \ No newline at end of file
+ - storperf-master
+ - storperf-reporting
+ - storperf-swaggerui \ No newline at end of file
diff --git a/docker/Dockerfile-httpfrontend b/docker/Dockerfile-httpfrontend
new file mode 100644
index 0000000..dc97b80
--- /dev/null
+++ b/docker/Dockerfile-httpfrontend
@@ -0,0 +1,25 @@
+##############################################################################
+# Copyright (c) 2017 Dell EMC and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+# Docker container for StorPerf HTTP Front ENd
+#
+# Build:
+# $ docker build -t opnfv/storperf-frontend:tag .
+##
+
+
+FROM nginx:stable-alpine
+MAINTAINER Mark Beierl <mark.beierl@dell.com>
+LABEL version="3.1" description="OPNFV Storperf HTTP Front End Container"
+
+ARG BRANCH=master
+
+COPY storperf-httpfrontend/nginx.conf /etc/nginx/nginx.conf
+COPY storperf-httpfrontend/html /etc/nginx/html
+
+EXPOSE 5000
diff --git a/docker/Dockerfile b/docker/Dockerfile-master
index f1ec617..38e8265 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile-master
@@ -12,16 +12,12 @@
#
# Maintained by Jose Lausuch, Mark Beierl
# Build:
-# $ docker build -t opnfv/storperf:tag .
+# $ docker build -t opnfv/storperf-master:tag .
#
-# Execution:
-# $ docker run -t opnfv/storperf /bin/bash
-#
-
FROM ubuntu:14.04
MAINTAINER Jose Lausuch <jose.lausuch@ericsson.com>
-LABEL version="0.1" description="OPNFV Storperf Docker container"
+LABEL version="5.0" description="OPNFV Storperf Docker container"
ARG BRANCH=master
@@ -30,55 +26,36 @@ ENV DEBIAN_FRONTEND noninteractive
WORKDIR /home/opnfv
+# Needed for Graphite installation
+RUN echo 'deb http://us.archive.ubuntu.com/ubuntu/ trusty universe' >> /etc/apt/sources.list
+
# Packaged dependencies
RUN apt-get update && apt-get install -y \
libaio1 \
libaio-dev \
zlib1g-dev \
supervisor \
-ssh \
libssl-dev \
libffi-dev \
-rsync \
git \
-wget \
-puppet \
build-essential \
python-dev \
python-pip \
--no-install-recommends
-
-# Allow root SSH access with 'storperf' as the password
-
-RUN echo 'root:storperf' | chpasswd
-RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config
-
-# SSH login fix. Otherwise user is kicked off after login
-RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
-
-ENV NOTVISIBLE "in users profile"
-RUN echo "export VISIBLE=now" >> /etc/profile
-RUN mkdir -p /var/run/sshd
-
-RUN mkdir -p ${repos_dir}
RUN mkdir -p /root/.ssh
RUN chmod 700 /root/.ssh
-# Graphite installation
-RUN echo 'deb http://us.archive.ubuntu.com/ubuntu/ trusty universe' >> /etc/apt/sources.list
-RUN apt-get -y update
-
# Install required packages
+
RUN apt-get -y install python-ldap python-cairo python-django python-twisted python-django-tagging python-simplejson python-memcache python-pysqlite2 python-support python-tz python-pip gunicorn supervisor nginx-light
RUN pip install whisper==0.9.15
RUN pip install --install-option="--prefix=/var/lib/graphite" --install-option="--install-lib=/var/lib/graphite/lib" carbon==0.9.15
RUN pip install --install-option="--prefix=/var/lib/graphite" --install-option="--install-lib=/var/lib/graphite/webapp" graphite-web==0.9.15
-# Add system service config
-ADD graphite/nginx.conf /etc/nginx/nginx.conf
-
# Add graphite config
+
+ADD graphite/nginx.conf /etc/nginx/nginx.conf
ADD graphite/initial_data.json /var/lib/graphite/webapp/graphite/initial_data.json
ADD graphite/local_settings.py /var/lib/graphite/webapp/graphite/local_settings.py
ADD graphite/carbon.conf /var/lib/graphite/conf/carbon.conf
@@ -91,27 +68,27 @@ RUN chmod 0775 /var/lib/graphite/storage /var/lib/graphite/storage/whisper
RUN chmod 0664 /var/lib/graphite/storage/graphite.db
RUN cd /var/lib/graphite/webapp/graphite && python manage.py syncdb --noinput
+
# Git configuration
RUN git config --global http.sslVerify false
-RUN git clone --depth 1 -b $BRANCH https://gerrit.opnfv.org/gerrit/storperf ${repos_dir}/storperf
RUN git clone --depth 1 https://gerrit.opnfv.org/gerrit/releng ${repos_dir}/releng
+
# Third party git fetches
RUN git clone http://git.kernel.dk/fio.git ${repos_dir}/fio
RUN cd ${repos_dir}/fio && git checkout tags/fio-2.2.10
-RUN cd ${repos_dir}/fio && make install
+#RUN cd ${repos_dir}/fio && make install
-RUN chmod 600 ${repos_dir}/storperf/storperf/resources/ssh/storperf_rsa
+# Install StorPerf
+COPY storperf-master ${repos_dir}/storperf
+RUN chmod 600 ${repos_dir}/storperf/storperf/resources/ssh/storperf_rsa
RUN pip install --upgrade setuptools==33.1.1
-RUN pip install -r ${repos_dir}/storperf/docker/requirements.pip
-
-
-# Open access to SSH if desired
-EXPOSE 22
+RUN pip install -r ${repos_dir}/storperf/requirements.pip
+COPY storperf-master/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Graphite
EXPOSE 8000
@@ -119,5 +96,4 @@ EXPOSE 8000
# ReST API
EXPOSE 5000
-COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
CMD ["/usr/bin/supervisord"]
diff --git a/reporting/docker/Dockerfile b/docker/Dockerfile-reporting
index 541845c..ad00019 100644
--- a/reporting/docker/Dockerfile
+++ b/docker/Dockerfile-reporting
@@ -21,14 +21,13 @@ LABEL version="0.1" description="OPNFV Storperf Reporting Container"
ARG BRANCH=master
-ENV repos_dir /home/opnfv/repos
-WORKDIR /home/opnfv
-
RUN apk add --update python py-pip
-COPY . /app
-WORKDIR /app
-RUN pip install -r requirements.txt
+COPY storperf-reporting /home/opnfv/storperf-reporting
+WORKDIR /home/opnfv/storperf-reporting
+
+RUN pip install -r /home/opnfv/storperf-reporting/requirements.txt
ENTRYPOINT ["python"]
-CMD ["./src/app.py"]
+CMD ["/home/opnfv/storperf-reporting/src/app.py"]
+
EXPOSE 5000 \ No newline at end of file
diff --git a/docker/storperf-httpfrontend/html/index.html b/docker/storperf-httpfrontend/html/index.html
new file mode 100644
index 0000000..7c772a0
--- /dev/null
+++ b/docker/storperf-httpfrontend/html/index.html
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<title>
+StorPerf Home
+</title>
+<body>
+<h1>StorPerf</h1>
+<ul>
+ <li><a href="/swagger">Interactive API</a></li>
+ <li><a href="/graphite">Graphite</a></li>
+ <li><a href="/reporting">Reporting</a></li>
+</ul>
+</body>
+</html> \ No newline at end of file
diff --git a/docker-compose/nginx.conf b/docker/storperf-httpfrontend/nginx.conf
index 6771358..d655aee 100644
--- a/docker-compose/nginx.conf
+++ b/docker/storperf-httpfrontend/nginx.conf
@@ -16,12 +16,17 @@ http {
listen 5000;
location /api/ {
- proxy_pass http://storperf:5000;
+ proxy_pass http://storperf-master:5000;
proxy_set_header Host $host:$proxy_port;
}
location /graphite/ {
- proxy_pass http://storperf:8000;
+ proxy_pass http://storperf-master:8000;
+ proxy_set_header Host $host:$proxy_port;
+ }
+
+ location /reporting/ {
+ proxy_pass http://storperf-reporting:5000/;
proxy_set_header Host $host:$proxy_port;
}
@@ -29,7 +34,7 @@ http {
if ($containsurl = 0) {
return 302 $scheme://$host:$server_port$uri?url=http://$host:$server_port/api/spec.json$args;
}
- proxy_pass http://swagger-ui:80/;
+ proxy_pass http://storperf-swaggerui:80/;
}
}
}
diff --git a/docker/requirements.pip b/docker/storperf-master/requirements.pip
index 5f9b68e..5f9b68e 100644
--- a/docker/requirements.pip
+++ b/docker/storperf-master/requirements.pip
diff --git a/rest_server.py b/docker/storperf-master/rest_server.py
index f2ee815..cc8d834 100644
--- a/rest_server.py
+++ b/docker/storperf-master/rest_server.py
@@ -167,7 +167,7 @@ class Job(Resource):
},
{
"name": "metrics_type",
- "description": "The metrics_type of metrics to report. May be "
+ "description": "The metrics_type of metrics to report. May be "
"metrics (default), or metadata",
"required": False,
"metrics_type": "string",
@@ -309,7 +309,7 @@ class Quota(Resource):
return jsonify({'quota': quota})
-def setup_logging(default_path='storperf/logging.json',
+def setup_logging(default_path='logging.json',
default_level=logging.INFO, env_key='LOG_CFG'):
"""Setup logging configuration
"""
diff --git a/storperf/__init__.py b/docker/storperf-master/storperf/__init__.py
index 73334c7..73334c7 100644
--- a/storperf/__init__.py
+++ b/docker/storperf-master/storperf/__init__.py
diff --git a/storperf/carbon/__init__.py b/docker/storperf-master/storperf/carbon/__init__.py
index 73334c7..73334c7 100644
--- a/storperf/carbon/__init__.py
+++ b/docker/storperf-master/storperf/carbon/__init__.py
diff --git a/storperf/carbon/converter.py b/docker/storperf-master/storperf/carbon/converter.py
index 623c144..623c144 100644
--- a/storperf/carbon/converter.py
+++ b/docker/storperf-master/storperf/carbon/converter.py
diff --git a/storperf/carbon/emitter.py b/docker/storperf-master/storperf/carbon/emitter.py
index e23dc79..e23dc79 100644
--- a/storperf/carbon/emitter.py
+++ b/docker/storperf-master/storperf/carbon/emitter.py
diff --git a/storperf/db/__init__.py b/docker/storperf-master/storperf/db/__init__.py
index 73334c7..73334c7 100644
--- a/storperf/db/__init__.py
+++ b/docker/storperf-master/storperf/db/__init__.py
diff --git a/storperf/db/configuration_db.py b/docker/storperf-master/storperf/db/configuration_db.py
index 5b996c7..5b996c7 100644
--- a/storperf/db/configuration_db.py
+++ b/docker/storperf-master/storperf/db/configuration_db.py
diff --git a/storperf/db/graphite_db.py b/docker/storperf-master/storperf/db/graphite_db.py
index c8a2d35..c8a2d35 100644
--- a/storperf/db/graphite_db.py
+++ b/docker/storperf-master/storperf/db/graphite_db.py
diff --git a/storperf/db/job_db.py b/docker/storperf-master/storperf/db/job_db.py
index 3308fa8..3308fa8 100644
--- a/storperf/db/job_db.py
+++ b/docker/storperf-master/storperf/db/job_db.py
diff --git a/storperf/db/test_results_db.py b/docker/storperf-master/storperf/db/test_results_db.py
index a2f7038..a2f7038 100644
--- a/storperf/db/test_results_db.py
+++ b/docker/storperf-master/storperf/db/test_results_db.py
diff --git a/storperf/fio/__init__.py b/docker/storperf-master/storperf/fio/__init__.py
index 73334c7..73334c7 100644
--- a/storperf/fio/__init__.py
+++ b/docker/storperf-master/storperf/fio/__init__.py
diff --git a/storperf/fio/fio_invoker.py b/docker/storperf-master/storperf/fio/fio_invoker.py
index 106696d..106696d 100644
--- a/storperf/fio/fio_invoker.py
+++ b/docker/storperf-master/storperf/fio/fio_invoker.py
diff --git a/storperf/logging.json b/docker/storperf-master/storperf/logging.json
index 2a0bbce..2a0bbce 100644
--- a/storperf/logging.json
+++ b/docker/storperf-master/storperf/logging.json
diff --git a/storperf/resources/hot/agent-group.yaml b/docker/storperf-master/storperf/resources/hot/agent-group.yaml
index c758ecd..c758ecd 100644
--- a/storperf/resources/hot/agent-group.yaml
+++ b/docker/storperf-master/storperf/resources/hot/agent-group.yaml
diff --git a/storperf/resources/hot/storperf-agent.yaml b/docker/storperf-master/storperf/resources/hot/storperf-agent.yaml
index 7bf8b4d..7bf8b4d 100644
--- a/storperf/resources/hot/storperf-agent.yaml
+++ b/docker/storperf-master/storperf/resources/hot/storperf-agent.yaml
diff --git a/storperf/resources/ssh/storperf_rsa b/docker/storperf-master/storperf/resources/ssh/storperf_rsa
index fb8c714..fb8c714 100644
--- a/storperf/resources/ssh/storperf_rsa
+++ b/docker/storperf-master/storperf/resources/ssh/storperf_rsa
diff --git a/storperf/resources/ssh/storperf_rsa.pub b/docker/storperf-master/storperf/resources/ssh/storperf_rsa.pub
index cdc8cb4..cdc8cb4 100644
--- a/storperf/resources/ssh/storperf_rsa.pub
+++ b/docker/storperf-master/storperf/resources/ssh/storperf_rsa.pub
diff --git a/storperf/storperf_master.py b/docker/storperf-master/storperf/storperf_master.py
index fb3e269..fb3e269 100644
--- a/storperf/storperf_master.py
+++ b/docker/storperf-master/storperf/storperf_master.py
diff --git a/storperf/test_executor.py b/docker/storperf-master/storperf/test_executor.py
index b2d5914..b2d5914 100644
--- a/storperf/test_executor.py
+++ b/docker/storperf-master/storperf/test_executor.py
diff --git a/storperf/utilities/__init__.py b/docker/storperf-master/storperf/utilities/__init__.py
index 73444b6..73444b6 100644
--- a/storperf/utilities/__init__.py
+++ b/docker/storperf-master/storperf/utilities/__init__.py
diff --git a/storperf/utilities/data_handler.py b/docker/storperf-master/storperf/utilities/data_handler.py
index 1da869c..1da869c 100644
--- a/storperf/utilities/data_handler.py
+++ b/docker/storperf-master/storperf/utilities/data_handler.py
diff --git a/storperf/utilities/data_treatment.py b/docker/storperf-master/storperf/utilities/data_treatment.py
index 2368fd9..2368fd9 100644
--- a/storperf/utilities/data_treatment.py
+++ b/docker/storperf-master/storperf/utilities/data_treatment.py
diff --git a/storperf/utilities/dictionary.py b/docker/storperf-master/storperf/utilities/dictionary.py
index 95f625c..95f625c 100644
--- a/storperf/utilities/dictionary.py
+++ b/docker/storperf-master/storperf/utilities/dictionary.py
diff --git a/storperf/utilities/math.py b/docker/storperf-master/storperf/utilities/math.py
index 8e04134..8e04134 100644
--- a/storperf/utilities/math.py
+++ b/docker/storperf-master/storperf/utilities/math.py
diff --git a/storperf/utilities/steady_state.py b/docker/storperf-master/storperf/utilities/steady_state.py
index 13f609d..13f609d 100644
--- a/storperf/utilities/steady_state.py
+++ b/docker/storperf-master/storperf/utilities/steady_state.py
diff --git a/storperf/utilities/thread_gate.py b/docker/storperf-master/storperf/utilities/thread_gate.py
index 38acbb1..38acbb1 100644
--- a/storperf/utilities/thread_gate.py
+++ b/docker/storperf-master/storperf/utilities/thread_gate.py
diff --git a/storperf/workloads/__init__.py b/docker/storperf-master/storperf/workloads/__init__.py
index 73334c7..73334c7 100644
--- a/storperf/workloads/__init__.py
+++ b/docker/storperf-master/storperf/workloads/__init__.py
diff --git a/storperf/workloads/_base_workload.py b/docker/storperf-master/storperf/workloads/_base_workload.py
index 936c839..936c839 100644
--- a/storperf/workloads/_base_workload.py
+++ b/docker/storperf-master/storperf/workloads/_base_workload.py
diff --git a/storperf/workloads/_ssd_preconditioning.py b/docker/storperf-master/storperf/workloads/_ssd_preconditioning.py
index cce3c31..cce3c31 100644
--- a/storperf/workloads/_ssd_preconditioning.py
+++ b/docker/storperf-master/storperf/workloads/_ssd_preconditioning.py
diff --git a/storperf/workloads/_warm_up.py b/docker/storperf-master/storperf/workloads/_warm_up.py
index 9cd268e..9cd268e 100644
--- a/storperf/workloads/_warm_up.py
+++ b/docker/storperf-master/storperf/workloads/_warm_up.py
diff --git a/storperf/workloads/rr.py b/docker/storperf-master/storperf/workloads/rr.py
index 3823a4c..3823a4c 100644
--- a/storperf/workloads/rr.py
+++ b/docker/storperf-master/storperf/workloads/rr.py
diff --git a/storperf/workloads/rs.py b/docker/storperf-master/storperf/workloads/rs.py
index 511888e..511888e 100644
--- a/storperf/workloads/rs.py
+++ b/docker/storperf-master/storperf/workloads/rs.py
diff --git a/storperf/workloads/rw.py b/docker/storperf-master/storperf/workloads/rw.py
index f4b6979..f4b6979 100644
--- a/storperf/workloads/rw.py
+++ b/docker/storperf-master/storperf/workloads/rw.py
diff --git a/storperf/workloads/wr.py b/docker/storperf-master/storperf/workloads/wr.py
index 457a29a..457a29a 100644
--- a/storperf/workloads/wr.py
+++ b/docker/storperf-master/storperf/workloads/wr.py
diff --git a/storperf/workloads/ws.py b/docker/storperf-master/storperf/workloads/ws.py
index f37079e..f37079e 100644
--- a/storperf/workloads/ws.py
+++ b/docker/storperf-master/storperf/workloads/ws.py
diff --git a/docker/supervisord.conf b/docker/storperf-master/supervisord.conf
index 834e23c..9832c49 100644
--- a/docker/supervisord.conf
+++ b/docker/storperf-master/supervisord.conf
@@ -24,17 +24,10 @@ stdout_logfile = /var/log/supervisor/%(program_name)s.log
stderr_logfile = /var/log/supervisor/%(program_name)s.log
autorestart = true
-[program:sshd]
-user = root
-command = /usr/sbin/sshd -D
-stdout_logfile = /var/log/supervisor/%(program_name)s.log
-stderr_logfile = /var/log/supervisor/%(program_name)s.log
-autorestart = true
-
[program:storperf-webapp]
user = root
-directory = /home/opnfv/repos/storperf
-command = /usr/bin/python /home/opnfv/repos/storperf/rest_server.py
+directory = /home/opnfv/repos/storperf/
+command = /usr/bin/python rest_server.py
stdout_logfile = /var/log/supervisor/%(program_name)s.log
stderr_logfile = /var/log/supervisor/%(program_name)s.log
autorestart = true
diff --git a/tests/__init__.py b/docker/storperf-master/tests/__init__.py
index 230494c..230494c 100644
--- a/tests/__init__.py
+++ b/docker/storperf-master/tests/__init__.py
diff --git a/tests/carbon_tests/__init__.py b/docker/storperf-master/tests/carbon_tests/__init__.py
index 73334c7..73334c7 100644
--- a/tests/carbon_tests/__init__.py
+++ b/docker/storperf-master/tests/carbon_tests/__init__.py
diff --git a/tests/carbon_tests/emitter_test.py b/docker/storperf-master/tests/carbon_tests/emitter_test.py
index 7f61049..7f61049 100644
--- a/tests/carbon_tests/emitter_test.py
+++ b/docker/storperf-master/tests/carbon_tests/emitter_test.py
diff --git a/tests/carbon_tests/json_to_carbon_test.py b/docker/storperf-master/tests/carbon_tests/json_to_carbon_test.py
index 523ff77..523ff77 100644
--- a/tests/carbon_tests/json_to_carbon_test.py
+++ b/docker/storperf-master/tests/carbon_tests/json_to_carbon_test.py
diff --git a/tests/db_tests/__init__.py b/docker/storperf-master/tests/db_tests/__init__.py
index 73334c7..73334c7 100644
--- a/tests/db_tests/__init__.py
+++ b/docker/storperf-master/tests/db_tests/__init__.py
diff --git a/tests/db_tests/configuration_db_test.py b/docker/storperf-master/tests/db_tests/configuration_db_test.py
index dda616b..d8b021a 100644
--- a/tests/db_tests/configuration_db_test.py
+++ b/docker/storperf-master/tests/db_tests/configuration_db_test.py
@@ -10,16 +10,24 @@
from storperf.db.configuration_db import ConfigurationDB
import os
import unittest
-import sqlite3
class ConfigurationDBTest(unittest.TestCase):
def setUp(self):
- ConfigurationDB.db_name = "file::memory:?cache=shared"
- db = sqlite3.connect(ConfigurationDB.db_name)
+ ConfigurationDB.db_name = __name__ + '.db'
+ try:
+ os.remove(ConfigurationDB.db_name)
+ except OSError:
+ pass
self.config_db = ConfigurationDB()
+ def tearDown(self):
+ try:
+ os.remove(ConfigurationDB.db_name)
+ except OSError:
+ pass
+
def test_create_key(self):
expected = "ABCDE-12345"
diff --git a/tests/db_tests/graphite_db_test.py b/docker/storperf-master/tests/db_tests/graphite_db_test.py
index d4c6fb6..d4c6fb6 100644
--- a/tests/db_tests/graphite_db_test.py
+++ b/docker/storperf-master/tests/db_tests/graphite_db_test.py
diff --git a/tests/db_tests/job_db_test.py b/docker/storperf-master/tests/db_tests/job_db_test.py
index 9b09a80..25fda1f 100644
--- a/tests/db_tests/job_db_test.py
+++ b/docker/storperf-master/tests/db_tests/job_db_test.py
@@ -20,7 +20,6 @@ from storperf.workloads.rr import rr
class JobDBTest(unittest.TestCase):
def setUp(self):
-
JobDB.db_name = __name__ + '.db'
try:
os.remove(JobDB.db_name)
@@ -28,6 +27,12 @@ class JobDBTest(unittest.TestCase):
pass
self.job = JobDB()
+ def tearDown(self):
+ try:
+ os.remove(JobDB.db_name)
+ except OSError:
+ pass
+
@mock.patch("uuid.uuid4")
def test_create_job(self, mock_uuid):
expected = "ABCDE-12345"
diff --git a/tests/fio_tests/__init__.py b/docker/storperf-master/tests/fio_tests/__init__.py
index df29e18..df29e18 100644
--- a/tests/fio_tests/__init__.py
+++ b/docker/storperf-master/tests/fio_tests/__init__.py
diff --git a/tests/fio_tests/fio_invoker_test.py b/docker/storperf-master/tests/fio_tests/fio_invoker_test.py
index 4672651..4672651 100644
--- a/tests/fio_tests/fio_invoker_test.py
+++ b/docker/storperf-master/tests/fio_tests/fio_invoker_test.py
diff --git a/tests/storperf_master_test.py b/docker/storperf-master/tests/storperf_master_test.py
index c67e3c4..e824a5f 100644
--- a/tests/storperf_master_test.py
+++ b/docker/storperf-master/tests/storperf_master_test.py
@@ -7,19 +7,29 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
+import os
+import unittest
+
from storperf.db.configuration_db import ConfigurationDB
from storperf.storperf_master import StorPerfMaster
-import unittest
-import sqlite3
class StorPerfMasterTest(unittest.TestCase):
def setUp(self):
- ConfigurationDB.db_name = "file::memory:?cache=shared"
- db = sqlite3.connect(ConfigurationDB.db_name)
+ ConfigurationDB.db_name = __name__ + '.db'
+ try:
+ os.remove(ConfigurationDB.db_name)
+ except OSError:
+ pass
self.storperf = StorPerfMaster()
+ def tearDown(self):
+ try:
+ os.remove(ConfigurationDB.db_name)
+ except OSError:
+ pass
+
def test_agent_count(self):
expected = 10
diff --git a/tests/utilities_tests/__init__.py b/docker/storperf-master/tests/utilities_tests/__init__.py
index 6218fe3..6218fe3 100644
--- a/tests/utilities_tests/__init__.py
+++ b/docker/storperf-master/tests/utilities_tests/__init__.py
diff --git a/tests/utilities_tests/data_handler_test.py b/docker/storperf-master/tests/utilities_tests/data_handler_test.py
index 6d57b0d..6d57b0d 100644
--- a/tests/utilities_tests/data_handler_test.py
+++ b/docker/storperf-master/tests/utilities_tests/data_handler_test.py
diff --git a/tests/utilities_tests/data_treatment_test.py b/docker/storperf-master/tests/utilities_tests/data_treatment_test.py
index 4450f92..4450f92 100644
--- a/tests/utilities_tests/data_treatment_test.py
+++ b/docker/storperf-master/tests/utilities_tests/data_treatment_test.py
diff --git a/tests/utilities_tests/dictionary_test.py b/docker/storperf-master/tests/utilities_tests/dictionary_test.py
index 0819cef..0819cef 100644
--- a/tests/utilities_tests/dictionary_test.py
+++ b/docker/storperf-master/tests/utilities_tests/dictionary_test.py
diff --git a/tests/utilities_tests/math_average_test.py b/docker/storperf-master/tests/utilities_tests/math_average_test.py
index 3095f56..3095f56 100644
--- a/tests/utilities_tests/math_average_test.py
+++ b/docker/storperf-master/tests/utilities_tests/math_average_test.py
diff --git a/tests/utilities_tests/math_range_test.py b/docker/storperf-master/tests/utilities_tests/math_range_test.py
index 90519e7..90519e7 100644
--- a/tests/utilities_tests/math_range_test.py
+++ b/docker/storperf-master/tests/utilities_tests/math_range_test.py
diff --git a/tests/utilities_tests/math_slope_test.py b/docker/storperf-master/tests/utilities_tests/math_slope_test.py
index 24d5cd7..24d5cd7 100644
--- a/tests/utilities_tests/math_slope_test.py
+++ b/docker/storperf-master/tests/utilities_tests/math_slope_test.py
diff --git a/tests/utilities_tests/steady_state_test.py b/docker/storperf-master/tests/utilities_tests/steady_state_test.py
index 564c090..564c090 100644
--- a/tests/utilities_tests/steady_state_test.py
+++ b/docker/storperf-master/tests/utilities_tests/steady_state_test.py
diff --git a/tests/utilities_tests/thread_gate_test.py b/docker/storperf-master/tests/utilities_tests/thread_gate_test.py
index de8b15a..de8b15a 100644
--- a/tests/utilities_tests/thread_gate_test.py
+++ b/docker/storperf-master/tests/utilities_tests/thread_gate_test.py
diff --git a/tests/workload_tests/__init__.py b/docker/storperf-master/tests/workload_tests/__init__.py
index 73334c7..73334c7 100644
--- a/tests/workload_tests/__init__.py
+++ b/docker/storperf-master/tests/workload_tests/__init__.py
diff --git a/tests/workload_tests/workload_subclass_test.py b/docker/storperf-master/tests/workload_tests/workload_subclass_test.py
index e9e47f3..e9e47f3 100644
--- a/tests/workload_tests/workload_subclass_test.py
+++ b/docker/storperf-master/tests/workload_tests/workload_subclass_test.py
diff --git a/reporting/docker/requirements.txt b/docker/storperf-reporting/requirements.txt
index 81903de..81903de 100644
--- a/reporting/docker/requirements.txt
+++ b/docker/storperf-reporting/requirements.txt
diff --git a/docker/storperf-reporting/src/app.py b/docker/storperf-reporting/src/app.py
new file mode 100644
index 0000000..1c70faf
--- /dev/null
+++ b/docker/storperf-reporting/src/app.py
@@ -0,0 +1,38 @@
+##############################################################################
+# Copyright (c) 2017 Dell EMC and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+from flask import Flask, redirect, url_for, request, render_template, session
+import urllib
+import json
+app = Flask(__name__)
+app.secret_key = 'storperf_graphing_module'
+
+
+@app.route('/success/')
+def success():
+ data = urllib.urlopen(session["url"]).read()
+ data = json.loads(data)
+ return render_template('plot_tables.html', data=data)
+
+
+@app.route('/url', methods=['POST', 'GET'])
+def url():
+ if request.method == 'POST':
+ url = request.form['url']
+ session["url"] = url
+ return redirect(url_for('success'))
+
+
+@app.route('/')
+def index():
+ return render_template('index.html')
+
+
+if __name__ == '__main__':
+ app.run(host="0.0.0.0", debug=True, threaded=True)
diff --git a/reporting/docker/src/static/css/bootstrap.min.css b/docker/storperf-reporting/src/static/css/bootstrap.min.css
index cd1c616..cd1c616 100644
--- a/reporting/docker/src/static/css/bootstrap.min.css
+++ b/docker/storperf-reporting/src/static/css/bootstrap.min.css
diff --git a/reporting/docker/src/static/js/Chart.min.js b/docker/storperf-reporting/src/static/js/Chart.min.js
index 3e93936..3e93936 100644
--- a/reporting/docker/src/static/js/Chart.min.js
+++ b/docker/storperf-reporting/src/static/js/Chart.min.js
diff --git a/reporting/docker/src/static/js/bootstrap.min.js b/docker/storperf-reporting/src/static/js/bootstrap.min.js
index c8f82e5..c8f82e5 100644
--- a/reporting/docker/src/static/js/bootstrap.min.js
+++ b/docker/storperf-reporting/src/static/js/bootstrap.min.js
diff --git a/reporting/docker/src/static/js/jquery-2.1.3.min.js b/docker/storperf-reporting/src/static/js/jquery-2.1.3.min.js
index 25714ed..25714ed 100644
--- a/reporting/docker/src/static/js/jquery-2.1.3.min.js
+++ b/docker/storperf-reporting/src/static/js/jquery-2.1.3.min.js
diff --git a/reporting/docker/src/static/js/jquery.bootpag.min.js b/docker/storperf-reporting/src/static/js/jquery.bootpag.min.js
index 324b1a3..324b1a3 100644
--- a/reporting/docker/src/static/js/jquery.bootpag.min.js
+++ b/docker/storperf-reporting/src/static/js/jquery.bootpag.min.js
diff --git a/reporting/docker/src/static/js/plotly-latest.min.js b/docker/storperf-reporting/src/static/js/plotly-latest.min.js
index 753a7ba..753a7ba 100644
--- a/reporting/docker/src/static/js/plotly-latest.min.js
+++ b/docker/storperf-reporting/src/static/js/plotly-latest.min.js
diff --git a/reporting/docker/src/templates/index.html b/docker/storperf-reporting/src/templates/index.html
index c302299..c302299 100644
--- a/reporting/docker/src/templates/index.html
+++ b/docker/storperf-reporting/src/templates/index.html
diff --git a/reporting/docker/src/templates/plot_tables.html b/docker/storperf-reporting/src/templates/plot_tables.html
index 4d6c887..4d6c887 100644
--- a/reporting/docker/src/templates/plot_tables.html
+++ b/docker/storperf-reporting/src/templates/plot_tables.html
diff --git a/reporting/docker/app.py b/reporting/docker/app.py
deleted file mode 100644
index 8f1c058..0000000
--- a/reporting/docker/app.py
+++ /dev/null
@@ -1,9 +0,0 @@
-from flask import Flask
-app = Flask(__name__)
-
-@app.route('/')
-def hello_world():
- return 'Hello World'
-
-if __name__ == '__main__':
- app.run(debug=True, host='0.0.0.0', threaded=True)
diff --git a/reporting/docker/src/app.py b/reporting/docker/src/app.py
deleted file mode 100644
index 4f6d17c..0000000
--- a/reporting/docker/src/app.py
+++ /dev/null
@@ -1,28 +0,0 @@
-from flask import Flask, redirect, url_for, request, render_template,jsonify, session
-import requests, json
-import urllib, json
-app = Flask(__name__)
-app.secret_key = 'storperf_graphing_module'
-#global url
-
-@app.route('/reporting/success/')
-def success():
- header = {'x-requested-with': 'XMLHttpRequest'}
- data = urllib.urlopen(session["url"]).read()
- data = json.loads(data)
- return render_template('plot_tables.html', data = data)
-
-@app.route('/reporting/url',methods = ['POST', 'GET'])
-def url():
- if request.method == 'POST':
-# global url
- url = request.form['url']
- session["url"] = url
- return redirect(url_for('success'))
-
-@app.route('/reporting/')
-def index():
- return render_template('index.html')
-
-if __name__ == '__main__':
- app.run(host="0.0.0.0", debug = True, threaded=True) \ No newline at end of file