summaryrefslogtreecommitdiffstats
path: root/resources/roles
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-04-20 22:51:59 +0800
committerYujun Zhang <zhang.yujunz@zte.com.cn>2017-04-21 13:43:50 +0800
commit6144eac326d14e26bbb849abea51c4cf7f3881b6 (patch)
tree15ab6fcd3eadfb6d9ae7d089b237a2f0416a9235 /resources/roles
parent7273ca98a91399e188af15e192be93724977fe08 (diff)
Group test results and report under node
Change-Id: I66286787d06c5012c6dcf516cffb9f6fd76522c5 Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'resources/roles')
-rw-r--r--resources/roles/inxi/tasks/main.yml7
-rw-r--r--resources/roles/inxi/templates/system-info.j216
-rw-r--r--resources/roles/nDPI/tasks/main.yml7
-rw-r--r--resources/roles/nDPI/templates/dpi-metrics.j24
-rw-r--r--resources/roles/openssl/tasks/main.yml7
-rw-r--r--resources/roles/openssl/templates/ssl-metrics.j23
-rw-r--r--resources/roles/qtip-workspace/files/copy/run.yml32
-rw-r--r--resources/roles/qtip-workspace/files/copy/setup.yml2
-rw-r--r--resources/roles/qtip-workspace/files/render/group_vars/all.yml2
-rw-r--r--resources/roles/ramspeed/tasks/main.yml24
-rw-r--r--resources/roles/ramspeed/templates/memory-metrics.j216
-rw-r--r--resources/roles/unixbench/tasks/main.yml12
-rw-r--r--resources/roles/unixbench/templates/floating-point.j22
-rw-r--r--resources/roles/unixbench/templates/integer.j22
14 files changed, 91 insertions, 45 deletions
diff --git a/resources/roles/inxi/tasks/main.yml b/resources/roles/inxi/tasks/main.yml
index 47eb2e73..66c83f9d 100644
--- a/resources/roles/inxi/tasks/main.yml
+++ b/resources/roles/inxi/tasks/main.yml
@@ -42,3 +42,10 @@
- '.+\sproduct:\s+(?P<product>.+)\sv'
dump: 'inix.log'
register: system_info
+
+- name: create system information report
+ template:
+ src: system-info.j2
+ dest: "{{ qtip_results }}/{{ inventory_hostname }}/system-info"
+ delegate_to: localhost
+ tags: [report]
diff --git a/resources/roles/inxi/templates/system-info.j2 b/resources/roles/inxi/templates/system-info.j2
new file mode 100644
index 00000000..305a2af2
--- /dev/null
+++ b/resources/roles/inxi/templates/system-info.j2
@@ -0,0 +1,16 @@
+System Information from inxi
+============================
+
+{% for host in groups['compute'] %}
+{{ hostvars[host].ansible_hostname }}
+-----------------------------
+
+{{ ('CPU Brand', hostvars[host].system_info.cpu[0])|justify }}
+{{ ('Disk', hostvars[host].system_info.disk[0])|justify }}
+{{ ('Host Name', hostvars[host].system_info.hostname[0])|justify }}
+{{ ('Kernel', hostvars[host].system_info.kernel[0])|justify }}
+{{ ('Memory', hostvars[host].system_info.memory[0])|justify }}
+{{ ('Operating System', hostvars[host].system_info.os[0])|justify }}
+{{ ('Product', hostvars[host].system_info.product[0])|justify }}
+
+{% endfor %}
diff --git a/resources/roles/nDPI/tasks/main.yml b/resources/roles/nDPI/tasks/main.yml
index b3e7259f..c53a22fc 100644
--- a/resources/roles/nDPI/tasks/main.yml
+++ b/resources/roles/nDPI/tasks/main.yml
@@ -58,3 +58,10 @@
- 'nDPI throughput:\s+?(?P<dpi_pps>\d+.\d+.*) \/ (?P<dpi_bps>\d+.\d+.*)$'
dump: 'nDPI.log'
register: dpi_metrics
+
+- name: create dpi report
+ template:
+ src: dpi-metrics.j2
+ dest: "{{ qtip_results }}/{{ inventory_hostname }}/dpi-metrics"
+ delegate_to: localhost
+ tags: [report]
diff --git a/resources/roles/nDPI/templates/dpi-metrics.j2 b/resources/roles/nDPI/templates/dpi-metrics.j2
new file mode 100644
index 00000000..4d6e0b69
--- /dev/null
+++ b/resources/roles/nDPI/templates/dpi-metrics.j2
@@ -0,0 +1,4 @@
+nDPI throughput
+===============
+
+{{ ('Result:', "{} / {}".format(dpi_metrics.dpi_pps[0], dpi_metrics.dpi_bps[0]))|justify }}
diff --git a/resources/roles/openssl/tasks/main.yml b/resources/roles/openssl/tasks/main.yml
index 2dda0e33..42efbeb4 100644
--- a/resources/roles/openssl/tasks/main.yml
+++ b/resources/roles/openssl/tasks/main.yml
@@ -52,3 +52,10 @@
# ?(?P<aes_128_cbc_256_bytes>\d+\.\w+)\s+
# ?(?P<aes_128_cbc_1024_bytes>\d+\.\w+)\s+
# ?(?P<aes_128_cbc_8192_bytes>\d+\.\w+)$
+
+- name: create SSL report
+ template:
+ src: ssl-metrics.j2
+ dest: "{{ qtip_results }}/{{ inventory_hostname }}/ssl-metrics"
+ delegate_to: localhost
+ tags: [report]
diff --git a/resources/roles/openssl/templates/ssl-metrics.j2 b/resources/roles/openssl/templates/ssl-metrics.j2
new file mode 100644
index 00000000..8dedf352
--- /dev/null
+++ b/resources/roles/openssl/templates/ssl-metrics.j2
@@ -0,0 +1,3 @@
+SSL
+===
+
diff --git a/resources/roles/qtip-workspace/files/copy/run.yml b/resources/roles/qtip-workspace/files/copy/run.yml
index ddac875c..ed87b6a4 100644
--- a/resources/roles/qtip-workspace/files/copy/run.yml
+++ b/resources/roles/qtip-workspace/files/copy/run.yml
@@ -22,13 +22,6 @@
roles:
- development-tools
- post_tasks:
- - name: create dumping directories
- file:
- path: "{{ qtip_dump }}/{{ inventory_hostname }}"
- state: directory
- delegate_to: localhost
-
tags: [setup]
@@ -50,7 +43,7 @@
spec: "{{ qtip_resources }}/QPI/compute.yaml"
register: qpi_result
delegate_to: localhost
- tags: [calculate]
+ tags: [qpi]
- hosts: localhost
@@ -61,31 +54,10 @@
aggregate:
group: compute
register: pod_result
+ tags: [pod]
# Generate and publish report
- - name: create report folder
- file:
- path: "{{ qtip_reports }}"
- state: directory
-
- - name: create system information report
- template:
- src: "{{ qtip_resources }}/template/system-info.j2"
- dest: "{{ qtip_reports }}/system-info"
-
- - name: create qpi report
- template:
- src: "{{ qtip_resources }}/template/qpi-report.j2"
- dest: "{{ qtip_reports }}/qpi-report"
- tags: [report]
-
- - name: create dpi metrics report
- template:
- src: "{{ qtip_resources }}/template/dpi-metrics.j2"
- dest: "{{ qtip_reports }}/dpi-metrics"
- tags: [report, dpi]
-
- name: push result to testapi
uri:
url: "{{ testapi_url }}/results"
diff --git a/resources/roles/qtip-workspace/files/copy/setup.yml b/resources/roles/qtip-workspace/files/copy/setup.yml
index 88cdb1d2..0923ba52 100644
--- a/resources/roles/qtip-workspace/files/copy/setup.yml
+++ b/resources/roles/qtip-workspace/files/copy/setup.yml
@@ -48,7 +48,7 @@
state: directory
with_items:
- "{{ qtip_cache }}"
- - "{{ qtip_reports }}"
+ - "{{ qtip_results }}"
# Initialize testapi database
- hosts: localhost
diff --git a/resources/roles/qtip-workspace/files/render/group_vars/all.yml b/resources/roles/qtip-workspace/files/render/group_vars/all.yml
index c00e72a4..af7f756b 100644
--- a/resources/roles/qtip-workspace/files/render/group_vars/all.yml
+++ b/resources/roles/qtip-workspace/files/render/group_vars/all.yml
@@ -8,7 +8,7 @@
##############################################################################
qtip_resources: "{{ qtip_package }}/resources"
-qtip_reports: reports
+qtip_results: results
qtip_fixtures: fixtures
qtip_dump: dump
qtip_cache: .cache
diff --git a/resources/roles/ramspeed/tasks/main.yml b/resources/roles/ramspeed/tasks/main.yml
index 6473d576..73df35de 100644
--- a/resources/roles/ramspeed/tasks/main.yml
+++ b/resources/roles/ramspeed/tasks/main.yml
@@ -45,11 +45,11 @@
collect:
string: "{{ ramsmp_intmem_out.stdout }}"
patterns:
- - '^INTEGER\s+BatchRun\s+Copy:\s+?(?P<integer_copy>\d+\.\d+)\sMB/s$'
- - '^INTEGER\s+BatchRun\s+Scale:\s+?(?P<integer_scale>\d+\.\d+)\sMB/s$'
- - '^INTEGER\s+BatchRun\s+Add:\s+?(?P<integer_add>\d+\.\d+)\sMB/s$'
- - '^INTEGER\s+BatchRun\s+Triad:\s+?(?P<integer_triad>\d+\.\d+)\sMB/s$'
- - '^INTEGER\s+BatchRun\s+AVERAGE:\s+?(?P<integer_average>\d+\.\d+)\sMB/s$'
+ - '^INTEGER\s+BatchRun\s+Copy:\s+?(?P<copy>\d+\.\d+)\sMB/s$'
+ - '^INTEGER\s+BatchRun\s+Scale:\s+?(?P<scale>\d+\.\d+)\sMB/s$'
+ - '^INTEGER\s+BatchRun\s+Add:\s+?(?P<add>\d+\.\d+)\sMB/s$'
+ - '^INTEGER\s+BatchRun\s+Triad:\s+?(?P<triad>\d+\.\d+)\sMB/s$'
+ - '^INTEGER\s+BatchRun\s+AVERAGE:\s+?(?P<average>\d+\.\d+)\sMB/s$'
dump: 'ramsmp-intmem.log'
register: intmem_metrics
tags: [collect]
@@ -58,18 +58,18 @@
collect:
string: "{{ ramsmp_floatmem_out.stdout }}"
patterns:
- - '^FL-POINT\s+BatchRun\s+Copy:\s+?(?P<float_copy>\d+\.\d+)\sMB/s$'
- - '^FL-POINT\s+BatchRun\s+Scale:\s+?(?P<float_scale>\d+\.\d+)\sMB/s$'
- - '^FL-POINT\s+BatchRun\s+Add:\s+?(?P<float_add>\d+\.\d+)\sMB/s$'
- - '^FL-POINT\s+BatchRun\s+Triad:\s+?(?P<float_triad>\d+\.\d+)\sMB/s$'
- - '^FL-POINT\s+BatchRun\s+AVERAGE:\s+?(?P<float_average>\d+\.\d+)\sMB/s$'
+ - '^FL-POINT\s+BatchRun\s+Copy:\s+?(?P<copy>\d+\.\d+)\sMB/s$'
+ - '^FL-POINT\s+BatchRun\s+Scale:\s+?(?P<scale>\d+\.\d+)\sMB/s$'
+ - '^FL-POINT\s+BatchRun\s+Add:\s+?(?P<add>\d+\.\d+)\sMB/s$'
+ - '^FL-POINT\s+BatchRun\s+Triad:\s+?(?P<triad>\d+\.\d+)\sMB/s$'
+ - '^FL-POINT\s+BatchRun\s+AVERAGE:\s+?(?P<average>\d+\.\d+)\sMB/s$'
dump: 'ramsmp-floatmem.log'
register: floatmem_metrics
tags: [collect]
- name: create memory metrics report
template:
- src: "{{ qtip_resources }}/template/mem-metrics.j2"
- dest: "{{ qtip_reports }}/mem-metrics"
+ src: "memory-metrics.j2"
+ dest: "{{ qtip_results }}/{{ inventory_hostname }}/memory-metrics"
delegate_to: localhost
tags: [report]
diff --git a/resources/roles/ramspeed/templates/memory-metrics.j2 b/resources/roles/ramspeed/templates/memory-metrics.j2
new file mode 100644
index 00000000..4f5a8e80
--- /dev/null
+++ b/resources/roles/ramspeed/templates/memory-metrics.j2
@@ -0,0 +1,16 @@
+Memory
+======
+
+INTEGER
+^^^^^^^
+{{ ('Copy', intmem_metrics['copy'][0])|justify }}
+{{ ('Scale', intmem_metrics['scale'][0])|justify }}
+{{ ('Add', intmem_metrics['add'][0])|justify }}
+{{ ('Triad', intmem_metrics['triad'][0])|justify }}
+
+FL-POINT
+^^^^^^^^
+{{ ('Copy', floatmem_metrics['copy'][0])|justify }}
+{{ ('Scale', floatmem_metrics['copy'][0])|justify }}
+{{ ('Add', floatmem_metrics['copy'][0])|justify }}
+{{ ('Triad', floatmem_metrics['copy'][0])|justify }}
diff --git a/resources/roles/unixbench/tasks/main.yml b/resources/roles/unixbench/tasks/main.yml
index d9d5c8f7..9d4ae833 100644
--- a/resources/roles/unixbench/tasks/main.yml
+++ b/resources/roles/unixbench/tasks/main.yml
@@ -32,5 +32,15 @@
synchronize:
mode: pull
src: "{{ cwd }}/byte-unixbench-5.1.3/UnixBench/results"
- dest: "{{ qtip_dump }}/{{ inventory_hostname }}/unixbench"
+ dest: "{{ qtip_results }}/{{ inventory_hostname }}/unixbench"
use_ssh_args: yes
+
+- name: create integer and floating point report
+ template:
+ src: "{{ item }}.j2"
+ dest: "{{ qtip_results }}/{{ inventory_hostname }}/{{ item }}"
+ with_items:
+ - floating-point
+ - integer
+ delegate_to: localhost
+ tags: [report]
diff --git a/resources/roles/unixbench/templates/floating-point.j2 b/resources/roles/unixbench/templates/floating-point.j2
new file mode 100644
index 00000000..5989d77c
--- /dev/null
+++ b/resources/roles/unixbench/templates/floating-point.j2
@@ -0,0 +1,2 @@
+Floating Point
+============== \ No newline at end of file
diff --git a/resources/roles/unixbench/templates/integer.j2 b/resources/roles/unixbench/templates/integer.j2
new file mode 100644
index 00000000..b494515f
--- /dev/null
+++ b/resources/roles/unixbench/templates/integer.j2
@@ -0,0 +1,2 @@
+Integer
+======= \ No newline at end of file