aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/apidocs/qtip_restful_api.rst2
-rw-r--r--docs/designspec/dashboard.rst16
-rw-r--r--docs/userguide/introduction.rst2
-rw-r--r--func/env_setup.py3
-rwxr-xr-xscripts/fetch_compute_ips.sh2
-rw-r--r--setup.py2
-rw-r--r--supporting/servers/inventory3
-rw-r--r--supporting/servers/qtip.yml4
-rw-r--r--supporting/servers/roles/ngnix/defaults/main.yml3
-rw-r--r--supporting/servers/roles/ngnix/tasks/main.yml1
-rw-r--r--supporting/servers/roles/ngnix/templates/qtip.conf.j217
-rw-r--r--supporting/servers/roles/qtip/files/run_qtip_server.sh4
-rw-r--r--supporting/servers/roles/qtip/tasks/main.yml5
13 files changed, 58 insertions, 6 deletions
diff --git a/docs/apidocs/qtip_restful_api.rst b/docs/apidocs/qtip_restful_api.rst
index 3f3297d5..06c01292 100644
--- a/docs/apidocs/qtip_restful_api.rst
+++ b/docs/apidocs/qtip_restful_api.rst
@@ -7,4 +7,4 @@
Qtip restful api
****************
-You can get all the Qtip restful api by http://qtip_server_ip:5000/api/spec.html.
+You can get all the Qtip restful api by http://restful_api.qtip.openzero.net/api/spec.html.
diff --git a/docs/designspec/dashboard.rst b/docs/designspec/dashboard.rst
index 555b3a24..60c4720d 100644
--- a/docs/designspec/dashboard.rst
+++ b/docs/designspec/dashboard.rst
@@ -133,3 +133,19 @@ A draft design is as following::
| HIDE COMMON|
+------------+
+Time line
+---------
+
+Time line diagram for analysis of time critical performance test::
+
+ +-----------------+-----------+-------------+-------------+-----+
+ | | | | | |
+ +-----------------> | | | |
+ | +-----------> | | |
+ | ? ms +-------------> | |
+ | ? ms +------------>+ |
+ | ? ms ? ms |
+ | |
+ +---------------------------------------------------------------+
+
+The time cost between checkpoints shall be displayed in the diagram.
diff --git a/docs/userguide/introduction.rst b/docs/userguide/introduction.rst
index 6f443fd3..0c8e1665 100644
--- a/docs/userguide/introduction.rst
+++ b/docs/userguide/introduction.rst
@@ -378,4 +378,4 @@ Stop running QTIP job by restful api.The job will finish the current benchmark t
Results:
--------
-QTIP generates results in the `results/` directory are listed down under the particularly benchmark name. So all the results for dhrystone would be listed and time stamped.
+In QTIP container, QTIP generates results in the `/home/opnfv/qtip/results/` directory are listed down under the particularly benchmark name. So all the results for dhrystone would be listed and time stamped.
diff --git a/func/env_setup.py b/func/env_setup.py
index 6027f904..e9f9cd2a 100644
--- a/func/env_setup.py
+++ b/func/env_setup.py
@@ -113,8 +113,7 @@ class Env_setup:
(installer_type, installer_ip)
logger.info(cmd)
os.system(cmd)
- home = expanduser("~")
- with open(home + "/ips.log", "r") as file:
+ with open(expanduser('~') + "/qtip/ips.log", "r") as file:
data = file.read()
if data:
ips.extend(data.rstrip('\n').split('\n'))
diff --git a/scripts/fetch_compute_ips.sh b/scripts/fetch_compute_ips.sh
index ebe817a6..4bdc9a48 100755
--- a/scripts/fetch_compute_ips.sh
+++ b/scripts/fetch_compute_ips.sh
@@ -110,7 +110,7 @@ if [ -z "$IPS" ]; then
else
echo "-------- all compute node ips: --------"
touch $HOME/ips.log
- echo "$IPS" > $HOME/ips.log
+ echo "$IPS" > $HOME/qtip/ips.log
echo $IPS
fi
diff --git a/setup.py b/setup.py
index fb6711c6..e00e97ba 100644
--- a/setup.py
+++ b/setup.py
@@ -9,7 +9,7 @@ setup(
description='Platform Performance Benchmarking for OPNFV',
author='OPNFV',
author_email='zhang.yujunz@zte.com.cn',
- install_requires=['click'],
+ install_requires=['click', 'pyyaml', 'prettytable'],
packages=['cli'],
entry_points={
'console_scripts': ['qtip=cli.entry:cli']
diff --git a/supporting/servers/inventory b/supporting/servers/inventory
index 1414fa7c..74c04c42 100644
--- a/supporting/servers/inventory
+++ b/supporting/servers/inventory
@@ -5,3 +5,6 @@ qtip-dev
[ngnix-servers]
qtip-dev
+
+[qtip-servers]
+qtip-dev
diff --git a/supporting/servers/qtip.yml b/supporting/servers/qtip.yml
new file mode 100644
index 00000000..f0ac3c4e
--- /dev/null
+++ b/supporting/servers/qtip.yml
@@ -0,0 +1,4 @@
+---
+- hosts: qtip-servers
+ roles:
+ - qtip
diff --git a/supporting/servers/roles/ngnix/defaults/main.yml b/supporting/servers/roles/ngnix/defaults/main.yml
index 855fc7ea..cb3b3934 100644
--- a/supporting/servers/roles/ngnix/defaults/main.yml
+++ b/supporting/servers/roles/ngnix/defaults/main.yml
@@ -2,3 +2,6 @@
services:
- { name: kibana, upstream: 'http://127.0.0.1:5601' }
- { name: elastic, upstream: 'http://127.0.0.1:9200' }
+
+qtip_services:
+ - { name: restful_api, upstream: 'http://127.0.0.1:5000' }
diff --git a/supporting/servers/roles/ngnix/tasks/main.yml b/supporting/servers/roles/ngnix/tasks/main.yml
index 8673b3d2..ec146850 100644
--- a/supporting/servers/roles/ngnix/tasks/main.yml
+++ b/supporting/servers/roles/ngnix/tasks/main.yml
@@ -7,5 +7,6 @@
template: src={{ item }}.conf.j2 dest=/etc/nginx/sites-enabled/{{ item }}.conf
with_items:
- elk
+ - qtip
notify:
- restart nginx
diff --git a/supporting/servers/roles/ngnix/templates/qtip.conf.j2 b/supporting/servers/roles/ngnix/templates/qtip.conf.j2
new file mode 100644
index 00000000..3a15c6ba
--- /dev/null
+++ b/supporting/servers/roles/ngnix/templates/qtip.conf.j2
@@ -0,0 +1,17 @@
+# {{ ansible_managed }}
+
+# servers
+#
+{% for service in qtip_services %}
+server {
+ listen 80;
+ listen 443 ssl;
+ server_name {{ service.name }}.qtip.openzero.net;
+ location / {
+ proxy_pass {{ service.upstream }};
+ sub_filter {{ service.upstream }} 'http://{{ service.name }}.qtip.openzero.net';
+ sub_filter_once off;
+ sub_filter_types text/html application/json;
+ }
+}
+{% endfor %}
diff --git a/supporting/servers/roles/qtip/files/run_qtip_server.sh b/supporting/servers/roles/qtip/files/run_qtip_server.sh
new file mode 100644
index 00000000..0f5cafea
--- /dev/null
+++ b/supporting/servers/roles/qtip/files/run_qtip_server.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+
+envs="INSTALLER_TYPE=fuel -e INSTALLER_IP=10.20.0.2 -e NODE_NAME=zte-pod1"
+docker run --name qtip -id -e $envs -p 5000:5000 opnfv/qtip
diff --git a/supporting/servers/roles/qtip/tasks/main.yml b/supporting/servers/roles/qtip/tasks/main.yml
new file mode 100644
index 00000000..b8292791
--- /dev/null
+++ b/supporting/servers/roles/qtip/tasks/main.yml
@@ -0,0 +1,5 @@
+---
+# TODO:change the script to docker_container.
+- name: setting up qtip
+ become: true
+ script: ../files/run_qtip_server.sh