diff options
-rw-r--r-- | docs/designspec/compute_QPI.rst | 69 | ||||
-rw-r--r-- | docs/designspec/index.rst | 1 | ||||
-rw-r--r-- | opt/servers/dev.yml | 10 | ||||
-rw-r--r-- | opt/servers/elk.yml | 5 | ||||
-rw-r--r-- | opt/servers/inventory | 21 | ||||
-rw-r--r-- | opt/servers/mongo.yml | 4 | ||||
-rw-r--r-- | opt/servers/ngnix.yml | 4 | ||||
-rw-r--r-- | opt/servers/qtip.yml | 4 | ||||
-rw-r--r-- | opt/servers/roles/user/defaults/main.yml (renamed from opt/servers/roles/ssh/defaults/main.yml) | 0 | ||||
-rw-r--r-- | opt/servers/roles/user/files/serena.authorized_keys (renamed from opt/servers/roles/ssh/files/serena.authorized_keys) | 0 | ||||
-rw-r--r-- | opt/servers/roles/user/files/sudoers.d-qtip | 2 | ||||
-rw-r--r-- | opt/servers/roles/user/files/taseer.authorized_keys (renamed from opt/servers/roles/ssh/files/taseer.authorized_keys) | 0 | ||||
-rw-r--r-- | opt/servers/roles/user/files/yujunz.authorized_keys (renamed from opt/servers/roles/ssh/files/yujunz.authorized_keys) | 0 | ||||
-rw-r--r-- | opt/servers/roles/user/files/zhifeng.authorized_keys (renamed from opt/servers/roles/ssh/files/zhifeng.authorized_keys) | 0 | ||||
-rw-r--r-- | opt/servers/roles/user/tasks/main.yml (renamed from opt/servers/roles/ssh/tasks/main.yml) | 6 | ||||
-rw-r--r-- | opt/servers/ssh.yml | 4 | ||||
-rw-r--r-- | opt/servers/test.yml | 4 | ||||
-rw-r--r-- | opt/servers/testapi.yml | 4 | ||||
-rw-r--r-- | qtip/utils/logger_utils.py | 3 | ||||
-rw-r--r-- | setup.cfg | 2 | ||||
-rw-r--r-- | tox.ini | 1 |
21 files changed, 103 insertions, 41 deletions
diff --git a/docs/designspec/compute_QPI.rst b/docs/designspec/compute_QPI.rst new file mode 100644 index 00000000..2e5aa87c --- /dev/null +++ b/docs/designspec/compute_QPI.rst @@ -0,0 +1,69 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. (c) 2016 ZTE Corp. + + +*********** +Compute QPI +*********** + +The compute QPI gives user an overall score for system compute performace. + +Summary +======= + +The compute QPI are calibrated a ZTE `E9000 <http://www.zte.com.cn/global/products/cocloud/cloud_computing/cloud_infrastructure/cloud_hw/429552>`_ server as a baseline with score of 2500 points. +Higher scores are better, with double the score indicating double the performance. +The compute QPI provides three different kinds of scores: + +* Workload Scores +* Section Scores +* Compute QPI Scores + +Baseline +======== + +ZTE E9000 server with an 2 Deca core Intel Xeon CPU processor,128560.0MB Memory. + +Workload Scores +=============== + +Each time a workload is executed QTIP calculates a score based on the computer's performance +compared to the baseline performance. + +Section Scores +============== + +QTIP uses a number of different tests, or workloads, to measure performance. +The workloads are divided into five different sections: + ++-----------------+--------------------------------------------------------------+------------------------------------------+ +| Section | Detail | Indication | ++=================+==============================================================+==========================================+ +| Integer | Integer workloads measure the integer instruction performace | All app relies on integer | +| | of host or vm by performing Dhrystone test. | performance | ++-----------------+--------------------------------------------------------------+------------------------------------------+ +| Floating point | Floating point workloads measure the floating pointperfo | Floating point performance is especially | +| | rmance by performing Whetstone test. | important in video games,digital content | +| | | creation applications. | ++-----------------+--------------------------------------------------------------+------------------------------------------+ +| Memory | Memory workloads measure memory bandwidth by performing | Software working with cipher large | +| | RamSpeed test. | amounts data relies on SSL Performace. | ++-----------------+--------------------------------------------------------------+------------------------------------------+ +| DPI | DPI workloads measure deep-packet inspection speed by | Software working with network packet | +| | performing nDPI test. | anlysis relies on DPI performance. | ++-----------------+--------------------------------------------------------------+------------------------------------------+ +| SSL | SSL Performance workloads measure cipher speeds by | Software working with cipher large | +| | using the OpenSSL tool. | amounts data relies on SSL Performace | ++-----------------+--------------------------------------------------------------+------------------------------------------+ + +A section score is the `geometric mean <https://en.wikipedia.org/wiki/Geometric_mean>`_ of all the workload scores for workloads +that are part of the section. These scores are useful for determining the performance of +the computer in a particular area. + +Compute QPI Scores +================== + +The compute QPI score is the `weighted arithmetic mean <https://en.wikipedia.org/wiki/Weighted_arithmetic_mean>`_ of the five section scores. +The compute QPI score provides a way to quickly compare performance across different +computers and different platforms without getting bogged down in details. diff --git a/docs/designspec/index.rst b/docs/designspec/index.rst index e9b3f9fd..d3bed217 100644 --- a/docs/designspec/index.rst +++ b/docs/designspec/index.rst @@ -11,3 +11,4 @@ QTIP Design Specifications :maxdepth: 2 dashboard.rst + compute_QPI.rst diff --git a/opt/servers/dev.yml b/opt/servers/dev.yml new file mode 100644 index 00000000..2e0cca93 --- /dev/null +++ b/opt/servers/dev.yml @@ -0,0 +1,10 @@ +--- +- hosts: development + roles: + - user + - docker + - elk + - mongo + - nginx + - qtip + - testapi diff --git a/opt/servers/elk.yml b/opt/servers/elk.yml deleted file mode 100644 index e2696573..00000000 --- a/opt/servers/elk.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -- hosts: elk-servers - roles: - - docker - - elk diff --git a/opt/servers/inventory b/opt/servers/inventory index 65c6c35d..0a862caa 100644 --- a/opt/servers/inventory +++ b/opt/servers/inventory @@ -1,17 +1,8 @@ -qtip-dev ansible_host=dev.qtip.io -qtip-test ansible_host=test.qtip.io +desk ansible_host=desk.qtip.io # 2vCPU/4GiB/16GiB (AWS us-east-1a) +table ansible_host=table.qtip.io # 1vCPU/1024MB/100Mbps/40GB (Aliyun Hongkong B) -[elk-servers] -qtip-dev +[development] +desk -[ngnix-servers] -qtip-dev - -[qtip-servers] -qtip-dev - -[testapi-servers] -qtip-dev - -[mongo-servers] -qtip-dev +[testing] +table diff --git a/opt/servers/mongo.yml b/opt/servers/mongo.yml deleted file mode 100644 index e64c0c69..00000000 --- a/opt/servers/mongo.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- hosts: mongo-servers - roles: - - mongo diff --git a/opt/servers/ngnix.yml b/opt/servers/ngnix.yml deleted file mode 100644 index d57a5603..00000000 --- a/opt/servers/ngnix.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- hosts: ngnix-servers - roles: - - ngnix diff --git a/opt/servers/qtip.yml b/opt/servers/qtip.yml deleted file mode 100644 index f0ac3c4e..00000000 --- a/opt/servers/qtip.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- hosts: qtip-servers - roles: - - qtip diff --git a/opt/servers/roles/ssh/defaults/main.yml b/opt/servers/roles/user/defaults/main.yml index 41ee9853..41ee9853 100644 --- a/opt/servers/roles/ssh/defaults/main.yml +++ b/opt/servers/roles/user/defaults/main.yml diff --git a/opt/servers/roles/ssh/files/serena.authorized_keys b/opt/servers/roles/user/files/serena.authorized_keys index 5cdbfe00..5cdbfe00 100644 --- a/opt/servers/roles/ssh/files/serena.authorized_keys +++ b/opt/servers/roles/user/files/serena.authorized_keys diff --git a/opt/servers/roles/user/files/sudoers.d-qtip b/opt/servers/roles/user/files/sudoers.d-qtip new file mode 100644 index 00000000..e96d278a --- /dev/null +++ b/opt/servers/roles/user/files/sudoers.d-qtip @@ -0,0 +1,2 @@ +# Group rules for qtip-contributors +%qtip ALL=(ALL) NOPASSWD:ALL diff --git a/opt/servers/roles/ssh/files/taseer.authorized_keys b/opt/servers/roles/user/files/taseer.authorized_keys index 2efb95e8..2efb95e8 100644 --- a/opt/servers/roles/ssh/files/taseer.authorized_keys +++ b/opt/servers/roles/user/files/taseer.authorized_keys diff --git a/opt/servers/roles/ssh/files/yujunz.authorized_keys b/opt/servers/roles/user/files/yujunz.authorized_keys index 83ed540d..83ed540d 100644 --- a/opt/servers/roles/ssh/files/yujunz.authorized_keys +++ b/opt/servers/roles/user/files/yujunz.authorized_keys diff --git a/opt/servers/roles/ssh/files/zhifeng.authorized_keys b/opt/servers/roles/user/files/zhifeng.authorized_keys index 195cfdca..195cfdca 100644 --- a/opt/servers/roles/ssh/files/zhifeng.authorized_keys +++ b/opt/servers/roles/user/files/zhifeng.authorized_keys diff --git a/opt/servers/roles/ssh/tasks/main.yml b/opt/servers/roles/user/tasks/main.yml index 48318485..b1b5be9b 100644 --- a/opt/servers/roles/ssh/tasks/main.yml +++ b/opt/servers/roles/user/tasks/main.yml @@ -1,6 +1,12 @@ - name: add group qtip become: true group: name=qtip state=present +- name: add qtip to sudoers without password + become: true + file: + src: sudoers.d-qtip + dest: /etc/sudoers.d/50-qtip + mode: 0440 - name: add users for ssh access become: true user: diff --git a/opt/servers/ssh.yml b/opt/servers/ssh.yml deleted file mode 100644 index a7fbb1c0..00000000 --- a/opt/servers/ssh.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- hosts: all - roles: - - ssh diff --git a/opt/servers/test.yml b/opt/servers/test.yml new file mode 100644 index 00000000..549b7255 --- /dev/null +++ b/opt/servers/test.yml @@ -0,0 +1,4 @@ +--- +- hosts: testing + roles: + - user diff --git a/opt/servers/testapi.yml b/opt/servers/testapi.yml deleted file mode 100644 index 556284db..00000000 --- a/opt/servers/testapi.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -- hosts: testapi-servers - roles: - - testapi diff --git a/qtip/utils/logger_utils.py b/qtip/utils/logger_utils.py index e8817c3c..d5e76a64 100644 --- a/qtip/utils/logger_utils.py +++ b/qtip/utils/logger_utils.py @@ -62,4 +62,7 @@ class QtipLogger(Logger): file_path = '{}/qtip/logs'.format(os.environ['HOME']) def __init__(self, logger_name): + if not os.path.exists(self.file_path): + os.makedirs(self.file_path) + super(QtipLogger, self).__init__(logger_name) @@ -13,7 +13,7 @@ setup-hooks = [entry_points] console_scripts = - qtip = qti.cli:entry + qtip = qtip.cli:entry [files] packages = @@ -18,6 +18,7 @@ commands= --basetemp={envtmpdir} \ {posargs} setenv= + HOME = {envtmpdir} PYTHONPATH = {toxinidir} [testenv:pep8] |