aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-04-20 20:58:13 +0800
committerYujun Zhang <zhang.yujunz@zte.com.cn>2017-04-21 13:43:50 +0800
commit9222ecb462099f667d78494f4886d6c84f8a2310 (patch)
tree695f9c4448b9a6ba637f33c8feabce0efa46f5bd
parent441dea324dc2442b746528e0337a539c18b85b2f (diff)
Reorganize benchmarking tasks into ansible roles which helps to
- group task with related templates and variables - simplify the main playbook to improve readability See: http://docs.ansible.com/ansible/playbooks_roles.html Change-Id: I9d3180edaac83ee9dba85ce5ac14ff574af7a905 Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
-rw-r--r--resources/roles/inxi/tasks/main.yml (renamed from resources/metric/inxi.yaml)0
-rw-r--r--resources/roles/nDPI/defaults/main.yml12
-rw-r--r--resources/roles/nDPI/meta/main.yml12
-rw-r--r--resources/roles/nDPI/tasks/main.yml (renamed from resources/metric/nDPI.yaml)0
-rw-r--r--resources/roles/openssl/tasks/main.yml (renamed from resources/metric/openssl.yaml)0
-rw-r--r--resources/roles/qtip-workspace/defaults/main.yml (renamed from resources/roles/qtip-bootstrap/defaults/main.yml)0
-rw-r--r--resources/roles/qtip-workspace/files/copy/fixtures/case.json (renamed from resources/roles/qtip-bootstrap/files/copy/fixtures/case.json)0
-rw-r--r--resources/roles/qtip-workspace/files/copy/fixtures/pod.json (renamed from resources/roles/qtip-bootstrap/files/copy/fixtures/pod.json)0
-rw-r--r--resources/roles/qtip-workspace/files/copy/fixtures/project.json (renamed from resources/roles/qtip-bootstrap/files/copy/fixtures/project.json)0
-rw-r--r--resources/roles/qtip-workspace/files/copy/group_vars/.gitkeep (renamed from resources/roles/qtip-bootstrap/files/copy/group_vars/.gitkeep)0
-rw-r--r--resources/roles/qtip-workspace/files/copy/host_vars/.gitkeep (renamed from resources/roles/qtip-bootstrap/files/copy/host_vars/.gitkeep)0
-rw-r--r--resources/roles/qtip-workspace/files/copy/run.yml (renamed from resources/roles/qtip-bootstrap/files/copy/run.yml)29
-rw-r--r--resources/roles/qtip-workspace/files/copy/setup.yml (renamed from resources/roles/qtip-bootstrap/files/copy/setup.yml)0
-rw-r--r--resources/roles/qtip-workspace/files/copy/templates/hosts (renamed from resources/roles/qtip-bootstrap/files/copy/templates/hosts)0
-rw-r--r--resources/roles/qtip-workspace/files/copy/templates/ssh.cfg (renamed from resources/roles/qtip-bootstrap/files/copy/templates/ssh.cfg)0
-rw-r--r--resources/roles/qtip-workspace/files/render/ansible.cfg (renamed from resources/roles/qtip-bootstrap/files/render/ansible.cfg)0
-rw-r--r--resources/roles/qtip-workspace/files/render/group_vars/all.yml (renamed from resources/roles/qtip-bootstrap/files/render/group_vars/all.yml)0
-rw-r--r--resources/roles/qtip-workspace/files/render/host_vars/localhost.yml (renamed from resources/roles/qtip-bootstrap/files/render/host_vars/localhost.yml)0
-rw-r--r--resources/roles/qtip-workspace/files/render/hosts (renamed from resources/roles/qtip-bootstrap/files/render/hosts)0
-rw-r--r--resources/roles/qtip-workspace/tasks/main.yml (renamed from resources/roles/qtip-bootstrap/tasks/main.yml)0
-rw-r--r--resources/roles/ramspeed/defaults/main.yml11
-rw-r--r--resources/roles/ramspeed/meta/main.yml12
-rw-r--r--resources/roles/ramspeed/tasks/main.yml (renamed from resources/metric/ramspeed.yaml)0
-rw-r--r--tests/integration/workspace-create.yml2
24 files changed, 54 insertions, 24 deletions
diff --git a/resources/metric/inxi.yaml b/resources/roles/inxi/tasks/main.yml
index 47eb2e73..47eb2e73 100644
--- a/resources/metric/inxi.yaml
+++ b/resources/roles/inxi/tasks/main.yml
diff --git a/resources/roles/nDPI/defaults/main.yml b/resources/roles/nDPI/defaults/main.yml
new file mode 100644
index 00000000..d8aae81a
--- /dev/null
+++ b/resources/roles/nDPI/defaults/main.yml
@@ -0,0 +1,12 @@
+#############################################################################
+# Copyright (c) 2017 ZTE Corporation 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
+#############################################################################
+
+---
+nDPI_cwd: "{{ ansible_env.HOME }}/qtip/nDPI"
+nDPI_file: "dpi.pcap"
diff --git a/resources/roles/nDPI/meta/main.yml b/resources/roles/nDPI/meta/main.yml
new file mode 100644
index 00000000..03c96c42
--- /dev/null
+++ b/resources/roles/nDPI/meta/main.yml
@@ -0,0 +1,12 @@
+#############################################################################
+# Copyright (c) 2017 ZTE Corporation 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
+#############################################################################
+
+---
+dependencies:
+ - { role: development-tools }
diff --git a/resources/metric/nDPI.yaml b/resources/roles/nDPI/tasks/main.yml
index b3e7259f..b3e7259f 100644
--- a/resources/metric/nDPI.yaml
+++ b/resources/roles/nDPI/tasks/main.yml
diff --git a/resources/metric/openssl.yaml b/resources/roles/openssl/tasks/main.yml
index 2dda0e33..2dda0e33 100644
--- a/resources/metric/openssl.yaml
+++ b/resources/roles/openssl/tasks/main.yml
diff --git a/resources/roles/qtip-bootstrap/defaults/main.yml b/resources/roles/qtip-workspace/defaults/main.yml
index 55e2cbce..55e2cbce 100644
--- a/resources/roles/qtip-bootstrap/defaults/main.yml
+++ b/resources/roles/qtip-workspace/defaults/main.yml
diff --git a/resources/roles/qtip-bootstrap/files/copy/fixtures/case.json b/resources/roles/qtip-workspace/files/copy/fixtures/case.json
index 22abc40f..22abc40f 100644
--- a/resources/roles/qtip-bootstrap/files/copy/fixtures/case.json
+++ b/resources/roles/qtip-workspace/files/copy/fixtures/case.json
diff --git a/resources/roles/qtip-bootstrap/files/copy/fixtures/pod.json b/resources/roles/qtip-workspace/files/copy/fixtures/pod.json
index 654b5828..654b5828 100644
--- a/resources/roles/qtip-bootstrap/files/copy/fixtures/pod.json
+++ b/resources/roles/qtip-workspace/files/copy/fixtures/pod.json
diff --git a/resources/roles/qtip-bootstrap/files/copy/fixtures/project.json b/resources/roles/qtip-workspace/files/copy/fixtures/project.json
index ecd03e83..ecd03e83 100644
--- a/resources/roles/qtip-bootstrap/files/copy/fixtures/project.json
+++ b/resources/roles/qtip-workspace/files/copy/fixtures/project.json
diff --git a/resources/roles/qtip-bootstrap/files/copy/group_vars/.gitkeep b/resources/roles/qtip-workspace/files/copy/group_vars/.gitkeep
index e69de29b..e69de29b 100644
--- a/resources/roles/qtip-bootstrap/files/copy/group_vars/.gitkeep
+++ b/resources/roles/qtip-workspace/files/copy/group_vars/.gitkeep
diff --git a/resources/roles/qtip-bootstrap/files/copy/host_vars/.gitkeep b/resources/roles/qtip-workspace/files/copy/host_vars/.gitkeep
index e69de29b..e69de29b 100644
--- a/resources/roles/qtip-bootstrap/files/copy/host_vars/.gitkeep
+++ b/resources/roles/qtip-workspace/files/copy/host_vars/.gitkeep
diff --git a/resources/roles/qtip-bootstrap/files/copy/run.yml b/resources/roles/qtip-workspace/files/copy/run.yml
index 52a66990..ddac875c 100644
--- a/resources/roles/qtip-bootstrap/files/copy/run.yml
+++ b/resources/roles/qtip-workspace/files/copy/run.yml
@@ -36,30 +36,13 @@
roles:
- - { role: unixbench, tags: [unixbench] }
-
- tasks:
-
- - name: collect system information
- include: "{{ qtip_resources }}/metric/inxi.yaml"
-
- - name: ssl metrics
- include: "{{ qtip_resources }}/metric/openssl.yaml"
- tags: [ssl]
-
- - name: DPI metrics
- include: "{{ qtip_resources }}/metric/nDPI.yaml"
- vars:
- nDPI_cwd: "{{ ansible_env.HOME }}/qtip/nDPI"
- nDPI_file: "dpi.pcap"
- tags: [dpi]
-
- - name: memory metrics
- include: "{{ qtip_resources }}/metric/ramspeed.yaml"
- vars:
- cwd: "{{ ansible_env.HOME }}/qtip/ramspeed"
- tags: [mem]
+ - { role: inxi, tags: [inxi, sysinfo] }
+ - { role: unixbench, tags: [unixbench, float, int] }
+ - { role: openssl, tags: [openssl, ssl]}
+ - { role: nDPI, tags: [ndpi, dpi]}
+ - { role: ramspeed, tags: [ramspeed, mem]}
+ post_tasks:
- name: calculate QPI of compute
calculate:
metrics:
diff --git a/resources/roles/qtip-bootstrap/files/copy/setup.yml b/resources/roles/qtip-workspace/files/copy/setup.yml
index 88cdb1d2..88cdb1d2 100644
--- a/resources/roles/qtip-bootstrap/files/copy/setup.yml
+++ b/resources/roles/qtip-workspace/files/copy/setup.yml
diff --git a/resources/roles/qtip-bootstrap/files/copy/templates/hosts b/resources/roles/qtip-workspace/files/copy/templates/hosts
index 27c8d1d6..27c8d1d6 100644
--- a/resources/roles/qtip-bootstrap/files/copy/templates/hosts
+++ b/resources/roles/qtip-workspace/files/copy/templates/hosts
diff --git a/resources/roles/qtip-bootstrap/files/copy/templates/ssh.cfg b/resources/roles/qtip-workspace/files/copy/templates/ssh.cfg
index d6a266ba..d6a266ba 100644
--- a/resources/roles/qtip-bootstrap/files/copy/templates/ssh.cfg
+++ b/resources/roles/qtip-workspace/files/copy/templates/ssh.cfg
diff --git a/resources/roles/qtip-bootstrap/files/render/ansible.cfg b/resources/roles/qtip-workspace/files/render/ansible.cfg
index 2d4b0b1d..2d4b0b1d 100644
--- a/resources/roles/qtip-bootstrap/files/render/ansible.cfg
+++ b/resources/roles/qtip-workspace/files/render/ansible.cfg
diff --git a/resources/roles/qtip-bootstrap/files/render/group_vars/all.yml b/resources/roles/qtip-workspace/files/render/group_vars/all.yml
index c00e72a4..c00e72a4 100644
--- a/resources/roles/qtip-bootstrap/files/render/group_vars/all.yml
+++ b/resources/roles/qtip-workspace/files/render/group_vars/all.yml
diff --git a/resources/roles/qtip-bootstrap/files/render/host_vars/localhost.yml b/resources/roles/qtip-workspace/files/render/host_vars/localhost.yml
index 8135e809..8135e809 100644
--- a/resources/roles/qtip-bootstrap/files/render/host_vars/localhost.yml
+++ b/resources/roles/qtip-workspace/files/render/host_vars/localhost.yml
diff --git a/resources/roles/qtip-bootstrap/files/render/hosts b/resources/roles/qtip-workspace/files/render/hosts
index bf19efab..bf19efab 100644
--- a/resources/roles/qtip-bootstrap/files/render/hosts
+++ b/resources/roles/qtip-workspace/files/render/hosts
diff --git a/resources/roles/qtip-bootstrap/tasks/main.yml b/resources/roles/qtip-workspace/tasks/main.yml
index e198732b..e198732b 100644
--- a/resources/roles/qtip-bootstrap/tasks/main.yml
+++ b/resources/roles/qtip-workspace/tasks/main.yml
diff --git a/resources/roles/ramspeed/defaults/main.yml b/resources/roles/ramspeed/defaults/main.yml
new file mode 100644
index 00000000..0cc06cf6
--- /dev/null
+++ b/resources/roles/ramspeed/defaults/main.yml
@@ -0,0 +1,11 @@
+#############################################################################
+# Copyright (c) 2017 ZTE Corporation 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
+#############################################################################
+
+---
+cwd: "{{ ansible_env.HOME }}/qtip/ramspeed"
diff --git a/resources/roles/ramspeed/meta/main.yml b/resources/roles/ramspeed/meta/main.yml
new file mode 100644
index 00000000..03c96c42
--- /dev/null
+++ b/resources/roles/ramspeed/meta/main.yml
@@ -0,0 +1,12 @@
+#############################################################################
+# Copyright (c) 2017 ZTE Corporation 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
+#############################################################################
+
+---
+dependencies:
+ - { role: development-tools }
diff --git a/resources/metric/ramspeed.yaml b/resources/roles/ramspeed/tasks/main.yml
index 6473d576..6473d576 100644
--- a/resources/metric/ramspeed.yaml
+++ b/resources/roles/ramspeed/tasks/main.yml
diff --git a/tests/integration/workspace-create.yml b/tests/integration/workspace-create.yml
index 71fd08da..919fe778 100644
--- a/tests/integration/workspace-create.yml
+++ b/tests/integration/workspace-create.yml
@@ -10,7 +10,7 @@
---
- hosts: localhost
roles:
- - role: qtip-bootstrap
+ - role: qtip-workspace
installer: fuel # fuel|apex
pod_name: qtip-pod
scenario: default