From 9edb0f9e48cc923ed443d3d66886713cde9b628d Mon Sep 17 00:00:00 2001 From: Yujun Zhang Date: Thu, 10 Nov 2016 10:59:26 +0800 Subject: Adjust folder structure Note: this patchset may break existing features, but it will help to accelerate the refactoring work. JIRA: QTIP-131 Change-Id: Ie0cd9d185e6b02316878daef905e26f4e533a66b Signed-off-by: Yujun Zhang --- .../test_plan/default/compute/dhrystone_bm.yaml | 33 ++++ .../test_plan/default/compute/dhrystone_vm.yaml | 45 +++++ benchmarks/test_plan/default/compute/dpi_bm.yaml | 34 ++++ benchmarks/test_plan/default/compute/dpi_vm.yaml | 35 ++++ .../test_plan/default/compute/ramspeed_bm.yaml | 34 ++++ .../test_plan/default/compute/ramspeed_vm.yaml | 45 +++++ benchmarks/test_plan/default/compute/ssl_bm.yaml | 31 +++ benchmarks/test_plan/default/compute/ssl_vm.yaml | 36 ++++ .../test_plan/default/compute/whetstone_bm.yaml | 33 ++++ .../test_plan/default/compute/whetstone_vm.yaml | 44 +++++ benchmarks/test_plan/default/network/iperf_bm.yaml | 50 +++++ benchmarks/test_plan/default/network/iperf_vm.yaml | 43 +++++ .../test_plan/default/network/iperf_vm_2.yaml | 44 +++++ benchmarks/test_plan/default/storage/fio_bm.yaml | 39 ++++ benchmarks/test_plan/default/storage/fio_vm.yaml | 44 +++++ .../test_plan/dell-pod1/compute/dhrystone_bm.yaml | 35 ++++ .../test_plan/dell-pod1/compute/dhrystone_vm.yaml | 45 +++++ benchmarks/test_plan/dell-pod1/compute/dpi_bm.yaml | 34 ++++ benchmarks/test_plan/dell-pod1/compute/dpi_vm.yaml | 35 ++++ .../test_plan/dell-pod1/compute/ramspeed_bm.yaml | 35 ++++ .../test_plan/dell-pod1/compute/ramspeed_vm.yaml | 45 +++++ benchmarks/test_plan/dell-pod1/compute/ssl_bm.yaml | 31 +++ benchmarks/test_plan/dell-pod1/compute/ssl_vm.yaml | 36 ++++ .../test_plan/dell-pod1/compute/whetstone_bm.yaml | 34 ++++ .../test_plan/dell-pod1/compute/whetstone_vm.yaml | 44 +++++ .../test_plan/dell-pod1/network/iperf_bm.yaml | 50 +++++ .../test_plan/dell-pod1/network/iperf_vm.yaml | 44 +++++ .../test_plan/dell-pod1/network/iperf_vm_2.yaml | 44 +++++ .../test_plan/dell-pod1/network/netperf.yaml | 42 ++++ benchmarks/test_plan/dell-pod1/storage/fio_bm.yaml | 39 ++++ benchmarks/test_plan/dell-pod1/storage/fio_vm.yaml | 44 +++++ .../compute/dhrystone_bm.yaml | 35 ++++ .../compute/dhrystone_vm.yaml | 45 +++++ .../dell-us-deploying-bm3/compute/dpi_bm.yaml | 34 ++++ .../dell-us-deploying-bm3/compute/dpi_vm.yaml | 35 ++++ .../dell-us-deploying-bm3/compute/ramspeed_bm.yaml | 35 ++++ .../dell-us-deploying-bm3/compute/ramspeed_vm.yaml | 45 +++++ .../dell-us-deploying-bm3/compute/ssl_bm.yaml | 31 +++ .../dell-us-deploying-bm3/compute/ssl_vm.yaml | 36 ++++ .../compute/whetstone_bm.yaml | 34 ++++ .../compute/whetstone_vm.yaml | 44 +++++ .../dell-us-deploying-bm3/network/iperf_bm.yaml | 50 +++++ .../dell-us-deploying-bm3/network/iperf_vm.yaml | 44 +++++ .../dell-us-deploying-bm3/network/iperf_vm_2.yaml | 44 +++++ .../dell-us-deploying-bm3/network/netperf.yaml | 42 ++++ .../dell-us-deploying-bm3/storage/fio_bm.yaml | 39 ++++ .../dell-us-deploying-bm3/storage/fio_vm.yaml | 44 +++++ cli/README.rst | 11 -- cli/__init__.py | 0 cli/commands/__init__.py | 0 cli/commands/ansible.py | 32 --- cli/commands/perftest.py | 57 ------ cli/commands/suite.py | 52 ----- cli/entry.py | 44 ----- cli/helper.py | 14 -- dashboard/__init__.py | 0 dashboard/pushtoDB.py | 66 ------- opt/servers/ansible.cfg | 3 + opt/servers/elk.yml | 5 + opt/servers/inventory | 10 + opt/servers/ngnix.yml | 4 + opt/servers/qtip.yml | 4 + opt/servers/roles/docker/handlers/main.yml | 4 + opt/servers/roles/docker/tasks/main.yml | 41 ++++ opt/servers/roles/elk/tasks/main.yml | 22 +++ opt/servers/roles/ngnix/defaults/main.yml | 7 + opt/servers/roles/ngnix/handlers/main.yml | 4 + opt/servers/roles/ngnix/tasks/main.yml | 12 ++ opt/servers/roles/ngnix/templates/elk.conf.j2 | 14 ++ opt/servers/roles/ngnix/templates/qtip.conf.j2 | 17 ++ opt/servers/roles/qtip/files/run_qtip_server.sh | 4 + opt/servers/roles/qtip/tasks/main.yml | 5 + opt/servers/roles/ssh/defaults/main.yml | 6 + opt/servers/roles/ssh/files/serena.authorized_keys | 1 + opt/servers/roles/ssh/files/taseer.authorized_keys | 1 + opt/servers/roles/ssh/files/yujunz.authorized_keys | 3 + .../roles/ssh/files/zhifeng.authorized_keys | 1 + opt/servers/roles/ssh/tasks/main.yml | 26 +++ opt/servers/ssh.yml | 4 + qtip/api/__init__.py | 0 qtip/api/db.py | 98 ++++++++++ qtip/api/qtip_server.py | 206 ++++++++++++++++++++ qtip/api/result_handler.py | 22 +++ qtip/cli/README.rst | 11 ++ qtip/cli/__init__.py | 0 qtip/cli/commands/__init__.py | 0 qtip/cli/commands/ansible.py | 32 +++ qtip/cli/commands/perftest.py | 57 ++++++ qtip/cli/commands/suite.py | 52 +++++ qtip/cli/entry.py | 44 +++++ qtip/cli/helper.py | 14 ++ qtip/utils/__init__.py | 0 qtip/utils/ansible_api.py | 65 +++++++ qtip/utils/args_handler.py | 73 +++++++ qtip/utils/cli.py | 76 ++++++++ qtip/utils/create_zones.py | 86 +++++++++ qtip/utils/dashboard/__init__.py | 0 qtip/utils/dashboard/pushtoDB.py | 66 +++++++ qtip/utils/driver.py | 92 +++++++++ qtip/utils/env_setup.py | 214 +++++++++++++++++++++ qtip/utils/logger_utils.py | 65 +++++++ qtip/utils/report/Qtip_Report.py | 108 +++++++++++ qtip/utils/report/__init__.py | 0 qtip/utils/report/get_indices.py | 8 + qtip/utils/report/get_results.py | 50 +++++ qtip/utils/report/qtip_graph.py | 30 +++ qtip/utils/spawn_vm.py | 206 ++++++++++++++++++++ qtip/utils/transform/__init__.py | 0 qtip/utils/transform/dpi_transform.py | 47 +++++ qtip/utils/transform/final_report.py | 24 +++ qtip/utils/transform/fio_transform.py | 29 +++ qtip/utils/transform/iperf_transform.py | 27 +++ qtip/utils/transform/ramspeed_transform.py | 41 ++++ qtip/utils/transform/ssl_transform.py | 54 ++++++ qtip/utils/transform/ubench_transform.py | 32 +++ restful_server/__init__.py | 0 restful_server/db.py | 98 ---------- restful_server/qtip_server.py | 206 -------------------- restful_server/result_handler.py | 22 --- supporting/servers/ansible.cfg | 3 - supporting/servers/elk.yml | 5 - supporting/servers/inventory | 10 - supporting/servers/ngnix.yml | 4 - supporting/servers/qtip.yml | 4 - supporting/servers/roles/docker/handlers/main.yml | 4 - supporting/servers/roles/docker/tasks/main.yml | 41 ---- supporting/servers/roles/elk/tasks/main.yml | 22 --- supporting/servers/roles/ngnix/defaults/main.yml | 7 - supporting/servers/roles/ngnix/handlers/main.yml | 4 - supporting/servers/roles/ngnix/tasks/main.yml | 12 -- .../servers/roles/ngnix/templates/elk.conf.j2 | 14 -- .../servers/roles/ngnix/templates/qtip.conf.j2 | 17 -- .../servers/roles/qtip/files/run_qtip_server.sh | 4 - supporting/servers/roles/qtip/tasks/main.yml | 5 - supporting/servers/roles/ssh/defaults/main.yml | 6 - .../servers/roles/ssh/files/serena.authorized_keys | 1 - .../servers/roles/ssh/files/taseer.authorized_keys | 1 - .../servers/roles/ssh/files/yujunz.authorized_keys | 3 - .../roles/ssh/files/zhifeng.authorized_keys | 1 - supporting/servers/roles/ssh/tasks/main.yml | 26 --- supporting/servers/ssh.yml | 4 - test_plan/default/compute/dhrystone_bm.yaml | 33 ---- test_plan/default/compute/dhrystone_vm.yaml | 45 ----- test_plan/default/compute/dpi_bm.yaml | 34 ---- test_plan/default/compute/dpi_vm.yaml | 35 ---- test_plan/default/compute/ramspeed_bm.yaml | 34 ---- test_plan/default/compute/ramspeed_vm.yaml | 45 ----- test_plan/default/compute/ssl_bm.yaml | 31 --- test_plan/default/compute/ssl_vm.yaml | 36 ---- test_plan/default/compute/whetstone_bm.yaml | 33 ---- test_plan/default/compute/whetstone_vm.yaml | 44 ----- test_plan/default/network/iperf_bm.yaml | 50 ----- test_plan/default/network/iperf_vm.yaml | 43 ----- test_plan/default/network/iperf_vm_2.yaml | 44 ----- test_plan/default/storage/fio_bm.yaml | 39 ---- test_plan/default/storage/fio_vm.yaml | 44 ----- test_plan/dell-pod1/compute/dhrystone_bm.yaml | 35 ---- test_plan/dell-pod1/compute/dhrystone_vm.yaml | 45 ----- test_plan/dell-pod1/compute/dpi_bm.yaml | 34 ---- test_plan/dell-pod1/compute/dpi_vm.yaml | 35 ---- test_plan/dell-pod1/compute/ramspeed_bm.yaml | 35 ---- test_plan/dell-pod1/compute/ramspeed_vm.yaml | 45 ----- test_plan/dell-pod1/compute/ssl_bm.yaml | 31 --- test_plan/dell-pod1/compute/ssl_vm.yaml | 36 ---- test_plan/dell-pod1/compute/whetstone_bm.yaml | 34 ---- test_plan/dell-pod1/compute/whetstone_vm.yaml | 44 ----- test_plan/dell-pod1/network/iperf_bm.yaml | 50 ----- test_plan/dell-pod1/network/iperf_vm.yaml | 44 ----- test_plan/dell-pod1/network/iperf_vm_2.yaml | 44 ----- test_plan/dell-pod1/network/netperf.yaml | 42 ---- test_plan/dell-pod1/storage/fio_bm.yaml | 39 ---- test_plan/dell-pod1/storage/fio_vm.yaml | 44 ----- .../compute/dhrystone_bm.yaml | 35 ---- .../compute/dhrystone_vm.yaml | 45 ----- .../dell-us-deploying-bm3/compute/dpi_bm.yaml | 34 ---- .../dell-us-deploying-bm3/compute/dpi_vm.yaml | 35 ---- .../dell-us-deploying-bm3/compute/ramspeed_bm.yaml | 35 ---- .../dell-us-deploying-bm3/compute/ramspeed_vm.yaml | 45 ----- .../dell-us-deploying-bm3/compute/ssl_bm.yaml | 31 --- .../dell-us-deploying-bm3/compute/ssl_vm.yaml | 36 ---- .../compute/whetstone_bm.yaml | 34 ---- .../compute/whetstone_vm.yaml | 44 ----- .../dell-us-deploying-bm3/network/iperf_bm.yaml | 50 ----- .../dell-us-deploying-bm3/network/iperf_vm.yaml | 44 ----- .../dell-us-deploying-bm3/network/iperf_vm_2.yaml | 44 ----- .../dell-us-deploying-bm3/network/netperf.yaml | 42 ---- .../dell-us-deploying-bm3/storage/fio_bm.yaml | 39 ---- .../dell-us-deploying-bm3/storage/fio_vm.yaml | 44 ----- utils/__init__.py | 0 utils/ansible_api.py | 65 ------- utils/args_handler.py | 73 ------- utils/cli.py | 76 -------- utils/create_zones.py | 86 --------- utils/driver.py | 92 --------- utils/env_setup.py | 214 --------------------- utils/logger_utils.py | 65 ------- utils/report/Qtip_Report.py | 108 ----------- utils/report/__init__.py | 0 utils/report/get_indices.py | 8 - utils/report/get_results.py | 50 ----- utils/report/qtip_graph.py | 30 --- utils/spawn_vm.py | 206 -------------------- utils/transform/__init__.py | 0 utils/transform/dpi_transform.py | 47 ----- utils/transform/final_report.py | 24 --- utils/transform/fio_transform.py | 29 --- utils/transform/iperf_transform.py | 27 --- utils/transform/ramspeed_transform.py | 41 ---- utils/transform/ssl_transform.py | 54 ------ utils/transform/ubench_transform.py | 32 --- 210 files changed, 3991 insertions(+), 3991 deletions(-) create mode 100644 benchmarks/test_plan/default/compute/dhrystone_bm.yaml create mode 100644 benchmarks/test_plan/default/compute/dhrystone_vm.yaml create mode 100644 benchmarks/test_plan/default/compute/dpi_bm.yaml create mode 100644 benchmarks/test_plan/default/compute/dpi_vm.yaml create mode 100644 benchmarks/test_plan/default/compute/ramspeed_bm.yaml create mode 100644 benchmarks/test_plan/default/compute/ramspeed_vm.yaml create mode 100644 benchmarks/test_plan/default/compute/ssl_bm.yaml create mode 100644 benchmarks/test_plan/default/compute/ssl_vm.yaml create mode 100644 benchmarks/test_plan/default/compute/whetstone_bm.yaml create mode 100644 benchmarks/test_plan/default/compute/whetstone_vm.yaml create mode 100644 benchmarks/test_plan/default/network/iperf_bm.yaml create mode 100644 benchmarks/test_plan/default/network/iperf_vm.yaml create mode 100644 benchmarks/test_plan/default/network/iperf_vm_2.yaml create mode 100644 benchmarks/test_plan/default/storage/fio_bm.yaml create mode 100644 benchmarks/test_plan/default/storage/fio_vm.yaml create mode 100644 benchmarks/test_plan/dell-pod1/compute/dhrystone_bm.yaml create mode 100644 benchmarks/test_plan/dell-pod1/compute/dhrystone_vm.yaml create mode 100644 benchmarks/test_plan/dell-pod1/compute/dpi_bm.yaml create mode 100644 benchmarks/test_plan/dell-pod1/compute/dpi_vm.yaml create mode 100644 benchmarks/test_plan/dell-pod1/compute/ramspeed_bm.yaml create mode 100644 benchmarks/test_plan/dell-pod1/compute/ramspeed_vm.yaml create mode 100644 benchmarks/test_plan/dell-pod1/compute/ssl_bm.yaml create mode 100644 benchmarks/test_plan/dell-pod1/compute/ssl_vm.yaml create mode 100644 benchmarks/test_plan/dell-pod1/compute/whetstone_bm.yaml create mode 100644 benchmarks/test_plan/dell-pod1/compute/whetstone_vm.yaml create mode 100644 benchmarks/test_plan/dell-pod1/network/iperf_bm.yaml create mode 100644 benchmarks/test_plan/dell-pod1/network/iperf_vm.yaml create mode 100644 benchmarks/test_plan/dell-pod1/network/iperf_vm_2.yaml create mode 100644 benchmarks/test_plan/dell-pod1/network/netperf.yaml create mode 100644 benchmarks/test_plan/dell-pod1/storage/fio_bm.yaml create mode 100644 benchmarks/test_plan/dell-pod1/storage/fio_vm.yaml create mode 100644 benchmarks/test_plan/dell-us-deploying-bm3/compute/dhrystone_bm.yaml create mode 100644 benchmarks/test_plan/dell-us-deploying-bm3/compute/dhrystone_vm.yaml create mode 100644 benchmarks/test_plan/dell-us-deploying-bm3/compute/dpi_bm.yaml create mode 100644 benchmarks/test_plan/dell-us-deploying-bm3/compute/dpi_vm.yaml create mode 100644 benchmarks/test_plan/dell-us-deploying-bm3/compute/ramspeed_bm.yaml create mode 100644 benchmarks/test_plan/dell-us-deploying-bm3/compute/ramspeed_vm.yaml create mode 100644 benchmarks/test_plan/dell-us-deploying-bm3/compute/ssl_bm.yaml create mode 100644 benchmarks/test_plan/dell-us-deploying-bm3/compute/ssl_vm.yaml create mode 100644 benchmarks/test_plan/dell-us-deploying-bm3/compute/whetstone_bm.yaml create mode 100644 benchmarks/test_plan/dell-us-deploying-bm3/compute/whetstone_vm.yaml create mode 100644 benchmarks/test_plan/dell-us-deploying-bm3/network/iperf_bm.yaml create mode 100644 benchmarks/test_plan/dell-us-deploying-bm3/network/iperf_vm.yaml create mode 100644 benchmarks/test_plan/dell-us-deploying-bm3/network/iperf_vm_2.yaml create mode 100644 benchmarks/test_plan/dell-us-deploying-bm3/network/netperf.yaml create mode 100644 benchmarks/test_plan/dell-us-deploying-bm3/storage/fio_bm.yaml create mode 100644 benchmarks/test_plan/dell-us-deploying-bm3/storage/fio_vm.yaml delete mode 100644 cli/README.rst delete mode 100644 cli/__init__.py delete mode 100644 cli/commands/__init__.py delete mode 100644 cli/commands/ansible.py delete mode 100644 cli/commands/perftest.py delete mode 100644 cli/commands/suite.py delete mode 100644 cli/entry.py delete mode 100644 cli/helper.py delete mode 100644 dashboard/__init__.py delete mode 100644 dashboard/pushtoDB.py create mode 100644 opt/servers/ansible.cfg create mode 100644 opt/servers/elk.yml create mode 100644 opt/servers/inventory create mode 100644 opt/servers/ngnix.yml create mode 100644 opt/servers/qtip.yml create mode 100644 opt/servers/roles/docker/handlers/main.yml create mode 100644 opt/servers/roles/docker/tasks/main.yml create mode 100644 opt/servers/roles/elk/tasks/main.yml create mode 100644 opt/servers/roles/ngnix/defaults/main.yml create mode 100644 opt/servers/roles/ngnix/handlers/main.yml create mode 100644 opt/servers/roles/ngnix/tasks/main.yml create mode 100644 opt/servers/roles/ngnix/templates/elk.conf.j2 create mode 100644 opt/servers/roles/ngnix/templates/qtip.conf.j2 create mode 100644 opt/servers/roles/qtip/files/run_qtip_server.sh create mode 100644 opt/servers/roles/qtip/tasks/main.yml create mode 100644 opt/servers/roles/ssh/defaults/main.yml create mode 100644 opt/servers/roles/ssh/files/serena.authorized_keys create mode 100644 opt/servers/roles/ssh/files/taseer.authorized_keys create mode 100644 opt/servers/roles/ssh/files/yujunz.authorized_keys create mode 100644 opt/servers/roles/ssh/files/zhifeng.authorized_keys create mode 100644 opt/servers/roles/ssh/tasks/main.yml create mode 100644 opt/servers/ssh.yml create mode 100644 qtip/api/__init__.py create mode 100644 qtip/api/db.py create mode 100644 qtip/api/qtip_server.py create mode 100644 qtip/api/result_handler.py create mode 100644 qtip/cli/README.rst create mode 100644 qtip/cli/__init__.py create mode 100644 qtip/cli/commands/__init__.py create mode 100644 qtip/cli/commands/ansible.py create mode 100644 qtip/cli/commands/perftest.py create mode 100644 qtip/cli/commands/suite.py create mode 100644 qtip/cli/entry.py create mode 100644 qtip/cli/helper.py create mode 100644 qtip/utils/__init__.py create mode 100644 qtip/utils/ansible_api.py create mode 100644 qtip/utils/args_handler.py create mode 100644 qtip/utils/cli.py create mode 100644 qtip/utils/create_zones.py create mode 100644 qtip/utils/dashboard/__init__.py create mode 100644 qtip/utils/dashboard/pushtoDB.py create mode 100644 qtip/utils/driver.py create mode 100644 qtip/utils/env_setup.py create mode 100644 qtip/utils/logger_utils.py create mode 100644 qtip/utils/report/Qtip_Report.py create mode 100644 qtip/utils/report/__init__.py create mode 100644 qtip/utils/report/get_indices.py create mode 100644 qtip/utils/report/get_results.py create mode 100644 qtip/utils/report/qtip_graph.py create mode 100644 qtip/utils/spawn_vm.py create mode 100644 qtip/utils/transform/__init__.py create mode 100644 qtip/utils/transform/dpi_transform.py create mode 100644 qtip/utils/transform/final_report.py create mode 100755 qtip/utils/transform/fio_transform.py create mode 100644 qtip/utils/transform/iperf_transform.py create mode 100644 qtip/utils/transform/ramspeed_transform.py create mode 100644 qtip/utils/transform/ssl_transform.py create mode 100644 qtip/utils/transform/ubench_transform.py delete mode 100644 restful_server/__init__.py delete mode 100644 restful_server/db.py delete mode 100644 restful_server/qtip_server.py delete mode 100644 restful_server/result_handler.py delete mode 100644 supporting/servers/ansible.cfg delete mode 100644 supporting/servers/elk.yml delete mode 100644 supporting/servers/inventory delete mode 100644 supporting/servers/ngnix.yml delete mode 100644 supporting/servers/qtip.yml delete mode 100644 supporting/servers/roles/docker/handlers/main.yml delete mode 100644 supporting/servers/roles/docker/tasks/main.yml delete mode 100644 supporting/servers/roles/elk/tasks/main.yml delete mode 100644 supporting/servers/roles/ngnix/defaults/main.yml delete mode 100644 supporting/servers/roles/ngnix/handlers/main.yml delete mode 100644 supporting/servers/roles/ngnix/tasks/main.yml delete mode 100644 supporting/servers/roles/ngnix/templates/elk.conf.j2 delete mode 100644 supporting/servers/roles/ngnix/templates/qtip.conf.j2 delete mode 100644 supporting/servers/roles/qtip/files/run_qtip_server.sh delete mode 100644 supporting/servers/roles/qtip/tasks/main.yml delete mode 100644 supporting/servers/roles/ssh/defaults/main.yml delete mode 100644 supporting/servers/roles/ssh/files/serena.authorized_keys delete mode 100644 supporting/servers/roles/ssh/files/taseer.authorized_keys delete mode 100644 supporting/servers/roles/ssh/files/yujunz.authorized_keys delete mode 100644 supporting/servers/roles/ssh/files/zhifeng.authorized_keys delete mode 100644 supporting/servers/roles/ssh/tasks/main.yml delete mode 100644 supporting/servers/ssh.yml delete mode 100644 test_plan/default/compute/dhrystone_bm.yaml delete mode 100644 test_plan/default/compute/dhrystone_vm.yaml delete mode 100644 test_plan/default/compute/dpi_bm.yaml delete mode 100644 test_plan/default/compute/dpi_vm.yaml delete mode 100644 test_plan/default/compute/ramspeed_bm.yaml delete mode 100644 test_plan/default/compute/ramspeed_vm.yaml delete mode 100644 test_plan/default/compute/ssl_bm.yaml delete mode 100644 test_plan/default/compute/ssl_vm.yaml delete mode 100644 test_plan/default/compute/whetstone_bm.yaml delete mode 100644 test_plan/default/compute/whetstone_vm.yaml delete mode 100644 test_plan/default/network/iperf_bm.yaml delete mode 100644 test_plan/default/network/iperf_vm.yaml delete mode 100644 test_plan/default/network/iperf_vm_2.yaml delete mode 100644 test_plan/default/storage/fio_bm.yaml delete mode 100644 test_plan/default/storage/fio_vm.yaml delete mode 100644 test_plan/dell-pod1/compute/dhrystone_bm.yaml delete mode 100644 test_plan/dell-pod1/compute/dhrystone_vm.yaml delete mode 100644 test_plan/dell-pod1/compute/dpi_bm.yaml delete mode 100644 test_plan/dell-pod1/compute/dpi_vm.yaml delete mode 100644 test_plan/dell-pod1/compute/ramspeed_bm.yaml delete mode 100644 test_plan/dell-pod1/compute/ramspeed_vm.yaml delete mode 100644 test_plan/dell-pod1/compute/ssl_bm.yaml delete mode 100644 test_plan/dell-pod1/compute/ssl_vm.yaml delete mode 100644 test_plan/dell-pod1/compute/whetstone_bm.yaml delete mode 100644 test_plan/dell-pod1/compute/whetstone_vm.yaml delete mode 100644 test_plan/dell-pod1/network/iperf_bm.yaml delete mode 100644 test_plan/dell-pod1/network/iperf_vm.yaml delete mode 100644 test_plan/dell-pod1/network/iperf_vm_2.yaml delete mode 100644 test_plan/dell-pod1/network/netperf.yaml delete mode 100644 test_plan/dell-pod1/storage/fio_bm.yaml delete mode 100644 test_plan/dell-pod1/storage/fio_vm.yaml delete mode 100644 test_plan/dell-us-deploying-bm3/compute/dhrystone_bm.yaml delete mode 100644 test_plan/dell-us-deploying-bm3/compute/dhrystone_vm.yaml delete mode 100644 test_plan/dell-us-deploying-bm3/compute/dpi_bm.yaml delete mode 100644 test_plan/dell-us-deploying-bm3/compute/dpi_vm.yaml delete mode 100644 test_plan/dell-us-deploying-bm3/compute/ramspeed_bm.yaml delete mode 100644 test_plan/dell-us-deploying-bm3/compute/ramspeed_vm.yaml delete mode 100644 test_plan/dell-us-deploying-bm3/compute/ssl_bm.yaml delete mode 100644 test_plan/dell-us-deploying-bm3/compute/ssl_vm.yaml delete mode 100644 test_plan/dell-us-deploying-bm3/compute/whetstone_bm.yaml delete mode 100644 test_plan/dell-us-deploying-bm3/compute/whetstone_vm.yaml delete mode 100644 test_plan/dell-us-deploying-bm3/network/iperf_bm.yaml delete mode 100644 test_plan/dell-us-deploying-bm3/network/iperf_vm.yaml delete mode 100644 test_plan/dell-us-deploying-bm3/network/iperf_vm_2.yaml delete mode 100644 test_plan/dell-us-deploying-bm3/network/netperf.yaml delete mode 100644 test_plan/dell-us-deploying-bm3/storage/fio_bm.yaml delete mode 100644 test_plan/dell-us-deploying-bm3/storage/fio_vm.yaml delete mode 100644 utils/__init__.py delete mode 100644 utils/ansible_api.py delete mode 100644 utils/args_handler.py delete mode 100644 utils/cli.py delete mode 100644 utils/create_zones.py delete mode 100644 utils/driver.py delete mode 100644 utils/env_setup.py delete mode 100644 utils/logger_utils.py delete mode 100644 utils/report/Qtip_Report.py delete mode 100644 utils/report/__init__.py delete mode 100644 utils/report/get_indices.py delete mode 100644 utils/report/get_results.py delete mode 100644 utils/report/qtip_graph.py delete mode 100644 utils/spawn_vm.py delete mode 100644 utils/transform/__init__.py delete mode 100644 utils/transform/dpi_transform.py delete mode 100644 utils/transform/final_report.py delete mode 100755 utils/transform/fio_transform.py delete mode 100644 utils/transform/iperf_transform.py delete mode 100644 utils/transform/ramspeed_transform.py delete mode 100644 utils/transform/ssl_transform.py delete mode 100644 utils/transform/ubench_transform.py diff --git a/benchmarks/test_plan/default/compute/dhrystone_bm.yaml b/benchmarks/test_plan/default/compute/dhrystone_bm.yaml new file mode 100644 index 00000000..64741537 --- /dev/null +++ b/benchmarks/test_plan/default/compute/dhrystone_bm.yaml @@ -0,0 +1,33 @@ + +Scenario: + benchmark: dhrystone + host: machine_1, machine_2 + server: + +Context: + Host_Machines: + machine_1: + ip: + pw: + role: host + machine_2: + ip: + pw: + role: host + + Virtual_Machines: + + +Test_Description: + Test_category: "Compute" + Benchmark: "dhrystone" + Overview: > + ''' This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n + if you wish to add a virtual machine add the following information under the Virtual_Machine tag + + virtualmachine_1: + availability_zone: + public_network: + OS_image: + flavor: + role: ''' diff --git a/benchmarks/test_plan/default/compute/dhrystone_vm.yaml b/benchmarks/test_plan/default/compute/dhrystone_vm.yaml new file mode 100644 index 00000000..8f5a4165 --- /dev/null +++ b/benchmarks/test_plan/default/compute/dhrystone_vm.yaml @@ -0,0 +1,45 @@ +Scenario: + benchmark: dhrystone + host: virtualmachine_1, virtualmachine_2 + server: blakc + +Context: + Host_Machines: + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute1 + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + virtualmachine_2: + availability_zone: compute2 + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + +Test_Description: + Test_category: "Compute" + Benchmark: "dhrystone" + Overview: > + '''This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n + if you wish to add a virtual machine add the following information under the Virtual_Machine tag + machine_1: + ip: 172.18.0.16 + pw: Op3nStack + role: host + machine_2: + ip: 172.18.0.15 + pw: Op3nStack + role: host + + virtualmachine_1: + availability_zone: + public_network: + OS_image: + flavor: + role: + ''' + diff --git a/benchmarks/test_plan/default/compute/dpi_bm.yaml b/benchmarks/test_plan/default/compute/dpi_bm.yaml new file mode 100644 index 00000000..14cb6d0d --- /dev/null +++ b/benchmarks/test_plan/default/compute/dpi_bm.yaml @@ -0,0 +1,34 @@ +Scenario: + benchmark: dpi + host: machine_1,machine_2 + +Context: + Host_Machines: + machine_1: + ip: + pw: + role: host + machine_2: + ip: + pw: + role: host + Virtual_Machines: +Test_Description: + Test_category: "Compute" + Benchmark: "dpi" + Overview: > + '''This test will run the DPI benchmark in serial on virutalmachine_1 and virtualmachine_2.\n + if you wish to add a host machine add the following information under the Host_Machine tag + virtualmachine_2: + availability_zone: compute1 + OS_image: QTIP_CentOS + public_network: 'provider_network' + + role: 1host + flavor: m1.large + machine_1: + ip: + pw: + role: + ''' + diff --git a/benchmarks/test_plan/default/compute/dpi_vm.yaml b/benchmarks/test_plan/default/compute/dpi_vm.yaml new file mode 100644 index 00000000..10e86993 --- /dev/null +++ b/benchmarks/test_plan/default/compute/dpi_vm.yaml @@ -0,0 +1,35 @@ +Scenario: + benchmark: dpi + 1Run : virtualmachine_1, virtualmachine_2 + +Context: + Host_Machines: + + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute1 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 1Run + flavor: m1.large + virtualmachine_2: + availability_zone: compute2 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 1Run + flavor: m1.large + +Test_Description: + Test_category: "Compute" + Benchmark: "dpi" + Overview: > + '''This test will run the DPI benchmark in parallel on virutalmachine_1 and virtualmachine_2.\n + if you wish to add a host machine add the following information under the Host_Machine tag + + machine_1: + ip: + pw: + role: + ''' + diff --git a/benchmarks/test_plan/default/compute/ramspeed_bm.yaml b/benchmarks/test_plan/default/compute/ramspeed_bm.yaml new file mode 100644 index 00000000..ed8fc700 --- /dev/null +++ b/benchmarks/test_plan/default/compute/ramspeed_bm.yaml @@ -0,0 +1,34 @@ +Scenario: + benchmark: ramspeed + host: machine_1, machine_2 + server: + +Context: + Host_Machines: + machine_1: + ip: + pw: + role: host + machine_2: + ip: + pw: + role: host + + Virtual_Machines: + + +Test_Description: + Test_category: "Compute" + Benchmark: "dhrystone" + Overview: > + ''' This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n + if you wish to add a virtual machine add the following information under the Virtual_Machine tag + + virtualmachine_1: + availability_zone: + public_network: + OS_image: + flavor: + role: ''' + + diff --git a/benchmarks/test_plan/default/compute/ramspeed_vm.yaml b/benchmarks/test_plan/default/compute/ramspeed_vm.yaml new file mode 100644 index 00000000..a6a4363f --- /dev/null +++ b/benchmarks/test_plan/default/compute/ramspeed_vm.yaml @@ -0,0 +1,45 @@ +Scenario: + benchmark: ramspeed + host: virtualmachine_1, virtualmachine_2 + server: blakc + +Context: + Host_Machines: + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute1 + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + virtualmachine_2: + availability_zone: compute2 + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + +Test_Description: + Test_category: "Compute" + Benchmark: "dhrystone" + Overview: > + '''This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n + if you wish to add a virtual machine add the following information under the Virtual_Machine tag + machine_1: + ip: 172.18.0.16 + pw: Op3nStack + role: host + machine_2: + ip: 172.18.0.15 + pw: Op3nStack + role: host + + virtualmachine_1: + availability_zone: + public_network: + OS_image: + flavor: + role: + ''' + diff --git a/benchmarks/test_plan/default/compute/ssl_bm.yaml b/benchmarks/test_plan/default/compute/ssl_bm.yaml new file mode 100644 index 00000000..cc5a8903 --- /dev/null +++ b/benchmarks/test_plan/default/compute/ssl_bm.yaml @@ -0,0 +1,31 @@ +Scenario: + benchmark: ssl + host: machine_1,machine_2 + +Context: + Host_Machines: + machine_1: + ip: + pw: + role: host + machine_2: + ip: + pw: + role: host + Virtual_Machines: + + +Test_Description: + Test_category: "Compute" + Benchmark: "ssl" + Overview: > + '''This test will run the SSL benchmark in parallel on machine_1 and machine_1. + If you wish to add a virtual machine add the following information under the Virtual_Machine tag + + virtualmachine_1: + availability_zone: + public_network: + OS_image: + flavor: + role: + ''' diff --git a/benchmarks/test_plan/default/compute/ssl_vm.yaml b/benchmarks/test_plan/default/compute/ssl_vm.yaml new file mode 100644 index 00000000..37824896 --- /dev/null +++ b/benchmarks/test_plan/default/compute/ssl_vm.yaml @@ -0,0 +1,36 @@ +Scenario: + benchmark: ssl + host: virtualmachine_1, virtualmachine_2 + +Context: + Host_Machines: + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute1 + public_network: 'net04_ext' + OS_image: 'QTIP_CentOS' + flavor: 'm1.large' + role: host + virtualmachine_2: + availability_zone: compute2 + public_network: 'net04_ext' + OS_image: 'QTIP_CentOS' + flavor: 'm1.large' + role: host + + +Test_Description: + Test_category: "Compute" + Benchmark: "ssl" + Overview: > + '''This test will run the SSL benchmark in parallel on virtualmachine_1 and machine_1.\n + if you wish to add a virtual machine add the following information under the Virtual_Machine tag + + virtualmachine_1: + availability_zone: + public_network: + OS_image: + flavor: + role: + ''' diff --git a/benchmarks/test_plan/default/compute/whetstone_bm.yaml b/benchmarks/test_plan/default/compute/whetstone_bm.yaml new file mode 100644 index 00000000..3c128b60 --- /dev/null +++ b/benchmarks/test_plan/default/compute/whetstone_bm.yaml @@ -0,0 +1,33 @@ +Scenario: + benchmark: whetstone + host: machine_1, machine_2 + + +Context: + Host_Machines: + machine_1: + ip: + pw: + role: host + machine_2: + ip: + pw: + role: host + Virtual_Machines: + + + +Test_Description: + Test_category: "Compute" + Benchmark: "whetstone" + Overview: > + ''' This test will run the whetstone benchmark in parallel on machine_1 and machine_2.\n + if you wish to add a baremetal machine add the following information under the Virtual_Machine tag + + machine_3: + ip: + pw: + role: + ''' + + diff --git a/benchmarks/test_plan/default/compute/whetstone_vm.yaml b/benchmarks/test_plan/default/compute/whetstone_vm.yaml new file mode 100644 index 00000000..0f1e8748 --- /dev/null +++ b/benchmarks/test_plan/default/compute/whetstone_vm.yaml @@ -0,0 +1,44 @@ +Scenario: + benchmark: whetstone + host: virtualmachine_1, virtualmachine_1 + server: + +Context: + Host_Machines: + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute1 + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + virtualmachine_2: + availability_zone: compute2 + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + + +Test_Description: + Test_category: "Compute" + Benchmark: "dhrystone" + Overview: > + '''This test will run the whetstone benchmark in parallel on machine_1 and machine_2.\n + if you wish to add a virtual machine add the following information under the Virtual_Machine tag + virtualmachine_1: + availability_zone: nova + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + + virtualmachine_1: + availability_zone: + public_network: + OS_image: + flavor: + role: + ''' + diff --git a/benchmarks/test_plan/default/network/iperf_bm.yaml b/benchmarks/test_plan/default/network/iperf_bm.yaml new file mode 100644 index 00000000..3aa8310d --- /dev/null +++ b/benchmarks/test_plan/default/network/iperf_bm.yaml @@ -0,0 +1,50 @@ +Scenario: + benchmark: iperf + topology: Client and Server on different baremetal Compute nodes + server: machine_1 + client: machine_2 + benchmark_details: + duration: 20 + protocol: tcp + bandwidthGbps: 10 + +Context: + Host_Machines: + machine_1: + ip: + pw: + role: 1-server + machine_2: + ip: + pw: + role: 2-host + + Virtual_Machines: + +Test_Description: + Test_category: "network" + Benchmark: "iperf" + Overview: > + '''This test will run the IPERF benchmark on virutalmachine_1 and virtualmachine_2. On the\n + same compute node + if you wish to add a host machine add the following information under the Host_Machine tag + virtualmachine_1: + availability_zone: compute1 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 1-server + flavor: m1.large + + virtualmachine_2: + availability_zone: compute2 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 2-host + flavor: m1.large + + machine_1: + ip: + pw: + role: + ''' + diff --git a/benchmarks/test_plan/default/network/iperf_vm.yaml b/benchmarks/test_plan/default/network/iperf_vm.yaml new file mode 100644 index 00000000..49bf13ad --- /dev/null +++ b/benchmarks/test_plan/default/network/iperf_vm.yaml @@ -0,0 +1,43 @@ +Scenario: + benchmark: iperf + topology: Client and Server on ONE compute + server : virtualmachine_1 + client: virtualmachine_2 + description: 'Leave the bandwidth as 0 to throttle maximum traffic' + benchmark_details: + duration: 20 + protocol: tcp + bandwidthGbps: 0 + +Context: + Host_Machines: + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute1 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 1-server + flavor: m1.large + + virtualmachine_2: + availability_zone: compute1 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 2-host + flavor: m1.large + +Test_Description: + Test_category: "network" + Benchmark: "iperf" + Overview: > + '''This test will run the IPERF benchmark on virutalmachine_1 and virtualmachine_2. On the\n + same compute node + if you wish to add a host machine add the following information under the Host_Machine tag + + machine_1: + ip: + pw: + role: + ''' + diff --git a/benchmarks/test_plan/default/network/iperf_vm_2.yaml b/benchmarks/test_plan/default/network/iperf_vm_2.yaml new file mode 100644 index 00000000..c5b94715 --- /dev/null +++ b/benchmarks/test_plan/default/network/iperf_vm_2.yaml @@ -0,0 +1,44 @@ +Scenario: + benchmark: iperf + topology: Client and Server on two different compute nodes + server : virtualmachine_1 + client: virtualmachine_2 + description: 'Leave the bandwidth as 0 to throttle maximum traffic' + benchmark_details: + duration: 20 + protocol: tcp + bandwidthGbps: 0 + +Context: + Host_Machines: + + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute1 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 1-server + flavor: m1.large + + virtualmachine_2: + availability_zone: compute2 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 2-host + flavor: m1.large + +Test_Description: + Test_category: "network" + Benchmark: "iperf" + Overview: > + '''This test will run the IPERF benchmark on virutalmachine_1 and virtualmachine_2. On the\n + same compute node + if you wish to add a host machine add the following information under the Host_Machine tag + + machine_1: + ip: + pw: + role: + ''' + diff --git a/benchmarks/test_plan/default/storage/fio_bm.yaml b/benchmarks/test_plan/default/storage/fio_bm.yaml new file mode 100644 index 00000000..d0001ea2 --- /dev/null +++ b/benchmarks/test_plan/default/storage/fio_bm.yaml @@ -0,0 +1,39 @@ +Scenario: + benchmark: fio + host: machine_1, machine_2 + server: + +Context: + Host_Machines: + machine_1: + ip: + pw: + role: host + machine_2: + ip: + pw: + role: host + + + Virtual_Machines: + + +Test_Description: + Test_category: "Storage" + Benchmark: "FIO" + Overview: > + '''This test will run the FIO benchmark in parallel on host machines "machine_1" and "machine_2".\n + The fio job specifications can be found in qtip/benchmarks/fio_jobs/test_job. + The job conists of an fio load of: + 1.50% rand read 50% rand write + 2.Asynch engine + 3.Direct IO. + 4.Queing depth of 2 + + if you wish to add another machine add the following information under the Host_Machines tag + machine_3: + ip: 172.18.0.16 + pw: Op3nStack + role: host + ''' + diff --git a/benchmarks/test_plan/default/storage/fio_vm.yaml b/benchmarks/test_plan/default/storage/fio_vm.yaml new file mode 100644 index 00000000..0e7f121b --- /dev/null +++ b/benchmarks/test_plan/default/storage/fio_vm.yaml @@ -0,0 +1,44 @@ +Scenario: + benchmark: fio + host: virtualmachine_1, virtualmachine_2 + server: + +Context: + Host_Machines: + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute1 + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + virtualmachine_2: + availability_zone: compute2 + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + +Test_Description: + Test_category: "Storage" + Benchmark: "FIO" + Overview: > + '''This test will run the FIO benchmark in parallel on virtualmachine_1 and virtualmachine_2.\n + The fio job specifications can be found in qtip/benchmarks/fio_jobs/test_job. + The job conists of an fio load of: + 1.50% rand read 50% rand write + 2.Asynch engine + 3.Direct IO. + 4.Queing depth of 2 + + if you wish to add a virtual machine add the following information under the Virtual_Machine tag + + virtualmachine_3: + availability_zone: + public_network: + OS_image: + flavor: + role: + ''' + diff --git a/benchmarks/test_plan/dell-pod1/compute/dhrystone_bm.yaml b/benchmarks/test_plan/dell-pod1/compute/dhrystone_bm.yaml new file mode 100644 index 00000000..2f8d0ec9 --- /dev/null +++ b/benchmarks/test_plan/dell-pod1/compute/dhrystone_bm.yaml @@ -0,0 +1,35 @@ + +Scenario: + benchmark: dhrystone + host: machine_1, machine_2 + server: + +Context: + Host_Machines: + machine_1: + ip: 172.16.1.4 + pw: + role: host + machine_2: + ip: 172.16.1.5 + pw: + role: host + + Virtual_Machines: + + +Test_Description: + Test_category: "Compute" + Benchmark: "dhrystone" + Overview: > + ''' This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n + if you wish to add a virtual machine add the following information under the Virtual_Machine tag + + virtualmachine_1: + availability_zone: + public_network: + OS_image: + flavor: + role: ''' + + diff --git a/benchmarks/test_plan/dell-pod1/compute/dhrystone_vm.yaml b/benchmarks/test_plan/dell-pod1/compute/dhrystone_vm.yaml new file mode 100644 index 00000000..8f5a4165 --- /dev/null +++ b/benchmarks/test_plan/dell-pod1/compute/dhrystone_vm.yaml @@ -0,0 +1,45 @@ +Scenario: + benchmark: dhrystone + host: virtualmachine_1, virtualmachine_2 + server: blakc + +Context: + Host_Machines: + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute1 + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + virtualmachine_2: + availability_zone: compute2 + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + +Test_Description: + Test_category: "Compute" + Benchmark: "dhrystone" + Overview: > + '''This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n + if you wish to add a virtual machine add the following information under the Virtual_Machine tag + machine_1: + ip: 172.18.0.16 + pw: Op3nStack + role: host + machine_2: + ip: 172.18.0.15 + pw: Op3nStack + role: host + + virtualmachine_1: + availability_zone: + public_network: + OS_image: + flavor: + role: + ''' + diff --git a/benchmarks/test_plan/dell-pod1/compute/dpi_bm.yaml b/benchmarks/test_plan/dell-pod1/compute/dpi_bm.yaml new file mode 100644 index 00000000..45324184 --- /dev/null +++ b/benchmarks/test_plan/dell-pod1/compute/dpi_bm.yaml @@ -0,0 +1,34 @@ +Scenario: + benchmark: dpi + host: machine_1,machine_2 + +Context: + Host_Machines: + machine_1: + ip: 172.16.1.4 + pw: + role: 1host + machine_2: + ip: 172.16.1.5 + pw: + role: 1host + Virtual_Machines: +Test_Description: + Test_category: "Compute" + Benchmark: "dpi" + Overview: > + '''This test will run the DPI benchmark in serial on virutalmachine_1 and virtualmachine_2.\n + if you wish to add a host machine add the following information under the Host_Machine tag + virtualmachine_2: + availability_zone: compute1 + OS_image: QTIP_CentOS + public_network: 'provider_network' + + role: 1host + flavor: m1.large + machine_1: + ip: + pw: + role: + ''' + diff --git a/benchmarks/test_plan/dell-pod1/compute/dpi_vm.yaml b/benchmarks/test_plan/dell-pod1/compute/dpi_vm.yaml new file mode 100644 index 00000000..8a157e7a --- /dev/null +++ b/benchmarks/test_plan/dell-pod1/compute/dpi_vm.yaml @@ -0,0 +1,35 @@ +Scenario: + benchmark: dpi + 1Run : virtualmachine_1, virtualmachine_2 + +Context: + Host_Machines: + + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute1 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 1Run + flavor: m1.large + virtualmachine_2: + availability_zone: compute4 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 1Run + flavor: m1.large + +Test_Description: + Test_category: "Compute" + Benchmark: "dpi" + Overview: > + '''This test will run the DPI benchmark in parallel on virutalmachine_1 and virtualmachine_2.\n + if you wish to add a host machine add the following information under the Host_Machine tag + + machine_1: + ip: + pw: + role: + ''' + diff --git a/benchmarks/test_plan/dell-pod1/compute/ramspeed_bm.yaml b/benchmarks/test_plan/dell-pod1/compute/ramspeed_bm.yaml new file mode 100644 index 00000000..af220b80 --- /dev/null +++ b/benchmarks/test_plan/dell-pod1/compute/ramspeed_bm.yaml @@ -0,0 +1,35 @@ + +Scenario: + benchmark: ramspeed + host: machine_1, machine_2 + server: + +Context: + Host_Machines: + machine_1: + ip: 172.16.1.4 + pw: + role: host + machine_2: + ip: 172.16.1.5 + pw: + role: host + + Virtual_Machines: + + +Test_Description: + Test_category: "Compute" + Benchmark: "dhrystone" + Overview: > + ''' This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n + if you wish to add a virtual machine add the following information under the Virtual_Machine tag + + virtualmachine_1: + availability_zone: + public_network: + OS_image: + flavor: + role: ''' + + diff --git a/benchmarks/test_plan/dell-pod1/compute/ramspeed_vm.yaml b/benchmarks/test_plan/dell-pod1/compute/ramspeed_vm.yaml new file mode 100644 index 00000000..a6a4363f --- /dev/null +++ b/benchmarks/test_plan/dell-pod1/compute/ramspeed_vm.yaml @@ -0,0 +1,45 @@ +Scenario: + benchmark: ramspeed + host: virtualmachine_1, virtualmachine_2 + server: blakc + +Context: + Host_Machines: + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute1 + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + virtualmachine_2: + availability_zone: compute2 + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + +Test_Description: + Test_category: "Compute" + Benchmark: "dhrystone" + Overview: > + '''This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n + if you wish to add a virtual machine add the following information under the Virtual_Machine tag + machine_1: + ip: 172.18.0.16 + pw: Op3nStack + role: host + machine_2: + ip: 172.18.0.15 + pw: Op3nStack + role: host + + virtualmachine_1: + availability_zone: + public_network: + OS_image: + flavor: + role: + ''' + diff --git a/benchmarks/test_plan/dell-pod1/compute/ssl_bm.yaml b/benchmarks/test_plan/dell-pod1/compute/ssl_bm.yaml new file mode 100644 index 00000000..6b14c4e6 --- /dev/null +++ b/benchmarks/test_plan/dell-pod1/compute/ssl_bm.yaml @@ -0,0 +1,31 @@ +Scenario: + benchmark: ssl + 1Run: machine_1,machine_2 + +Context: + Host_Machines: + machine_1: + ip: 172.16.1.4 + pw: + role: 1Run + machine_2: + ip: 172.16.1.5 + pw: + role: 1Run + Virtual_Machines: + + +Test_Description: + Test_category: "Compute" + Benchmark: "ssl" + Overview: > + '''This test will run the SSL benchmark in parallel on machine_1 and machine_1. + If you wish to add a virtual machine add the following information under the Virtual_Machine tag + + virtualmachine_1: + availability_zone: + public_network: + OS_image: + flavor: + role: + ''' diff --git a/benchmarks/test_plan/dell-pod1/compute/ssl_vm.yaml b/benchmarks/test_plan/dell-pod1/compute/ssl_vm.yaml new file mode 100644 index 00000000..37824896 --- /dev/null +++ b/benchmarks/test_plan/dell-pod1/compute/ssl_vm.yaml @@ -0,0 +1,36 @@ +Scenario: + benchmark: ssl + host: virtualmachine_1, virtualmachine_2 + +Context: + Host_Machines: + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute1 + public_network: 'net04_ext' + OS_image: 'QTIP_CentOS' + flavor: 'm1.large' + role: host + virtualmachine_2: + availability_zone: compute2 + public_network: 'net04_ext' + OS_image: 'QTIP_CentOS' + flavor: 'm1.large' + role: host + + +Test_Description: + Test_category: "Compute" + Benchmark: "ssl" + Overview: > + '''This test will run the SSL benchmark in parallel on virtualmachine_1 and machine_1.\n + if you wish to add a virtual machine add the following information under the Virtual_Machine tag + + virtualmachine_1: + availability_zone: + public_network: + OS_image: + flavor: + role: + ''' diff --git a/benchmarks/test_plan/dell-pod1/compute/whetstone_bm.yaml b/benchmarks/test_plan/dell-pod1/compute/whetstone_bm.yaml new file mode 100644 index 00000000..128075a1 --- /dev/null +++ b/benchmarks/test_plan/dell-pod1/compute/whetstone_bm.yaml @@ -0,0 +1,34 @@ + +Scenario: + benchmark: whetstone + host: machine_1, machine_2 + + +Context: + Host_Machines: + machine_1: + ip: 172.16.1.4 + pw: + role: host + machine_2: + ip: 172.16.1.5 + pw: + role: host + Virtual_Machines: + + + +Test_Description: + Test_category: "Compute" + Benchmark: "whetstone" + Overview: > + ''' This test will run the whetstone benchmark in parallel on machine_1 and machine_2.\n + if you wish to add a baremetal machine add the following information under the Virtual_Machine tag + + machine_3: + ip: + pw: + role: + ''' + + diff --git a/benchmarks/test_plan/dell-pod1/compute/whetstone_vm.yaml b/benchmarks/test_plan/dell-pod1/compute/whetstone_vm.yaml new file mode 100644 index 00000000..0f1e8748 --- /dev/null +++ b/benchmarks/test_plan/dell-pod1/compute/whetstone_vm.yaml @@ -0,0 +1,44 @@ +Scenario: + benchmark: whetstone + host: virtualmachine_1, virtualmachine_1 + server: + +Context: + Host_Machines: + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute1 + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + virtualmachine_2: + availability_zone: compute2 + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + + +Test_Description: + Test_category: "Compute" + Benchmark: "dhrystone" + Overview: > + '''This test will run the whetstone benchmark in parallel on machine_1 and machine_2.\n + if you wish to add a virtual machine add the following information under the Virtual_Machine tag + virtualmachine_1: + availability_zone: nova + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + + virtualmachine_1: + availability_zone: + public_network: + OS_image: + flavor: + role: + ''' + diff --git a/benchmarks/test_plan/dell-pod1/network/iperf_bm.yaml b/benchmarks/test_plan/dell-pod1/network/iperf_bm.yaml new file mode 100644 index 00000000..b2d2a958 --- /dev/null +++ b/benchmarks/test_plan/dell-pod1/network/iperf_bm.yaml @@ -0,0 +1,50 @@ +Scenario: + benchmark: iperf + topology: Client and Server on different baremetal Compute nodes + server: machine_1 + client: machine_2 + benchmark_details: + duration: 20 + protocol: tcp + bandwidthGbps: 10 + +Context: + Host_Machines: + machine_1: + ip: 172.16.1.4 + pw: + role: 1-server + machine_2: + ip: 172.16.1.5 + pw: + role: 2-host + + Virtual_Machines: + +Test_Description: + Test_category: "network" + Benchmark: "iperf" + Overview: > + '''This test will run the IPERF benchmark on virutalmachine_1 and virtualmachine_2. On the\n + same compute node + if you wish to add a host machine add the following information under the Host_Machine tag + virtualmachine_1: + availability_zone: compute1 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 1-server + flavor: m1.large + + virtualmachine_2: + availability_zone: compute2 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 2-host + flavor: m1.large + + machine_1: + ip: + pw: + role: + ''' + diff --git a/benchmarks/test_plan/dell-pod1/network/iperf_vm.yaml b/benchmarks/test_plan/dell-pod1/network/iperf_vm.yaml new file mode 100644 index 00000000..d7079e99 --- /dev/null +++ b/benchmarks/test_plan/dell-pod1/network/iperf_vm.yaml @@ -0,0 +1,44 @@ +Scenario: + benchmark: iperf + topology: Client and Server on ONE compute + server : virtualmachine_1 + client: virtualmachine_2 + description: 'Leave the bandwidth as 0 to throttle maximum traffic' + benchmark_details: + duration: 20 + protocol: tcp + bandwidthGbps: 0 + +Context: + Host_Machines: + + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute1 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 1-server + flavor: m1.large + + virtualmachine_2: + availability_zone: compute1 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 2-host + flavor: m1.large + +Test_Description: + Test_category: "network" + Benchmark: "iperf" + Overview: > + '''This test will run the IPERF benchmark on virutalmachine_1 and virtualmachine_2. On the\n + same compute node + if you wish to add a host machine add the following information under the Host_Machine tag + + machine_1: + ip: + pw: + role: + ''' + diff --git a/benchmarks/test_plan/dell-pod1/network/iperf_vm_2.yaml b/benchmarks/test_plan/dell-pod1/network/iperf_vm_2.yaml new file mode 100644 index 00000000..c5b94715 --- /dev/null +++ b/benchmarks/test_plan/dell-pod1/network/iperf_vm_2.yaml @@ -0,0 +1,44 @@ +Scenario: + benchmark: iperf + topology: Client and Server on two different compute nodes + server : virtualmachine_1 + client: virtualmachine_2 + description: 'Leave the bandwidth as 0 to throttle maximum traffic' + benchmark_details: + duration: 20 + protocol: tcp + bandwidthGbps: 0 + +Context: + Host_Machines: + + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute1 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 1-server + flavor: m1.large + + virtualmachine_2: + availability_zone: compute2 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 2-host + flavor: m1.large + +Test_Description: + Test_category: "network" + Benchmark: "iperf" + Overview: > + '''This test will run the IPERF benchmark on virutalmachine_1 and virtualmachine_2. On the\n + same compute node + if you wish to add a host machine add the following information under the Host_Machine tag + + machine_1: + ip: + pw: + role: + ''' + diff --git a/benchmarks/test_plan/dell-pod1/network/netperf.yaml b/benchmarks/test_plan/dell-pod1/network/netperf.yaml new file mode 100644 index 00000000..f4ce396b --- /dev/null +++ b/benchmarks/test_plan/dell-pod1/network/netperf.yaml @@ -0,0 +1,42 @@ +Scenario: + benchmark: netperf + topology: Client and Server on ONE compute + server : virtualmachine_1 + client: virtualmachine_2 + benchmark_details: + duration: 10 + teststream: udp_stream + +Context: + Host_Machines: + + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute2 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 1-server + flavor: m1.large + + virtualmachine_2: + availability_zone: compute2 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 2-host + flavor: m1.large + +Test_Description: + Test_category: "network" + Benchmark: "netperf" + Overview: > + '''This test will run the NETPERF benchmark on virutalmachine_1 and virtualmachine_2. On the\n + same compute node + if you wish to add a host machine add the following information under the Host_Machine tag + + machine_1: + ip: + pw: + role: + ''' + diff --git a/benchmarks/test_plan/dell-pod1/storage/fio_bm.yaml b/benchmarks/test_plan/dell-pod1/storage/fio_bm.yaml new file mode 100644 index 00000000..755bb730 --- /dev/null +++ b/benchmarks/test_plan/dell-pod1/storage/fio_bm.yaml @@ -0,0 +1,39 @@ +Scenario: + benchmark: fio + host: machine_1, machine_2 + server: blakc + +Context: + Host_Machines: + machine_1: + ip: 172.16.1.4 + pw: + role: host + machine_2: + ip: 172.16.1.5 + pw: + role: host + + + Virtual_Machines: + + +Test_Description: + Test_category: "Storage" + Benchmark: "FIO" + Overview: > + '''This test will run the FIO benchmark in parallel on host machines "machine_1" and "machine_2".\n + The fio job specifications can be found in qtip/benchmarks/fio_jobs/test_job. + The job conists of an fio load of: + 1.50% rand read 50% rand write + 2.Asynch engine + 3.Direct IO. + 4.Queing depth of 2 + + if you wish to add another machine add the following information under the Host_Machines tag + machine_3: + ip: 172.18.0.16 + pw: Op3nStack + role: host + ''' + diff --git a/benchmarks/test_plan/dell-pod1/storage/fio_vm.yaml b/benchmarks/test_plan/dell-pod1/storage/fio_vm.yaml new file mode 100644 index 00000000..5ae90d2c --- /dev/null +++ b/benchmarks/test_plan/dell-pod1/storage/fio_vm.yaml @@ -0,0 +1,44 @@ +Scenario: + benchmark: fio + host: machine_1, machine_2 + server: blakc + +Context: + Host_Machines: + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute1 + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + virtualmachine_2: + availability_zone: compute2 + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + +Test_Description: + Test_category: "Storage" + Benchmark: "FIO" + Overview: > + '''This test will run the FIO benchmark in parallel on virtualmachine_1 and virtualmachine_2.\n + The fio job specifications can be found in qtip/benchmarks/fio_jobs/test_job. + The job conists of an fio load of: + 1.50% rand read 50% rand write + 2.Asynch engine + 3.Direct IO. + 4.Queing depth of 2 + + if you wish to add a virtual machine add the following information under the Virtual_Machine tag + + virtualmachine_3: + availability_zone: + public_network: + OS_image: + flavor: + role: + ''' + diff --git a/benchmarks/test_plan/dell-us-deploying-bm3/compute/dhrystone_bm.yaml b/benchmarks/test_plan/dell-us-deploying-bm3/compute/dhrystone_bm.yaml new file mode 100644 index 00000000..4c1fc962 --- /dev/null +++ b/benchmarks/test_plan/dell-us-deploying-bm3/compute/dhrystone_bm.yaml @@ -0,0 +1,35 @@ + +Scenario: + benchmark: dhrystone + host: machine_1, machine_2 + server: + +Context: + Host_Machines: + machine_1: + ip: 10.20.0.4 + pw: + role: host + machine_2: + ip: 10.20.0.5 + pw: + role: host + + Virtual_Machines: + + +Test_Description: + Test_category: "Compute" + Benchmark: "dhrystone" + Overview: > + ''' This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n + if you wish to add a virtual machine add the following information under the Virtual_Machine tag + + virtualmachine_1: + availability_zone: + public_network: + OS_image: + flavor: + role: ''' + + diff --git a/benchmarks/test_plan/dell-us-deploying-bm3/compute/dhrystone_vm.yaml b/benchmarks/test_plan/dell-us-deploying-bm3/compute/dhrystone_vm.yaml new file mode 100644 index 00000000..8f5a4165 --- /dev/null +++ b/benchmarks/test_plan/dell-us-deploying-bm3/compute/dhrystone_vm.yaml @@ -0,0 +1,45 @@ +Scenario: + benchmark: dhrystone + host: virtualmachine_1, virtualmachine_2 + server: blakc + +Context: + Host_Machines: + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute1 + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + virtualmachine_2: + availability_zone: compute2 + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + +Test_Description: + Test_category: "Compute" + Benchmark: "dhrystone" + Overview: > + '''This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n + if you wish to add a virtual machine add the following information under the Virtual_Machine tag + machine_1: + ip: 172.18.0.16 + pw: Op3nStack + role: host + machine_2: + ip: 172.18.0.15 + pw: Op3nStack + role: host + + virtualmachine_1: + availability_zone: + public_network: + OS_image: + flavor: + role: + ''' + diff --git a/benchmarks/test_plan/dell-us-deploying-bm3/compute/dpi_bm.yaml b/benchmarks/test_plan/dell-us-deploying-bm3/compute/dpi_bm.yaml new file mode 100644 index 00000000..1bc534b3 --- /dev/null +++ b/benchmarks/test_plan/dell-us-deploying-bm3/compute/dpi_bm.yaml @@ -0,0 +1,34 @@ +Scenario: + benchmark: dpi + host: machine_1,machine_2 + +Context: + Host_Machines: + machine_1: + ip: 10.20.0.4 + pw: Op3nStack + role: 1host + machine_2: + ip: 10.20.0.5 + pw: Op3nStack + role: 1host + Virtual_Machines: +Test_Description: + Test_category: "Compute" + Benchmark: "dpi" + Overview: > + '''This test will run the DPI benchmark in serial on virutalmachine_1 and virtualmachine_2.\n + if you wish to add a host machine add the following information under the Host_Machine tag + virtualmachine_2: + availability_zone: compute1 + OS_image: QTIP_CentOS + public_network: 'provider_network' + + role: 1host + flavor: m1.large + machine_1: + ip: + pw: + role: + ''' + diff --git a/benchmarks/test_plan/dell-us-deploying-bm3/compute/dpi_vm.yaml b/benchmarks/test_plan/dell-us-deploying-bm3/compute/dpi_vm.yaml new file mode 100644 index 00000000..10e86993 --- /dev/null +++ b/benchmarks/test_plan/dell-us-deploying-bm3/compute/dpi_vm.yaml @@ -0,0 +1,35 @@ +Scenario: + benchmark: dpi + 1Run : virtualmachine_1, virtualmachine_2 + +Context: + Host_Machines: + + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute1 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 1Run + flavor: m1.large + virtualmachine_2: + availability_zone: compute2 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 1Run + flavor: m1.large + +Test_Description: + Test_category: "Compute" + Benchmark: "dpi" + Overview: > + '''This test will run the DPI benchmark in parallel on virutalmachine_1 and virtualmachine_2.\n + if you wish to add a host machine add the following information under the Host_Machine tag + + machine_1: + ip: + pw: + role: + ''' + diff --git a/benchmarks/test_plan/dell-us-deploying-bm3/compute/ramspeed_bm.yaml b/benchmarks/test_plan/dell-us-deploying-bm3/compute/ramspeed_bm.yaml new file mode 100644 index 00000000..a63df3e2 --- /dev/null +++ b/benchmarks/test_plan/dell-us-deploying-bm3/compute/ramspeed_bm.yaml @@ -0,0 +1,35 @@ + +Scenario: + benchmark: ramspeed + host: machine_1, machine_2 + server: + +Context: + Host_Machines: + machine_1: + ip: 10.20.0.4 + pw: + role: host + machine_2: + ip: 10.20.0.5 + pw: + role: host + + Virtual_Machines: + + +Test_Description: + Test_category: "Compute" + Benchmark: "dhrystone" + Overview: > + ''' This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n + if you wish to add a virtual machine add the following information under the Virtual_Machine tag + + virtualmachine_1: + availability_zone: + public_network: + OS_image: + flavor: + role: ''' + + diff --git a/benchmarks/test_plan/dell-us-deploying-bm3/compute/ramspeed_vm.yaml b/benchmarks/test_plan/dell-us-deploying-bm3/compute/ramspeed_vm.yaml new file mode 100644 index 00000000..a6a4363f --- /dev/null +++ b/benchmarks/test_plan/dell-us-deploying-bm3/compute/ramspeed_vm.yaml @@ -0,0 +1,45 @@ +Scenario: + benchmark: ramspeed + host: virtualmachine_1, virtualmachine_2 + server: blakc + +Context: + Host_Machines: + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute1 + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + virtualmachine_2: + availability_zone: compute2 + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + +Test_Description: + Test_category: "Compute" + Benchmark: "dhrystone" + Overview: > + '''This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n + if you wish to add a virtual machine add the following information under the Virtual_Machine tag + machine_1: + ip: 172.18.0.16 + pw: Op3nStack + role: host + machine_2: + ip: 172.18.0.15 + pw: Op3nStack + role: host + + virtualmachine_1: + availability_zone: + public_network: + OS_image: + flavor: + role: + ''' + diff --git a/benchmarks/test_plan/dell-us-deploying-bm3/compute/ssl_bm.yaml b/benchmarks/test_plan/dell-us-deploying-bm3/compute/ssl_bm.yaml new file mode 100644 index 00000000..dc038822 --- /dev/null +++ b/benchmarks/test_plan/dell-us-deploying-bm3/compute/ssl_bm.yaml @@ -0,0 +1,31 @@ +Scenario: + benchmark: ssl + 1Run: machine_1,machine_2 + +Context: + Host_Machines: + machine_1: + ip: 10.20.0.4 + pw: + role: 1Run + machine_2: + ip: 10.20.0.5 + pw: + role: 1Run + Virtual_Machines: + + +Test_Description: + Test_category: "Compute" + Benchmark: "ssl" + Overview: > + '''This test will run the SSL benchmark in parallel on machine_1 and machine_1. + If you wish to add a virtual machine add the following information under the Virtual_Machine tag + + virtualmachine_1: + availability_zone: + public_network: + OS_image: + flavor: + role: + ''' diff --git a/benchmarks/test_plan/dell-us-deploying-bm3/compute/ssl_vm.yaml b/benchmarks/test_plan/dell-us-deploying-bm3/compute/ssl_vm.yaml new file mode 100644 index 00000000..37824896 --- /dev/null +++ b/benchmarks/test_plan/dell-us-deploying-bm3/compute/ssl_vm.yaml @@ -0,0 +1,36 @@ +Scenario: + benchmark: ssl + host: virtualmachine_1, virtualmachine_2 + +Context: + Host_Machines: + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute1 + public_network: 'net04_ext' + OS_image: 'QTIP_CentOS' + flavor: 'm1.large' + role: host + virtualmachine_2: + availability_zone: compute2 + public_network: 'net04_ext' + OS_image: 'QTIP_CentOS' + flavor: 'm1.large' + role: host + + +Test_Description: + Test_category: "Compute" + Benchmark: "ssl" + Overview: > + '''This test will run the SSL benchmark in parallel on virtualmachine_1 and machine_1.\n + if you wish to add a virtual machine add the following information under the Virtual_Machine tag + + virtualmachine_1: + availability_zone: + public_network: + OS_image: + flavor: + role: + ''' diff --git a/benchmarks/test_plan/dell-us-deploying-bm3/compute/whetstone_bm.yaml b/benchmarks/test_plan/dell-us-deploying-bm3/compute/whetstone_bm.yaml new file mode 100644 index 00000000..180d4e51 --- /dev/null +++ b/benchmarks/test_plan/dell-us-deploying-bm3/compute/whetstone_bm.yaml @@ -0,0 +1,34 @@ + +Scenario: + benchmark: whetstone + host: machine_1, machine_2 + + +Context: + Host_Machines: + machine_1: + ip: 10.20.0.4 + pw: + role: host + machine_2: + ip: 10.20.0.5 + pw: + role: host + Virtual_Machines: + + + +Test_Description: + Test_category: "Compute" + Benchmark: "whetstone" + Overview: > + ''' This test will run the whetstone benchmark in parallel on machine_1 and machine_2.\n + if you wish to add a baremetal machine add the following information under the Virtual_Machine tag + + machine_3: + ip: + pw: + role: + ''' + + diff --git a/benchmarks/test_plan/dell-us-deploying-bm3/compute/whetstone_vm.yaml b/benchmarks/test_plan/dell-us-deploying-bm3/compute/whetstone_vm.yaml new file mode 100644 index 00000000..0f1e8748 --- /dev/null +++ b/benchmarks/test_plan/dell-us-deploying-bm3/compute/whetstone_vm.yaml @@ -0,0 +1,44 @@ +Scenario: + benchmark: whetstone + host: virtualmachine_1, virtualmachine_1 + server: + +Context: + Host_Machines: + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute1 + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + virtualmachine_2: + availability_zone: compute2 + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + + +Test_Description: + Test_category: "Compute" + Benchmark: "dhrystone" + Overview: > + '''This test will run the whetstone benchmark in parallel on machine_1 and machine_2.\n + if you wish to add a virtual machine add the following information under the Virtual_Machine tag + virtualmachine_1: + availability_zone: nova + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + + virtualmachine_1: + availability_zone: + public_network: + OS_image: + flavor: + role: + ''' + diff --git a/benchmarks/test_plan/dell-us-deploying-bm3/network/iperf_bm.yaml b/benchmarks/test_plan/dell-us-deploying-bm3/network/iperf_bm.yaml new file mode 100644 index 00000000..4c64dd16 --- /dev/null +++ b/benchmarks/test_plan/dell-us-deploying-bm3/network/iperf_bm.yaml @@ -0,0 +1,50 @@ +Scenario: + benchmark: iperf + topology: Client and Server on different baremetal Compute nodes + server: machine_1 + client: machine_2 + benchmark_details: + duration: 20 + protocol: tcp + bandwidthGbps: 10 + +Context: + Host_Machines: + machine_1: + ip: 10.20.0.4 + pw: + role: 1-server + machine_2: + ip: 10.20.0.5 + pw: + role: 2-host + + Virtual_Machines: + +Test_Description: + Test_category: "network" + Benchmark: "iperf" + Overview: > + '''This test will run the IPERF benchmark on virutalmachine_1 and virtualmachine_2. On the\n + same compute node + if you wish to add a host machine add the following information under the Host_Machine tag + virtualmachine_1: + availability_zone: compute1 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 1-server + flavor: m1.large + + virtualmachine_2: + availability_zone: compute2 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 2-host + flavor: m1.large + + machine_1: + ip: + pw: + role: + ''' + diff --git a/benchmarks/test_plan/dell-us-deploying-bm3/network/iperf_vm.yaml b/benchmarks/test_plan/dell-us-deploying-bm3/network/iperf_vm.yaml new file mode 100644 index 00000000..d7079e99 --- /dev/null +++ b/benchmarks/test_plan/dell-us-deploying-bm3/network/iperf_vm.yaml @@ -0,0 +1,44 @@ +Scenario: + benchmark: iperf + topology: Client and Server on ONE compute + server : virtualmachine_1 + client: virtualmachine_2 + description: 'Leave the bandwidth as 0 to throttle maximum traffic' + benchmark_details: + duration: 20 + protocol: tcp + bandwidthGbps: 0 + +Context: + Host_Machines: + + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute1 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 1-server + flavor: m1.large + + virtualmachine_2: + availability_zone: compute1 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 2-host + flavor: m1.large + +Test_Description: + Test_category: "network" + Benchmark: "iperf" + Overview: > + '''This test will run the IPERF benchmark on virutalmachine_1 and virtualmachine_2. On the\n + same compute node + if you wish to add a host machine add the following information under the Host_Machine tag + + machine_1: + ip: + pw: + role: + ''' + diff --git a/benchmarks/test_plan/dell-us-deploying-bm3/network/iperf_vm_2.yaml b/benchmarks/test_plan/dell-us-deploying-bm3/network/iperf_vm_2.yaml new file mode 100644 index 00000000..c5b94715 --- /dev/null +++ b/benchmarks/test_plan/dell-us-deploying-bm3/network/iperf_vm_2.yaml @@ -0,0 +1,44 @@ +Scenario: + benchmark: iperf + topology: Client and Server on two different compute nodes + server : virtualmachine_1 + client: virtualmachine_2 + description: 'Leave the bandwidth as 0 to throttle maximum traffic' + benchmark_details: + duration: 20 + protocol: tcp + bandwidthGbps: 0 + +Context: + Host_Machines: + + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute1 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 1-server + flavor: m1.large + + virtualmachine_2: + availability_zone: compute2 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 2-host + flavor: m1.large + +Test_Description: + Test_category: "network" + Benchmark: "iperf" + Overview: > + '''This test will run the IPERF benchmark on virutalmachine_1 and virtualmachine_2. On the\n + same compute node + if you wish to add a host machine add the following information under the Host_Machine tag + + machine_1: + ip: + pw: + role: + ''' + diff --git a/benchmarks/test_plan/dell-us-deploying-bm3/network/netperf.yaml b/benchmarks/test_plan/dell-us-deploying-bm3/network/netperf.yaml new file mode 100644 index 00000000..f4ce396b --- /dev/null +++ b/benchmarks/test_plan/dell-us-deploying-bm3/network/netperf.yaml @@ -0,0 +1,42 @@ +Scenario: + benchmark: netperf + topology: Client and Server on ONE compute + server : virtualmachine_1 + client: virtualmachine_2 + benchmark_details: + duration: 10 + teststream: udp_stream + +Context: + Host_Machines: + + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute2 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 1-server + flavor: m1.large + + virtualmachine_2: + availability_zone: compute2 + OS_image: QTIP_CentOS + public_network: 'net04_ext' + role: 2-host + flavor: m1.large + +Test_Description: + Test_category: "network" + Benchmark: "netperf" + Overview: > + '''This test will run the NETPERF benchmark on virutalmachine_1 and virtualmachine_2. On the\n + same compute node + if you wish to add a host machine add the following information under the Host_Machine tag + + machine_1: + ip: + pw: + role: + ''' + diff --git a/benchmarks/test_plan/dell-us-deploying-bm3/storage/fio_bm.yaml b/benchmarks/test_plan/dell-us-deploying-bm3/storage/fio_bm.yaml new file mode 100644 index 00000000..12be8c17 --- /dev/null +++ b/benchmarks/test_plan/dell-us-deploying-bm3/storage/fio_bm.yaml @@ -0,0 +1,39 @@ +Scenario: + benchmark: fio + host: machine_1, machine_2 + server: blakc + +Context: + Host_Machines: + machine_1: + ip: 10.20.0.4 + pw: r00tme + role: host + machine_2: + ip: 10.20.0.5 + pw: r00tme + role: host + + + Virtual_Machines: + + +Test_Description: + Test_category: "Storage" + Benchmark: "FIO" + Overview: > + '''This test will run the FIO benchmark in parallel on host machines "machine_1" and "machine_2".\n + The fio job specifications can be found in qtip/benchmarks/fio_jobs/test_job. + The job conists of an fio load of: + 1.50% rand read 50% rand write + 2.Asynch engine + 3.Direct IO. + 4.Queing depth of 2 + + if you wish to add another machine add the following information under the Host_Machines tag + machine_3: + ip: 172.18.0.16 + pw: Op3nStack + role: host + ''' + diff --git a/benchmarks/test_plan/dell-us-deploying-bm3/storage/fio_vm.yaml b/benchmarks/test_plan/dell-us-deploying-bm3/storage/fio_vm.yaml new file mode 100644 index 00000000..5ae90d2c --- /dev/null +++ b/benchmarks/test_plan/dell-us-deploying-bm3/storage/fio_vm.yaml @@ -0,0 +1,44 @@ +Scenario: + benchmark: fio + host: machine_1, machine_2 + server: blakc + +Context: + Host_Machines: + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute1 + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + virtualmachine_2: + availability_zone: compute2 + public_network: 'net04_ext' + OS_image: QTIP_CentOS + flavor: m1.large + role: host + +Test_Description: + Test_category: "Storage" + Benchmark: "FIO" + Overview: > + '''This test will run the FIO benchmark in parallel on virtualmachine_1 and virtualmachine_2.\n + The fio job specifications can be found in qtip/benchmarks/fio_jobs/test_job. + The job conists of an fio load of: + 1.50% rand read 50% rand write + 2.Asynch engine + 3.Direct IO. + 4.Queing depth of 2 + + if you wish to add a virtual machine add the following information under the Virtual_Machine tag + + virtualmachine_3: + availability_zone: + public_network: + OS_image: + flavor: + role: + ''' + diff --git a/cli/README.rst b/cli/README.rst deleted file mode 100644 index 65f4af86..00000000 --- a/cli/README.rst +++ /dev/null @@ -1,11 +0,0 @@ -QTIP CLI -======== -Note: The cli is only tested within docker - -install -------- -pip install . - -usage ------ -qtip -h diff --git a/cli/__init__.py b/cli/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/cli/commands/__init__.py b/cli/commands/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/cli/commands/ansible.py b/cli/commands/ansible.py deleted file mode 100644 index 001185a3..00000000 --- a/cli/commands/ansible.py +++ /dev/null @@ -1,32 +0,0 @@ -############################################################################## -# Copyright (c) 2016 ZTE Corp 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 -############################################################################## - -import os - -import click - -ANSIBLE_CONF = '{}/conf/ansible.cfg'.format(os.environ['HOME']) - - -class Ansible: - - def __init__(self): - pass - - def show(self): - click.echo("show ansible configuration") - pass - - def prepare(self): - click.echo("prepare ansible env") - pass - - def status(self): - click.echo("check connectivity") - pass diff --git a/cli/commands/perftest.py b/cli/commands/perftest.py deleted file mode 100644 index 0eb6d062..00000000 --- a/cli/commands/perftest.py +++ /dev/null @@ -1,57 +0,0 @@ -############################################################################## -# Copyright (c) 2016 ZTE Corp 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 prettytable import PrettyTable -import yaml -import click -import os -from cli import helper - - -class PerfTest: - - def __init__(self): - self.path = os.path.join(helper.fetch_root(), 'perftest/summary') - - def list(self): - table = PrettyTable(["Name", "Description"]) - table.align = 'l' - with open(self.path) as tests: - line = tests.read() - data = yaml.safe_load(line)['test_cases'] - for i in range(0, len(data)): - points = data[i] - table.add_row([points['name'], points['description']]) - click.echo(table) - - def run(self): - click.echo("Run a perftest") - - -@click.group() -def cli(): - pass - - -@cli.group() -@click.pass_context -def perftest(ctx): - pass - -_perftest = PerfTest() - - -@perftest.command("list", help="Lists all perftest benchmarks.") -def list(): - _perftest.list() - - -@perftest.command("run", help="Executes a single perftest benchmark.") -def execute(): - _perftest.run() diff --git a/cli/commands/suite.py b/cli/commands/suite.py deleted file mode 100644 index 757f11a1..00000000 --- a/cli/commands/suite.py +++ /dev/null @@ -1,52 +0,0 @@ -############################################################################## -# Copyright (c) 2016 ZTE Corp 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 prettytable import PrettyTable -import os -import click - - -class Suite: - - def __init__(self): - self.path = os.path.join(os.path.dirname(__file__), '..', '..', 'benchmarks/suite') - - def list(self): - table = PrettyTable(["Name"]) - table.align = 'l' - suites = os.listdir(self.path) - for suite in suites: - table.add_row([suite]) - click.echo(table) - - def run(self): - print("Run a suite") - - -@click.group() -def cli(): - pass - - -@cli.group() -@click.pass_context -def suite(ctx): - pass - -_suite = Suite() - - -@suite.command("list", help="Lists all the available suites") -def list(): - _suite.list() - - -@suite.command("run", help="Execute one complete suite") -def execute(): - _suite.run() diff --git a/cli/entry.py b/cli/entry.py deleted file mode 100644 index f9dc440c..00000000 --- a/cli/entry.py +++ /dev/null @@ -1,44 +0,0 @@ -############################################################################## -# Copyright (c) 2016 ZTE Corp 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 -############################################################################## - -import click - -from cli.commands.ansible import Ansible - -CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help']) - - -@click.group(context_settings=CONTEXT_SETTINGS) -@click.version_option(version='0.1.dev0') -def cli(): - pass - -_ansible = Ansible() - - -@cli.group() -@click.pass_context -def ansible(ctx): - pass - - -@ansible.command('prepare', help="Prepares the ansible environment. " - "This step is needed run benchmarks.") -def ansible_prepare(): - _ansible.prepare() - - -@ansible.command('show', help="Shows the current ansible configuration.") -def ansible_show(): - _ansible.show() - - -@ansible.command('status', help="Checks if ansible still connects to hosts.") -def ansible_status(): - _ansible.status() diff --git a/cli/helper.py b/cli/helper.py deleted file mode 100644 index a5865bce..00000000 --- a/cli/helper.py +++ /dev/null @@ -1,14 +0,0 @@ -############################################################################## -# Copyright (c) 2016 ZTE Corp 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 -############################################################################## - -import os - - -def fetch_root(): - return os.path.join(os.path.dirname(__file__), os.pardir, 'benchmarks/') diff --git a/dashboard/__init__.py b/dashboard/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/dashboard/pushtoDB.py b/dashboard/pushtoDB.py deleted file mode 100644 index e6a4d239..00000000 --- a/dashboard/pushtoDB.py +++ /dev/null @@ -1,66 +0,0 @@ -import requests -import json -import datetime -import os -import sys -from utils import logger_utils - -logger = logger_utils.QtipLogger('push_db').get - -TEST_DB = 'http://testresults.opnfv.org/test/api/v1' - -suite_list = [('compute_result.json', 'compute_test_suite'), - ('network_result.json', 'network_test_suite'), - ('storage_result.json', 'storage_test_suite')] -payload_list = {} - - -def push_results_to_db(db_url, case_name, payload, installer, pod_name): - - url = db_url + "/results" - creation_date = str(datetime.datetime.utcnow().isoformat()) - - params = {"project_name": "qtip", "case_name": case_name, - "pod_name": pod_name, "installer": installer, "start_date": creation_date, - "version": "test", "details": payload} - - headers = {'Content-Type': 'application/json'} - logger.info('pod_name:{0},installer:{1},creation_data:{2}'.format(pod_name, - installer, - creation_date)) - try: - r = requests.post(url, data=json.dumps(params), headers=headers) - logger.info(r) - return True - except: - logger.info("Error:{0}".format(sys.exc_info()[0])) - return False - - -def populate_payload(suite_list): - - global payload_list - for k, v in suite_list: - - if os.path.isfile('results/' + str(k)): - payload_list[k] = v - - -def main(): - - global payload_list - populate_payload(suite_list) - if payload_list: - logger.info(payload_list) - for suite, case in payload_list.items(): - with open('results/' + suite, 'r') as result_file: - j = json.load(result_file) - push_results_to_db(TEST_DB, case, j, - os.environ['INSTALLER_TYPE'], - os.environ['NODE_NAME']) - elif not payload_list: - logger.info('Results not found') - - -if __name__ == "__main__": - main() diff --git a/opt/servers/ansible.cfg b/opt/servers/ansible.cfg new file mode 100644 index 00000000..93022c4e --- /dev/null +++ b/opt/servers/ansible.cfg @@ -0,0 +1,3 @@ +[defaults] +hostfile = inventory +host_key_checking = False \ No newline at end of file diff --git a/opt/servers/elk.yml b/opt/servers/elk.yml new file mode 100644 index 00000000..e2696573 --- /dev/null +++ b/opt/servers/elk.yml @@ -0,0 +1,5 @@ +--- +- hosts: elk-servers + roles: + - docker + - elk diff --git a/opt/servers/inventory b/opt/servers/inventory new file mode 100644 index 00000000..74c04c42 --- /dev/null +++ b/opt/servers/inventory @@ -0,0 +1,10 @@ +qtip-dev ansible_host=qtip.openzero.net + +[elk-servers] +qtip-dev + +[ngnix-servers] +qtip-dev + +[qtip-servers] +qtip-dev diff --git a/opt/servers/ngnix.yml b/opt/servers/ngnix.yml new file mode 100644 index 00000000..d57a5603 --- /dev/null +++ b/opt/servers/ngnix.yml @@ -0,0 +1,4 @@ +--- +- hosts: ngnix-servers + roles: + - ngnix diff --git a/opt/servers/qtip.yml b/opt/servers/qtip.yml new file mode 100644 index 00000000..f0ac3c4e --- /dev/null +++ b/opt/servers/qtip.yml @@ -0,0 +1,4 @@ +--- +- hosts: qtip-servers + roles: + - qtip diff --git a/opt/servers/roles/docker/handlers/main.yml b/opt/servers/roles/docker/handlers/main.yml new file mode 100644 index 00000000..985f8d41 --- /dev/null +++ b/opt/servers/roles/docker/handlers/main.yml @@ -0,0 +1,4 @@ +--- +- name: starting docker service + become: true + service: name=docker state=started diff --git a/opt/servers/roles/docker/tasks/main.yml b/opt/servers/roles/docker/tasks/main.yml new file mode 100644 index 00000000..1cf3bea0 --- /dev/null +++ b/opt/servers/roles/docker/tasks/main.yml @@ -0,0 +1,41 @@ +- name: adding keys + become: true + apt_key: keyserver=hkp://p80.pool.sks-keyservers.net id=0X58118E89F3A912897C070ADBF76221572C52609D + +- name: adding entry for ubuntu + become: true + apt_repository: repo='deb https://apt.dockerproject.org/repo ubuntu-xenial main' state=present filename='docker' + when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "16.04" + +- name: installing from docker repo + become: true + shell: apt-cache policy docker-engine + when: ansible_distribution == "Ubuntu" and ansible_distribution_version== "16.04" + +- name: adding entry for ubuntu + become: true + apt_repository: repo='deb https://apt.dockerproject.org/repo ubuntu-trusty main' state=present filename='docker' + when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "14.04" + +- name: updating + become: true + apt: update_cache=yes + +- name: installing docker engine + become: true + apt: name=docker-engine + notify: + - starting docker service + +- name: install pip + become: true + apt: name={{item}} state=installed + with_items: + - python-dev + - python-pip + +- name: install docker-py + become: true + pip: + name: docker-py + version: 1.7.0 diff --git a/opt/servers/roles/elk/tasks/main.yml b/opt/servers/roles/elk/tasks/main.yml new file mode 100644 index 00000000..ed987f1a --- /dev/null +++ b/opt/servers/roles/elk/tasks/main.yml @@ -0,0 +1,22 @@ +--- +- name: pulling elasticsearch and kibana + become: true + docker_image: name={{ item }} state=present + with_items: + - elasticsearch + - kibana + +- name: setting up elasticsearch + become: true + docker_container: + name: esearch + image: elasticsearch + published_ports: 9200:9200 + +- name: setting up kibana + become: true + docker_container: + name: kibana + image: kibana + published_ports: 5601:5601 + links: esearch:elasticsearch diff --git a/opt/servers/roles/ngnix/defaults/main.yml b/opt/servers/roles/ngnix/defaults/main.yml new file mode 100644 index 00000000..cb3b3934 --- /dev/null +++ b/opt/servers/roles/ngnix/defaults/main.yml @@ -0,0 +1,7 @@ +--- +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/opt/servers/roles/ngnix/handlers/main.yml b/opt/servers/roles/ngnix/handlers/main.yml new file mode 100644 index 00000000..35585363 --- /dev/null +++ b/opt/servers/roles/ngnix/handlers/main.yml @@ -0,0 +1,4 @@ +--- +- name: restart nginx + become: true + service: name=nginx state=restarted diff --git a/opt/servers/roles/ngnix/tasks/main.yml b/opt/servers/roles/ngnix/tasks/main.yml new file mode 100644 index 00000000..ec146850 --- /dev/null +++ b/opt/servers/roles/ngnix/tasks/main.yml @@ -0,0 +1,12 @@ +--- +- name: nginx is installed + become: true + package: name=nginx state=present +- name: qtip server configuration is generated + become: true + template: src={{ item }}.conf.j2 dest=/etc/nginx/sites-enabled/{{ item }}.conf + with_items: + - elk + - qtip + notify: + - restart nginx diff --git a/opt/servers/roles/ngnix/templates/elk.conf.j2 b/opt/servers/roles/ngnix/templates/elk.conf.j2 new file mode 100644 index 00000000..271690e0 --- /dev/null +++ b/opt/servers/roles/ngnix/templates/elk.conf.j2 @@ -0,0 +1,14 @@ +# {{ ansible_managed }} + +# servers +# +{% for service in services %} +server { + listen 80; + listen 443 ssl; + server_name {{ service.name }}.qtip.openzero.net; + location / { + proxy_pass {{ service.upstream }}; + } +} +{% endfor %} diff --git a/opt/servers/roles/ngnix/templates/qtip.conf.j2 b/opt/servers/roles/ngnix/templates/qtip.conf.j2 new file mode 100644 index 00000000..3a15c6ba --- /dev/null +++ b/opt/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/opt/servers/roles/qtip/files/run_qtip_server.sh b/opt/servers/roles/qtip/files/run_qtip_server.sh new file mode 100644 index 00000000..0f5cafea --- /dev/null +++ b/opt/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/opt/servers/roles/qtip/tasks/main.yml b/opt/servers/roles/qtip/tasks/main.yml new file mode 100644 index 00000000..b8292791 --- /dev/null +++ b/opt/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 diff --git a/opt/servers/roles/ssh/defaults/main.yml b/opt/servers/roles/ssh/defaults/main.yml new file mode 100644 index 00000000..41ee9853 --- /dev/null +++ b/opt/servers/roles/ssh/defaults/main.yml @@ -0,0 +1,6 @@ +--- +users: + - { name: yujunz, comment: "Yujun Zhang " } + - { name: taseer, comment: "Taseer Ahmed " } + - { name: serena, comment: "Serena Feng " } + - { name: zhifeng, comment: "Zhifeng Jiang" } diff --git a/opt/servers/roles/ssh/files/serena.authorized_keys b/opt/servers/roles/ssh/files/serena.authorized_keys new file mode 100644 index 00000000..5cdbfe00 --- /dev/null +++ b/opt/servers/roles/ssh/files/serena.authorized_keys @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDYlLrMOPxwLNQvLpxXVLYXQCxNkaKfVWt7u9k+6T0SU7VNuT8e1VoTk6b/iVWyXQ4j1hW4sNroTucqZjl+8V2z2nYgpEMIy6jBuehlKP2LJ9v/p98/OBVVxgEnRJGzFYIeO/GKBLMaUu43OkCO2Ef67qKeISeNP5/ewUR12YCUHQg5GkGYnDL3fFd7SiVDkYPEXQvHfi85beGOuPwDTjbKoKbF9WATIIzJSPUmslGjFRpKqM8AQLGWEyTeklU7H4ddRqaKxe6DGbpTLJM2rCMF8W91097nmiOKEnuxi6vJKTmyX81BZXi48ugCRh3942ONYRH8W7dBegrvRY3kyAtH root@gsmdev-VirtualBox diff --git a/opt/servers/roles/ssh/files/taseer.authorized_keys b/opt/servers/roles/ssh/files/taseer.authorized_keys new file mode 100644 index 00000000..2efb95e8 --- /dev/null +++ b/opt/servers/roles/ssh/files/taseer.authorized_keys @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDCxCG9Z+8rBLQiJ9yt+RzRkAZZQIlou83e899Kkuf/UgXd+1TUgIu4AJUDvayrorTxk2kw7ra+DoysEa2NBkLL6FNnG+NpYV+XTaG+Z3tvp4l62ROV+5+O4soiWtBroRghQPDkrpiTQuFJ7/BKQt9bKZYPb3t2bxCLeFVWtUzCpFDIj6wDPGwDeTLnLMPtQNQtIlgPV+XGAet17rNSrm7EcDzqdDQcdZFmfeH5YvBsY9ZO+qwcbelEpMBWPsyEMU6OgwTqUj7mm3o+Quew35y13Zrhf+GAx5ZMXho/Cpjp1TzognDkwAFpFzZG7zWSNexXrD15Wzgyae2cl/vD75I7 taseer@123.org \ No newline at end of file diff --git a/opt/servers/roles/ssh/files/yujunz.authorized_keys b/opt/servers/roles/ssh/files/yujunz.authorized_keys new file mode 100644 index 00000000..83ed540d --- /dev/null +++ b/opt/servers/roles/ssh/files/yujunz.authorized_keys @@ -0,0 +1,3 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC0o+WARhbI5DeZK9eiZKVprY3oQ910npo/EPFI9prfpN7zeF0UA4TwT9rqsrwFgRQeJkKvbDTOPt5Ox9vLIEnxT4PdirvrYNxtyJHHfbL4ZxKemYhBi2BA6CAbI3f9CR+dtbfOBxtTpXAj1Y5oA9y59o1hqHpuVmM8dBpcQt/ELdYCHZ0khxft5WaSOURsslTZN18bikVX9WHlKflVyRA8efxqzTZ4w5ufHl1Fv9i/G0u7iGbUtvlI8X7+Z+ePuysZhHKErQSGfv2NybDi+r8xM5hL2LYXxjAu0PV58olUl1SX40OY9yA2Yx+PVzIGhv6EQ8snUFnsoMy0ZIbQ+ysB yujunz@silver.mbp +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDs9VhmmGg0c7FTLMtoZlPue4N1DdSCh6r6YssmEY3e1GHPXJTGGTX7QKXEBlWd7EXq+uedwN+lU9C/FClwneP0M+4vprgqdmUcmlCoSI/RffQAymcuGbxvfptNcLpBApHn4C+e93H/5ryaypaG+6n8WtbDZDtvWgn2ZJY6hDdJSw6Y++C+zDI0QliTsrCHmnGnYcRuDWUNgaiERvW3cvpeF5duFJcDZ0NtMl2UjeGMYL0JU6YfIOIeeFwD0Su86Nf3RtoKF+RzO4LcrGLvywzM7C/iCncIdj6GZjpVBYnB5U6YUh8VqLjHVHjmjTpAjmsWcc8NnwNG9rHDbG6nrGWd yujunz@silver + diff --git a/opt/servers/roles/ssh/files/zhifeng.authorized_keys b/opt/servers/roles/ssh/files/zhifeng.authorized_keys new file mode 100644 index 00000000..195cfdca --- /dev/null +++ b/opt/servers/roles/ssh/files/zhifeng.authorized_keys @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAuck9a5uUXLtzlTaCYhwcLDffFH8o5ldhU4iKr0D4KaXlFfUsKD7VyHN+Zck3HBWTB4U7X9FEeFINtp2v2aoY8n74TS4LUGT8yqRYLyvsh2LgrhE4ouRvYgWlrZGice2x6ZZrcGM4uoGTC/lUHEvMDGDkDxUCfhxlFWcrplCUMcgd1V/5U14s0ufDgLGyEhXWWXFW4pNoqKBEGZNChBSvnq+NvOD7I4jgStUm9REooOp/VPpubH/6mSvDSTokCvrgWSCaNpcDqLCUjhwpoT/D1oFzEd4jBfPSV3jva+eAKPE2r/dnudQR5NR8T/eUz25YRGeJfrjDP6cMgXJoG43IXQ== root@fuel.domain.tld diff --git a/opt/servers/roles/ssh/tasks/main.yml b/opt/servers/roles/ssh/tasks/main.yml new file mode 100644 index 00000000..7de1e208 --- /dev/null +++ b/opt/servers/roles/ssh/tasks/main.yml @@ -0,0 +1,26 @@ +- name: add users for ssh access + become: true + user: + name: "{{ item.name }}" + comment: "{{ item.comment }}" + groups: "qtip" + append: yes + with_items: "{{ users }}" +- name: create .ssh directory + become: true + file: + path: "/home/{{ item.name }}/.ssh" + state: directory + owner: "{{ item.name }}" + group: "{{ item.name }}" + mode: 0700 + with_items: "{{ users }}" +- name: authorize public key + become: true + copy: + src: "{{ item.name }}.authorized_keys" + dest: "/home/{{ item.name }}/.ssh/authorized_keys" + owner: "{{ item.name }}" + group: "{{ item.name }}" + mode: 0600 + with_items: "{{ users }}" \ No newline at end of file diff --git a/opt/servers/ssh.yml b/opt/servers/ssh.yml new file mode 100644 index 00000000..bd74ab3b --- /dev/null +++ b/opt/servers/ssh.yml @@ -0,0 +1,4 @@ +--- +- hosts: elk-servers + roles: + - ssh diff --git a/qtip/api/__init__.py b/qtip/api/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/qtip/api/db.py b/qtip/api/db.py new file mode 100644 index 00000000..24fc27a5 --- /dev/null +++ b/qtip/api/db.py @@ -0,0 +1,98 @@ +############################################################################## +# Copyright (c) 2016 ZTE Corp 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 datetime import datetime +from operator import add +import uuid + +jobs = {} +threads = {} + + +def create_job(args): + if len(filter(lambda x: jobs[x]['state'] == 'processing', jobs.keys())) > 0: + return None + else: + job = {'job_id': str(uuid.uuid4()), + 'installer_type': args["installer_type"], + 'installer_ip': args["installer_ip"], + 'pod_name': args["pod_name"], + 'suite_name': args["suite_name"], + 'max_minutes': args["max_minutes"], + 'type': args["type"], + 'testdb_url': args["testdb_url"], + 'node_name': args["node_name"], + 'start_time': str(datetime.now()), + 'end_time': None, + 'state': 'processing', + 'state_detail': [], + 'result': None, + 'result_detail': []} + jobs[job['job_id']] = job + return job['job_id'] + + +def delete_job(job_id): + if job_id in threads: + stop_thread(job_id) + if job_id in jobs: + jobs[job_id]['end_time'] = str(datetime.now()) + jobs[job_id]['state'] = 'terminated' + return True + else: + return False + + +def get_job_info(job_id): + if job_id in jobs: + return jobs[job_id] + else: + return None + + +def finish_job(job_id): + jobs[job_id]['end_time'] = str(datetime.now()) + jobs[job_id]['state'] = 'finished' + jobs[job_id]['result'] = reduce(add, map(lambda x: x['result'], + jobs[job_id]['result_detail'])) + del threads[job_id] + + +def update_job_state_detail(job_id, state_detail): + jobs[job_id]['state_detail'] = state_detail + + +def update_job_result_detail(job_id, benchmark, result): + result['benchmark'] = benchmark + jobs[job_id]['result_detail'].append(result) + + +def is_job_timeout(job_id): + period = datetime.now() - datetime.strptime(jobs[job_id]['start_time'], + "%Y-%m-%d %H:%M:%S.%f") + return True if jobs[job_id]['max_minutes'] * 60 < period.total_seconds()\ + else False + + +def start_thread(job_id, thread, thread_stop): + threads[job_id] = {'thread': thread, + 'thread_stop': thread_stop} + thread.start() + + +def stop_thread(job_id): + if threads[job_id]['thread'].isAlive(): + threads[job_id]['thread_stop'].set() + threads[job_id]['thread'].join() + if job_id in threads: + del threads[job_id] + + +def update_benchmark_state(job_id, benchmark, benchmark_state): + filter(lambda x: x["benchmark"] == benchmark, + get_job_info(job_id)["state_detail"])[0]['state'] = benchmark_state diff --git a/qtip/api/qtip_server.py b/qtip/api/qtip_server.py new file mode 100644 index 00000000..537b2c05 --- /dev/null +++ b/qtip/api/qtip_server.py @@ -0,0 +1,206 @@ +############################################################################## +# Copyright (c) 2016 ZTE Corp 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, abort +from flask_restful import Api, Resource, fields, reqparse +from flask_restful_swagger import swagger +import threading +from copy import copy +import db +import utils.args_handler as args_handler +import restful_server.result_handler as result_handler + + +app = Flask(__name__) +api = swagger.docs(Api(app), apiVersion='0.1') + + +@swagger.model +class JobModel: + resource_fields = { + 'installer_type': fields.String, + 'installer_ip': fields.String, + 'max_minutes': fields.Integer, + 'pod_name': fields.String, + 'suite_name': fields.String, + 'type': fields.String, + 'benchmark_name': fields.String, + 'testdb_url': fields.String, + 'node_name': fields.String + } + required = ['installer_type', 'installer_ip'] + + +@swagger.model +class JobResponseModel: + resource_fields = { + 'job_id': fields.String + } + + +class Job(Resource): + @swagger.operation( + notes='get a job by ID', + nickname='get', + parameters=[], + responseMessages=[ + { + "code": 200, + "message": "Job detail info." + }, + { + "code": 404, + "message": "Can't not find the job id XXXXXXX" + } + ] + ) + def get(self, id): + ret = db.get_job_info(id) + return ret if ret else abort(404, " Can't not find the job id %s" % id) + + @swagger.operation( + notes='delete a job by ID', + nickname='delete', + parameters=[], + responseMessages=[ + { + "code": 200, + "message": "Delete successfully" + }, + { + "code": 404, + "message": "Can not find job_id XXXXXXXXX" + } + ] + ) + def delete(self, id): + ret = db.delete_job(id) + return {'result': "Delete successfully"} if ret else abort(404, "Can not find job_id %s" % id) + + +class JobList(Resource): + @swagger.operation( + note='create a job with parameters', + nickname='create', + parameters=[ + { + "name": "body", + "description": """ +"installer_type": The installer type, for example fuel, compass.., + +"installer_ip": The installer ip of the pod, + +"max_minutes": If specified, the maximum duration in minutes +for any single test iteration, default is '60', + +"pod_name": If specified, the Pod name, default is 'default', + +"suite_name": If specified, Test suite name, for example 'compute', 'network', 'storage', +default is 'compute', + +"type": BM or VM,default is 'BM', + +"benchmark_name": If specified, benchmark name in suite, for example 'dhrystone_bm.yaml', +default is all benchmarks in suite with specified type, + +"testdb_url": test db http url, for example 'http://testresults.opnfv.org/test/api/v1', + +"node_name": node name reported to test db + """, + "required": True, + "type": "JobModel", + "paramType": "body" + } + ], + type=JobResponseModel.__name__, + responseMessages=[ + { + "code": 200, + "message": "Job submitted" + }, + { + "code": 400, + "message": "Missing configuration data" + }, + { + "code": 409, + "message": "It already has one job running now!" + } + ] + ) + def post(self): + parser = reqparse.RequestParser() + parser.add_argument('installer_type', type=str, required=True, help='installer_type is required') + parser.add_argument('installer_ip', type=str, required=True, help='installer_ip is required') + parser.add_argument('max_minutes', type=int, required=False, default=60, help='max_minutes should be integer') + parser.add_argument('pod_name', type=str, required=False, default='default', help='pod_name should be string') + parser.add_argument('suite_name', type=str, required=False, default='compute', help='suite_name should be string') + parser.add_argument('type', type=str, required=False, default='BM', help='type should be BM, VM and ALL') + parser.add_argument('benchmark_name', type=str, required=False, default='all', help='benchmark_name should be string') + parser.add_argument('testdb_url', type=str, required=False, default=None, + help='testdb_url should be test db http url,for example http://testresults.opnfv.org/test/api/v1') + parser.add_argument('node_name', type=str, required=False, default=None, help='node_name should be string') + args = parser.parse_args() + if not args_handler.check_suite(args["suite_name"]): + return abort(404, 'message:Test suite {0} does not exist under benchmarks/suite'.format(args["suite_name"])) + if not args_handler.check_lab_name(args["pod_name"]): + return abort(404, 'message: You have specified a lab {0}\ + that is not present in test_cases'.format(args['pod_name'])) + + job_id = db.create_job(args) + if not job_id: + return abort(409, 'message:It already has one job running now!') + + benchmarks = args_handler.get_files_in_suite(args["suite_name"], + args["type"].lower()) + test_cases = args_handler.get_files_in_test_case(args["pod_name"], + args["suite_name"], + args["type"].lower()) + benchmarks_list = filter(lambda x: x in test_cases, benchmarks) + if args["benchmark_name"] in benchmarks_list: + benchmarks_list = [args["benchmark_name"]] + if (args["benchmark_name"] is not 'all') and args["benchmark_name"] not in benchmarks_list: + return abort(404, 'message: Benchmark name {0} does not exist in suit {1}'.format(args["benchmark_name"], + args["suite_name"])) + state_detail = map(lambda x: {'benchmark': x, 'state': 'idle'}, benchmarks_list) + db.update_job_state_detail(job_id, copy(state_detail)) + thread_stop = threading.Event() + post_thread = threading.Thread(target=self.thread_post, args=(args["installer_type"], + benchmarks_list, + args["pod_name"], + args["suite_name"], + job_id, + args["testdb_url"], + args["node_name"], + thread_stop)) + db.start_thread(job_id, post_thread, thread_stop) + return {'job_id': str(job_id)} + + def thread_post(self, installer_type, benchmarks_list, pod_name, suite_name, + job_id, testdb_url, node_name, stop_event): + for benchmark in benchmarks_list: + if db.is_job_timeout(job_id) or stop_event.is_set(): + break + db.update_benchmark_state(job_id, benchmark, 'processing') + result = args_handler.prepare_and_run_benchmark(installer_type, + '/home', + args_handler.get_benchmark_path(pod_name, + suite_name, + benchmark)) + db.update_job_result_detail(job_id, benchmark, copy(result)) + db.update_benchmark_state(job_id, benchmark, 'finished') + if (result_handler.dump_suite_result(suite_name) and testdb_url): + result_handler.push_suite_result_to_db(suite_name, testdb_url, installer_type, node_name) + db.finish_job(job_id) + + +api.add_resource(JobList, '/api/v1.0/jobs') +api.add_resource(Job, '/api/v1.0/jobs/') + +if __name__ == "__main__": + app.run(host='0.0.0.0') diff --git a/qtip/api/result_handler.py b/qtip/api/result_handler.py new file mode 100644 index 00000000..200330cb --- /dev/null +++ b/qtip/api/result_handler.py @@ -0,0 +1,22 @@ +############################################################################## +# Copyright (c) 2016 ZTE Corp 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 +############################################################################## +import json +import scripts.ref_results.suite_result as suite_result +import dashboard.pushtoDB as push_to_db + + +def dump_suite_result(suite_name): + return suite_result.get_suite_result(suite_name) + + +def push_suite_result_to_db(suite_name, test_db_url, installer_type, node_name): + with open('results/{0}_result.json'.format(suite_name), 'r') as result_file: + j = json.load(result_file) + push_to_db.push_results_to_db(test_db_url, '{0}_test_suite'.format(suite_name), + j, installer_type, node_name) diff --git a/qtip/cli/README.rst b/qtip/cli/README.rst new file mode 100644 index 00000000..65f4af86 --- /dev/null +++ b/qtip/cli/README.rst @@ -0,0 +1,11 @@ +QTIP CLI +======== +Note: The cli is only tested within docker + +install +------- +pip install . + +usage +----- +qtip -h diff --git a/qtip/cli/__init__.py b/qtip/cli/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/qtip/cli/commands/__init__.py b/qtip/cli/commands/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/qtip/cli/commands/ansible.py b/qtip/cli/commands/ansible.py new file mode 100644 index 00000000..001185a3 --- /dev/null +++ b/qtip/cli/commands/ansible.py @@ -0,0 +1,32 @@ +############################################################################## +# Copyright (c) 2016 ZTE Corp 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 +############################################################################## + +import os + +import click + +ANSIBLE_CONF = '{}/conf/ansible.cfg'.format(os.environ['HOME']) + + +class Ansible: + + def __init__(self): + pass + + def show(self): + click.echo("show ansible configuration") + pass + + def prepare(self): + click.echo("prepare ansible env") + pass + + def status(self): + click.echo("check connectivity") + pass diff --git a/qtip/cli/commands/perftest.py b/qtip/cli/commands/perftest.py new file mode 100644 index 00000000..0eb6d062 --- /dev/null +++ b/qtip/cli/commands/perftest.py @@ -0,0 +1,57 @@ +############################################################################## +# Copyright (c) 2016 ZTE Corp 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 prettytable import PrettyTable +import yaml +import click +import os +from cli import helper + + +class PerfTest: + + def __init__(self): + self.path = os.path.join(helper.fetch_root(), 'perftest/summary') + + def list(self): + table = PrettyTable(["Name", "Description"]) + table.align = 'l' + with open(self.path) as tests: + line = tests.read() + data = yaml.safe_load(line)['test_cases'] + for i in range(0, len(data)): + points = data[i] + table.add_row([points['name'], points['description']]) + click.echo(table) + + def run(self): + click.echo("Run a perftest") + + +@click.group() +def cli(): + pass + + +@cli.group() +@click.pass_context +def perftest(ctx): + pass + +_perftest = PerfTest() + + +@perftest.command("list", help="Lists all perftest benchmarks.") +def list(): + _perftest.list() + + +@perftest.command("run", help="Executes a single perftest benchmark.") +def execute(): + _perftest.run() diff --git a/qtip/cli/commands/suite.py b/qtip/cli/commands/suite.py new file mode 100644 index 00000000..757f11a1 --- /dev/null +++ b/qtip/cli/commands/suite.py @@ -0,0 +1,52 @@ +############################################################################## +# Copyright (c) 2016 ZTE Corp 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 prettytable import PrettyTable +import os +import click + + +class Suite: + + def __init__(self): + self.path = os.path.join(os.path.dirname(__file__), '..', '..', 'benchmarks/suite') + + def list(self): + table = PrettyTable(["Name"]) + table.align = 'l' + suites = os.listdir(self.path) + for suite in suites: + table.add_row([suite]) + click.echo(table) + + def run(self): + print("Run a suite") + + +@click.group() +def cli(): + pass + + +@cli.group() +@click.pass_context +def suite(ctx): + pass + +_suite = Suite() + + +@suite.command("list", help="Lists all the available suites") +def list(): + _suite.list() + + +@suite.command("run", help="Execute one complete suite") +def execute(): + _suite.run() diff --git a/qtip/cli/entry.py b/qtip/cli/entry.py new file mode 100644 index 00000000..f9dc440c --- /dev/null +++ b/qtip/cli/entry.py @@ -0,0 +1,44 @@ +############################################################################## +# Copyright (c) 2016 ZTE Corp 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 +############################################################################## + +import click + +from cli.commands.ansible import Ansible + +CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help']) + + +@click.group(context_settings=CONTEXT_SETTINGS) +@click.version_option(version='0.1.dev0') +def cli(): + pass + +_ansible = Ansible() + + +@cli.group() +@click.pass_context +def ansible(ctx): + pass + + +@ansible.command('prepare', help="Prepares the ansible environment. " + "This step is needed run benchmarks.") +def ansible_prepare(): + _ansible.prepare() + + +@ansible.command('show', help="Shows the current ansible configuration.") +def ansible_show(): + _ansible.show() + + +@ansible.command('status', help="Checks if ansible still connects to hosts.") +def ansible_status(): + _ansible.status() diff --git a/qtip/cli/helper.py b/qtip/cli/helper.py new file mode 100644 index 00000000..a5865bce --- /dev/null +++ b/qtip/cli/helper.py @@ -0,0 +1,14 @@ +############################################################################## +# Copyright (c) 2016 ZTE Corp 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 +############################################################################## + +import os + + +def fetch_root(): + return os.path.join(os.path.dirname(__file__), os.pardir, 'benchmarks/') diff --git a/qtip/utils/__init__.py b/qtip/utils/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/qtip/utils/ansible_api.py b/qtip/utils/ansible_api.py new file mode 100644 index 00000000..9e1d249e --- /dev/null +++ b/qtip/utils/ansible_api.py @@ -0,0 +1,65 @@ +############################################################################## +# Copyright (c) 2016 ZTE Corp 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 +############################################################################## +import os +from collections import namedtuple +from ansible.executor.playbook_executor import PlaybookExecutor +from ansible.inventory import Inventory +from ansible.parsing.dataloader import DataLoader +from ansible.vars import VariableManager +import logger_utils + +logger = logger_utils.QtipLogger('ansible_api').get + + +class AnsibleApi: + + def __init__(self): + self.variable_manager = VariableManager() + self.loader = DataLoader() + self.passwords = {} + self.pbex = None + + def _check_path(self, file_path): + if not os.path.exists(file_path): + logger.error('The playbook %s does not exist' % file_path) + return False + else: + return True + + def execute_playbook(self, hosts_file, playbook_path, pub_key_file, vars): + if not self._check_path(hosts_file): + return False + + inventory = Inventory(loader=self.loader, variable_manager=self.variable_manager, + host_list=hosts_file) + Options = namedtuple('Options', ['listtags', 'listtasks', 'listhosts', 'syntax', + 'connection', 'module_path', 'forks', 'remote_user', + 'private_key_file', 'ssh_common_args', 'ssh_extra_args', + 'sftp_extra_args', 'scp_extra_args', 'become', + 'become_method', 'become_user', 'verbosity', 'check']) + options = Options(listtags=False, listtasks=False, listhosts=False, syntax=False, + connection='ssh', module_path=None, forks=100, remote_user='root', + private_key_file=pub_key_file, ssh_common_args=None, + ssh_extra_args=None, sftp_extra_args=None, scp_extra_args=None, + become=True, become_method=None, become_user='root', verbosity=None, + check=False) + self.variable_manager.extra_vars = vars + + self.pbex = PlaybookExecutor(playbooks=[playbook_path], inventory=inventory, + variable_manager=self.variable_manager, loader=self.loader, + options=options, passwords=self.passwords) + + return self.pbex.run() + + def get_detail_playbook_stats(self): + if self.pbex: + stats = self.pbex._tqm._stats + return map(lambda x: (x, stats.summarize(x)), stats.processed.keys()) + else: + return None diff --git a/qtip/utils/args_handler.py b/qtip/utils/args_handler.py new file mode 100644 index 00000000..879fd204 --- /dev/null +++ b/qtip/utils/args_handler.py @@ -0,0 +1,73 @@ +############################################################################## +# Copyright (c) 2016 ZTE Corp 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 +############################################################################## +import os +from operator import add +import simplejson as json +from env_setup import Env_setup +from spawn_vm import SpawnVM +from driver import Driver + + +def get_files_in_suite(suite_name, case_type='all'): + benchmark_list = json.load(file('benchmarks/suite/{0}'.format(suite_name))) + return reduce(add, benchmark_list.values()) \ + if case_type == 'all' else benchmark_list[case_type] + + +def get_files_in_test_plan(lab, suite_name, case_type='all'): + test_case_all = os.listdir('./test_plan/{0}/{1}'.format(lab, suite_name)) + return test_case_all if case_type == 'all' else \ + filter(lambda x: case_type in x, test_case_all) + + +def get_benchmark_path(lab, suit, benchmark): + return './test_plan/{0}/{1}/{2}'.format(lab, suit, benchmark) + + +def check_suite(suite_name): + return True if os.path.isfile('benchmarks/suite/' + suite_name) else False + + +def check_lab_name(lab_name): + return True if os.path.isdir('test_plan/' + lab_name) else False + + +def check_benchmark_name(lab, file, benchmark): + return os.path.isfile('test_plan/' + lab + '/' + file + '/' + benchmark) + + +def _get_f_name(test_case_path): + return test_case_path.split('/')[-1] + + +def prepare_ansible_env(benchmark_test_case): + env_setup = Env_setup() + [benchmark, vm_info, benchmark_details, proxy_info] = env_setup.parse(benchmark_test_case) + SpawnVM(vm_info) if len(vm_info) else None + env_setup.call_ping_test() + env_setup.call_ssh_test() + env_setup.update_ansible() + return benchmark, benchmark_details, proxy_info, env_setup + + +def run_benchmark(installer_type, pwd, benchmark, benchmark_details, + proxy_info, env_setup, benchmark_test_case): + driver = Driver() + result = driver.drive_bench(installer_type, pwd, benchmark, + env_setup.roles_dict.items(), + _get_f_name(benchmark_test_case), + benchmark_details, env_setup.ip_pw_dict.items(), proxy_info) + env_setup.cleanup_authorized_keys() + return result + + +def prepare_and_run_benchmark(installer_type, pwd, benchmark_test_case): + benchmark, benchmark_details, proxy_info, env_setup = prepare_ansible_env(benchmark_test_case) + return run_benchmark(installer_type, pwd, benchmark, benchmark_details, + proxy_info, env_setup, benchmark_test_case) diff --git a/qtip/utils/cli.py b/qtip/utils/cli.py new file mode 100644 index 00000000..def70061 --- /dev/null +++ b/qtip/utils/cli.py @@ -0,0 +1,76 @@ +############################################################################## +# Copyright (c) 2015 Dell Inc 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 +############################################################################## + +import sys +import os +import args_handler +import argparse +import logger_utils + +logger = logger_utils.QtipLogger('cli').get + + +class Cli: + + @staticmethod + def _parse_args(args): + parser = argparse.ArgumentParser() + parser.add_argument('-l ', '--lab', required=True, help='Name of Lab ' + 'on which being tested, These can' + 'be found in the test_plan/ directory. Please ' + 'ensure that you have edited the respective files ' + 'before using them. For testing other than through Jenkins' + ' The user should list default after -l . all the fields in' + ' the files are necessary and should be filled') + parser.add_argument('-f', '--file', required=True, help='File in ' + 'benchmarks/suite/ with the list of tests. there are three files' + '\n compute ' + '\n storage ' + '\n network ' + 'They contain all the tests that will be run. They are listed by suite.' + 'Please ensure there are no empty lines') + parser.add_argument('-b', '--benchmark', help='Name of the benchmark.' + 'Can be found in benchmarks/suite/file_name') + + return parser.parse_args(args) + + def __init__(self, args=sys.argv[1:]): + + args = self._parse_args(args) + if not args_handler.check_suite(args.file): + logger.error("ERROR: This suite file %s doesn't exist under benchmarks/suite/.\ + Please enter correct file." % str(args.file)) + sys.exit(1) + + if not args_handler.check_lab_name(args.lab): + logger.error("You have specified a lab that is not present under test_plan/.\ + Please enter correct file. If unsure how to proceed, use -l default.") + sys.exit(1) + suite = args.file + benchmarks = args_handler.get_files_in_suite(suite) + test_cases = args_handler.get_files_in_test_plan(args.lab, suite) + benchmarks_list = filter(lambda x: x in test_cases, benchmarks) + + if args.benchmark: + if not args_handler.check_benchmark_name(args.lab, args.file, args.benchmark): + logger.error("You have specified an incorrect benchmark.\ + Please enter the correct one.") + sys.exit(1) + else: + logger.info("Starting with " + args.benchmark) + args_handler.prepare_and_run_benchmark( + os.environ['INSTALLER_TYPE'], os.environ['PWD'], + args_handler.get_benchmark_path(args.lab.lower(), args.file, args.benchmark)) + else: + map(lambda x: args_handler.prepare_and_run_benchmark( + os.environ['INSTALLER_TYPE'], os.environ['PWD'], + args_handler.get_benchmark_path(args.lab.lower(), suite, x)), benchmarks_list) + + logger.info("{0} is not a Template in the Directory Enter a Valid file name.\ + or use qtip.py -h for list".format(filter(lambda x: x not in test_cases, benchmarks))) diff --git a/qtip/utils/create_zones.py b/qtip/utils/create_zones.py new file mode 100644 index 00000000..5e378c83 --- /dev/null +++ b/qtip/utils/create_zones.py @@ -0,0 +1,86 @@ +############################################################################## +# Copyright (c) 2016 Dell Inc, ZTE 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 keystoneclient.auth.identity import v2 +from keystoneclient import session +from novaclient import client +import os +import random +import logger_utils + +logger = logger_utils.QtipLogger('create_zones').get + + +class AvailabilityZone: + + def __init__(self): + self._keystone_client = None + self._nova_client = None + + def _get_keystone_client(self): + """returns a keystone client instance""" + + if self._keystone_client is None: + ''' + self._keystone_client = keystoneclient.v2_0.client.Client( + auth_url=os.environ.get('OS_AUTH_URL'), + username=os.environ.get('OS_USERNAME'), + password=os.environ.get('OS_PASSWORD'), + tenant_name=os.environ.get('OS_TENANT_NAME')) + ''' + auth = v2.Password(auth_url=os.environ.get('OS_AUTH_URL'), + username=os.environ.get('OS_USERNAME'), + password=os.environ.get('OS_PASSWORD'), + tenant_name=os.environ.get('OS_TENANT_NAME')) + + sess = session.Session(auth=auth) + else: + return self._keystone_client + + return sess + + def _get_nova_client(self): + if self._nova_client is None: + keystone = self._get_keystone_client() + self._nova_client = client.Client('2', session=keystone) + return self._nova_client + + def clean_all_aggregates(self): + logger.info("clean all aggregates") + nova = self._get_nova_client() + agg_list = nova.aggregates.list() + + for agg in agg_list: + agg_info = nova.aggregates.get_details(agg.id) + agg_hosts = agg_info.hosts + if len(agg_hosts): + for host in agg_hosts: + nova.aggregates.remove_host(agg.id, host) + nova.aggregates.delete(agg.id) + + def create_aggs(self, args): + azone_list = list(set(args)) + azone_list.sort() + + nova = self._get_nova_client() + hyper_list = nova.hypervisors.list() + + if len(azone_list) > len(hyper_list): + logger.error("required available zones > compute nodes") + return None + + compute_nodes = map(lambda x: x.service['host'], hyper_list) + sample_nodes = random.sample(compute_nodes, len(azone_list)) + sample_nodes.sort() + + for index, item in enumerate(azone_list): + logger.info("create aggregates: %s" % str(item)) + agg_id = nova.aggregates.create(item, item) + + logger.info("add host: %s" % sample_nodes[index]) + nova.aggregates.add_host(aggregate=agg_id, host=sample_nodes[index]) diff --git a/qtip/utils/dashboard/__init__.py b/qtip/utils/dashboard/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/qtip/utils/dashboard/pushtoDB.py b/qtip/utils/dashboard/pushtoDB.py new file mode 100644 index 00000000..e6a4d239 --- /dev/null +++ b/qtip/utils/dashboard/pushtoDB.py @@ -0,0 +1,66 @@ +import requests +import json +import datetime +import os +import sys +from utils import logger_utils + +logger = logger_utils.QtipLogger('push_db').get + +TEST_DB = 'http://testresults.opnfv.org/test/api/v1' + +suite_list = [('compute_result.json', 'compute_test_suite'), + ('network_result.json', 'network_test_suite'), + ('storage_result.json', 'storage_test_suite')] +payload_list = {} + + +def push_results_to_db(db_url, case_name, payload, installer, pod_name): + + url = db_url + "/results" + creation_date = str(datetime.datetime.utcnow().isoformat()) + + params = {"project_name": "qtip", "case_name": case_name, + "pod_name": pod_name, "installer": installer, "start_date": creation_date, + "version": "test", "details": payload} + + headers = {'Content-Type': 'application/json'} + logger.info('pod_name:{0},installer:{1},creation_data:{2}'.format(pod_name, + installer, + creation_date)) + try: + r = requests.post(url, data=json.dumps(params), headers=headers) + logger.info(r) + return True + except: + logger.info("Error:{0}".format(sys.exc_info()[0])) + return False + + +def populate_payload(suite_list): + + global payload_list + for k, v in suite_list: + + if os.path.isfile('results/' + str(k)): + payload_list[k] = v + + +def main(): + + global payload_list + populate_payload(suite_list) + if payload_list: + logger.info(payload_list) + for suite, case in payload_list.items(): + with open('results/' + suite, 'r') as result_file: + j = json.load(result_file) + push_results_to_db(TEST_DB, case, j, + os.environ['INSTALLER_TYPE'], + os.environ['NODE_NAME']) + elif not payload_list: + logger.info('Results not found') + + +if __name__ == "__main__": + main() diff --git a/qtip/utils/driver.py b/qtip/utils/driver.py new file mode 100644 index 00000000..9894e0f5 --- /dev/null +++ b/qtip/utils/driver.py @@ -0,0 +1,92 @@ +############################################################################## +# Copyright (c) 2015 Dell Inc, ZTE 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 +############################################################################## +import logger_utils +from operator import add +from ansible_api import AnsibleApi +from os.path import expanduser + +logger = logger_utils.QtipLogger('driver').get + + +class Driver: + + def __init__(self): + + logger.info("Class driver initialized\n") + self.installer_username = {'fuel': 'root', + 'joid': 'ubuntu', + 'apex': 'heat-admin'} + + @staticmethod + def merge_two_dicts(x, y): + ''' + It is from http://stackoverflow.com/questions/38987/ + how-can-i-merge-two-python-dictionaries-in-a-single-expression + ''' + z = x.copy() + z.update(y) + return z + + def get_common_var_json(self, installer_type, pwd, benchmark_fname, + benchmark_detail, pip_dict, proxy_info): + common_json = {'Dest_dir': expanduser('~') + '/qtip/results', + 'ip1': '', + 'ip2': '', + 'installer': str(installer_type), + 'workingdir': str(pwd), + 'fname': str(benchmark_fname), + 'username': self.installer_username[str(installer_type)]} + common_json.update(benchmark_detail) if benchmark_detail else None + common_json.update(proxy_info) if proxy_info else None + return common_json + + def get_special_var_json(self, role, roles, benchmark_detail, pip_dict): + special_json = {} + index = roles.index(role) + 1 + private_ip = pip_dict[0][1] if pip_dict[0][1][0] else 'NONE' + map(lambda x: special_json.update({'ip' + str(index): x}), role[1])\ + if benchmark_detail and (role[0] == '1-server') else None + map(lambda x: special_json.update({'privateip' + str(index): private_ip}), role[1])\ + if benchmark_detail and (role[0] == '1-server') else None + special_json = self.get_special_var_json(filter(lambda x: x[0] == '1-server', roles)[0], + roles, + benchmark_detail, + pip_dict) if role[0] == '2-host' else special_json + special_json.update({'role': role[0]}) + return special_json + + def run_ansible_playbook(self, benchmark, extra_vars): + logger.info(extra_vars) + ansible_api = AnsibleApi() + ansible_api.execute_playbook('./config/hosts', + './benchmarks/perftest/{0}.yaml'.format(benchmark), + './config/QtipKey', extra_vars) + return self.get_ansible_result(extra_vars['role'], ansible_api.get_detail_playbook_stats()) + + def drive_bench(self, installer_type, pwd, benchmark, roles, benchmark_fname, + benchmark_detail=None, pip_dict=None, proxy_info=None): + roles = sorted(roles) + pip_dict = sorted(pip_dict) + var_json = self.get_common_var_json(installer_type, pwd, benchmark_fname, + benchmark_detail, pip_dict, proxy_info) + result = map(lambda role: self.run_ansible_playbook + (benchmark, self.merge_two_dicts(var_json, + self.get_special_var_json(role, roles, + benchmark_detail, + pip_dict))), roles) + return reduce(self._merge_ansible_result, result) + + def get_ansible_result(self, role, stats): + result = reduce(add, map(lambda x: x[1]['failures'] + x[1]['unreachable'], stats)) + return {'result': result, + 'detail': {role: stats}} + + def _merge_ansible_result(self, result_1, result_2): + return {'result': result_1['result'] + result_2['result'], + 'detail': self.merge_two_dicts(result_1['detail'], result_2['detail'])} diff --git a/qtip/utils/env_setup.py b/qtip/utils/env_setup.py new file mode 100644 index 00000000..7bbedfcf --- /dev/null +++ b/qtip/utils/env_setup.py @@ -0,0 +1,214 @@ +############################################################################## +# Copyright (c) 2016 Dell Inc, ZTE 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 +############################################################################## +import os +import random +import socket +import sys +import time +from collections import defaultdict +from os.path import expanduser +import paramiko +import yaml +import logger_utils + +logger = logger_utils.QtipLogger('env_setup').get + + +class Env_setup: + + roles_ip_list = [] # ROLE and its corresponding IP address list + ip_pw_list = [] # IP and password, this will be used to ssh + roles_dict = defaultdict(list) + ip_pw_dict = defaultdict(list) + ip_pip_list = [] + vm_parameters = defaultdict(list) + benchmark_details = defaultdict() + benchmark = '' + + def __init__(self): + print '\nParsing class initiated\n' + self.roles_ip_list[:] = [] + self.ip_pw_list[:] = [] + self.roles_dict.clear() + self.ip_pw_dict.clear() + self.ip_pip_list[:] = [] + self.proxy_info = {} + self.vm_parameters.clear() + self.benchmark_details.clear() + self.benchmark = '' + + @staticmethod + def write_to_file(role): + f_name_2 = open('./config/hosts', 'w') + print role.items() + for k in role: + f_name_2.write('[' + k + ']\n') + num = len(role[k]) + for x in range(num): + f_name_2.write(role[k][x] + '\n') + f_name_2.close() + + @staticmethod + def ssh_test(hosts): + for ip, pw in hosts: + logger.info('Beginning SSH Test: %s \n' % ip) + os.system('ssh-keyscan %s >> /root/.ssh/known_hosts' % ip) + time.sleep(2) + + ssh_cmd = './scripts/qtip_creds.sh %s' % ip + logger.info("run command: %s " % ssh_cmd) + os.system(ssh_cmd) + + ssh = paramiko.SSHClient() + ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) + ssh.connect(ip, key_filename='./config/QtipKey') + + for attempts in range(100): + try: + stdin, stdout, stderr = ssh.exec_command('uname') + if not stderr.readlines(): + logger.info('SSH successful') + break + except socket.error: + logger.error('SSH is still unavailable, retry!') + time.sleep(2) + if attempts == 99: + logger.error("Try 99 times, SSH failed: %s" % ip) + + @staticmethod + def ping_test(lister, attempts=30): + for k, v in lister.iteritems(): + time.sleep(10) + for val in v: + ipvar = val + ping_cmd = 'ping -D -c1 {0}'.format(ipvar) + for i in range(attempts): + if os.system(ping_cmd) != 0: + print '\nWaiting for machine\n' + time.sleep(10) + else: + break + print ('\n\n %s is UP \n\n ' % ipvar) + + @staticmethod + def fetch_compute_ips(): + logger.info("Fetch compute ips through installer") + ips = [] + + installer_type = str(os.environ['INSTALLER_TYPE'].lower()) + installer_ip = str(os.environ['INSTALLER_IP']) + if installer_type not in ["fuel", "compass"]: + raise RuntimeError("%s is not supported" % installer_type) + if not installer_ip: + raise RuntimeError("undefine environment variable INSTALLER_IP") + + cmd = "bash ./scripts/fetch_compute_ips.sh -i %s -a %s" % \ + (installer_type, installer_ip) + logger.info(cmd) + os.system(cmd) + with open(expanduser('~') + "/qtip/ips.log", "r") as file: + data = file.read() + if data: + ips.extend(data.rstrip('\n').split('\n')) + logger.info("All compute ips: %s" % ips) + return ips + + def check_machine_ips(self, host_tag): + logger.info("Check machine ips") + ips = self.fetch_compute_ips() + ips_num = len(ips) + num = len(host_tag) + if num > ips_num: + err = "host num %s > compute ips num %s" % (num, ips_num) + raise RuntimeError(err) + + for x in range(num): + hostlabel = 'machine_' + str(x + 1) + if host_tag[hostlabel]['ip']: + if host_tag[hostlabel]['ip'] in ips: + info = "%s's ip %s is defined by test case yaml file" % \ + (hostlabel, host_tag[hostlabel]['ip']) + logger.info(info) + else: + err = "%s is not in %s" % (host_tag[hostlabel]['ip'], ips) + raise RuntimeError(err) + else: + host_tag[hostlabel]['ip'] = random.choice(ips) + info = "assign ip %s to %s" % (host_tag[hostlabel]['ip'], hostlabel) + ips.remove(host_tag[hostlabel]['ip']) + + def get_host_machine_info(self, host_tag): + num = len(host_tag) + offset = len(self.roles_ip_list) + self.check_machine_ips(host_tag) + for x in range(num): + hostlabel = 'machine_' + str(x + 1) + self.roles_ip_list.insert( + offset, (host_tag[hostlabel]['role'], host_tag[hostlabel]['ip'])) + self.ip_pw_list.insert( + offset, (host_tag[hostlabel]['ip'], host_tag[hostlabel]['pw'])) + + def get_virtual_machine_info(self, virtual_tag): + + num = len(virtual_tag) + for x in range(num): + host_label = 'virtualmachine_' + str(x + 1) + for k, v in virtual_tag[host_label].iteritems(): + self.vm_parameters[k].append(v) + + def get_bench_mark_details(self, detail_dic): + + print detail_dic + for k, v in detail_dic.items(): + self.benchmark_details[k] = v + + def parse(self, config_file_path): + try: + f_name = open(config_file_path, 'r+') + doc = yaml.safe_load(f_name) + f_name.close() + if doc['Scenario']['benchmark']: + self.benchmark = doc['Scenario']['benchmark'] + if doc['Context']['Virtual_Machines']: + self.get_virtual_machine_info(doc['Context']['Virtual_Machines']) + if doc['Context']['Host_Machines']: + self.get_host_machine_info(doc['Context']['Host_Machines']) + if doc.get('Scenario', {}).get('benchmark_details', {}): + self.get_bench_mark_details(doc.get('Scenario', {}).get('benchmark_details', {})) + if 'Proxy_Environment' in doc['Context'].keys(): + self.proxy_info['http_proxy'] = doc['Context']['Proxy_Environment']['http_proxy'] + self.proxy_info['https_proxy'] = doc['Context']['Proxy_Environment']['https_proxy'] + self.proxy_info['no_proxy'] = doc['Context']['Proxy_Environment']['no_proxy'] + for k, v in self.roles_ip_list: + self.roles_dict[k].append(v) + for k, v in self.ip_pw_list: + self.ip_pw_dict[k].append(v) + return ( + self.benchmark, + self.vm_parameters, + self.benchmark_details.items(), + self.proxy_info) + except KeyboardInterrupt: + print 'ConfigFile Closed: exiting!' + sys.exit(0) + + def update_ansible(self): + self.write_to_file(self.roles_dict) + + def call_ping_test(self): + self.ping_test(self.roles_dict) + + def call_ssh_test(self): + self.ssh_test(self.ip_pw_list) + + def cleanup_authorized_keys(self): + for ip, pw in self.ip_pw_list: + cmd = './scripts/cleanup_creds.sh %s' % ip + logger.info("cleanup authorized_keys: %s " % cmd) + os.system(cmd) diff --git a/qtip/utils/logger_utils.py b/qtip/utils/logger_utils.py new file mode 100644 index 00000000..e8817c3c --- /dev/null +++ b/qtip/utils/logger_utils.py @@ -0,0 +1,65 @@ +############################################################################## +# Copyright (c) 2016 ZTE Corp 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 +# +# Logging levels: +# Level Numeric value +# CRITICAL 50 +# ERROR 40 +# WARNING 30 +# INFO 20 +# DEBUG 10 +# NOTSET 0 +# +# Usage: +# from utils import logger_utils +# logger = logger_utils.QtipLogger(__file__).get +# logger.info("message to be shown with - INFO - ") +# logger.debug("message to be shown with - DEBUG -") +############################################################################## + +import logging +import os + + +class Logger(object): + file_path = '/var/log' + formatter = logging.Formatter('%(asctime)s - %(name)s - ' + '%(levelname)s - %(message)s') + + def __init__(self, logger_name): + + IF_DEBUG = os.getenv('IF_DEBUG') + + self.logger_name = logger_name + self.logger = logging.getLogger(logger_name) + self.logger.propagate = 0 + self.logger.setLevel(logging.DEBUG) + + ch = logging.StreamHandler() + ch.setFormatter(self.formatter) + if IF_DEBUG is not None and IF_DEBUG.lower() == "true": + ch.setLevel(logging.DEBUG) + else: + ch.setLevel(logging.INFO) + self.logger.addHandler(ch) + + hdlr = logging.FileHandler('%s/%s.log' % (self.file_path, logger_name)) + hdlr.setFormatter(self.formatter) + hdlr.setLevel(logging.DEBUG) + self.logger.addHandler(hdlr) + + @property + def get(self): + return self.logger + + +class QtipLogger(Logger): + file_path = '{}/qtip/logs'.format(os.environ['HOME']) + + def __init__(self, logger_name): + super(QtipLogger, self).__init__(logger_name) diff --git a/qtip/utils/report/Qtip_Report.py b/qtip/utils/report/Qtip_Report.py new file mode 100644 index 00000000..cd20d57c --- /dev/null +++ b/qtip/utils/report/Qtip_Report.py @@ -0,0 +1,108 @@ +from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Image +from reportlab.lib.styles import getSampleStyleSheet +from reportlab.lib.units import inch +from reportlab.lib.pagesizes import letter +import qtip_graph as graph +import get_indices as results +from get_results import report_concat +from get_results import generate_result + + +def dump_result(Stor, directory, testcase): + try: + lower_s = testcase.lower() + Stor.append(Paragraph(testcase, Style['h3'])) + l1 = report_concat(directory, lower_s) + l = 1 + for a in l1: + Stor.append(Paragraph(testcase + " result_" + str(l), Style['h5'])) + raw_string = generate_result(a, 0) + replaced_string = raw_string.replace('\n', '
').replace(' ', ' ') + Stor.append(Paragraph(replaced_string, Style['BodyText'])) + l = l + 1 + except OSError: + print "Results for {0} not found".format(testcase) + +doc = SimpleDocTemplate("../../results/QTIP_results.pdf", pagesize=letter, + rightMargin=72, leftMargin=72, + topMargin=72, bottomMargin=18) +Stor = [] +Style = getSampleStyleSheet() +Title = "QTIP Benchmark Suite" +Stor.append(Paragraph(Title, Style['Title'])) +H1 = "Results" +Stor.append(Spacer(0, 36)) +Stor.append(Paragraph(H1, Style['h2'])) +compute = 0 +storage = 0 +network = 0 +try: + compute = results.get_index('compute_result') +except IOError: + pass + +try: + storage = results.get_index('storage_result') +except IOError: + pass +try: + network = results.get_index('network_result') +except IOError: + pass + +Stor.append(Paragraph("Compute Suite: %f" % compute, Style['h5'])) +Stor.append(Paragraph("Storage Suite: %f" % storage, Style['h5'])) +Stor.append(Paragraph("Network Suite: %f" % network, Style['h5'])) +graph.plot_indices(compute, storage, network) +qtip_graph = ('qtip_graph.jpeg') +im = Image(qtip_graph, 5 * inch, 4 * inch) +Stor.append(im) +Stor.append(Spacer(0, 12)) +Stor.append(Paragraph("Reference POD", Style['h5'])) +ptext = "The Dell OPNFV Lab POD3 has been taken as the reference POD against which the reference results have been collected. The POD consists of 6 identical servers. The details of such a server are:" +Stor.append(Paragraph(ptext, Style['Normal'])) +ptext = "Server Type: Dell PowerEdge R630 Server" +Stor.append(Paragraph(ptext, Style['Bullet'])) +ptext = "CPU: Intel Xeon E5-2698 @ 2300 MHz" +Stor.append(Paragraph(ptext, Style["Bullet"])) +ptext = "RAM: 128GB" +Stor.append(Paragraph(ptext, Style["Bullet"])) +ptext = "Storage SSD: 420GB" +Stor.append(Paragraph(ptext, Style["Bullet"])) +ptext = "Network Card: Intel 2P X520/2P I350 rNDC" +Stor.append(Paragraph(ptext, Style["Bullet"])) +ptext = "Servers interconnected through a DELL S4810 switch using a 10Gbps physical link" +Stor.append(Paragraph(ptext, Style["Bullet"])) +Stor.append(Spacer(0, 12)) +ptext = "For Further Details of the Reference POD hardware, please visit: https://wiki.opnfv.org/reference_pod_hardware_details" +Stor.append(Paragraph(ptext, Style['Normal'])) +Stor.append(Spacer(0, 12)) +ptext = "For Details of the Reference POD Results, please visit: https://wiki.opnfv.org/reference_pod_qtip_results" +Stor.append(Spacer(0, 12)) +Stor.append(Paragraph(ptext, Style['Normal'])) +Stor.append(Paragraph("RAW Results", Style['h1'])) +Stor.append(Paragraph("Compute Results", Style['h2'])) + +dump_result(Stor, "../../results/dhrystone/", "Dhrystone_bm") +dump_result(Stor, "../../results/dhrystone/", "Dhrystone_vm") + +dump_result(Stor, "../../results/whetstone/", "Whetstone_bm") +dump_result(Stor, "../../results/whetstone/", "Whetstone_vm") + +dump_result(Stor, "../../results/ramspeed/", "Ramspeed_bm") +dump_result(Stor, "../../results/ramspeed/", "Ramspeed_vm") + +dump_result(Stor, "../../results/ssl/", "SSL_bm") +dump_result(Stor, "../../results/ssl/", "SSL_vm") + +Stor.append(Paragraph("Network Results", Style['h2'])) +dump_result(Stor, "../../results/iperf/", "IPERF_bm") +dump_result(Stor, "../../results/iperf/", "IPERF_vm") +dump_result(Stor, "../../results/iperf/", "IPERF_vm_2") + +Stor.append(Paragraph("Storage Results", Style['h2'])) +dump_result(Stor, "../../results/fio/", "fio_bm") +dump_result(Stor, "../../results/fio/", "fio_vm") + + +doc.build(Stor) diff --git a/qtip/utils/report/__init__.py b/qtip/utils/report/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/qtip/utils/report/get_indices.py b/qtip/utils/report/get_indices.py new file mode 100644 index 00000000..91219c0b --- /dev/null +++ b/qtip/utils/report/get_indices.py @@ -0,0 +1,8 @@ +import json + + +def get_index(suite): + with open('../../results/' + suite + '.json') as result_file: + result_djson = json.load(result_file) + index = result_djson['index'] + return index diff --git a/qtip/utils/report/get_results.py b/qtip/utils/report/get_results.py new file mode 100644 index 00000000..23fd5383 --- /dev/null +++ b/qtip/utils/report/get_results.py @@ -0,0 +1,50 @@ +import os +import json + + +def report_concat(targ_dir, testcase): + machine_temp = [] + machines = [] + + for file in os.listdir(targ_dir): + if file.endswith(".json"): + machine_temp.append(file) + + l = len(machine_temp) + + for x in range(0, l): + file_t = machine_temp[x] + with open(targ_dir + file_t) as result_file: + result_djson = json.load(result_file) + if result_djson['1 Testcase Name'] == str(testcase): + machines.append(result_djson) + return machines + + +def space_count(l): + spc = '' + for x in range(l): + spc = spc + ' ' + return spc + + +def custom_dict(list1, list2, k): + string_1 = '' + for num_1 in range(0, len(list1)): + string_1 = string_1 + space_count(k) + str(list1[num_1][0]) + "=" + str(list2[num_1]) + "\n" + return string_1 + + +def generate_result(dict_a, k): + list_1 = [] + list_2 = [] + count = 0 + for i, j in sorted(dict_a.iteritems()): + list_1.append([]) + list_1[count].append(i) + if (str(type(dict_a.get(i)))) == "": + list_2.append(str("\n" + generate_result(dict_a.get(i), int(k + 1)))) + else: + list_2.append(dict_a.get(i)) + count = count + 1 + return custom_dict(list_1, list_2, k) diff --git a/qtip/utils/report/qtip_graph.py b/qtip/utils/report/qtip_graph.py new file mode 100644 index 00000000..acbda40c --- /dev/null +++ b/qtip/utils/report/qtip_graph.py @@ -0,0 +1,30 @@ +import matplotlib +import matplotlib.pyplot as plt +import numpy as np + +matplotlib.use('Agg') + + +def plot_indices(a, b, c): + N = 3 + ind = np.arange(N) + y_axis = (a, b, c) + width = 0.35 + f = plt.figure() + ax = f.gca() + ax.set_autoscale_on(True) + my_bars = ax.bar(ind, y_axis, width, color='b') + ax.set_ylabel('Index Score*') + ax.set_xlabel('Suite') + ax.set_title(' QTIP benchmark scores') + ax.axis('on') + my_bars = ax.bar(ind, y_axis, width) + ax.set_xticks(ind + width / 2) + ax.set_xticklabels(['Compute', 'Storage', 'Network']) + ax.axis([0, 3, 0, 1.25]) + f.text(0.7, 0.01, '* With Comparison to Refernece POD', fontsize=9) + + for rect in my_bars: + height = rect.get_height() + ax.text(rect.get_x() + rect.get_width() / 2., 1.05 * height, height, ha='center', va='bottom') + f.savefig('qtip_graph.jpeg') diff --git a/qtip/utils/spawn_vm.py b/qtip/utils/spawn_vm.py new file mode 100644 index 00000000..f38c9a3a --- /dev/null +++ b/qtip/utils/spawn_vm.py @@ -0,0 +1,206 @@ +############################################################################## +# Copyright (c) 2016 Dell Inc, ZTE 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 +############################################################################## +import os +import sys +import yaml +import heatclient.client +import keystoneclient +import time +from env_setup import Env_setup +from create_zones import AvailabilityZone +import logger_utils + +logger = logger_utils.QtipLogger('spawn_vm').get + + +class SpawnVM(Env_setup): + + def __init__(self, vm_info): + logger.info('vm_info: %s' % vm_info) + vm_role_ip_dict = vm_info.copy() + self._keystone_client = None + self._heat_client = None + self._glance_client = None + self._nova_client = None + self.azone = AvailabilityZone() + # TODO: it should clean up aggregates and stack after test case finished. + self.azone.clean_all_aggregates() + self.azone.create_aggs(vm_info['availability_zone']) + self.heat_template = self.generate_heat_template(vm_info) + self.create_stack(vm_role_ip_dict) + + @staticmethod + def get_public_network(): + + """ + TODO: GET THE NAMES OF THE PUBLIC NETWORKS for OTHER PROJECTS + """ + installer = os.environ['INSTALLER_TYPE'] + + if installer.lower() == 'fuel': + return 'admin_floating_net' + if installer.lower() == 'apex': + return 'external' + if installer.lower() == 'compass': + return 'ext-net' + if installer.lower() == 'joid': + return 'ext-net' + + def generate_heat_template(self, vm_params): + logger.info('Generating Heat Template') + heat_dict = {} + try: + with open('./config/SampleHeat.yaml', 'r+') as H_temp: + heat_dict = yaml.safe_load(H_temp) + except yaml.YAMLError as exc: + if hasattr(exc, 'problem_mark'): + mark = exc.problem_mark + logger.error( + 'Error in qtip/config/SampleHeat.yaml at: (%s,%s)' % (mark.line + 1, + mark.column + 1)) + logger.error('EXITING PROGRAM. Correct File and restart') + sys.exit(1) + + fopen = open('./config/QtipKey.pub', 'r') + fopenstr = fopen.read() + fopenstr = fopenstr.rstrip() + scriptcmd = '#!/bin/bash \n echo {0} >> foo.txt \n echo {1} >> /root/.ssh/authorized_keys'.format( + fopenstr, fopenstr) + + netName = self.get_public_network() + heat_dict['heat_template_version'] = '2015-04-30' + + heat_dict['parameters']['public_network'] = { + 'type': 'string', + 'default': netName + } + + for x in range(1, len(vm_params['availability_zone']) + 1): + avail_zone = vm_params['availability_zone'][x - 1] + + heat_dict['parameters']['availability_zone_' + str(x)] = \ + {'description': 'Availability Zone of the instance', + 'default': avail_zone, + 'type': 'string'} + + heat_dict['resources']['public_port_' + str(x)] = \ + {'type': 'OS::Neutron::Port', + 'properties': {'network': {'get_resource': 'network'}, + 'security_groups': [{'get_resource': 'security_group'}], + 'fixed_ips': [{'subnet_id': {'get_resource': 'subnet'}}]}} + + heat_dict['resources']['floating_ip_' + str(x)] = { + 'type': 'OS::Neutron::FloatingIP', + 'properties': {'floating_network': {'get_param': 'external_net_name'}}} + + heat_dict['resources']['floating_ip_assoc_' + str(x)] = { + 'type': 'OS::Neutron::FloatingIPAssociation', + 'properties': { + 'floatingip_id': {'get_resource': 'floating_ip_' + str(x)}, + 'port_id': {'get_resource': 'public_port_' + str(x)}}} + + heat_dict['resources']['my_instance_' + str(x)] = \ + {'type': 'OS::Nova::Server', + 'properties': {'image': {'get_param': 'image'}, + 'networks': + [{'port': {'get_resource': 'public_port_' + str(x)}}], + 'flavor': {'get_resource': 'flavor'}, + 'availability_zone': avail_zone, + 'security_groups': [{'get_resource': 'security_group'}], + 'name': 'instance' + str(x), + 'user_data_format': 'RAW', + 'user_data': scriptcmd}} + + heat_dict['outputs']['instance_PIP_' + str(x)] = { + 'description': 'IP address of the instance', + 'value': {'get_attr': ['my_instance_' + str(x), 'first_address']}} + + heat_dict['outputs']['instance_ip_' + str(x)] = { + 'description': 'IP address of the instance', + 'value': {'get_attr': ['floating_ip_' + str(x), 'floating_ip_address']}} + + heat_dict['outputs']['availability_instance_' + str(x)] = { + 'description': 'Availability Zone of the Instance', + 'value': {'get_param': 'availability_zone_' + str(x)}} + + del heat_dict['outputs']['description'] + logger.info(heat_dict) + + return heat_dict + + def _get_keystone_client(self): + """returns a keystone client instance""" + + if self._keystone_client is None: + self._keystone_client = keystoneclient.v2_0.client.Client( + auth_url=os.environ.get('OS_AUTH_URL'), + username=os.environ.get('OS_USERNAME'), + password=os.environ.get('OS_PASSWORD'), + tenant_name=os.environ.get('OS_TENANT_NAME')) + return self._keystone_client + + def _get_heat_client(self): + """returns a heat client instance""" + if self._heat_client is None: + keystone = self._get_keystone_client() + heat_endpoint = keystone.service_catalog.url_for( + service_type='orchestration') + self._heat_client = heatclient.client.Client( + '1', endpoint=heat_endpoint, token=keystone.auth_token) + return self._heat_client + + def create_stack(self, vm_role_ip_dict): + stackname = 'QTIP' + heat = self._get_heat_client() + + self.delete_stack(stackname) + + logger.info('Start to create stack %s' % stackname) + heat.stacks.create(stack_name=stackname, template=self.heat_template) + + stack_status = "IN_PROGRESS" + while stack_status != 'COMPLETE': + if stack_status == 'IN_PROGRESS': + logger.debug('Create in Progress') + if stack_status == 'CREATE_FAILED': + raise RuntimeError("Stack %s created failed!" % stackname) + stack_status = heat.stacks.get(stackname).status + time.sleep(15) + logger.info('Stack %s Created Complete!' % stackname) + + stack_outputs = heat.stacks.get(stackname).outputs + + for vm in range(len(vm_role_ip_dict['OS_image'])): + for i in stack_outputs: + instanceKey = "instance_ip_" + str(vm + 1) + privateIPkey = 'instance_PIP_' + str(vm + 1) + if i['output_key'] == instanceKey: + Env_setup.roles_dict[vm_role_ip_dict['role'][vm]] \ + .append(str(i['output_value'])) + Env_setup.ip_pw_list.append((str(i['output_value']), '')) + + if i['output_key'] == privateIPkey: + Env_setup.ip_pw_dict[vm_role_ip_dict['role'][vm]] = str(i['output_value']) + + logger.info('Getting Public IP(s): %s' % Env_setup.ip_pw_list) + + def delete_stack(self, stack_name): + heat = self._get_heat_client() + + stacks = heat.stacks.list() + exists = map(lambda x: x.stack_name, stacks) + if stack_name in exists: + logger.info("Delete stack %s" % stack_name) + heat.stacks.delete(stack_name) + while stack_name in exists: + time.sleep(10) + stacks = heat.stacks.list() + exists = map(lambda x: x.stack_name, stacks) + logger.debug("exists_stacks: %s" % exists) + logger.info("%s doesn't exist" % stack_name) diff --git a/qtip/utils/transform/__init__.py b/qtip/utils/transform/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/qtip/utils/transform/dpi_transform.py b/qtip/utils/transform/dpi_transform.py new file mode 100644 index 00000000..ee29d8e2 --- /dev/null +++ b/qtip/utils/transform/dpi_transform.py @@ -0,0 +1,47 @@ +import os +import pickle +import datetime + +sum_dpi_pps = float(0) +sum_dpi_bps = float(0) + +for x in range(1, 11): + dpi_result_pps = float( + os.popen( + "cat $HOME/qtip_result/dpi_dump.txt | grep 'nDPI throughput:' | awk 'NR=='" + + str(x) + + " | awk '{print $3}'").read().lstrip()) + dpi_result_bps = float( + os.popen( + "cat $HOME/qtip_result/dpi_dump.txt | grep 'nDPI throughput:' | awk 'NR=='" + + str(x) + + " | awk '{print $7}'").read().rstrip()) + + if (dpi_result_pps > 100): + dpi_result_pps = dpi_result_pps / 1000 + + if (dpi_result_bps > 100): + dpi_result_bps = dpi_result_bps / 1000 + + sum_dpi_pps += dpi_result_pps + sum_dpi_bps += dpi_result_bps + +dpi_result_pps = sum_dpi_pps / 10 +dpi_result_bps = sum_dpi_bps / 10 + +host = os.popen("hostname").read().rstrip() +log_time_stamp = str(datetime.datetime.utcnow().isoformat()) + +os.popen( + "cat $HOME/qtip_result/dpi_dump.txt > $HOME/qtip_result/" + + host + + "-" + + log_time_stamp + + ".log") + +home_dir = str(os.popen("echo $HOME").read().rstrip()) +host = os.popen("echo $HOSTNAME") +result = {'pps': round(dpi_result_pps, 3), + 'bps': round(dpi_result_bps, 3)} +with open('./result_temp', 'w+') as result_file: + pickle.dump(result, result_file) diff --git a/qtip/utils/transform/final_report.py b/qtip/utils/transform/final_report.py new file mode 100644 index 00000000..274742d4 --- /dev/null +++ b/qtip/utils/transform/final_report.py @@ -0,0 +1,24 @@ +import pickle +import json +import datetime +import os +import sys + +home_dir = str((os.popen("echo $HOME").read().rstrip())) + +with open('./sys_info_temp', 'r') as sys_info_f: + sys_info_dict = pickle.load(sys_info_f) +with open('./result_temp', 'r') as result_f: + result_dict = pickle.load(result_f) + +host_name = (os.popen("hostname").read().rstrip()) +benchmark_name = str(sys.argv[1]) +testcase_name = str(sys.argv[2]) +report_time_stamp = str(datetime.datetime.utcnow().isoformat()) +final_dict = {"name": testcase_name, + "time": report_time_stamp, + "system_information": sys_info_dict, + "details": result_dict} + +with open('./' + host_name + '-' + report_time_stamp + '.json', 'w+') as result_json: + json.dump(final_dict, result_json, indent=4, sort_keys=True) diff --git a/qtip/utils/transform/fio_transform.py b/qtip/utils/transform/fio_transform.py new file mode 100755 index 00000000..5ecac823 --- /dev/null +++ b/qtip/utils/transform/fio_transform.py @@ -0,0 +1,29 @@ +import json +import pickle +import os +import datetime + + +def get_fio_job_result(fio_job_data): + return {'read': {'io_bytes': fio_job_data["read"]["io_bytes"], + 'io_ps': fio_job_data["read"]["iops"], + 'io_runtime_millisec': fio_job_data["read"]["runtime"], + 'mean_io_latenchy_microsec': fio_job_data["read"]["lat"]["mean"]}, + 'write': {'io_bytes': fio_job_data["write"]["io_bytes"], + 'io_ps': fio_job_data["write"]["iops"], + 'io_runtime_millisec': fio_job_data["write"]["runtime"], + 'mean_io_latenchy_microsec': fio_job_data["write"]["lat"]["mean"]}} + + +with open("fio_result.json") as fio_raw: + fio_data = json.load(fio_raw) + +fio_result_dict = {} +for x, result in enumerate(map(get_fio_job_result, fio_data["jobs"])): + fio_result_dict['job_{0}'.format(x)] = result + +host_name = (os.popen("hostname").read().rstrip()) +report_time = str(datetime.datetime.utcnow().isoformat()) +os.system("mv fio_result.json " + str(host_name) + "-" + report_time + ".log") +with open('./result_temp', 'w + ')as out_fio_result: + pickle.dump(fio_result_dict, out_fio_result) diff --git a/qtip/utils/transform/iperf_transform.py b/qtip/utils/transform/iperf_transform.py new file mode 100644 index 00000000..b52e4634 --- /dev/null +++ b/qtip/utils/transform/iperf_transform.py @@ -0,0 +1,27 @@ +import json +import datetime +import pickle +with open('iperf_raw.json', 'r') as ifile: + raw_iperf_data = json.loads(ifile.read().rstrip()) + +bits_sent = raw_iperf_data['end']['sum_sent']['bits_per_second'] +bits_received = raw_iperf_data['end']['sum_received']['bits_per_second'] +total_byte_sent = raw_iperf_data['end']['sum_sent']['bytes'] +total_byte_received = raw_iperf_data['end']['sum_received']['bytes'] +cpu_host_total_percent = raw_iperf_data['end']['cpu_utilization_percent']['host_total'] +cpu_remote_total_percent = raw_iperf_data['end']['cpu_utilization_percent']['remote_total'] + +time_stamp = str(datetime.datetime.utcnow().isoformat()) + +result = {'version': raw_iperf_data['start']['version'], + 'bandwidth': {'sender_throughput': bits_sent, + 'received_throughput': bits_received}, + 'cpu': {'cpu_host': cpu_host_total_percent, + 'cpu_remote': cpu_remote_total_percent} + } + +with open('iperf_raw-' + time_stamp + '.log', 'w+') as ofile: + ofile.write(json.dumps(raw_iperf_data)) + +with open('./result_temp', 'w+') as result_file: + pickle.dump(result, result_file) diff --git a/qtip/utils/transform/ramspeed_transform.py b/qtip/utils/transform/ramspeed_transform.py new file mode 100644 index 00000000..960f84fc --- /dev/null +++ b/qtip/utils/transform/ramspeed_transform.py @@ -0,0 +1,41 @@ +import os +import pickle +import datetime + +intmem_copy = os.popen("cat Intmem | grep 'BatchRun Copy' | awk '{print $4}'").read().rstrip() +intmem_scale = os.popen("cat Intmem | grep 'BatchRun Scale' | awk '{print $4}'").read().rstrip() +intmem_add = os.popen("cat Intmem | grep 'BatchRun Add' | awk '{print $4}'").read().rstrip() +intmem_triad = os.popen("cat Intmem | grep 'BatchRun Triad' | awk '{print $4}'").read().rstrip() +intmem_average = os.popen("cat Intmem | grep 'BatchRun AVERAGE' | awk '{print $4}'").read().rstrip() + +print intmem_copy +print intmem_average + +floatmem_copy = os.popen("cat Floatmem | grep 'BatchRun Copy' | awk '{print $4}'").read().rstrip() +floatmem_scale = os.popen("cat Floatmem | grep 'BatchRun Scale' | awk '{print $4}'").read().rstrip() +floatmem_add = os.popen("cat Floatmem | grep 'BatchRun Add' | awk '{print $4}'").read().rstrip() +floatmem_triad = os.popen("cat Floatmem | grep 'BatchRun Triad' | awk '{print $4}'").read().rstrip() +floatmem_average = os.popen("cat Floatmem | grep 'BatchRun AVERAGE' | awk '{print $4}'").read().rstrip() + +print floatmem_copy +print floatmem_average + +hostname = os.popen("hostname").read().rstrip() +time_stamp = str(datetime.datetime.utcnow().isoformat()) + +os.system("mv Intmem " + hostname + "-" + time_stamp + ".log") +os.system("cp Floatmem >> " + hostname + "-" + time_stamp + ".log") + +result = {"int_bandwidth": {"copy": intmem_copy, + "add": intmem_add, + "scale": intmem_scale, + "triad": intmem_triad, + "average": intmem_average}, + "float_bandwidth": {"copy": floatmem_copy, + "add": floatmem_add, + "scale": floatmem_scale, + "triad": floatmem_triad, + "average": floatmem_average}} + +with open('./result_temp', 'w+') as result_file: + pickle.dump(result, result_file) diff --git a/qtip/utils/transform/ssl_transform.py b/qtip/utils/transform/ssl_transform.py new file mode 100644 index 00000000..de84d24b --- /dev/null +++ b/qtip/utils/transform/ssl_transform.py @@ -0,0 +1,54 @@ +import os +import pickle +import datetime + +openssl_version = os.popen("cat RSA_dump | head -1").read().rstrip() +rsa_512_sps = os.popen( + "cat RSA_dump | grep '512 bits ' | awk '{print $6}' ").read().rstrip() +rsa_512_vps = os.popen( + "cat RSA_dump | grep '512 bits ' | awk '{print $7}' ").read().rstrip() +rsa_1024_sps = os.popen( + "cat RSA_dump | grep '1024 bits ' | awk '{print $6}' ").read().rstrip() +rsa_1024_vps = os.popen( + "cat RSA_dump | grep '1024 bits ' | awk '{print $7}' ").read().rstrip() +rsa_2048_sps = os.popen( + "cat RSA_dump | grep '2048 bits ' | awk '{print $6}' ").read().rstrip() +rsa_2048_vps = os.popen( + "cat RSA_dump | grep '2048 bits ' | awk '{print $7}' ").read().rstrip() +rsa_4096_sps = os.popen( + "cat RSA_dump | grep '4096 bits ' | awk '{print $6}' ").read().rstrip() +rsa_4096_vps = os.popen( + "cat RSA_dump | grep '4096 bits ' | awk '{print $7}' ").read().rstrip() + +aes_16B = os.popen( + "cat AES-128-CBC_dump | grep 'aes-128-cbc ' | awk '{print $2}' ").read().rstrip() +aes_64B = os.popen( + "cat AES-128-CBC_dump | grep 'aes-128-cbc ' | awk '{print $3}' ").read().rstrip() +aes_256B = os.popen( + "cat AES-128-CBC_dump | grep 'aes-128-cbc ' | awk '{print $4}' ").read().rstrip() +aes_1024B = os.popen( + "cat AES-128-CBC_dump | grep 'aes-128-cbc ' | awk '{print $5}' ").read().rstrip() +aes_8192B = os.popen( + "cat AES-128-CBC_dump | grep 'aes-128-cbc ' | awk '{print $6}' ").read().rstrip() + +hostname = os.popen("hostname").read().rstrip() +time_stamp = str(datetime.datetime.utcnow().isoformat()) + +os.system("mv RSA_dump " + hostname + "-" + time_stamp + ".log") +os.system("cat AES-128-CBC_dump >> " + hostname + "-" + time_stamp + ".log") + +result = {"version": [openssl_version], + "rsa_sig": {"512_bits": rsa_512_sps, + "1024_bits": rsa_1024_sps, + "2048_bits": rsa_2048_sps, + "4096_bits": rsa_4096_sps, + "unit": "sig/sec"}, + "aes_128_cbc": {"16B_block": aes_16B, + "64B_block": aes_64B, + "256B_block": aes_256B, + "1024B_block": aes_1024B, + "8192B_block": aes_8192B, + "unit": "B/sec"}} + +with open('./result_temp', 'w+') as result_file: + pickle.dump(result, result_file) diff --git a/qtip/utils/transform/ubench_transform.py b/qtip/utils/transform/ubench_transform.py new file mode 100644 index 00000000..ab5fe171 --- /dev/null +++ b/qtip/utils/transform/ubench_transform.py @@ -0,0 +1,32 @@ +import os +import json +import pickle + +total_cpu = os.popen( + "cat $HOME/tempT/UnixBench/results/* | grep 'of tests' | awk '{print $1;}' | awk 'NR==1'").read().rstrip() + +cpu_1 = os.popen( + "cat $HOME/tempT/UnixBench/results/* | grep 'of tests' | awk '{print $6;}' | awk 'NR==1'").read().rstrip() + + +cpu_2 = os.popen( + "cat $HOME/tempT/UnixBench/results/* | grep 'of tests' | awk '{print $6;}' | awk 'NR==2'").read().rstrip() + + +index_1 = os.popen( + "cat $HOME/tempT/UnixBench/results/* | grep 'Index Score (Partial Only) ' | awk '{print $7;}' | awk 'NR==1'").read().rstrip() +index_2 = os.popen( + "cat $HOME/tempT/UnixBench/results/* | grep 'Index Score (Partial Only) ' | awk '{print $7;}' | awk 'NR==2'").read().rstrip() + + +result = {"n_cpu": total_cpu, + "single": {"n_para_test": cpu_1, + "score": index_1}, + "multi": {"n_para_test": cpu_2, + "score": index_2} + } + +with open('result_temp', 'w+') as result_file: + pickle.dump(result, result_file) +print json.dumps(result, indent=4, sort_keys=True) +# print result.items() diff --git a/restful_server/__init__.py b/restful_server/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/restful_server/db.py b/restful_server/db.py deleted file mode 100644 index 24fc27a5..00000000 --- a/restful_server/db.py +++ /dev/null @@ -1,98 +0,0 @@ -############################################################################## -# Copyright (c) 2016 ZTE Corp 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 datetime import datetime -from operator import add -import uuid - -jobs = {} -threads = {} - - -def create_job(args): - if len(filter(lambda x: jobs[x]['state'] == 'processing', jobs.keys())) > 0: - return None - else: - job = {'job_id': str(uuid.uuid4()), - 'installer_type': args["installer_type"], - 'installer_ip': args["installer_ip"], - 'pod_name': args["pod_name"], - 'suite_name': args["suite_name"], - 'max_minutes': args["max_minutes"], - 'type': args["type"], - 'testdb_url': args["testdb_url"], - 'node_name': args["node_name"], - 'start_time': str(datetime.now()), - 'end_time': None, - 'state': 'processing', - 'state_detail': [], - 'result': None, - 'result_detail': []} - jobs[job['job_id']] = job - return job['job_id'] - - -def delete_job(job_id): - if job_id in threads: - stop_thread(job_id) - if job_id in jobs: - jobs[job_id]['end_time'] = str(datetime.now()) - jobs[job_id]['state'] = 'terminated' - return True - else: - return False - - -def get_job_info(job_id): - if job_id in jobs: - return jobs[job_id] - else: - return None - - -def finish_job(job_id): - jobs[job_id]['end_time'] = str(datetime.now()) - jobs[job_id]['state'] = 'finished' - jobs[job_id]['result'] = reduce(add, map(lambda x: x['result'], - jobs[job_id]['result_detail'])) - del threads[job_id] - - -def update_job_state_detail(job_id, state_detail): - jobs[job_id]['state_detail'] = state_detail - - -def update_job_result_detail(job_id, benchmark, result): - result['benchmark'] = benchmark - jobs[job_id]['result_detail'].append(result) - - -def is_job_timeout(job_id): - period = datetime.now() - datetime.strptime(jobs[job_id]['start_time'], - "%Y-%m-%d %H:%M:%S.%f") - return True if jobs[job_id]['max_minutes'] * 60 < period.total_seconds()\ - else False - - -def start_thread(job_id, thread, thread_stop): - threads[job_id] = {'thread': thread, - 'thread_stop': thread_stop} - thread.start() - - -def stop_thread(job_id): - if threads[job_id]['thread'].isAlive(): - threads[job_id]['thread_stop'].set() - threads[job_id]['thread'].join() - if job_id in threads: - del threads[job_id] - - -def update_benchmark_state(job_id, benchmark, benchmark_state): - filter(lambda x: x["benchmark"] == benchmark, - get_job_info(job_id)["state_detail"])[0]['state'] = benchmark_state diff --git a/restful_server/qtip_server.py b/restful_server/qtip_server.py deleted file mode 100644 index 537b2c05..00000000 --- a/restful_server/qtip_server.py +++ /dev/null @@ -1,206 +0,0 @@ -############################################################################## -# Copyright (c) 2016 ZTE Corp 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, abort -from flask_restful import Api, Resource, fields, reqparse -from flask_restful_swagger import swagger -import threading -from copy import copy -import db -import utils.args_handler as args_handler -import restful_server.result_handler as result_handler - - -app = Flask(__name__) -api = swagger.docs(Api(app), apiVersion='0.1') - - -@swagger.model -class JobModel: - resource_fields = { - 'installer_type': fields.String, - 'installer_ip': fields.String, - 'max_minutes': fields.Integer, - 'pod_name': fields.String, - 'suite_name': fields.String, - 'type': fields.String, - 'benchmark_name': fields.String, - 'testdb_url': fields.String, - 'node_name': fields.String - } - required = ['installer_type', 'installer_ip'] - - -@swagger.model -class JobResponseModel: - resource_fields = { - 'job_id': fields.String - } - - -class Job(Resource): - @swagger.operation( - notes='get a job by ID', - nickname='get', - parameters=[], - responseMessages=[ - { - "code": 200, - "message": "Job detail info." - }, - { - "code": 404, - "message": "Can't not find the job id XXXXXXX" - } - ] - ) - def get(self, id): - ret = db.get_job_info(id) - return ret if ret else abort(404, " Can't not find the job id %s" % id) - - @swagger.operation( - notes='delete a job by ID', - nickname='delete', - parameters=[], - responseMessages=[ - { - "code": 200, - "message": "Delete successfully" - }, - { - "code": 404, - "message": "Can not find job_id XXXXXXXXX" - } - ] - ) - def delete(self, id): - ret = db.delete_job(id) - return {'result': "Delete successfully"} if ret else abort(404, "Can not find job_id %s" % id) - - -class JobList(Resource): - @swagger.operation( - note='create a job with parameters', - nickname='create', - parameters=[ - { - "name": "body", - "description": """ -"installer_type": The installer type, for example fuel, compass.., - -"installer_ip": The installer ip of the pod, - -"max_minutes": If specified, the maximum duration in minutes -for any single test iteration, default is '60', - -"pod_name": If specified, the Pod name, default is 'default', - -"suite_name": If specified, Test suite name, for example 'compute', 'network', 'storage', -default is 'compute', - -"type": BM or VM,default is 'BM', - -"benchmark_name": If specified, benchmark name in suite, for example 'dhrystone_bm.yaml', -default is all benchmarks in suite with specified type, - -"testdb_url": test db http url, for example 'http://testresults.opnfv.org/test/api/v1', - -"node_name": node name reported to test db - """, - "required": True, - "type": "JobModel", - "paramType": "body" - } - ], - type=JobResponseModel.__name__, - responseMessages=[ - { - "code": 200, - "message": "Job submitted" - }, - { - "code": 400, - "message": "Missing configuration data" - }, - { - "code": 409, - "message": "It already has one job running now!" - } - ] - ) - def post(self): - parser = reqparse.RequestParser() - parser.add_argument('installer_type', type=str, required=True, help='installer_type is required') - parser.add_argument('installer_ip', type=str, required=True, help='installer_ip is required') - parser.add_argument('max_minutes', type=int, required=False, default=60, help='max_minutes should be integer') - parser.add_argument('pod_name', type=str, required=False, default='default', help='pod_name should be string') - parser.add_argument('suite_name', type=str, required=False, default='compute', help='suite_name should be string') - parser.add_argument('type', type=str, required=False, default='BM', help='type should be BM, VM and ALL') - parser.add_argument('benchmark_name', type=str, required=False, default='all', help='benchmark_name should be string') - parser.add_argument('testdb_url', type=str, required=False, default=None, - help='testdb_url should be test db http url,for example http://testresults.opnfv.org/test/api/v1') - parser.add_argument('node_name', type=str, required=False, default=None, help='node_name should be string') - args = parser.parse_args() - if not args_handler.check_suite(args["suite_name"]): - return abort(404, 'message:Test suite {0} does not exist under benchmarks/suite'.format(args["suite_name"])) - if not args_handler.check_lab_name(args["pod_name"]): - return abort(404, 'message: You have specified a lab {0}\ - that is not present in test_cases'.format(args['pod_name'])) - - job_id = db.create_job(args) - if not job_id: - return abort(409, 'message:It already has one job running now!') - - benchmarks = args_handler.get_files_in_suite(args["suite_name"], - args["type"].lower()) - test_cases = args_handler.get_files_in_test_case(args["pod_name"], - args["suite_name"], - args["type"].lower()) - benchmarks_list = filter(lambda x: x in test_cases, benchmarks) - if args["benchmark_name"] in benchmarks_list: - benchmarks_list = [args["benchmark_name"]] - if (args["benchmark_name"] is not 'all') and args["benchmark_name"] not in benchmarks_list: - return abort(404, 'message: Benchmark name {0} does not exist in suit {1}'.format(args["benchmark_name"], - args["suite_name"])) - state_detail = map(lambda x: {'benchmark': x, 'state': 'idle'}, benchmarks_list) - db.update_job_state_detail(job_id, copy(state_detail)) - thread_stop = threading.Event() - post_thread = threading.Thread(target=self.thread_post, args=(args["installer_type"], - benchmarks_list, - args["pod_name"], - args["suite_name"], - job_id, - args["testdb_url"], - args["node_name"], - thread_stop)) - db.start_thread(job_id, post_thread, thread_stop) - return {'job_id': str(job_id)} - - def thread_post(self, installer_type, benchmarks_list, pod_name, suite_name, - job_id, testdb_url, node_name, stop_event): - for benchmark in benchmarks_list: - if db.is_job_timeout(job_id) or stop_event.is_set(): - break - db.update_benchmark_state(job_id, benchmark, 'processing') - result = args_handler.prepare_and_run_benchmark(installer_type, - '/home', - args_handler.get_benchmark_path(pod_name, - suite_name, - benchmark)) - db.update_job_result_detail(job_id, benchmark, copy(result)) - db.update_benchmark_state(job_id, benchmark, 'finished') - if (result_handler.dump_suite_result(suite_name) and testdb_url): - result_handler.push_suite_result_to_db(suite_name, testdb_url, installer_type, node_name) - db.finish_job(job_id) - - -api.add_resource(JobList, '/api/v1.0/jobs') -api.add_resource(Job, '/api/v1.0/jobs/') - -if __name__ == "__main__": - app.run(host='0.0.0.0') diff --git a/restful_server/result_handler.py b/restful_server/result_handler.py deleted file mode 100644 index 200330cb..00000000 --- a/restful_server/result_handler.py +++ /dev/null @@ -1,22 +0,0 @@ -############################################################################## -# Copyright (c) 2016 ZTE Corp 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 -############################################################################## -import json -import scripts.ref_results.suite_result as suite_result -import dashboard.pushtoDB as push_to_db - - -def dump_suite_result(suite_name): - return suite_result.get_suite_result(suite_name) - - -def push_suite_result_to_db(suite_name, test_db_url, installer_type, node_name): - with open('results/{0}_result.json'.format(suite_name), 'r') as result_file: - j = json.load(result_file) - push_to_db.push_results_to_db(test_db_url, '{0}_test_suite'.format(suite_name), - j, installer_type, node_name) diff --git a/supporting/servers/ansible.cfg b/supporting/servers/ansible.cfg deleted file mode 100644 index 93022c4e..00000000 --- a/supporting/servers/ansible.cfg +++ /dev/null @@ -1,3 +0,0 @@ -[defaults] -hostfile = inventory -host_key_checking = False \ No newline at end of file diff --git a/supporting/servers/elk.yml b/supporting/servers/elk.yml deleted file mode 100644 index e2696573..00000000 --- a/supporting/servers/elk.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: elk-servers - roles: - - docker - - elk diff --git a/supporting/servers/inventory b/supporting/servers/inventory deleted file mode 100644 index 74c04c42..00000000 --- a/supporting/servers/inventory +++ /dev/null @@ -1,10 +0,0 @@ -qtip-dev ansible_host=qtip.openzero.net - -[elk-servers] -qtip-dev - -[ngnix-servers] -qtip-dev - -[qtip-servers] -qtip-dev diff --git a/supporting/servers/ngnix.yml b/supporting/servers/ngnix.yml deleted file mode 100644 index d57a5603..00000000 --- a/supporting/servers/ngnix.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- hosts: ngnix-servers - roles: - - ngnix diff --git a/supporting/servers/qtip.yml b/supporting/servers/qtip.yml deleted file mode 100644 index f0ac3c4e..00000000 --- a/supporting/servers/qtip.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- hosts: qtip-servers - roles: - - qtip diff --git a/supporting/servers/roles/docker/handlers/main.yml b/supporting/servers/roles/docker/handlers/main.yml deleted file mode 100644 index 985f8d41..00000000 --- a/supporting/servers/roles/docker/handlers/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- name: starting docker service - become: true - service: name=docker state=started diff --git a/supporting/servers/roles/docker/tasks/main.yml b/supporting/servers/roles/docker/tasks/main.yml deleted file mode 100644 index 1cf3bea0..00000000 --- a/supporting/servers/roles/docker/tasks/main.yml +++ /dev/null @@ -1,41 +0,0 @@ -- name: adding keys - become: true - apt_key: keyserver=hkp://p80.pool.sks-keyservers.net id=0X58118E89F3A912897C070ADBF76221572C52609D - -- name: adding entry for ubuntu - become: true - apt_repository: repo='deb https://apt.dockerproject.org/repo ubuntu-xenial main' state=present filename='docker' - when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "16.04" - -- name: installing from docker repo - become: true - shell: apt-cache policy docker-engine - when: ansible_distribution == "Ubuntu" and ansible_distribution_version== "16.04" - -- name: adding entry for ubuntu - become: true - apt_repository: repo='deb https://apt.dockerproject.org/repo ubuntu-trusty main' state=present filename='docker' - when: ansible_distribution == "Ubuntu" and ansible_distribution_version == "14.04" - -- name: updating - become: true - apt: update_cache=yes - -- name: installing docker engine - become: true - apt: name=docker-engine - notify: - - starting docker service - -- name: install pip - become: true - apt: name={{item}} state=installed - with_items: - - python-dev - - python-pip - -- name: install docker-py - become: true - pip: - name: docker-py - version: 1.7.0 diff --git a/supporting/servers/roles/elk/tasks/main.yml b/supporting/servers/roles/elk/tasks/main.yml deleted file mode 100644 index ed987f1a..00000000 --- a/supporting/servers/roles/elk/tasks/main.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -- name: pulling elasticsearch and kibana - become: true - docker_image: name={{ item }} state=present - with_items: - - elasticsearch - - kibana - -- name: setting up elasticsearch - become: true - docker_container: - name: esearch - image: elasticsearch - published_ports: 9200:9200 - -- name: setting up kibana - become: true - docker_container: - name: kibana - image: kibana - published_ports: 5601:5601 - links: esearch:elasticsearch diff --git a/supporting/servers/roles/ngnix/defaults/main.yml b/supporting/servers/roles/ngnix/defaults/main.yml deleted file mode 100644 index cb3b3934..00000000 --- a/supporting/servers/roles/ngnix/defaults/main.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -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/handlers/main.yml b/supporting/servers/roles/ngnix/handlers/main.yml deleted file mode 100644 index 35585363..00000000 --- a/supporting/servers/roles/ngnix/handlers/main.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- name: restart nginx - become: true - service: name=nginx state=restarted diff --git a/supporting/servers/roles/ngnix/tasks/main.yml b/supporting/servers/roles/ngnix/tasks/main.yml deleted file mode 100644 index ec146850..00000000 --- a/supporting/servers/roles/ngnix/tasks/main.yml +++ /dev/null @@ -1,12 +0,0 @@ ---- -- name: nginx is installed - become: true - package: name=nginx state=present -- name: qtip server configuration is generated - become: true - 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/elk.conf.j2 b/supporting/servers/roles/ngnix/templates/elk.conf.j2 deleted file mode 100644 index 271690e0..00000000 --- a/supporting/servers/roles/ngnix/templates/elk.conf.j2 +++ /dev/null @@ -1,14 +0,0 @@ -# {{ ansible_managed }} - -# servers -# -{% for service in services %} -server { - listen 80; - listen 443 ssl; - server_name {{ service.name }}.qtip.openzero.net; - location / { - proxy_pass {{ service.upstream }}; - } -} -{% endfor %} diff --git a/supporting/servers/roles/ngnix/templates/qtip.conf.j2 b/supporting/servers/roles/ngnix/templates/qtip.conf.j2 deleted file mode 100644 index 3a15c6ba..00000000 --- a/supporting/servers/roles/ngnix/templates/qtip.conf.j2 +++ /dev/null @@ -1,17 +0,0 @@ -# {{ 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 deleted file mode 100644 index 0f5cafea..00000000 --- a/supporting/servers/roles/qtip/files/run_qtip_server.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/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 deleted file mode 100644 index b8292791..00000000 --- a/supporting/servers/roles/qtip/tasks/main.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -# TODO:change the script to docker_container. -- name: setting up qtip - become: true - script: ../files/run_qtip_server.sh diff --git a/supporting/servers/roles/ssh/defaults/main.yml b/supporting/servers/roles/ssh/defaults/main.yml deleted file mode 100644 index 41ee9853..00000000 --- a/supporting/servers/roles/ssh/defaults/main.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -users: - - { name: yujunz, comment: "Yujun Zhang " } - - { name: taseer, comment: "Taseer Ahmed " } - - { name: serena, comment: "Serena Feng " } - - { name: zhifeng, comment: "Zhifeng Jiang" } diff --git a/supporting/servers/roles/ssh/files/serena.authorized_keys b/supporting/servers/roles/ssh/files/serena.authorized_keys deleted file mode 100644 index 5cdbfe00..00000000 --- a/supporting/servers/roles/ssh/files/serena.authorized_keys +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDYlLrMOPxwLNQvLpxXVLYXQCxNkaKfVWt7u9k+6T0SU7VNuT8e1VoTk6b/iVWyXQ4j1hW4sNroTucqZjl+8V2z2nYgpEMIy6jBuehlKP2LJ9v/p98/OBVVxgEnRJGzFYIeO/GKBLMaUu43OkCO2Ef67qKeISeNP5/ewUR12YCUHQg5GkGYnDL3fFd7SiVDkYPEXQvHfi85beGOuPwDTjbKoKbF9WATIIzJSPUmslGjFRpKqM8AQLGWEyTeklU7H4ddRqaKxe6DGbpTLJM2rCMF8W91097nmiOKEnuxi6vJKTmyX81BZXi48ugCRh3942ONYRH8W7dBegrvRY3kyAtH root@gsmdev-VirtualBox diff --git a/supporting/servers/roles/ssh/files/taseer.authorized_keys b/supporting/servers/roles/ssh/files/taseer.authorized_keys deleted file mode 100644 index 2efb95e8..00000000 --- a/supporting/servers/roles/ssh/files/taseer.authorized_keys +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDCxCG9Z+8rBLQiJ9yt+RzRkAZZQIlou83e899Kkuf/UgXd+1TUgIu4AJUDvayrorTxk2kw7ra+DoysEa2NBkLL6FNnG+NpYV+XTaG+Z3tvp4l62ROV+5+O4soiWtBroRghQPDkrpiTQuFJ7/BKQt9bKZYPb3t2bxCLeFVWtUzCpFDIj6wDPGwDeTLnLMPtQNQtIlgPV+XGAet17rNSrm7EcDzqdDQcdZFmfeH5YvBsY9ZO+qwcbelEpMBWPsyEMU6OgwTqUj7mm3o+Quew35y13Zrhf+GAx5ZMXho/Cpjp1TzognDkwAFpFzZG7zWSNexXrD15Wzgyae2cl/vD75I7 taseer@123.org \ No newline at end of file diff --git a/supporting/servers/roles/ssh/files/yujunz.authorized_keys b/supporting/servers/roles/ssh/files/yujunz.authorized_keys deleted file mode 100644 index 83ed540d..00000000 --- a/supporting/servers/roles/ssh/files/yujunz.authorized_keys +++ /dev/null @@ -1,3 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC0o+WARhbI5DeZK9eiZKVprY3oQ910npo/EPFI9prfpN7zeF0UA4TwT9rqsrwFgRQeJkKvbDTOPt5Ox9vLIEnxT4PdirvrYNxtyJHHfbL4ZxKemYhBi2BA6CAbI3f9CR+dtbfOBxtTpXAj1Y5oA9y59o1hqHpuVmM8dBpcQt/ELdYCHZ0khxft5WaSOURsslTZN18bikVX9WHlKflVyRA8efxqzTZ4w5ufHl1Fv9i/G0u7iGbUtvlI8X7+Z+ePuysZhHKErQSGfv2NybDi+r8xM5hL2LYXxjAu0PV58olUl1SX40OY9yA2Yx+PVzIGhv6EQ8snUFnsoMy0ZIbQ+ysB yujunz@silver.mbp -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDs9VhmmGg0c7FTLMtoZlPue4N1DdSCh6r6YssmEY3e1GHPXJTGGTX7QKXEBlWd7EXq+uedwN+lU9C/FClwneP0M+4vprgqdmUcmlCoSI/RffQAymcuGbxvfptNcLpBApHn4C+e93H/5ryaypaG+6n8WtbDZDtvWgn2ZJY6hDdJSw6Y++C+zDI0QliTsrCHmnGnYcRuDWUNgaiERvW3cvpeF5duFJcDZ0NtMl2UjeGMYL0JU6YfIOIeeFwD0Su86Nf3RtoKF+RzO4LcrGLvywzM7C/iCncIdj6GZjpVBYnB5U6YUh8VqLjHVHjmjTpAjmsWcc8NnwNG9rHDbG6nrGWd yujunz@silver - diff --git a/supporting/servers/roles/ssh/files/zhifeng.authorized_keys b/supporting/servers/roles/ssh/files/zhifeng.authorized_keys deleted file mode 100644 index 195cfdca..00000000 --- a/supporting/servers/roles/ssh/files/zhifeng.authorized_keys +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAuck9a5uUXLtzlTaCYhwcLDffFH8o5ldhU4iKr0D4KaXlFfUsKD7VyHN+Zck3HBWTB4U7X9FEeFINtp2v2aoY8n74TS4LUGT8yqRYLyvsh2LgrhE4ouRvYgWlrZGice2x6ZZrcGM4uoGTC/lUHEvMDGDkDxUCfhxlFWcrplCUMcgd1V/5U14s0ufDgLGyEhXWWXFW4pNoqKBEGZNChBSvnq+NvOD7I4jgStUm9REooOp/VPpubH/6mSvDSTokCvrgWSCaNpcDqLCUjhwpoT/D1oFzEd4jBfPSV3jva+eAKPE2r/dnudQR5NR8T/eUz25YRGeJfrjDP6cMgXJoG43IXQ== root@fuel.domain.tld diff --git a/supporting/servers/roles/ssh/tasks/main.yml b/supporting/servers/roles/ssh/tasks/main.yml deleted file mode 100644 index 7de1e208..00000000 --- a/supporting/servers/roles/ssh/tasks/main.yml +++ /dev/null @@ -1,26 +0,0 @@ -- name: add users for ssh access - become: true - user: - name: "{{ item.name }}" - comment: "{{ item.comment }}" - groups: "qtip" - append: yes - with_items: "{{ users }}" -- name: create .ssh directory - become: true - file: - path: "/home/{{ item.name }}/.ssh" - state: directory - owner: "{{ item.name }}" - group: "{{ item.name }}" - mode: 0700 - with_items: "{{ users }}" -- name: authorize public key - become: true - copy: - src: "{{ item.name }}.authorized_keys" - dest: "/home/{{ item.name }}/.ssh/authorized_keys" - owner: "{{ item.name }}" - group: "{{ item.name }}" - mode: 0600 - with_items: "{{ users }}" \ No newline at end of file diff --git a/supporting/servers/ssh.yml b/supporting/servers/ssh.yml deleted file mode 100644 index bd74ab3b..00000000 --- a/supporting/servers/ssh.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- hosts: elk-servers - roles: - - ssh diff --git a/test_plan/default/compute/dhrystone_bm.yaml b/test_plan/default/compute/dhrystone_bm.yaml deleted file mode 100644 index 64741537..00000000 --- a/test_plan/default/compute/dhrystone_bm.yaml +++ /dev/null @@ -1,33 +0,0 @@ - -Scenario: - benchmark: dhrystone - host: machine_1, machine_2 - server: - -Context: - Host_Machines: - machine_1: - ip: - pw: - role: host - machine_2: - ip: - pw: - role: host - - Virtual_Machines: - - -Test_Description: - Test_category: "Compute" - Benchmark: "dhrystone" - Overview: > - ''' This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n - if you wish to add a virtual machine add the following information under the Virtual_Machine tag - - virtualmachine_1: - availability_zone: - public_network: - OS_image: - flavor: - role: ''' diff --git a/test_plan/default/compute/dhrystone_vm.yaml b/test_plan/default/compute/dhrystone_vm.yaml deleted file mode 100644 index 8f5a4165..00000000 --- a/test_plan/default/compute/dhrystone_vm.yaml +++ /dev/null @@ -1,45 +0,0 @@ -Scenario: - benchmark: dhrystone - host: virtualmachine_1, virtualmachine_2 - server: blakc - -Context: - Host_Machines: - - Virtual_Machines: - virtualmachine_1: - availability_zone: compute1 - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - virtualmachine_2: - availability_zone: compute2 - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - -Test_Description: - Test_category: "Compute" - Benchmark: "dhrystone" - Overview: > - '''This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n - if you wish to add a virtual machine add the following information under the Virtual_Machine tag - machine_1: - ip: 172.18.0.16 - pw: Op3nStack - role: host - machine_2: - ip: 172.18.0.15 - pw: Op3nStack - role: host - - virtualmachine_1: - availability_zone: - public_network: - OS_image: - flavor: - role: - ''' - diff --git a/test_plan/default/compute/dpi_bm.yaml b/test_plan/default/compute/dpi_bm.yaml deleted file mode 100644 index 14cb6d0d..00000000 --- a/test_plan/default/compute/dpi_bm.yaml +++ /dev/null @@ -1,34 +0,0 @@ -Scenario: - benchmark: dpi - host: machine_1,machine_2 - -Context: - Host_Machines: - machine_1: - ip: - pw: - role: host - machine_2: - ip: - pw: - role: host - Virtual_Machines: -Test_Description: - Test_category: "Compute" - Benchmark: "dpi" - Overview: > - '''This test will run the DPI benchmark in serial on virutalmachine_1 and virtualmachine_2.\n - if you wish to add a host machine add the following information under the Host_Machine tag - virtualmachine_2: - availability_zone: compute1 - OS_image: QTIP_CentOS - public_network: 'provider_network' - - role: 1host - flavor: m1.large - machine_1: - ip: - pw: - role: - ''' - diff --git a/test_plan/default/compute/dpi_vm.yaml b/test_plan/default/compute/dpi_vm.yaml deleted file mode 100644 index 10e86993..00000000 --- a/test_plan/default/compute/dpi_vm.yaml +++ /dev/null @@ -1,35 +0,0 @@ -Scenario: - benchmark: dpi - 1Run : virtualmachine_1, virtualmachine_2 - -Context: - Host_Machines: - - - Virtual_Machines: - virtualmachine_1: - availability_zone: compute1 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 1Run - flavor: m1.large - virtualmachine_2: - availability_zone: compute2 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 1Run - flavor: m1.large - -Test_Description: - Test_category: "Compute" - Benchmark: "dpi" - Overview: > - '''This test will run the DPI benchmark in parallel on virutalmachine_1 and virtualmachine_2.\n - if you wish to add a host machine add the following information under the Host_Machine tag - - machine_1: - ip: - pw: - role: - ''' - diff --git a/test_plan/default/compute/ramspeed_bm.yaml b/test_plan/default/compute/ramspeed_bm.yaml deleted file mode 100644 index ed8fc700..00000000 --- a/test_plan/default/compute/ramspeed_bm.yaml +++ /dev/null @@ -1,34 +0,0 @@ -Scenario: - benchmark: ramspeed - host: machine_1, machine_2 - server: - -Context: - Host_Machines: - machine_1: - ip: - pw: - role: host - machine_2: - ip: - pw: - role: host - - Virtual_Machines: - - -Test_Description: - Test_category: "Compute" - Benchmark: "dhrystone" - Overview: > - ''' This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n - if you wish to add a virtual machine add the following information under the Virtual_Machine tag - - virtualmachine_1: - availability_zone: - public_network: - OS_image: - flavor: - role: ''' - - diff --git a/test_plan/default/compute/ramspeed_vm.yaml b/test_plan/default/compute/ramspeed_vm.yaml deleted file mode 100644 index a6a4363f..00000000 --- a/test_plan/default/compute/ramspeed_vm.yaml +++ /dev/null @@ -1,45 +0,0 @@ -Scenario: - benchmark: ramspeed - host: virtualmachine_1, virtualmachine_2 - server: blakc - -Context: - Host_Machines: - - Virtual_Machines: - virtualmachine_1: - availability_zone: compute1 - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - virtualmachine_2: - availability_zone: compute2 - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - -Test_Description: - Test_category: "Compute" - Benchmark: "dhrystone" - Overview: > - '''This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n - if you wish to add a virtual machine add the following information under the Virtual_Machine tag - machine_1: - ip: 172.18.0.16 - pw: Op3nStack - role: host - machine_2: - ip: 172.18.0.15 - pw: Op3nStack - role: host - - virtualmachine_1: - availability_zone: - public_network: - OS_image: - flavor: - role: - ''' - diff --git a/test_plan/default/compute/ssl_bm.yaml b/test_plan/default/compute/ssl_bm.yaml deleted file mode 100644 index cc5a8903..00000000 --- a/test_plan/default/compute/ssl_bm.yaml +++ /dev/null @@ -1,31 +0,0 @@ -Scenario: - benchmark: ssl - host: machine_1,machine_2 - -Context: - Host_Machines: - machine_1: - ip: - pw: - role: host - machine_2: - ip: - pw: - role: host - Virtual_Machines: - - -Test_Description: - Test_category: "Compute" - Benchmark: "ssl" - Overview: > - '''This test will run the SSL benchmark in parallel on machine_1 and machine_1. - If you wish to add a virtual machine add the following information under the Virtual_Machine tag - - virtualmachine_1: - availability_zone: - public_network: - OS_image: - flavor: - role: - ''' diff --git a/test_plan/default/compute/ssl_vm.yaml b/test_plan/default/compute/ssl_vm.yaml deleted file mode 100644 index 37824896..00000000 --- a/test_plan/default/compute/ssl_vm.yaml +++ /dev/null @@ -1,36 +0,0 @@ -Scenario: - benchmark: ssl - host: virtualmachine_1, virtualmachine_2 - -Context: - Host_Machines: - - Virtual_Machines: - virtualmachine_1: - availability_zone: compute1 - public_network: 'net04_ext' - OS_image: 'QTIP_CentOS' - flavor: 'm1.large' - role: host - virtualmachine_2: - availability_zone: compute2 - public_network: 'net04_ext' - OS_image: 'QTIP_CentOS' - flavor: 'm1.large' - role: host - - -Test_Description: - Test_category: "Compute" - Benchmark: "ssl" - Overview: > - '''This test will run the SSL benchmark in parallel on virtualmachine_1 and machine_1.\n - if you wish to add a virtual machine add the following information under the Virtual_Machine tag - - virtualmachine_1: - availability_zone: - public_network: - OS_image: - flavor: - role: - ''' diff --git a/test_plan/default/compute/whetstone_bm.yaml b/test_plan/default/compute/whetstone_bm.yaml deleted file mode 100644 index 3c128b60..00000000 --- a/test_plan/default/compute/whetstone_bm.yaml +++ /dev/null @@ -1,33 +0,0 @@ -Scenario: - benchmark: whetstone - host: machine_1, machine_2 - - -Context: - Host_Machines: - machine_1: - ip: - pw: - role: host - machine_2: - ip: - pw: - role: host - Virtual_Machines: - - - -Test_Description: - Test_category: "Compute" - Benchmark: "whetstone" - Overview: > - ''' This test will run the whetstone benchmark in parallel on machine_1 and machine_2.\n - if you wish to add a baremetal machine add the following information under the Virtual_Machine tag - - machine_3: - ip: - pw: - role: - ''' - - diff --git a/test_plan/default/compute/whetstone_vm.yaml b/test_plan/default/compute/whetstone_vm.yaml deleted file mode 100644 index 0f1e8748..00000000 --- a/test_plan/default/compute/whetstone_vm.yaml +++ /dev/null @@ -1,44 +0,0 @@ -Scenario: - benchmark: whetstone - host: virtualmachine_1, virtualmachine_1 - server: - -Context: - Host_Machines: - - Virtual_Machines: - virtualmachine_1: - availability_zone: compute1 - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - virtualmachine_2: - availability_zone: compute2 - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - - -Test_Description: - Test_category: "Compute" - Benchmark: "dhrystone" - Overview: > - '''This test will run the whetstone benchmark in parallel on machine_1 and machine_2.\n - if you wish to add a virtual machine add the following information under the Virtual_Machine tag - virtualmachine_1: - availability_zone: nova - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - - virtualmachine_1: - availability_zone: - public_network: - OS_image: - flavor: - role: - ''' - diff --git a/test_plan/default/network/iperf_bm.yaml b/test_plan/default/network/iperf_bm.yaml deleted file mode 100644 index 3aa8310d..00000000 --- a/test_plan/default/network/iperf_bm.yaml +++ /dev/null @@ -1,50 +0,0 @@ -Scenario: - benchmark: iperf - topology: Client and Server on different baremetal Compute nodes - server: machine_1 - client: machine_2 - benchmark_details: - duration: 20 - protocol: tcp - bandwidthGbps: 10 - -Context: - Host_Machines: - machine_1: - ip: - pw: - role: 1-server - machine_2: - ip: - pw: - role: 2-host - - Virtual_Machines: - -Test_Description: - Test_category: "network" - Benchmark: "iperf" - Overview: > - '''This test will run the IPERF benchmark on virutalmachine_1 and virtualmachine_2. On the\n - same compute node - if you wish to add a host machine add the following information under the Host_Machine tag - virtualmachine_1: - availability_zone: compute1 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 1-server - flavor: m1.large - - virtualmachine_2: - availability_zone: compute2 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 2-host - flavor: m1.large - - machine_1: - ip: - pw: - role: - ''' - diff --git a/test_plan/default/network/iperf_vm.yaml b/test_plan/default/network/iperf_vm.yaml deleted file mode 100644 index 49bf13ad..00000000 --- a/test_plan/default/network/iperf_vm.yaml +++ /dev/null @@ -1,43 +0,0 @@ -Scenario: - benchmark: iperf - topology: Client and Server on ONE compute - server : virtualmachine_1 - client: virtualmachine_2 - description: 'Leave the bandwidth as 0 to throttle maximum traffic' - benchmark_details: - duration: 20 - protocol: tcp - bandwidthGbps: 0 - -Context: - Host_Machines: - - Virtual_Machines: - virtualmachine_1: - availability_zone: compute1 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 1-server - flavor: m1.large - - virtualmachine_2: - availability_zone: compute1 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 2-host - flavor: m1.large - -Test_Description: - Test_category: "network" - Benchmark: "iperf" - Overview: > - '''This test will run the IPERF benchmark on virutalmachine_1 and virtualmachine_2. On the\n - same compute node - if you wish to add a host machine add the following information under the Host_Machine tag - - machine_1: - ip: - pw: - role: - ''' - diff --git a/test_plan/default/network/iperf_vm_2.yaml b/test_plan/default/network/iperf_vm_2.yaml deleted file mode 100644 index c5b94715..00000000 --- a/test_plan/default/network/iperf_vm_2.yaml +++ /dev/null @@ -1,44 +0,0 @@ -Scenario: - benchmark: iperf - topology: Client and Server on two different compute nodes - server : virtualmachine_1 - client: virtualmachine_2 - description: 'Leave the bandwidth as 0 to throttle maximum traffic' - benchmark_details: - duration: 20 - protocol: tcp - bandwidthGbps: 0 - -Context: - Host_Machines: - - - Virtual_Machines: - virtualmachine_1: - availability_zone: compute1 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 1-server - flavor: m1.large - - virtualmachine_2: - availability_zone: compute2 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 2-host - flavor: m1.large - -Test_Description: - Test_category: "network" - Benchmark: "iperf" - Overview: > - '''This test will run the IPERF benchmark on virutalmachine_1 and virtualmachine_2. On the\n - same compute node - if you wish to add a host machine add the following information under the Host_Machine tag - - machine_1: - ip: - pw: - role: - ''' - diff --git a/test_plan/default/storage/fio_bm.yaml b/test_plan/default/storage/fio_bm.yaml deleted file mode 100644 index d0001ea2..00000000 --- a/test_plan/default/storage/fio_bm.yaml +++ /dev/null @@ -1,39 +0,0 @@ -Scenario: - benchmark: fio - host: machine_1, machine_2 - server: - -Context: - Host_Machines: - machine_1: - ip: - pw: - role: host - machine_2: - ip: - pw: - role: host - - - Virtual_Machines: - - -Test_Description: - Test_category: "Storage" - Benchmark: "FIO" - Overview: > - '''This test will run the FIO benchmark in parallel on host machines "machine_1" and "machine_2".\n - The fio job specifications can be found in qtip/benchmarks/fio_jobs/test_job. - The job conists of an fio load of: - 1.50% rand read 50% rand write - 2.Asynch engine - 3.Direct IO. - 4.Queing depth of 2 - - if you wish to add another machine add the following information under the Host_Machines tag - machine_3: - ip: 172.18.0.16 - pw: Op3nStack - role: host - ''' - diff --git a/test_plan/default/storage/fio_vm.yaml b/test_plan/default/storage/fio_vm.yaml deleted file mode 100644 index 0e7f121b..00000000 --- a/test_plan/default/storage/fio_vm.yaml +++ /dev/null @@ -1,44 +0,0 @@ -Scenario: - benchmark: fio - host: virtualmachine_1, virtualmachine_2 - server: - -Context: - Host_Machines: - - Virtual_Machines: - virtualmachine_1: - availability_zone: compute1 - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - virtualmachine_2: - availability_zone: compute2 - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - -Test_Description: - Test_category: "Storage" - Benchmark: "FIO" - Overview: > - '''This test will run the FIO benchmark in parallel on virtualmachine_1 and virtualmachine_2.\n - The fio job specifications can be found in qtip/benchmarks/fio_jobs/test_job. - The job conists of an fio load of: - 1.50% rand read 50% rand write - 2.Asynch engine - 3.Direct IO. - 4.Queing depth of 2 - - if you wish to add a virtual machine add the following information under the Virtual_Machine tag - - virtualmachine_3: - availability_zone: - public_network: - OS_image: - flavor: - role: - ''' - diff --git a/test_plan/dell-pod1/compute/dhrystone_bm.yaml b/test_plan/dell-pod1/compute/dhrystone_bm.yaml deleted file mode 100644 index 2f8d0ec9..00000000 --- a/test_plan/dell-pod1/compute/dhrystone_bm.yaml +++ /dev/null @@ -1,35 +0,0 @@ - -Scenario: - benchmark: dhrystone - host: machine_1, machine_2 - server: - -Context: - Host_Machines: - machine_1: - ip: 172.16.1.4 - pw: - role: host - machine_2: - ip: 172.16.1.5 - pw: - role: host - - Virtual_Machines: - - -Test_Description: - Test_category: "Compute" - Benchmark: "dhrystone" - Overview: > - ''' This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n - if you wish to add a virtual machine add the following information under the Virtual_Machine tag - - virtualmachine_1: - availability_zone: - public_network: - OS_image: - flavor: - role: ''' - - diff --git a/test_plan/dell-pod1/compute/dhrystone_vm.yaml b/test_plan/dell-pod1/compute/dhrystone_vm.yaml deleted file mode 100644 index 8f5a4165..00000000 --- a/test_plan/dell-pod1/compute/dhrystone_vm.yaml +++ /dev/null @@ -1,45 +0,0 @@ -Scenario: - benchmark: dhrystone - host: virtualmachine_1, virtualmachine_2 - server: blakc - -Context: - Host_Machines: - - Virtual_Machines: - virtualmachine_1: - availability_zone: compute1 - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - virtualmachine_2: - availability_zone: compute2 - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - -Test_Description: - Test_category: "Compute" - Benchmark: "dhrystone" - Overview: > - '''This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n - if you wish to add a virtual machine add the following information under the Virtual_Machine tag - machine_1: - ip: 172.18.0.16 - pw: Op3nStack - role: host - machine_2: - ip: 172.18.0.15 - pw: Op3nStack - role: host - - virtualmachine_1: - availability_zone: - public_network: - OS_image: - flavor: - role: - ''' - diff --git a/test_plan/dell-pod1/compute/dpi_bm.yaml b/test_plan/dell-pod1/compute/dpi_bm.yaml deleted file mode 100644 index 45324184..00000000 --- a/test_plan/dell-pod1/compute/dpi_bm.yaml +++ /dev/null @@ -1,34 +0,0 @@ -Scenario: - benchmark: dpi - host: machine_1,machine_2 - -Context: - Host_Machines: - machine_1: - ip: 172.16.1.4 - pw: - role: 1host - machine_2: - ip: 172.16.1.5 - pw: - role: 1host - Virtual_Machines: -Test_Description: - Test_category: "Compute" - Benchmark: "dpi" - Overview: > - '''This test will run the DPI benchmark in serial on virutalmachine_1 and virtualmachine_2.\n - if you wish to add a host machine add the following information under the Host_Machine tag - virtualmachine_2: - availability_zone: compute1 - OS_image: QTIP_CentOS - public_network: 'provider_network' - - role: 1host - flavor: m1.large - machine_1: - ip: - pw: - role: - ''' - diff --git a/test_plan/dell-pod1/compute/dpi_vm.yaml b/test_plan/dell-pod1/compute/dpi_vm.yaml deleted file mode 100644 index 8a157e7a..00000000 --- a/test_plan/dell-pod1/compute/dpi_vm.yaml +++ /dev/null @@ -1,35 +0,0 @@ -Scenario: - benchmark: dpi - 1Run : virtualmachine_1, virtualmachine_2 - -Context: - Host_Machines: - - - Virtual_Machines: - virtualmachine_1: - availability_zone: compute1 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 1Run - flavor: m1.large - virtualmachine_2: - availability_zone: compute4 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 1Run - flavor: m1.large - -Test_Description: - Test_category: "Compute" - Benchmark: "dpi" - Overview: > - '''This test will run the DPI benchmark in parallel on virutalmachine_1 and virtualmachine_2.\n - if you wish to add a host machine add the following information under the Host_Machine tag - - machine_1: - ip: - pw: - role: - ''' - diff --git a/test_plan/dell-pod1/compute/ramspeed_bm.yaml b/test_plan/dell-pod1/compute/ramspeed_bm.yaml deleted file mode 100644 index af220b80..00000000 --- a/test_plan/dell-pod1/compute/ramspeed_bm.yaml +++ /dev/null @@ -1,35 +0,0 @@ - -Scenario: - benchmark: ramspeed - host: machine_1, machine_2 - server: - -Context: - Host_Machines: - machine_1: - ip: 172.16.1.4 - pw: - role: host - machine_2: - ip: 172.16.1.5 - pw: - role: host - - Virtual_Machines: - - -Test_Description: - Test_category: "Compute" - Benchmark: "dhrystone" - Overview: > - ''' This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n - if you wish to add a virtual machine add the following information under the Virtual_Machine tag - - virtualmachine_1: - availability_zone: - public_network: - OS_image: - flavor: - role: ''' - - diff --git a/test_plan/dell-pod1/compute/ramspeed_vm.yaml b/test_plan/dell-pod1/compute/ramspeed_vm.yaml deleted file mode 100644 index a6a4363f..00000000 --- a/test_plan/dell-pod1/compute/ramspeed_vm.yaml +++ /dev/null @@ -1,45 +0,0 @@ -Scenario: - benchmark: ramspeed - host: virtualmachine_1, virtualmachine_2 - server: blakc - -Context: - Host_Machines: - - Virtual_Machines: - virtualmachine_1: - availability_zone: compute1 - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - virtualmachine_2: - availability_zone: compute2 - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - -Test_Description: - Test_category: "Compute" - Benchmark: "dhrystone" - Overview: > - '''This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n - if you wish to add a virtual machine add the following information under the Virtual_Machine tag - machine_1: - ip: 172.18.0.16 - pw: Op3nStack - role: host - machine_2: - ip: 172.18.0.15 - pw: Op3nStack - role: host - - virtualmachine_1: - availability_zone: - public_network: - OS_image: - flavor: - role: - ''' - diff --git a/test_plan/dell-pod1/compute/ssl_bm.yaml b/test_plan/dell-pod1/compute/ssl_bm.yaml deleted file mode 100644 index 6b14c4e6..00000000 --- a/test_plan/dell-pod1/compute/ssl_bm.yaml +++ /dev/null @@ -1,31 +0,0 @@ -Scenario: - benchmark: ssl - 1Run: machine_1,machine_2 - -Context: - Host_Machines: - machine_1: - ip: 172.16.1.4 - pw: - role: 1Run - machine_2: - ip: 172.16.1.5 - pw: - role: 1Run - Virtual_Machines: - - -Test_Description: - Test_category: "Compute" - Benchmark: "ssl" - Overview: > - '''This test will run the SSL benchmark in parallel on machine_1 and machine_1. - If you wish to add a virtual machine add the following information under the Virtual_Machine tag - - virtualmachine_1: - availability_zone: - public_network: - OS_image: - flavor: - role: - ''' diff --git a/test_plan/dell-pod1/compute/ssl_vm.yaml b/test_plan/dell-pod1/compute/ssl_vm.yaml deleted file mode 100644 index 37824896..00000000 --- a/test_plan/dell-pod1/compute/ssl_vm.yaml +++ /dev/null @@ -1,36 +0,0 @@ -Scenario: - benchmark: ssl - host: virtualmachine_1, virtualmachine_2 - -Context: - Host_Machines: - - Virtual_Machines: - virtualmachine_1: - availability_zone: compute1 - public_network: 'net04_ext' - OS_image: 'QTIP_CentOS' - flavor: 'm1.large' - role: host - virtualmachine_2: - availability_zone: compute2 - public_network: 'net04_ext' - OS_image: 'QTIP_CentOS' - flavor: 'm1.large' - role: host - - -Test_Description: - Test_category: "Compute" - Benchmark: "ssl" - Overview: > - '''This test will run the SSL benchmark in parallel on virtualmachine_1 and machine_1.\n - if you wish to add a virtual machine add the following information under the Virtual_Machine tag - - virtualmachine_1: - availability_zone: - public_network: - OS_image: - flavor: - role: - ''' diff --git a/test_plan/dell-pod1/compute/whetstone_bm.yaml b/test_plan/dell-pod1/compute/whetstone_bm.yaml deleted file mode 100644 index 128075a1..00000000 --- a/test_plan/dell-pod1/compute/whetstone_bm.yaml +++ /dev/null @@ -1,34 +0,0 @@ - -Scenario: - benchmark: whetstone - host: machine_1, machine_2 - - -Context: - Host_Machines: - machine_1: - ip: 172.16.1.4 - pw: - role: host - machine_2: - ip: 172.16.1.5 - pw: - role: host - Virtual_Machines: - - - -Test_Description: - Test_category: "Compute" - Benchmark: "whetstone" - Overview: > - ''' This test will run the whetstone benchmark in parallel on machine_1 and machine_2.\n - if you wish to add a baremetal machine add the following information under the Virtual_Machine tag - - machine_3: - ip: - pw: - role: - ''' - - diff --git a/test_plan/dell-pod1/compute/whetstone_vm.yaml b/test_plan/dell-pod1/compute/whetstone_vm.yaml deleted file mode 100644 index 0f1e8748..00000000 --- a/test_plan/dell-pod1/compute/whetstone_vm.yaml +++ /dev/null @@ -1,44 +0,0 @@ -Scenario: - benchmark: whetstone - host: virtualmachine_1, virtualmachine_1 - server: - -Context: - Host_Machines: - - Virtual_Machines: - virtualmachine_1: - availability_zone: compute1 - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - virtualmachine_2: - availability_zone: compute2 - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - - -Test_Description: - Test_category: "Compute" - Benchmark: "dhrystone" - Overview: > - '''This test will run the whetstone benchmark in parallel on machine_1 and machine_2.\n - if you wish to add a virtual machine add the following information under the Virtual_Machine tag - virtualmachine_1: - availability_zone: nova - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - - virtualmachine_1: - availability_zone: - public_network: - OS_image: - flavor: - role: - ''' - diff --git a/test_plan/dell-pod1/network/iperf_bm.yaml b/test_plan/dell-pod1/network/iperf_bm.yaml deleted file mode 100644 index b2d2a958..00000000 --- a/test_plan/dell-pod1/network/iperf_bm.yaml +++ /dev/null @@ -1,50 +0,0 @@ -Scenario: - benchmark: iperf - topology: Client and Server on different baremetal Compute nodes - server: machine_1 - client: machine_2 - benchmark_details: - duration: 20 - protocol: tcp - bandwidthGbps: 10 - -Context: - Host_Machines: - machine_1: - ip: 172.16.1.4 - pw: - role: 1-server - machine_2: - ip: 172.16.1.5 - pw: - role: 2-host - - Virtual_Machines: - -Test_Description: - Test_category: "network" - Benchmark: "iperf" - Overview: > - '''This test will run the IPERF benchmark on virutalmachine_1 and virtualmachine_2. On the\n - same compute node - if you wish to add a host machine add the following information under the Host_Machine tag - virtualmachine_1: - availability_zone: compute1 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 1-server - flavor: m1.large - - virtualmachine_2: - availability_zone: compute2 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 2-host - flavor: m1.large - - machine_1: - ip: - pw: - role: - ''' - diff --git a/test_plan/dell-pod1/network/iperf_vm.yaml b/test_plan/dell-pod1/network/iperf_vm.yaml deleted file mode 100644 index d7079e99..00000000 --- a/test_plan/dell-pod1/network/iperf_vm.yaml +++ /dev/null @@ -1,44 +0,0 @@ -Scenario: - benchmark: iperf - topology: Client and Server on ONE compute - server : virtualmachine_1 - client: virtualmachine_2 - description: 'Leave the bandwidth as 0 to throttle maximum traffic' - benchmark_details: - duration: 20 - protocol: tcp - bandwidthGbps: 0 - -Context: - Host_Machines: - - - Virtual_Machines: - virtualmachine_1: - availability_zone: compute1 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 1-server - flavor: m1.large - - virtualmachine_2: - availability_zone: compute1 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 2-host - flavor: m1.large - -Test_Description: - Test_category: "network" - Benchmark: "iperf" - Overview: > - '''This test will run the IPERF benchmark on virutalmachine_1 and virtualmachine_2. On the\n - same compute node - if you wish to add a host machine add the following information under the Host_Machine tag - - machine_1: - ip: - pw: - role: - ''' - diff --git a/test_plan/dell-pod1/network/iperf_vm_2.yaml b/test_plan/dell-pod1/network/iperf_vm_2.yaml deleted file mode 100644 index c5b94715..00000000 --- a/test_plan/dell-pod1/network/iperf_vm_2.yaml +++ /dev/null @@ -1,44 +0,0 @@ -Scenario: - benchmark: iperf - topology: Client and Server on two different compute nodes - server : virtualmachine_1 - client: virtualmachine_2 - description: 'Leave the bandwidth as 0 to throttle maximum traffic' - benchmark_details: - duration: 20 - protocol: tcp - bandwidthGbps: 0 - -Context: - Host_Machines: - - - Virtual_Machines: - virtualmachine_1: - availability_zone: compute1 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 1-server - flavor: m1.large - - virtualmachine_2: - availability_zone: compute2 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 2-host - flavor: m1.large - -Test_Description: - Test_category: "network" - Benchmark: "iperf" - Overview: > - '''This test will run the IPERF benchmark on virutalmachine_1 and virtualmachine_2. On the\n - same compute node - if you wish to add a host machine add the following information under the Host_Machine tag - - machine_1: - ip: - pw: - role: - ''' - diff --git a/test_plan/dell-pod1/network/netperf.yaml b/test_plan/dell-pod1/network/netperf.yaml deleted file mode 100644 index f4ce396b..00000000 --- a/test_plan/dell-pod1/network/netperf.yaml +++ /dev/null @@ -1,42 +0,0 @@ -Scenario: - benchmark: netperf - topology: Client and Server on ONE compute - server : virtualmachine_1 - client: virtualmachine_2 - benchmark_details: - duration: 10 - teststream: udp_stream - -Context: - Host_Machines: - - - Virtual_Machines: - virtualmachine_1: - availability_zone: compute2 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 1-server - flavor: m1.large - - virtualmachine_2: - availability_zone: compute2 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 2-host - flavor: m1.large - -Test_Description: - Test_category: "network" - Benchmark: "netperf" - Overview: > - '''This test will run the NETPERF benchmark on virutalmachine_1 and virtualmachine_2. On the\n - same compute node - if you wish to add a host machine add the following information under the Host_Machine tag - - machine_1: - ip: - pw: - role: - ''' - diff --git a/test_plan/dell-pod1/storage/fio_bm.yaml b/test_plan/dell-pod1/storage/fio_bm.yaml deleted file mode 100644 index 755bb730..00000000 --- a/test_plan/dell-pod1/storage/fio_bm.yaml +++ /dev/null @@ -1,39 +0,0 @@ -Scenario: - benchmark: fio - host: machine_1, machine_2 - server: blakc - -Context: - Host_Machines: - machine_1: - ip: 172.16.1.4 - pw: - role: host - machine_2: - ip: 172.16.1.5 - pw: - role: host - - - Virtual_Machines: - - -Test_Description: - Test_category: "Storage" - Benchmark: "FIO" - Overview: > - '''This test will run the FIO benchmark in parallel on host machines "machine_1" and "machine_2".\n - The fio job specifications can be found in qtip/benchmarks/fio_jobs/test_job. - The job conists of an fio load of: - 1.50% rand read 50% rand write - 2.Asynch engine - 3.Direct IO. - 4.Queing depth of 2 - - if you wish to add another machine add the following information under the Host_Machines tag - machine_3: - ip: 172.18.0.16 - pw: Op3nStack - role: host - ''' - diff --git a/test_plan/dell-pod1/storage/fio_vm.yaml b/test_plan/dell-pod1/storage/fio_vm.yaml deleted file mode 100644 index 5ae90d2c..00000000 --- a/test_plan/dell-pod1/storage/fio_vm.yaml +++ /dev/null @@ -1,44 +0,0 @@ -Scenario: - benchmark: fio - host: machine_1, machine_2 - server: blakc - -Context: - Host_Machines: - - Virtual_Machines: - virtualmachine_1: - availability_zone: compute1 - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - virtualmachine_2: - availability_zone: compute2 - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - -Test_Description: - Test_category: "Storage" - Benchmark: "FIO" - Overview: > - '''This test will run the FIO benchmark in parallel on virtualmachine_1 and virtualmachine_2.\n - The fio job specifications can be found in qtip/benchmarks/fio_jobs/test_job. - The job conists of an fio load of: - 1.50% rand read 50% rand write - 2.Asynch engine - 3.Direct IO. - 4.Queing depth of 2 - - if you wish to add a virtual machine add the following information under the Virtual_Machine tag - - virtualmachine_3: - availability_zone: - public_network: - OS_image: - flavor: - role: - ''' - diff --git a/test_plan/dell-us-deploying-bm3/compute/dhrystone_bm.yaml b/test_plan/dell-us-deploying-bm3/compute/dhrystone_bm.yaml deleted file mode 100644 index 4c1fc962..00000000 --- a/test_plan/dell-us-deploying-bm3/compute/dhrystone_bm.yaml +++ /dev/null @@ -1,35 +0,0 @@ - -Scenario: - benchmark: dhrystone - host: machine_1, machine_2 - server: - -Context: - Host_Machines: - machine_1: - ip: 10.20.0.4 - pw: - role: host - machine_2: - ip: 10.20.0.5 - pw: - role: host - - Virtual_Machines: - - -Test_Description: - Test_category: "Compute" - Benchmark: "dhrystone" - Overview: > - ''' This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n - if you wish to add a virtual machine add the following information under the Virtual_Machine tag - - virtualmachine_1: - availability_zone: - public_network: - OS_image: - flavor: - role: ''' - - diff --git a/test_plan/dell-us-deploying-bm3/compute/dhrystone_vm.yaml b/test_plan/dell-us-deploying-bm3/compute/dhrystone_vm.yaml deleted file mode 100644 index 8f5a4165..00000000 --- a/test_plan/dell-us-deploying-bm3/compute/dhrystone_vm.yaml +++ /dev/null @@ -1,45 +0,0 @@ -Scenario: - benchmark: dhrystone - host: virtualmachine_1, virtualmachine_2 - server: blakc - -Context: - Host_Machines: - - Virtual_Machines: - virtualmachine_1: - availability_zone: compute1 - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - virtualmachine_2: - availability_zone: compute2 - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - -Test_Description: - Test_category: "Compute" - Benchmark: "dhrystone" - Overview: > - '''This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n - if you wish to add a virtual machine add the following information under the Virtual_Machine tag - machine_1: - ip: 172.18.0.16 - pw: Op3nStack - role: host - machine_2: - ip: 172.18.0.15 - pw: Op3nStack - role: host - - virtualmachine_1: - availability_zone: - public_network: - OS_image: - flavor: - role: - ''' - diff --git a/test_plan/dell-us-deploying-bm3/compute/dpi_bm.yaml b/test_plan/dell-us-deploying-bm3/compute/dpi_bm.yaml deleted file mode 100644 index 1bc534b3..00000000 --- a/test_plan/dell-us-deploying-bm3/compute/dpi_bm.yaml +++ /dev/null @@ -1,34 +0,0 @@ -Scenario: - benchmark: dpi - host: machine_1,machine_2 - -Context: - Host_Machines: - machine_1: - ip: 10.20.0.4 - pw: Op3nStack - role: 1host - machine_2: - ip: 10.20.0.5 - pw: Op3nStack - role: 1host - Virtual_Machines: -Test_Description: - Test_category: "Compute" - Benchmark: "dpi" - Overview: > - '''This test will run the DPI benchmark in serial on virutalmachine_1 and virtualmachine_2.\n - if you wish to add a host machine add the following information under the Host_Machine tag - virtualmachine_2: - availability_zone: compute1 - OS_image: QTIP_CentOS - public_network: 'provider_network' - - role: 1host - flavor: m1.large - machine_1: - ip: - pw: - role: - ''' - diff --git a/test_plan/dell-us-deploying-bm3/compute/dpi_vm.yaml b/test_plan/dell-us-deploying-bm3/compute/dpi_vm.yaml deleted file mode 100644 index 10e86993..00000000 --- a/test_plan/dell-us-deploying-bm3/compute/dpi_vm.yaml +++ /dev/null @@ -1,35 +0,0 @@ -Scenario: - benchmark: dpi - 1Run : virtualmachine_1, virtualmachine_2 - -Context: - Host_Machines: - - - Virtual_Machines: - virtualmachine_1: - availability_zone: compute1 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 1Run - flavor: m1.large - virtualmachine_2: - availability_zone: compute2 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 1Run - flavor: m1.large - -Test_Description: - Test_category: "Compute" - Benchmark: "dpi" - Overview: > - '''This test will run the DPI benchmark in parallel on virutalmachine_1 and virtualmachine_2.\n - if you wish to add a host machine add the following information under the Host_Machine tag - - machine_1: - ip: - pw: - role: - ''' - diff --git a/test_plan/dell-us-deploying-bm3/compute/ramspeed_bm.yaml b/test_plan/dell-us-deploying-bm3/compute/ramspeed_bm.yaml deleted file mode 100644 index a63df3e2..00000000 --- a/test_plan/dell-us-deploying-bm3/compute/ramspeed_bm.yaml +++ /dev/null @@ -1,35 +0,0 @@ - -Scenario: - benchmark: ramspeed - host: machine_1, machine_2 - server: - -Context: - Host_Machines: - machine_1: - ip: 10.20.0.4 - pw: - role: host - machine_2: - ip: 10.20.0.5 - pw: - role: host - - Virtual_Machines: - - -Test_Description: - Test_category: "Compute" - Benchmark: "dhrystone" - Overview: > - ''' This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n - if you wish to add a virtual machine add the following information under the Virtual_Machine tag - - virtualmachine_1: - availability_zone: - public_network: - OS_image: - flavor: - role: ''' - - diff --git a/test_plan/dell-us-deploying-bm3/compute/ramspeed_vm.yaml b/test_plan/dell-us-deploying-bm3/compute/ramspeed_vm.yaml deleted file mode 100644 index a6a4363f..00000000 --- a/test_plan/dell-us-deploying-bm3/compute/ramspeed_vm.yaml +++ /dev/null @@ -1,45 +0,0 @@ -Scenario: - benchmark: ramspeed - host: virtualmachine_1, virtualmachine_2 - server: blakc - -Context: - Host_Machines: - - Virtual_Machines: - virtualmachine_1: - availability_zone: compute1 - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - virtualmachine_2: - availability_zone: compute2 - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - -Test_Description: - Test_category: "Compute" - Benchmark: "dhrystone" - Overview: > - '''This test will run the dhrystone benchmark in parallel on machine_1 and machine_2.\n - if you wish to add a virtual machine add the following information under the Virtual_Machine tag - machine_1: - ip: 172.18.0.16 - pw: Op3nStack - role: host - machine_2: - ip: 172.18.0.15 - pw: Op3nStack - role: host - - virtualmachine_1: - availability_zone: - public_network: - OS_image: - flavor: - role: - ''' - diff --git a/test_plan/dell-us-deploying-bm3/compute/ssl_bm.yaml b/test_plan/dell-us-deploying-bm3/compute/ssl_bm.yaml deleted file mode 100644 index dc038822..00000000 --- a/test_plan/dell-us-deploying-bm3/compute/ssl_bm.yaml +++ /dev/null @@ -1,31 +0,0 @@ -Scenario: - benchmark: ssl - 1Run: machine_1,machine_2 - -Context: - Host_Machines: - machine_1: - ip: 10.20.0.4 - pw: - role: 1Run - machine_2: - ip: 10.20.0.5 - pw: - role: 1Run - Virtual_Machines: - - -Test_Description: - Test_category: "Compute" - Benchmark: "ssl" - Overview: > - '''This test will run the SSL benchmark in parallel on machine_1 and machine_1. - If you wish to add a virtual machine add the following information under the Virtual_Machine tag - - virtualmachine_1: - availability_zone: - public_network: - OS_image: - flavor: - role: - ''' diff --git a/test_plan/dell-us-deploying-bm3/compute/ssl_vm.yaml b/test_plan/dell-us-deploying-bm3/compute/ssl_vm.yaml deleted file mode 100644 index 37824896..00000000 --- a/test_plan/dell-us-deploying-bm3/compute/ssl_vm.yaml +++ /dev/null @@ -1,36 +0,0 @@ -Scenario: - benchmark: ssl - host: virtualmachine_1, virtualmachine_2 - -Context: - Host_Machines: - - Virtual_Machines: - virtualmachine_1: - availability_zone: compute1 - public_network: 'net04_ext' - OS_image: 'QTIP_CentOS' - flavor: 'm1.large' - role: host - virtualmachine_2: - availability_zone: compute2 - public_network: 'net04_ext' - OS_image: 'QTIP_CentOS' - flavor: 'm1.large' - role: host - - -Test_Description: - Test_category: "Compute" - Benchmark: "ssl" - Overview: > - '''This test will run the SSL benchmark in parallel on virtualmachine_1 and machine_1.\n - if you wish to add a virtual machine add the following information under the Virtual_Machine tag - - virtualmachine_1: - availability_zone: - public_network: - OS_image: - flavor: - role: - ''' diff --git a/test_plan/dell-us-deploying-bm3/compute/whetstone_bm.yaml b/test_plan/dell-us-deploying-bm3/compute/whetstone_bm.yaml deleted file mode 100644 index 180d4e51..00000000 --- a/test_plan/dell-us-deploying-bm3/compute/whetstone_bm.yaml +++ /dev/null @@ -1,34 +0,0 @@ - -Scenario: - benchmark: whetstone - host: machine_1, machine_2 - - -Context: - Host_Machines: - machine_1: - ip: 10.20.0.4 - pw: - role: host - machine_2: - ip: 10.20.0.5 - pw: - role: host - Virtual_Machines: - - - -Test_Description: - Test_category: "Compute" - Benchmark: "whetstone" - Overview: > - ''' This test will run the whetstone benchmark in parallel on machine_1 and machine_2.\n - if you wish to add a baremetal machine add the following information under the Virtual_Machine tag - - machine_3: - ip: - pw: - role: - ''' - - diff --git a/test_plan/dell-us-deploying-bm3/compute/whetstone_vm.yaml b/test_plan/dell-us-deploying-bm3/compute/whetstone_vm.yaml deleted file mode 100644 index 0f1e8748..00000000 --- a/test_plan/dell-us-deploying-bm3/compute/whetstone_vm.yaml +++ /dev/null @@ -1,44 +0,0 @@ -Scenario: - benchmark: whetstone - host: virtualmachine_1, virtualmachine_1 - server: - -Context: - Host_Machines: - - Virtual_Machines: - virtualmachine_1: - availability_zone: compute1 - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - virtualmachine_2: - availability_zone: compute2 - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - - -Test_Description: - Test_category: "Compute" - Benchmark: "dhrystone" - Overview: > - '''This test will run the whetstone benchmark in parallel on machine_1 and machine_2.\n - if you wish to add a virtual machine add the following information under the Virtual_Machine tag - virtualmachine_1: - availability_zone: nova - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - - virtualmachine_1: - availability_zone: - public_network: - OS_image: - flavor: - role: - ''' - diff --git a/test_plan/dell-us-deploying-bm3/network/iperf_bm.yaml b/test_plan/dell-us-deploying-bm3/network/iperf_bm.yaml deleted file mode 100644 index 4c64dd16..00000000 --- a/test_plan/dell-us-deploying-bm3/network/iperf_bm.yaml +++ /dev/null @@ -1,50 +0,0 @@ -Scenario: - benchmark: iperf - topology: Client and Server on different baremetal Compute nodes - server: machine_1 - client: machine_2 - benchmark_details: - duration: 20 - protocol: tcp - bandwidthGbps: 10 - -Context: - Host_Machines: - machine_1: - ip: 10.20.0.4 - pw: - role: 1-server - machine_2: - ip: 10.20.0.5 - pw: - role: 2-host - - Virtual_Machines: - -Test_Description: - Test_category: "network" - Benchmark: "iperf" - Overview: > - '''This test will run the IPERF benchmark on virutalmachine_1 and virtualmachine_2. On the\n - same compute node - if you wish to add a host machine add the following information under the Host_Machine tag - virtualmachine_1: - availability_zone: compute1 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 1-server - flavor: m1.large - - virtualmachine_2: - availability_zone: compute2 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 2-host - flavor: m1.large - - machine_1: - ip: - pw: - role: - ''' - diff --git a/test_plan/dell-us-deploying-bm3/network/iperf_vm.yaml b/test_plan/dell-us-deploying-bm3/network/iperf_vm.yaml deleted file mode 100644 index d7079e99..00000000 --- a/test_plan/dell-us-deploying-bm3/network/iperf_vm.yaml +++ /dev/null @@ -1,44 +0,0 @@ -Scenario: - benchmark: iperf - topology: Client and Server on ONE compute - server : virtualmachine_1 - client: virtualmachine_2 - description: 'Leave the bandwidth as 0 to throttle maximum traffic' - benchmark_details: - duration: 20 - protocol: tcp - bandwidthGbps: 0 - -Context: - Host_Machines: - - - Virtual_Machines: - virtualmachine_1: - availability_zone: compute1 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 1-server - flavor: m1.large - - virtualmachine_2: - availability_zone: compute1 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 2-host - flavor: m1.large - -Test_Description: - Test_category: "network" - Benchmark: "iperf" - Overview: > - '''This test will run the IPERF benchmark on virutalmachine_1 and virtualmachine_2. On the\n - same compute node - if you wish to add a host machine add the following information under the Host_Machine tag - - machine_1: - ip: - pw: - role: - ''' - diff --git a/test_plan/dell-us-deploying-bm3/network/iperf_vm_2.yaml b/test_plan/dell-us-deploying-bm3/network/iperf_vm_2.yaml deleted file mode 100644 index c5b94715..00000000 --- a/test_plan/dell-us-deploying-bm3/network/iperf_vm_2.yaml +++ /dev/null @@ -1,44 +0,0 @@ -Scenario: - benchmark: iperf - topology: Client and Server on two different compute nodes - server : virtualmachine_1 - client: virtualmachine_2 - description: 'Leave the bandwidth as 0 to throttle maximum traffic' - benchmark_details: - duration: 20 - protocol: tcp - bandwidthGbps: 0 - -Context: - Host_Machines: - - - Virtual_Machines: - virtualmachine_1: - availability_zone: compute1 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 1-server - flavor: m1.large - - virtualmachine_2: - availability_zone: compute2 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 2-host - flavor: m1.large - -Test_Description: - Test_category: "network" - Benchmark: "iperf" - Overview: > - '''This test will run the IPERF benchmark on virutalmachine_1 and virtualmachine_2. On the\n - same compute node - if you wish to add a host machine add the following information under the Host_Machine tag - - machine_1: - ip: - pw: - role: - ''' - diff --git a/test_plan/dell-us-deploying-bm3/network/netperf.yaml b/test_plan/dell-us-deploying-bm3/network/netperf.yaml deleted file mode 100644 index f4ce396b..00000000 --- a/test_plan/dell-us-deploying-bm3/network/netperf.yaml +++ /dev/null @@ -1,42 +0,0 @@ -Scenario: - benchmark: netperf - topology: Client and Server on ONE compute - server : virtualmachine_1 - client: virtualmachine_2 - benchmark_details: - duration: 10 - teststream: udp_stream - -Context: - Host_Machines: - - - Virtual_Machines: - virtualmachine_1: - availability_zone: compute2 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 1-server - flavor: m1.large - - virtualmachine_2: - availability_zone: compute2 - OS_image: QTIP_CentOS - public_network: 'net04_ext' - role: 2-host - flavor: m1.large - -Test_Description: - Test_category: "network" - Benchmark: "netperf" - Overview: > - '''This test will run the NETPERF benchmark on virutalmachine_1 and virtualmachine_2. On the\n - same compute node - if you wish to add a host machine add the following information under the Host_Machine tag - - machine_1: - ip: - pw: - role: - ''' - diff --git a/test_plan/dell-us-deploying-bm3/storage/fio_bm.yaml b/test_plan/dell-us-deploying-bm3/storage/fio_bm.yaml deleted file mode 100644 index 12be8c17..00000000 --- a/test_plan/dell-us-deploying-bm3/storage/fio_bm.yaml +++ /dev/null @@ -1,39 +0,0 @@ -Scenario: - benchmark: fio - host: machine_1, machine_2 - server: blakc - -Context: - Host_Machines: - machine_1: - ip: 10.20.0.4 - pw: r00tme - role: host - machine_2: - ip: 10.20.0.5 - pw: r00tme - role: host - - - Virtual_Machines: - - -Test_Description: - Test_category: "Storage" - Benchmark: "FIO" - Overview: > - '''This test will run the FIO benchmark in parallel on host machines "machine_1" and "machine_2".\n - The fio job specifications can be found in qtip/benchmarks/fio_jobs/test_job. - The job conists of an fio load of: - 1.50% rand read 50% rand write - 2.Asynch engine - 3.Direct IO. - 4.Queing depth of 2 - - if you wish to add another machine add the following information under the Host_Machines tag - machine_3: - ip: 172.18.0.16 - pw: Op3nStack - role: host - ''' - diff --git a/test_plan/dell-us-deploying-bm3/storage/fio_vm.yaml b/test_plan/dell-us-deploying-bm3/storage/fio_vm.yaml deleted file mode 100644 index 5ae90d2c..00000000 --- a/test_plan/dell-us-deploying-bm3/storage/fio_vm.yaml +++ /dev/null @@ -1,44 +0,0 @@ -Scenario: - benchmark: fio - host: machine_1, machine_2 - server: blakc - -Context: - Host_Machines: - - Virtual_Machines: - virtualmachine_1: - availability_zone: compute1 - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - virtualmachine_2: - availability_zone: compute2 - public_network: 'net04_ext' - OS_image: QTIP_CentOS - flavor: m1.large - role: host - -Test_Description: - Test_category: "Storage" - Benchmark: "FIO" - Overview: > - '''This test will run the FIO benchmark in parallel on virtualmachine_1 and virtualmachine_2.\n - The fio job specifications can be found in qtip/benchmarks/fio_jobs/test_job. - The job conists of an fio load of: - 1.50% rand read 50% rand write - 2.Asynch engine - 3.Direct IO. - 4.Queing depth of 2 - - if you wish to add a virtual machine add the following information under the Virtual_Machine tag - - virtualmachine_3: - availability_zone: - public_network: - OS_image: - flavor: - role: - ''' - diff --git a/utils/__init__.py b/utils/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/utils/ansible_api.py b/utils/ansible_api.py deleted file mode 100644 index 9e1d249e..00000000 --- a/utils/ansible_api.py +++ /dev/null @@ -1,65 +0,0 @@ -############################################################################## -# Copyright (c) 2016 ZTE Corp 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 -############################################################################## -import os -from collections import namedtuple -from ansible.executor.playbook_executor import PlaybookExecutor -from ansible.inventory import Inventory -from ansible.parsing.dataloader import DataLoader -from ansible.vars import VariableManager -import logger_utils - -logger = logger_utils.QtipLogger('ansible_api').get - - -class AnsibleApi: - - def __init__(self): - self.variable_manager = VariableManager() - self.loader = DataLoader() - self.passwords = {} - self.pbex = None - - def _check_path(self, file_path): - if not os.path.exists(file_path): - logger.error('The playbook %s does not exist' % file_path) - return False - else: - return True - - def execute_playbook(self, hosts_file, playbook_path, pub_key_file, vars): - if not self._check_path(hosts_file): - return False - - inventory = Inventory(loader=self.loader, variable_manager=self.variable_manager, - host_list=hosts_file) - Options = namedtuple('Options', ['listtags', 'listtasks', 'listhosts', 'syntax', - 'connection', 'module_path', 'forks', 'remote_user', - 'private_key_file', 'ssh_common_args', 'ssh_extra_args', - 'sftp_extra_args', 'scp_extra_args', 'become', - 'become_method', 'become_user', 'verbosity', 'check']) - options = Options(listtags=False, listtasks=False, listhosts=False, syntax=False, - connection='ssh', module_path=None, forks=100, remote_user='root', - private_key_file=pub_key_file, ssh_common_args=None, - ssh_extra_args=None, sftp_extra_args=None, scp_extra_args=None, - become=True, become_method=None, become_user='root', verbosity=None, - check=False) - self.variable_manager.extra_vars = vars - - self.pbex = PlaybookExecutor(playbooks=[playbook_path], inventory=inventory, - variable_manager=self.variable_manager, loader=self.loader, - options=options, passwords=self.passwords) - - return self.pbex.run() - - def get_detail_playbook_stats(self): - if self.pbex: - stats = self.pbex._tqm._stats - return map(lambda x: (x, stats.summarize(x)), stats.processed.keys()) - else: - return None diff --git a/utils/args_handler.py b/utils/args_handler.py deleted file mode 100644 index 879fd204..00000000 --- a/utils/args_handler.py +++ /dev/null @@ -1,73 +0,0 @@ -############################################################################## -# Copyright (c) 2016 ZTE Corp 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 -############################################################################## -import os -from operator import add -import simplejson as json -from env_setup import Env_setup -from spawn_vm import SpawnVM -from driver import Driver - - -def get_files_in_suite(suite_name, case_type='all'): - benchmark_list = json.load(file('benchmarks/suite/{0}'.format(suite_name))) - return reduce(add, benchmark_list.values()) \ - if case_type == 'all' else benchmark_list[case_type] - - -def get_files_in_test_plan(lab, suite_name, case_type='all'): - test_case_all = os.listdir('./test_plan/{0}/{1}'.format(lab, suite_name)) - return test_case_all if case_type == 'all' else \ - filter(lambda x: case_type in x, test_case_all) - - -def get_benchmark_path(lab, suit, benchmark): - return './test_plan/{0}/{1}/{2}'.format(lab, suit, benchmark) - - -def check_suite(suite_name): - return True if os.path.isfile('benchmarks/suite/' + suite_name) else False - - -def check_lab_name(lab_name): - return True if os.path.isdir('test_plan/' + lab_name) else False - - -def check_benchmark_name(lab, file, benchmark): - return os.path.isfile('test_plan/' + lab + '/' + file + '/' + benchmark) - - -def _get_f_name(test_case_path): - return test_case_path.split('/')[-1] - - -def prepare_ansible_env(benchmark_test_case): - env_setup = Env_setup() - [benchmark, vm_info, benchmark_details, proxy_info] = env_setup.parse(benchmark_test_case) - SpawnVM(vm_info) if len(vm_info) else None - env_setup.call_ping_test() - env_setup.call_ssh_test() - env_setup.update_ansible() - return benchmark, benchmark_details, proxy_info, env_setup - - -def run_benchmark(installer_type, pwd, benchmark, benchmark_details, - proxy_info, env_setup, benchmark_test_case): - driver = Driver() - result = driver.drive_bench(installer_type, pwd, benchmark, - env_setup.roles_dict.items(), - _get_f_name(benchmark_test_case), - benchmark_details, env_setup.ip_pw_dict.items(), proxy_info) - env_setup.cleanup_authorized_keys() - return result - - -def prepare_and_run_benchmark(installer_type, pwd, benchmark_test_case): - benchmark, benchmark_details, proxy_info, env_setup = prepare_ansible_env(benchmark_test_case) - return run_benchmark(installer_type, pwd, benchmark, benchmark_details, - proxy_info, env_setup, benchmark_test_case) diff --git a/utils/cli.py b/utils/cli.py deleted file mode 100644 index def70061..00000000 --- a/utils/cli.py +++ /dev/null @@ -1,76 +0,0 @@ -############################################################################## -# Copyright (c) 2015 Dell Inc 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 -############################################################################## - -import sys -import os -import args_handler -import argparse -import logger_utils - -logger = logger_utils.QtipLogger('cli').get - - -class Cli: - - @staticmethod - def _parse_args(args): - parser = argparse.ArgumentParser() - parser.add_argument('-l ', '--lab', required=True, help='Name of Lab ' - 'on which being tested, These can' - 'be found in the test_plan/ directory. Please ' - 'ensure that you have edited the respective files ' - 'before using them. For testing other than through Jenkins' - ' The user should list default after -l . all the fields in' - ' the files are necessary and should be filled') - parser.add_argument('-f', '--file', required=True, help='File in ' - 'benchmarks/suite/ with the list of tests. there are three files' - '\n compute ' - '\n storage ' - '\n network ' - 'They contain all the tests that will be run. They are listed by suite.' - 'Please ensure there are no empty lines') - parser.add_argument('-b', '--benchmark', help='Name of the benchmark.' - 'Can be found in benchmarks/suite/file_name') - - return parser.parse_args(args) - - def __init__(self, args=sys.argv[1:]): - - args = self._parse_args(args) - if not args_handler.check_suite(args.file): - logger.error("ERROR: This suite file %s doesn't exist under benchmarks/suite/.\ - Please enter correct file." % str(args.file)) - sys.exit(1) - - if not args_handler.check_lab_name(args.lab): - logger.error("You have specified a lab that is not present under test_plan/.\ - Please enter correct file. If unsure how to proceed, use -l default.") - sys.exit(1) - suite = args.file - benchmarks = args_handler.get_files_in_suite(suite) - test_cases = args_handler.get_files_in_test_plan(args.lab, suite) - benchmarks_list = filter(lambda x: x in test_cases, benchmarks) - - if args.benchmark: - if not args_handler.check_benchmark_name(args.lab, args.file, args.benchmark): - logger.error("You have specified an incorrect benchmark.\ - Please enter the correct one.") - sys.exit(1) - else: - logger.info("Starting with " + args.benchmark) - args_handler.prepare_and_run_benchmark( - os.environ['INSTALLER_TYPE'], os.environ['PWD'], - args_handler.get_benchmark_path(args.lab.lower(), args.file, args.benchmark)) - else: - map(lambda x: args_handler.prepare_and_run_benchmark( - os.environ['INSTALLER_TYPE'], os.environ['PWD'], - args_handler.get_benchmark_path(args.lab.lower(), suite, x)), benchmarks_list) - - logger.info("{0} is not a Template in the Directory Enter a Valid file name.\ - or use qtip.py -h for list".format(filter(lambda x: x not in test_cases, benchmarks))) diff --git a/utils/create_zones.py b/utils/create_zones.py deleted file mode 100644 index 5e378c83..00000000 --- a/utils/create_zones.py +++ /dev/null @@ -1,86 +0,0 @@ -############################################################################## -# Copyright (c) 2016 Dell Inc, ZTE 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 keystoneclient.auth.identity import v2 -from keystoneclient import session -from novaclient import client -import os -import random -import logger_utils - -logger = logger_utils.QtipLogger('create_zones').get - - -class AvailabilityZone: - - def __init__(self): - self._keystone_client = None - self._nova_client = None - - def _get_keystone_client(self): - """returns a keystone client instance""" - - if self._keystone_client is None: - ''' - self._keystone_client = keystoneclient.v2_0.client.Client( - auth_url=os.environ.get('OS_AUTH_URL'), - username=os.environ.get('OS_USERNAME'), - password=os.environ.get('OS_PASSWORD'), - tenant_name=os.environ.get('OS_TENANT_NAME')) - ''' - auth = v2.Password(auth_url=os.environ.get('OS_AUTH_URL'), - username=os.environ.get('OS_USERNAME'), - password=os.environ.get('OS_PASSWORD'), - tenant_name=os.environ.get('OS_TENANT_NAME')) - - sess = session.Session(auth=auth) - else: - return self._keystone_client - - return sess - - def _get_nova_client(self): - if self._nova_client is None: - keystone = self._get_keystone_client() - self._nova_client = client.Client('2', session=keystone) - return self._nova_client - - def clean_all_aggregates(self): - logger.info("clean all aggregates") - nova = self._get_nova_client() - agg_list = nova.aggregates.list() - - for agg in agg_list: - agg_info = nova.aggregates.get_details(agg.id) - agg_hosts = agg_info.hosts - if len(agg_hosts): - for host in agg_hosts: - nova.aggregates.remove_host(agg.id, host) - nova.aggregates.delete(agg.id) - - def create_aggs(self, args): - azone_list = list(set(args)) - azone_list.sort() - - nova = self._get_nova_client() - hyper_list = nova.hypervisors.list() - - if len(azone_list) > len(hyper_list): - logger.error("required available zones > compute nodes") - return None - - compute_nodes = map(lambda x: x.service['host'], hyper_list) - sample_nodes = random.sample(compute_nodes, len(azone_list)) - sample_nodes.sort() - - for index, item in enumerate(azone_list): - logger.info("create aggregates: %s" % str(item)) - agg_id = nova.aggregates.create(item, item) - - logger.info("add host: %s" % sample_nodes[index]) - nova.aggregates.add_host(aggregate=agg_id, host=sample_nodes[index]) diff --git a/utils/driver.py b/utils/driver.py deleted file mode 100644 index 9894e0f5..00000000 --- a/utils/driver.py +++ /dev/null @@ -1,92 +0,0 @@ -############################################################################## -# Copyright (c) 2015 Dell Inc, ZTE 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 -############################################################################## -import logger_utils -from operator import add -from ansible_api import AnsibleApi -from os.path import expanduser - -logger = logger_utils.QtipLogger('driver').get - - -class Driver: - - def __init__(self): - - logger.info("Class driver initialized\n") - self.installer_username = {'fuel': 'root', - 'joid': 'ubuntu', - 'apex': 'heat-admin'} - - @staticmethod - def merge_two_dicts(x, y): - ''' - It is from http://stackoverflow.com/questions/38987/ - how-can-i-merge-two-python-dictionaries-in-a-single-expression - ''' - z = x.copy() - z.update(y) - return z - - def get_common_var_json(self, installer_type, pwd, benchmark_fname, - benchmark_detail, pip_dict, proxy_info): - common_json = {'Dest_dir': expanduser('~') + '/qtip/results', - 'ip1': '', - 'ip2': '', - 'installer': str(installer_type), - 'workingdir': str(pwd), - 'fname': str(benchmark_fname), - 'username': self.installer_username[str(installer_type)]} - common_json.update(benchmark_detail) if benchmark_detail else None - common_json.update(proxy_info) if proxy_info else None - return common_json - - def get_special_var_json(self, role, roles, benchmark_detail, pip_dict): - special_json = {} - index = roles.index(role) + 1 - private_ip = pip_dict[0][1] if pip_dict[0][1][0] else 'NONE' - map(lambda x: special_json.update({'ip' + str(index): x}), role[1])\ - if benchmark_detail and (role[0] == '1-server') else None - map(lambda x: special_json.update({'privateip' + str(index): private_ip}), role[1])\ - if benchmark_detail and (role[0] == '1-server') else None - special_json = self.get_special_var_json(filter(lambda x: x[0] == '1-server', roles)[0], - roles, - benchmark_detail, - pip_dict) if role[0] == '2-host' else special_json - special_json.update({'role': role[0]}) - return special_json - - def run_ansible_playbook(self, benchmark, extra_vars): - logger.info(extra_vars) - ansible_api = AnsibleApi() - ansible_api.execute_playbook('./config/hosts', - './benchmarks/perftest/{0}.yaml'.format(benchmark), - './config/QtipKey', extra_vars) - return self.get_ansible_result(extra_vars['role'], ansible_api.get_detail_playbook_stats()) - - def drive_bench(self, installer_type, pwd, benchmark, roles, benchmark_fname, - benchmark_detail=None, pip_dict=None, proxy_info=None): - roles = sorted(roles) - pip_dict = sorted(pip_dict) - var_json = self.get_common_var_json(installer_type, pwd, benchmark_fname, - benchmark_detail, pip_dict, proxy_info) - result = map(lambda role: self.run_ansible_playbook - (benchmark, self.merge_two_dicts(var_json, - self.get_special_var_json(role, roles, - benchmark_detail, - pip_dict))), roles) - return reduce(self._merge_ansible_result, result) - - def get_ansible_result(self, role, stats): - result = reduce(add, map(lambda x: x[1]['failures'] + x[1]['unreachable'], stats)) - return {'result': result, - 'detail': {role: stats}} - - def _merge_ansible_result(self, result_1, result_2): - return {'result': result_1['result'] + result_2['result'], - 'detail': self.merge_two_dicts(result_1['detail'], result_2['detail'])} diff --git a/utils/env_setup.py b/utils/env_setup.py deleted file mode 100644 index 7bbedfcf..00000000 --- a/utils/env_setup.py +++ /dev/null @@ -1,214 +0,0 @@ -############################################################################## -# Copyright (c) 2016 Dell Inc, ZTE 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 -############################################################################## -import os -import random -import socket -import sys -import time -from collections import defaultdict -from os.path import expanduser -import paramiko -import yaml -import logger_utils - -logger = logger_utils.QtipLogger('env_setup').get - - -class Env_setup: - - roles_ip_list = [] # ROLE and its corresponding IP address list - ip_pw_list = [] # IP and password, this will be used to ssh - roles_dict = defaultdict(list) - ip_pw_dict = defaultdict(list) - ip_pip_list = [] - vm_parameters = defaultdict(list) - benchmark_details = defaultdict() - benchmark = '' - - def __init__(self): - print '\nParsing class initiated\n' - self.roles_ip_list[:] = [] - self.ip_pw_list[:] = [] - self.roles_dict.clear() - self.ip_pw_dict.clear() - self.ip_pip_list[:] = [] - self.proxy_info = {} - self.vm_parameters.clear() - self.benchmark_details.clear() - self.benchmark = '' - - @staticmethod - def write_to_file(role): - f_name_2 = open('./config/hosts', 'w') - print role.items() - for k in role: - f_name_2.write('[' + k + ']\n') - num = len(role[k]) - for x in range(num): - f_name_2.write(role[k][x] + '\n') - f_name_2.close() - - @staticmethod - def ssh_test(hosts): - for ip, pw in hosts: - logger.info('Beginning SSH Test: %s \n' % ip) - os.system('ssh-keyscan %s >> /root/.ssh/known_hosts' % ip) - time.sleep(2) - - ssh_cmd = './scripts/qtip_creds.sh %s' % ip - logger.info("run command: %s " % ssh_cmd) - os.system(ssh_cmd) - - ssh = paramiko.SSHClient() - ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) - ssh.connect(ip, key_filename='./config/QtipKey') - - for attempts in range(100): - try: - stdin, stdout, stderr = ssh.exec_command('uname') - if not stderr.readlines(): - logger.info('SSH successful') - break - except socket.error: - logger.error('SSH is still unavailable, retry!') - time.sleep(2) - if attempts == 99: - logger.error("Try 99 times, SSH failed: %s" % ip) - - @staticmethod - def ping_test(lister, attempts=30): - for k, v in lister.iteritems(): - time.sleep(10) - for val in v: - ipvar = val - ping_cmd = 'ping -D -c1 {0}'.format(ipvar) - for i in range(attempts): - if os.system(ping_cmd) != 0: - print '\nWaiting for machine\n' - time.sleep(10) - else: - break - print ('\n\n %s is UP \n\n ' % ipvar) - - @staticmethod - def fetch_compute_ips(): - logger.info("Fetch compute ips through installer") - ips = [] - - installer_type = str(os.environ['INSTALLER_TYPE'].lower()) - installer_ip = str(os.environ['INSTALLER_IP']) - if installer_type not in ["fuel", "compass"]: - raise RuntimeError("%s is not supported" % installer_type) - if not installer_ip: - raise RuntimeError("undefine environment variable INSTALLER_IP") - - cmd = "bash ./scripts/fetch_compute_ips.sh -i %s -a %s" % \ - (installer_type, installer_ip) - logger.info(cmd) - os.system(cmd) - with open(expanduser('~') + "/qtip/ips.log", "r") as file: - data = file.read() - if data: - ips.extend(data.rstrip('\n').split('\n')) - logger.info("All compute ips: %s" % ips) - return ips - - def check_machine_ips(self, host_tag): - logger.info("Check machine ips") - ips = self.fetch_compute_ips() - ips_num = len(ips) - num = len(host_tag) - if num > ips_num: - err = "host num %s > compute ips num %s" % (num, ips_num) - raise RuntimeError(err) - - for x in range(num): - hostlabel = 'machine_' + str(x + 1) - if host_tag[hostlabel]['ip']: - if host_tag[hostlabel]['ip'] in ips: - info = "%s's ip %s is defined by test case yaml file" % \ - (hostlabel, host_tag[hostlabel]['ip']) - logger.info(info) - else: - err = "%s is not in %s" % (host_tag[hostlabel]['ip'], ips) - raise RuntimeError(err) - else: - host_tag[hostlabel]['ip'] = random.choice(ips) - info = "assign ip %s to %s" % (host_tag[hostlabel]['ip'], hostlabel) - ips.remove(host_tag[hostlabel]['ip']) - - def get_host_machine_info(self, host_tag): - num = len(host_tag) - offset = len(self.roles_ip_list) - self.check_machine_ips(host_tag) - for x in range(num): - hostlabel = 'machine_' + str(x + 1) - self.roles_ip_list.insert( - offset, (host_tag[hostlabel]['role'], host_tag[hostlabel]['ip'])) - self.ip_pw_list.insert( - offset, (host_tag[hostlabel]['ip'], host_tag[hostlabel]['pw'])) - - def get_virtual_machine_info(self, virtual_tag): - - num = len(virtual_tag) - for x in range(num): - host_label = 'virtualmachine_' + str(x + 1) - for k, v in virtual_tag[host_label].iteritems(): - self.vm_parameters[k].append(v) - - def get_bench_mark_details(self, detail_dic): - - print detail_dic - for k, v in detail_dic.items(): - self.benchmark_details[k] = v - - def parse(self, config_file_path): - try: - f_name = open(config_file_path, 'r+') - doc = yaml.safe_load(f_name) - f_name.close() - if doc['Scenario']['benchmark']: - self.benchmark = doc['Scenario']['benchmark'] - if doc['Context']['Virtual_Machines']: - self.get_virtual_machine_info(doc['Context']['Virtual_Machines']) - if doc['Context']['Host_Machines']: - self.get_host_machine_info(doc['Context']['Host_Machines']) - if doc.get('Scenario', {}).get('benchmark_details', {}): - self.get_bench_mark_details(doc.get('Scenario', {}).get('benchmark_details', {})) - if 'Proxy_Environment' in doc['Context'].keys(): - self.proxy_info['http_proxy'] = doc['Context']['Proxy_Environment']['http_proxy'] - self.proxy_info['https_proxy'] = doc['Context']['Proxy_Environment']['https_proxy'] - self.proxy_info['no_proxy'] = doc['Context']['Proxy_Environment']['no_proxy'] - for k, v in self.roles_ip_list: - self.roles_dict[k].append(v) - for k, v in self.ip_pw_list: - self.ip_pw_dict[k].append(v) - return ( - self.benchmark, - self.vm_parameters, - self.benchmark_details.items(), - self.proxy_info) - except KeyboardInterrupt: - print 'ConfigFile Closed: exiting!' - sys.exit(0) - - def update_ansible(self): - self.write_to_file(self.roles_dict) - - def call_ping_test(self): - self.ping_test(self.roles_dict) - - def call_ssh_test(self): - self.ssh_test(self.ip_pw_list) - - def cleanup_authorized_keys(self): - for ip, pw in self.ip_pw_list: - cmd = './scripts/cleanup_creds.sh %s' % ip - logger.info("cleanup authorized_keys: %s " % cmd) - os.system(cmd) diff --git a/utils/logger_utils.py b/utils/logger_utils.py deleted file mode 100644 index e8817c3c..00000000 --- a/utils/logger_utils.py +++ /dev/null @@ -1,65 +0,0 @@ -############################################################################## -# Copyright (c) 2016 ZTE Corp 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 -# -# Logging levels: -# Level Numeric value -# CRITICAL 50 -# ERROR 40 -# WARNING 30 -# INFO 20 -# DEBUG 10 -# NOTSET 0 -# -# Usage: -# from utils import logger_utils -# logger = logger_utils.QtipLogger(__file__).get -# logger.info("message to be shown with - INFO - ") -# logger.debug("message to be shown with - DEBUG -") -############################################################################## - -import logging -import os - - -class Logger(object): - file_path = '/var/log' - formatter = logging.Formatter('%(asctime)s - %(name)s - ' - '%(levelname)s - %(message)s') - - def __init__(self, logger_name): - - IF_DEBUG = os.getenv('IF_DEBUG') - - self.logger_name = logger_name - self.logger = logging.getLogger(logger_name) - self.logger.propagate = 0 - self.logger.setLevel(logging.DEBUG) - - ch = logging.StreamHandler() - ch.setFormatter(self.formatter) - if IF_DEBUG is not None and IF_DEBUG.lower() == "true": - ch.setLevel(logging.DEBUG) - else: - ch.setLevel(logging.INFO) - self.logger.addHandler(ch) - - hdlr = logging.FileHandler('%s/%s.log' % (self.file_path, logger_name)) - hdlr.setFormatter(self.formatter) - hdlr.setLevel(logging.DEBUG) - self.logger.addHandler(hdlr) - - @property - def get(self): - return self.logger - - -class QtipLogger(Logger): - file_path = '{}/qtip/logs'.format(os.environ['HOME']) - - def __init__(self, logger_name): - super(QtipLogger, self).__init__(logger_name) diff --git a/utils/report/Qtip_Report.py b/utils/report/Qtip_Report.py deleted file mode 100644 index cd20d57c..00000000 --- a/utils/report/Qtip_Report.py +++ /dev/null @@ -1,108 +0,0 @@ -from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Image -from reportlab.lib.styles import getSampleStyleSheet -from reportlab.lib.units import inch -from reportlab.lib.pagesizes import letter -import qtip_graph as graph -import get_indices as results -from get_results import report_concat -from get_results import generate_result - - -def dump_result(Stor, directory, testcase): - try: - lower_s = testcase.lower() - Stor.append(Paragraph(testcase, Style['h3'])) - l1 = report_concat(directory, lower_s) - l = 1 - for a in l1: - Stor.append(Paragraph(testcase + " result_" + str(l), Style['h5'])) - raw_string = generate_result(a, 0) - replaced_string = raw_string.replace('\n', '
').replace(' ', ' ') - Stor.append(Paragraph(replaced_string, Style['BodyText'])) - l = l + 1 - except OSError: - print "Results for {0} not found".format(testcase) - -doc = SimpleDocTemplate("../../results/QTIP_results.pdf", pagesize=letter, - rightMargin=72, leftMargin=72, - topMargin=72, bottomMargin=18) -Stor = [] -Style = getSampleStyleSheet() -Title = "QTIP Benchmark Suite" -Stor.append(Paragraph(Title, Style['Title'])) -H1 = "Results" -Stor.append(Spacer(0, 36)) -Stor.append(Paragraph(H1, Style['h2'])) -compute = 0 -storage = 0 -network = 0 -try: - compute = results.get_index('compute_result') -except IOError: - pass - -try: - storage = results.get_index('storage_result') -except IOError: - pass -try: - network = results.get_index('network_result') -except IOError: - pass - -Stor.append(Paragraph("Compute Suite: %f" % compute, Style['h5'])) -Stor.append(Paragraph("Storage Suite: %f" % storage, Style['h5'])) -Stor.append(Paragraph("Network Suite: %f" % network, Style['h5'])) -graph.plot_indices(compute, storage, network) -qtip_graph = ('qtip_graph.jpeg') -im = Image(qtip_graph, 5 * inch, 4 * inch) -Stor.append(im) -Stor.append(Spacer(0, 12)) -Stor.append(Paragraph("Reference POD", Style['h5'])) -ptext = "The Dell OPNFV Lab POD3 has been taken as the reference POD against which the reference results have been collected. The POD consists of 6 identical servers. The details of such a server are:" -Stor.append(Paragraph(ptext, Style['Normal'])) -ptext = "Server Type: Dell PowerEdge R630 Server" -Stor.append(Paragraph(ptext, Style['Bullet'])) -ptext = "CPU: Intel Xeon E5-2698 @ 2300 MHz" -Stor.append(Paragraph(ptext, Style["Bullet"])) -ptext = "RAM: 128GB" -Stor.append(Paragraph(ptext, Style["Bullet"])) -ptext = "Storage SSD: 420GB" -Stor.append(Paragraph(ptext, Style["Bullet"])) -ptext = "Network Card: Intel 2P X520/2P I350 rNDC" -Stor.append(Paragraph(ptext, Style["Bullet"])) -ptext = "Servers interconnected through a DELL S4810 switch using a 10Gbps physical link" -Stor.append(Paragraph(ptext, Style["Bullet"])) -Stor.append(Spacer(0, 12)) -ptext = "For Further Details of the Reference POD hardware, please visit: https://wiki.opnfv.org/reference_pod_hardware_details" -Stor.append(Paragraph(ptext, Style['Normal'])) -Stor.append(Spacer(0, 12)) -ptext = "For Details of the Reference POD Results, please visit: https://wiki.opnfv.org/reference_pod_qtip_results" -Stor.append(Spacer(0, 12)) -Stor.append(Paragraph(ptext, Style['Normal'])) -Stor.append(Paragraph("RAW Results", Style['h1'])) -Stor.append(Paragraph("Compute Results", Style['h2'])) - -dump_result(Stor, "../../results/dhrystone/", "Dhrystone_bm") -dump_result(Stor, "../../results/dhrystone/", "Dhrystone_vm") - -dump_result(Stor, "../../results/whetstone/", "Whetstone_bm") -dump_result(Stor, "../../results/whetstone/", "Whetstone_vm") - -dump_result(Stor, "../../results/ramspeed/", "Ramspeed_bm") -dump_result(Stor, "../../results/ramspeed/", "Ramspeed_vm") - -dump_result(Stor, "../../results/ssl/", "SSL_bm") -dump_result(Stor, "../../results/ssl/", "SSL_vm") - -Stor.append(Paragraph("Network Results", Style['h2'])) -dump_result(Stor, "../../results/iperf/", "IPERF_bm") -dump_result(Stor, "../../results/iperf/", "IPERF_vm") -dump_result(Stor, "../../results/iperf/", "IPERF_vm_2") - -Stor.append(Paragraph("Storage Results", Style['h2'])) -dump_result(Stor, "../../results/fio/", "fio_bm") -dump_result(Stor, "../../results/fio/", "fio_vm") - - -doc.build(Stor) diff --git a/utils/report/__init__.py b/utils/report/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/utils/report/get_indices.py b/utils/report/get_indices.py deleted file mode 100644 index 91219c0b..00000000 --- a/utils/report/get_indices.py +++ /dev/null @@ -1,8 +0,0 @@ -import json - - -def get_index(suite): - with open('../../results/' + suite + '.json') as result_file: - result_djson = json.load(result_file) - index = result_djson['index'] - return index diff --git a/utils/report/get_results.py b/utils/report/get_results.py deleted file mode 100644 index 23fd5383..00000000 --- a/utils/report/get_results.py +++ /dev/null @@ -1,50 +0,0 @@ -import os -import json - - -def report_concat(targ_dir, testcase): - machine_temp = [] - machines = [] - - for file in os.listdir(targ_dir): - if file.endswith(".json"): - machine_temp.append(file) - - l = len(machine_temp) - - for x in range(0, l): - file_t = machine_temp[x] - with open(targ_dir + file_t) as result_file: - result_djson = json.load(result_file) - if result_djson['1 Testcase Name'] == str(testcase): - machines.append(result_djson) - return machines - - -def space_count(l): - spc = '' - for x in range(l): - spc = spc + ' ' - return spc - - -def custom_dict(list1, list2, k): - string_1 = '' - for num_1 in range(0, len(list1)): - string_1 = string_1 + space_count(k) + str(list1[num_1][0]) + "=" + str(list2[num_1]) + "\n" - return string_1 - - -def generate_result(dict_a, k): - list_1 = [] - list_2 = [] - count = 0 - for i, j in sorted(dict_a.iteritems()): - list_1.append([]) - list_1[count].append(i) - if (str(type(dict_a.get(i)))) == "": - list_2.append(str("\n" + generate_result(dict_a.get(i), int(k + 1)))) - else: - list_2.append(dict_a.get(i)) - count = count + 1 - return custom_dict(list_1, list_2, k) diff --git a/utils/report/qtip_graph.py b/utils/report/qtip_graph.py deleted file mode 100644 index acbda40c..00000000 --- a/utils/report/qtip_graph.py +++ /dev/null @@ -1,30 +0,0 @@ -import matplotlib -import matplotlib.pyplot as plt -import numpy as np - -matplotlib.use('Agg') - - -def plot_indices(a, b, c): - N = 3 - ind = np.arange(N) - y_axis = (a, b, c) - width = 0.35 - f = plt.figure() - ax = f.gca() - ax.set_autoscale_on(True) - my_bars = ax.bar(ind, y_axis, width, color='b') - ax.set_ylabel('Index Score*') - ax.set_xlabel('Suite') - ax.set_title(' QTIP benchmark scores') - ax.axis('on') - my_bars = ax.bar(ind, y_axis, width) - ax.set_xticks(ind + width / 2) - ax.set_xticklabels(['Compute', 'Storage', 'Network']) - ax.axis([0, 3, 0, 1.25]) - f.text(0.7, 0.01, '* With Comparison to Refernece POD', fontsize=9) - - for rect in my_bars: - height = rect.get_height() - ax.text(rect.get_x() + rect.get_width() / 2., 1.05 * height, height, ha='center', va='bottom') - f.savefig('qtip_graph.jpeg') diff --git a/utils/spawn_vm.py b/utils/spawn_vm.py deleted file mode 100644 index f38c9a3a..00000000 --- a/utils/spawn_vm.py +++ /dev/null @@ -1,206 +0,0 @@ -############################################################################## -# Copyright (c) 2016 Dell Inc, ZTE 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 -############################################################################## -import os -import sys -import yaml -import heatclient.client -import keystoneclient -import time -from env_setup import Env_setup -from create_zones import AvailabilityZone -import logger_utils - -logger = logger_utils.QtipLogger('spawn_vm').get - - -class SpawnVM(Env_setup): - - def __init__(self, vm_info): - logger.info('vm_info: %s' % vm_info) - vm_role_ip_dict = vm_info.copy() - self._keystone_client = None - self._heat_client = None - self._glance_client = None - self._nova_client = None - self.azone = AvailabilityZone() - # TODO: it should clean up aggregates and stack after test case finished. - self.azone.clean_all_aggregates() - self.azone.create_aggs(vm_info['availability_zone']) - self.heat_template = self.generate_heat_template(vm_info) - self.create_stack(vm_role_ip_dict) - - @staticmethod - def get_public_network(): - - """ - TODO: GET THE NAMES OF THE PUBLIC NETWORKS for OTHER PROJECTS - """ - installer = os.environ['INSTALLER_TYPE'] - - if installer.lower() == 'fuel': - return 'admin_floating_net' - if installer.lower() == 'apex': - return 'external' - if installer.lower() == 'compass': - return 'ext-net' - if installer.lower() == 'joid': - return 'ext-net' - - def generate_heat_template(self, vm_params): - logger.info('Generating Heat Template') - heat_dict = {} - try: - with open('./config/SampleHeat.yaml', 'r+') as H_temp: - heat_dict = yaml.safe_load(H_temp) - except yaml.YAMLError as exc: - if hasattr(exc, 'problem_mark'): - mark = exc.problem_mark - logger.error( - 'Error in qtip/config/SampleHeat.yaml at: (%s,%s)' % (mark.line + 1, - mark.column + 1)) - logger.error('EXITING PROGRAM. Correct File and restart') - sys.exit(1) - - fopen = open('./config/QtipKey.pub', 'r') - fopenstr = fopen.read() - fopenstr = fopenstr.rstrip() - scriptcmd = '#!/bin/bash \n echo {0} >> foo.txt \n echo {1} >> /root/.ssh/authorized_keys'.format( - fopenstr, fopenstr) - - netName = self.get_public_network() - heat_dict['heat_template_version'] = '2015-04-30' - - heat_dict['parameters']['public_network'] = { - 'type': 'string', - 'default': netName - } - - for x in range(1, len(vm_params['availability_zone']) + 1): - avail_zone = vm_params['availability_zone'][x - 1] - - heat_dict['parameters']['availability_zone_' + str(x)] = \ - {'description': 'Availability Zone of the instance', - 'default': avail_zone, - 'type': 'string'} - - heat_dict['resources']['public_port_' + str(x)] = \ - {'type': 'OS::Neutron::Port', - 'properties': {'network': {'get_resource': 'network'}, - 'security_groups': [{'get_resource': 'security_group'}], - 'fixed_ips': [{'subnet_id': {'get_resource': 'subnet'}}]}} - - heat_dict['resources']['floating_ip_' + str(x)] = { - 'type': 'OS::Neutron::FloatingIP', - 'properties': {'floating_network': {'get_param': 'external_net_name'}}} - - heat_dict['resources']['floating_ip_assoc_' + str(x)] = { - 'type': 'OS::Neutron::FloatingIPAssociation', - 'properties': { - 'floatingip_id': {'get_resource': 'floating_ip_' + str(x)}, - 'port_id': {'get_resource': 'public_port_' + str(x)}}} - - heat_dict['resources']['my_instance_' + str(x)] = \ - {'type': 'OS::Nova::Server', - 'properties': {'image': {'get_param': 'image'}, - 'networks': - [{'port': {'get_resource': 'public_port_' + str(x)}}], - 'flavor': {'get_resource': 'flavor'}, - 'availability_zone': avail_zone, - 'security_groups': [{'get_resource': 'security_group'}], - 'name': 'instance' + str(x), - 'user_data_format': 'RAW', - 'user_data': scriptcmd}} - - heat_dict['outputs']['instance_PIP_' + str(x)] = { - 'description': 'IP address of the instance', - 'value': {'get_attr': ['my_instance_' + str(x), 'first_address']}} - - heat_dict['outputs']['instance_ip_' + str(x)] = { - 'description': 'IP address of the instance', - 'value': {'get_attr': ['floating_ip_' + str(x), 'floating_ip_address']}} - - heat_dict['outputs']['availability_instance_' + str(x)] = { - 'description': 'Availability Zone of the Instance', - 'value': {'get_param': 'availability_zone_' + str(x)}} - - del heat_dict['outputs']['description'] - logger.info(heat_dict) - - return heat_dict - - def _get_keystone_client(self): - """returns a keystone client instance""" - - if self._keystone_client is None: - self._keystone_client = keystoneclient.v2_0.client.Client( - auth_url=os.environ.get('OS_AUTH_URL'), - username=os.environ.get('OS_USERNAME'), - password=os.environ.get('OS_PASSWORD'), - tenant_name=os.environ.get('OS_TENANT_NAME')) - return self._keystone_client - - def _get_heat_client(self): - """returns a heat client instance""" - if self._heat_client is None: - keystone = self._get_keystone_client() - heat_endpoint = keystone.service_catalog.url_for( - service_type='orchestration') - self._heat_client = heatclient.client.Client( - '1', endpoint=heat_endpoint, token=keystone.auth_token) - return self._heat_client - - def create_stack(self, vm_role_ip_dict): - stackname = 'QTIP' - heat = self._get_heat_client() - - self.delete_stack(stackname) - - logger.info('Start to create stack %s' % stackname) - heat.stacks.create(stack_name=stackname, template=self.heat_template) - - stack_status = "IN_PROGRESS" - while stack_status != 'COMPLETE': - if stack_status == 'IN_PROGRESS': - logger.debug('Create in Progress') - if stack_status == 'CREATE_FAILED': - raise RuntimeError("Stack %s created failed!" % stackname) - stack_status = heat.stacks.get(stackname).status - time.sleep(15) - logger.info('Stack %s Created Complete!' % stackname) - - stack_outputs = heat.stacks.get(stackname).outputs - - for vm in range(len(vm_role_ip_dict['OS_image'])): - for i in stack_outputs: - instanceKey = "instance_ip_" + str(vm + 1) - privateIPkey = 'instance_PIP_' + str(vm + 1) - if i['output_key'] == instanceKey: - Env_setup.roles_dict[vm_role_ip_dict['role'][vm]] \ - .append(str(i['output_value'])) - Env_setup.ip_pw_list.append((str(i['output_value']), '')) - - if i['output_key'] == privateIPkey: - Env_setup.ip_pw_dict[vm_role_ip_dict['role'][vm]] = str(i['output_value']) - - logger.info('Getting Public IP(s): %s' % Env_setup.ip_pw_list) - - def delete_stack(self, stack_name): - heat = self._get_heat_client() - - stacks = heat.stacks.list() - exists = map(lambda x: x.stack_name, stacks) - if stack_name in exists: - logger.info("Delete stack %s" % stack_name) - heat.stacks.delete(stack_name) - while stack_name in exists: - time.sleep(10) - stacks = heat.stacks.list() - exists = map(lambda x: x.stack_name, stacks) - logger.debug("exists_stacks: %s" % exists) - logger.info("%s doesn't exist" % stack_name) diff --git a/utils/transform/__init__.py b/utils/transform/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/utils/transform/dpi_transform.py b/utils/transform/dpi_transform.py deleted file mode 100644 index ee29d8e2..00000000 --- a/utils/transform/dpi_transform.py +++ /dev/null @@ -1,47 +0,0 @@ -import os -import pickle -import datetime - -sum_dpi_pps = float(0) -sum_dpi_bps = float(0) - -for x in range(1, 11): - dpi_result_pps = float( - os.popen( - "cat $HOME/qtip_result/dpi_dump.txt | grep 'nDPI throughput:' | awk 'NR=='" + - str(x) + - " | awk '{print $3}'").read().lstrip()) - dpi_result_bps = float( - os.popen( - "cat $HOME/qtip_result/dpi_dump.txt | grep 'nDPI throughput:' | awk 'NR=='" + - str(x) + - " | awk '{print $7}'").read().rstrip()) - - if (dpi_result_pps > 100): - dpi_result_pps = dpi_result_pps / 1000 - - if (dpi_result_bps > 100): - dpi_result_bps = dpi_result_bps / 1000 - - sum_dpi_pps += dpi_result_pps - sum_dpi_bps += dpi_result_bps - -dpi_result_pps = sum_dpi_pps / 10 -dpi_result_bps = sum_dpi_bps / 10 - -host = os.popen("hostname").read().rstrip() -log_time_stamp = str(datetime.datetime.utcnow().isoformat()) - -os.popen( - "cat $HOME/qtip_result/dpi_dump.txt > $HOME/qtip_result/" + - host + - "-" + - log_time_stamp + - ".log") - -home_dir = str(os.popen("echo $HOME").read().rstrip()) -host = os.popen("echo $HOSTNAME") -result = {'pps': round(dpi_result_pps, 3), - 'bps': round(dpi_result_bps, 3)} -with open('./result_temp', 'w+') as result_file: - pickle.dump(result, result_file) diff --git a/utils/transform/final_report.py b/utils/transform/final_report.py deleted file mode 100644 index 274742d4..00000000 --- a/utils/transform/final_report.py +++ /dev/null @@ -1,24 +0,0 @@ -import pickle -import json -import datetime -import os -import sys - -home_dir = str((os.popen("echo $HOME").read().rstrip())) - -with open('./sys_info_temp', 'r') as sys_info_f: - sys_info_dict = pickle.load(sys_info_f) -with open('./result_temp', 'r') as result_f: - result_dict = pickle.load(result_f) - -host_name = (os.popen("hostname").read().rstrip()) -benchmark_name = str(sys.argv[1]) -testcase_name = str(sys.argv[2]) -report_time_stamp = str(datetime.datetime.utcnow().isoformat()) -final_dict = {"name": testcase_name, - "time": report_time_stamp, - "system_information": sys_info_dict, - "details": result_dict} - -with open('./' + host_name + '-' + report_time_stamp + '.json', 'w+') as result_json: - json.dump(final_dict, result_json, indent=4, sort_keys=True) diff --git a/utils/transform/fio_transform.py b/utils/transform/fio_transform.py deleted file mode 100755 index 5ecac823..00000000 --- a/utils/transform/fio_transform.py +++ /dev/null @@ -1,29 +0,0 @@ -import json -import pickle -import os -import datetime - - -def get_fio_job_result(fio_job_data): - return {'read': {'io_bytes': fio_job_data["read"]["io_bytes"], - 'io_ps': fio_job_data["read"]["iops"], - 'io_runtime_millisec': fio_job_data["read"]["runtime"], - 'mean_io_latenchy_microsec': fio_job_data["read"]["lat"]["mean"]}, - 'write': {'io_bytes': fio_job_data["write"]["io_bytes"], - 'io_ps': fio_job_data["write"]["iops"], - 'io_runtime_millisec': fio_job_data["write"]["runtime"], - 'mean_io_latenchy_microsec': fio_job_data["write"]["lat"]["mean"]}} - - -with open("fio_result.json") as fio_raw: - fio_data = json.load(fio_raw) - -fio_result_dict = {} -for x, result in enumerate(map(get_fio_job_result, fio_data["jobs"])): - fio_result_dict['job_{0}'.format(x)] = result - -host_name = (os.popen("hostname").read().rstrip()) -report_time = str(datetime.datetime.utcnow().isoformat()) -os.system("mv fio_result.json " + str(host_name) + "-" + report_time + ".log") -with open('./result_temp', 'w + ')as out_fio_result: - pickle.dump(fio_result_dict, out_fio_result) diff --git a/utils/transform/iperf_transform.py b/utils/transform/iperf_transform.py deleted file mode 100644 index b52e4634..00000000 --- a/utils/transform/iperf_transform.py +++ /dev/null @@ -1,27 +0,0 @@ -import json -import datetime -import pickle -with open('iperf_raw.json', 'r') as ifile: - raw_iperf_data = json.loads(ifile.read().rstrip()) - -bits_sent = raw_iperf_data['end']['sum_sent']['bits_per_second'] -bits_received = raw_iperf_data['end']['sum_received']['bits_per_second'] -total_byte_sent = raw_iperf_data['end']['sum_sent']['bytes'] -total_byte_received = raw_iperf_data['end']['sum_received']['bytes'] -cpu_host_total_percent = raw_iperf_data['end']['cpu_utilization_percent']['host_total'] -cpu_remote_total_percent = raw_iperf_data['end']['cpu_utilization_percent']['remote_total'] - -time_stamp = str(datetime.datetime.utcnow().isoformat()) - -result = {'version': raw_iperf_data['start']['version'], - 'bandwidth': {'sender_throughput': bits_sent, - 'received_throughput': bits_received}, - 'cpu': {'cpu_host': cpu_host_total_percent, - 'cpu_remote': cpu_remote_total_percent} - } - -with open('iperf_raw-' + time_stamp + '.log', 'w+') as ofile: - ofile.write(json.dumps(raw_iperf_data)) - -with open('./result_temp', 'w+') as result_file: - pickle.dump(result, result_file) diff --git a/utils/transform/ramspeed_transform.py b/utils/transform/ramspeed_transform.py deleted file mode 100644 index 960f84fc..00000000 --- a/utils/transform/ramspeed_transform.py +++ /dev/null @@ -1,41 +0,0 @@ -import os -import pickle -import datetime - -intmem_copy = os.popen("cat Intmem | grep 'BatchRun Copy' | awk '{print $4}'").read().rstrip() -intmem_scale = os.popen("cat Intmem | grep 'BatchRun Scale' | awk '{print $4}'").read().rstrip() -intmem_add = os.popen("cat Intmem | grep 'BatchRun Add' | awk '{print $4}'").read().rstrip() -intmem_triad = os.popen("cat Intmem | grep 'BatchRun Triad' | awk '{print $4}'").read().rstrip() -intmem_average = os.popen("cat Intmem | grep 'BatchRun AVERAGE' | awk '{print $4}'").read().rstrip() - -print intmem_copy -print intmem_average - -floatmem_copy = os.popen("cat Floatmem | grep 'BatchRun Copy' | awk '{print $4}'").read().rstrip() -floatmem_scale = os.popen("cat Floatmem | grep 'BatchRun Scale' | awk '{print $4}'").read().rstrip() -floatmem_add = os.popen("cat Floatmem | grep 'BatchRun Add' | awk '{print $4}'").read().rstrip() -floatmem_triad = os.popen("cat Floatmem | grep 'BatchRun Triad' | awk '{print $4}'").read().rstrip() -floatmem_average = os.popen("cat Floatmem | grep 'BatchRun AVERAGE' | awk '{print $4}'").read().rstrip() - -print floatmem_copy -print floatmem_average - -hostname = os.popen("hostname").read().rstrip() -time_stamp = str(datetime.datetime.utcnow().isoformat()) - -os.system("mv Intmem " + hostname + "-" + time_stamp + ".log") -os.system("cp Floatmem >> " + hostname + "-" + time_stamp + ".log") - -result = {"int_bandwidth": {"copy": intmem_copy, - "add": intmem_add, - "scale": intmem_scale, - "triad": intmem_triad, - "average": intmem_average}, - "float_bandwidth": {"copy": floatmem_copy, - "add": floatmem_add, - "scale": floatmem_scale, - "triad": floatmem_triad, - "average": floatmem_average}} - -with open('./result_temp', 'w+') as result_file: - pickle.dump(result, result_file) diff --git a/utils/transform/ssl_transform.py b/utils/transform/ssl_transform.py deleted file mode 100644 index de84d24b..00000000 --- a/utils/transform/ssl_transform.py +++ /dev/null @@ -1,54 +0,0 @@ -import os -import pickle -import datetime - -openssl_version = os.popen("cat RSA_dump | head -1").read().rstrip() -rsa_512_sps = os.popen( - "cat RSA_dump | grep '512 bits ' | awk '{print $6}' ").read().rstrip() -rsa_512_vps = os.popen( - "cat RSA_dump | grep '512 bits ' | awk '{print $7}' ").read().rstrip() -rsa_1024_sps = os.popen( - "cat RSA_dump | grep '1024 bits ' | awk '{print $6}' ").read().rstrip() -rsa_1024_vps = os.popen( - "cat RSA_dump | grep '1024 bits ' | awk '{print $7}' ").read().rstrip() -rsa_2048_sps = os.popen( - "cat RSA_dump | grep '2048 bits ' | awk '{print $6}' ").read().rstrip() -rsa_2048_vps = os.popen( - "cat RSA_dump | grep '2048 bits ' | awk '{print $7}' ").read().rstrip() -rsa_4096_sps = os.popen( - "cat RSA_dump | grep '4096 bits ' | awk '{print $6}' ").read().rstrip() -rsa_4096_vps = os.popen( - "cat RSA_dump | grep '4096 bits ' | awk '{print $7}' ").read().rstrip() - -aes_16B = os.popen( - "cat AES-128-CBC_dump | grep 'aes-128-cbc ' | awk '{print $2}' ").read().rstrip() -aes_64B = os.popen( - "cat AES-128-CBC_dump | grep 'aes-128-cbc ' | awk '{print $3}' ").read().rstrip() -aes_256B = os.popen( - "cat AES-128-CBC_dump | grep 'aes-128-cbc ' | awk '{print $4}' ").read().rstrip() -aes_1024B = os.popen( - "cat AES-128-CBC_dump | grep 'aes-128-cbc ' | awk '{print $5}' ").read().rstrip() -aes_8192B = os.popen( - "cat AES-128-CBC_dump | grep 'aes-128-cbc ' | awk '{print $6}' ").read().rstrip() - -hostname = os.popen("hostname").read().rstrip() -time_stamp = str(datetime.datetime.utcnow().isoformat()) - -os.system("mv RSA_dump " + hostname + "-" + time_stamp + ".log") -os.system("cat AES-128-CBC_dump >> " + hostname + "-" + time_stamp + ".log") - -result = {"version": [openssl_version], - "rsa_sig": {"512_bits": rsa_512_sps, - "1024_bits": rsa_1024_sps, - "2048_bits": rsa_2048_sps, - "4096_bits": rsa_4096_sps, - "unit": "sig/sec"}, - "aes_128_cbc": {"16B_block": aes_16B, - "64B_block": aes_64B, - "256B_block": aes_256B, - "1024B_block": aes_1024B, - "8192B_block": aes_8192B, - "unit": "B/sec"}} - -with open('./result_temp', 'w+') as result_file: - pickle.dump(result, result_file) diff --git a/utils/transform/ubench_transform.py b/utils/transform/ubench_transform.py deleted file mode 100644 index ab5fe171..00000000 --- a/utils/transform/ubench_transform.py +++ /dev/null @@ -1,32 +0,0 @@ -import os -import json -import pickle - -total_cpu = os.popen( - "cat $HOME/tempT/UnixBench/results/* | grep 'of tests' | awk '{print $1;}' | awk 'NR==1'").read().rstrip() - -cpu_1 = os.popen( - "cat $HOME/tempT/UnixBench/results/* | grep 'of tests' | awk '{print $6;}' | awk 'NR==1'").read().rstrip() - - -cpu_2 = os.popen( - "cat $HOME/tempT/UnixBench/results/* | grep 'of tests' | awk '{print $6;}' | awk 'NR==2'").read().rstrip() - - -index_1 = os.popen( - "cat $HOME/tempT/UnixBench/results/* | grep 'Index Score (Partial Only) ' | awk '{print $7;}' | awk 'NR==1'").read().rstrip() -index_2 = os.popen( - "cat $HOME/tempT/UnixBench/results/* | grep 'Index Score (Partial Only) ' | awk '{print $7;}' | awk 'NR==2'").read().rstrip() - - -result = {"n_cpu": total_cpu, - "single": {"n_para_test": cpu_1, - "score": index_1}, - "multi": {"n_para_test": cpu_2, - "score": index_2} - } - -with open('result_temp', 'w+') as result_file: - pickle.dump(result, result_file) -print json.dumps(result, indent=4, sort_keys=True) -# print result.items() -- cgit 1.2.3-korg