aboutsummaryrefslogtreecommitdiffstats
path: root/benchmarks/playbooks/netperf.yaml
diff options
context:
space:
mode:
authorMofassirArif <Mofassir_Arif@dellteam.com>2016-01-21 06:42:23 -0800
committerMofassirArif <Mofassir_Arif@dellteam.com>2016-01-21 07:28:54 -0800
commit971a7c98515a9d83661f5e423f7e8390f35dca59 (patch)
treeee1d930fca39fa6875de6e18a2ae3dd9dba6f70f /benchmarks/playbooks/netperf.yaml
parent688380c212d1fc7cceb969a4d150c7764fcdeb77 (diff)
bug fix: result collection bug fix for docker images
Change-Id: Ia4ea09b90c7a4f4e3699af456c6d66e85661cc0b Signed-off-by: MofassirArif <Mofassir_Arif@dellteam.com>
Diffstat (limited to 'benchmarks/playbooks/netperf.yaml')
-rw-r--r--benchmarks/playbooks/netperf.yaml28
1 files changed, 14 insertions, 14 deletions
diff --git a/benchmarks/playbooks/netperf.yaml b/benchmarks/playbooks/netperf.yaml
index 3292f060..12943bcc 100644
--- a/benchmarks/playbooks/netperf.yaml
+++ b/benchmarks/playbooks/netperf.yaml
@@ -1,14 +1,14 @@
- hosts: 127.0.0.1
connection: local
- tasks:
+ tasks:
- name: getting directory
shell: echo $PWD
register: qtip_dir
- name: making Netperf directory
- file: path=../../{{Dest_dir}}/netperf state=directory
+ file: path={{workingdir}}/{{Dest_dir}}/netperf state=directory
- name: making temporary netperf directory
- file: path=../../{{Dest_dir}}/netperf/netperf_temp state=directory
+ file: path={{workingdir}}/{{Dest_dir}}/netperf/netperf_temp state=directory
- hosts: "{{role}}"
@@ -17,7 +17,7 @@
set_fact:
rolename: "{{role}}"
when: role is defined
-
+
- name: Get Hostname
shell: echo $HOSTNAME
register: hostID
@@ -32,7 +32,7 @@
shell: mkdir $HOME/netperf
- name: making results temporary directory
shell: mkdir $HOME/qtip_result
-
+
- name: Fetching netperf
shell: wget ftp://ftp.netperf.org/netperf/netperf-2.7.0.tar.gz
when: ansible_os_family == "RedHat"
@@ -41,26 +41,26 @@
- name: configuring netperf
shell: cd $HOME/netperf-2.7.0 && ./configure
- name: Making Netperf
- shell: cd $HOME/netperf-2.7.0 && make
+ shell: cd $HOME/netperf-2.7.0 && make
- name: Installing Netperf
shell: cd $HOME/netperf-2.7.0 && make install
-
+
- name: Running netperf on server
shell: /usr/local/bin/netserver -p 4000
when: rolename == "1-server"
-
+
- name: Running netperf on Host
shell: /usr/local/bin/netperf -H {{privateip1}} -p 4000 -l {{duration}} -t {{teststream}} -fG >> ./qtip_result/server{{hostID.stdout}}-{{item}}.json
ignore_errors: yes
- with_items:
+ with_items:
- "{{ip1}}"
when: rolename == "2-host" and "{{ip2}}" == ''
-
- - name: Files to Copy
+
+ - name: Files to Copy
shell: (cd $HOME/qtip_result/; find . -maxdepth 1 -name "*.json") | cut -d'/' -f2
register: files_to_copy
- name: copy results
- fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest=../../{{Dest_dir}}/netperf/netperf_temp
+ fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/netperf/netperf_temp
with_items: files_to_copy.stdout_lines
- hosts: 127.0.0.1
connection: local
@@ -70,7 +70,7 @@
rolename: "{{role}}"
when: role is defined
- name: extracting_json
- shell: ( find ../../{{Dest_dir}}/netperf/netperf_temp/ -name "*.json" | xargs cp -t ../../{{Dest_dir}}/netperf/)
+ shell: ( find {{workingdir}}/{{Dest_dir}}/netperf/netperf_temp/ -name "*.json" | xargs cp -t {{workingdir}}/{{Dest_dir}}/netperf/)
when: rolename == "2-host"
- name: removing netperf_temp
- shell: rm -rf ../../{{Dest_dir}}/netperf/netperf_temp \ No newline at end of file
+ shell: rm -rf {{workingdir}}/{{Dest_dir}}/netperf/netperf_temp \ No newline at end of file