summaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
Diffstat (limited to 'resources')
-rw-r--r--resources/QPI/compute.yaml36
-rw-r--r--resources/metric/inxi.yaml44
-rw-r--r--resources/metric/openssl.yaml54
-rw-r--r--resources/template/hosts.j221
-rw-r--r--resources/template/hosts.sample83
-rw-r--r--resources/template/qpi-report.j218
-rw-r--r--resources/template/qpi-report.sample46
-rw-r--r--resources/template/ssh.cfg.j214
-rw-r--r--resources/template/ssh.cfg.sample56
-rw-r--r--resources/template/system-info.j216
-rw-r--r--resources/template/system-info.sample36
11 files changed, 424 insertions, 0 deletions
diff --git a/resources/QPI/compute.yaml b/resources/QPI/compute.yaml
new file mode 100644
index 00000000..736aef22
--- /dev/null
+++ b/resources/QPI/compute.yaml
@@ -0,0 +1,36 @@
+##############################################################################
+# Copyright (c) 2016 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+name: compute
+description: QTIP Performance Index of compute
+formula: weighted arithmetic mean
+sections: # split based on different application
+ - name: SSL
+ description: cryptography and SSL/TLS performance
+ formula: geometric mean
+ metrics:
+ - name: ssl_rsa
+ formual: geometric mean
+ workloads:
+ - name: rsa_sign_512
+ description: RSA signature 512 bits
+ baseline: 14982.3
+ - name: rsa_verify_512
+ baseline: 180619.2
+ - name: rsa_sign_1024
+ baseline: 5037.7
+ - name: rsa_verify_1024
+ baseline: 67359.9
+ - name: rsa_sign_2048
+ baseline: 713.6
+ - name: rsa_verify_2048
+ baseline: 23458.0
+ - name: rsa_sign_4096
+ baseline: 102.1
+ - name: rsa_verify_4096
+ baseline: 6402.9
diff --git a/resources/metric/inxi.yaml b/resources/metric/inxi.yaml
new file mode 100644
index 00000000..47eb2e73
--- /dev/null
+++ b/resources/metric/inxi.yaml
@@ -0,0 +1,44 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+- name: install inxi - Command line system information script for console and IRC
+ package:
+ name: inxi
+ state: present
+
+- name: check hardware information with inxi
+ command: inxi -b -c0 -n
+ register: inxi_out
+
+# TODO(yujunz) normalize system information, test condition and performance metrics for future data mining
+# e.g. convert "2 Deca core Intel Xeon E5-2650 v3s (-HT-MCP-SMP-) speed/max: 1200/3000 MHz" to
+# ---
+# processor:
+# id:
+# vendor: Intel
+# product_family: Xeon
+# processor_number: E5-2650 v3s
+# number_of_cores: 2
+# number_of_threads: None # set `None` when data is not available
+# base_frequency_mhz: 1200
+# max_turbo_frequency_mhz: 3000
+# cache_mb: None
+- name: collect system information from inxi
+ collect:
+ string: "{{ inxi_out.stdout }}"
+ patterns:
+ - '.+\s+Host:\s+(?P<hostname>.+)\sKernel'
+ - '.+\sMemory:\s+(?P<memory>.+MB)\s'
+ - '^CPU\(s\):\s+(?P<cpu>.+)'
+ - '.+\sDistro:\s+(?P<os>.+)'
+ - '.+\sKernel:\s+(?P<kernel>.+)\sConsole'
+ - '.+\s+HDD Total Size:\s+(?P<disk>.+)\s'
+ - '.+\sproduct:\s+(?P<product>.+)\sv'
+ dump: 'inix.log'
+ register: system_info
diff --git a/resources/metric/openssl.yaml b/resources/metric/openssl.yaml
new file mode 100644
index 00000000..2dda0e33
--- /dev/null
+++ b/resources/metric/openssl.yaml
@@ -0,0 +1,54 @@
+##############################################################################
+# Copyright (c) 2017 ZTE Corporation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+- name: install openssl - Cryptography and SSL/TLS Toolkit
+ package:
+ name: openssl
+ state: present
+
+- name: RSA signatures speed measurement
+ command: openssl speed rsa
+ register: openssl_rsa_log
+
+#- name: AES speed measurement
+# command: openssl speed -evp aes-128-cbc
+# register: openssl_aes_log
+
+- name: collect ssl metrics from openssl
+ collect:
+ string: "{{ openssl_rsa_log.stdout }}"
+ patterns:
+ - |-
+ ^rsa\s+512\sbits\s.+\s+
+ ?(?P<rsa_sign_512>\d+\.\d)\s+
+ ?(?P<rsa_verify_512>\d+\.\d)$
+ - |-
+ ^rsa\s+1024\sbits\s.+\s+
+ ?(?P<rsa_sign_1024>\d+\.\d)\s+
+ ?(?P<rsa_verify_1024>\d+\.\d)$
+ - |-
+ ^rsa\s+2048\sbits\s.+\s+
+ ?(?P<rsa_sign_2048>\d+\.\d)\s+
+ ?(?P<rsa_verify_2048>\d+\.\d)$
+ - |-
+ ^rsa\s+4096\sbits\s.+\s+
+ ?(?P<rsa_sign_4096>\d+\.\d)\s+
+ ?(?P<rsa_verify_4096>\d+\.\d)$
+ dump: openssl_rsa_log
+ register: openssl_rsa_metrics
+
+# - filename: AES-128-CBC_dump
+# grep:
+# - |-
+# ^aes-128-cbc\s+
+# ?(?P<aes_128_cbc_16_bytes>\d+\.\w+)\s+
+# ?(?P<aes_128_cbc_64_bytes>\d+\.\w+)\s+
+# ?(?P<aes_128_cbc_256_bytes>\d+\.\w+)\s+
+# ?(?P<aes_128_cbc_1024_bytes>\d+\.\w+)\s+
+# ?(?P<aes_128_cbc_8192_bytes>\d+\.\w+)$
diff --git a/resources/template/hosts.j2 b/resources/template/hosts.j2
new file mode 100644
index 00000000..868a4e57
--- /dev/null
+++ b/resources/template/hosts.j2
@@ -0,0 +1,21 @@
+[fuel-master]
+fuel-master
+
+[local]
+localhost ansible_connection=local
+
+[fuel-groups:children]
+{% for group in hosts|sort %}
+{{ group }}
+{% endfor %}
+
+[fuel-groups:vars]
+ansible_ssh_common_args=-F ./ssh.cfg
+
+{% for group in hosts|sort %}
+[{{ group }}]
+{% for host in hosts[group]|sort %}
+{{ host }}
+{% endfor %}
+
+{% endfor %}
diff --git a/resources/template/hosts.sample b/resources/template/hosts.sample
new file mode 100644
index 00000000..e37d38ec
--- /dev/null
+++ b/resources/template/hosts.sample
@@ -0,0 +1,83 @@
+[fuel-master]
+fuel-master
+
+[local]
+localhost ansible_connection=local
+
+[fuel-groups:children]
+ceph-osd
+cluster-1
+compute
+controller
+hw-zte-servers
+mongo
+node-1
+node-2
+node-3
+node-4
+node-5
+node-6
+node-7
+
+[fuel-groups:vars]
+ansible_ssh_common_args=-F ./ssh.cfg
+
+[ceph-osd]
+node-2
+node-4
+node-6
+node-7
+
+[cluster-1]
+node-1
+node-2
+node-3
+node-4
+node-5
+node-6
+node-7
+
+[compute]
+node-2
+node-4
+node-6
+node-7
+
+[controller]
+node-1
+node-3
+node-5
+
+[hw-zte-servers]
+node-1
+node-2
+node-3
+node-4
+node-5
+node-6
+node-7
+
+[mongo]
+node-1
+
+[node-1]
+node-1
+
+[node-2]
+node-2
+
+[node-3]
+node-3
+
+[node-4]
+node-4
+
+[node-5]
+node-5
+
+[node-6]
+node-6
+
+[node-7]
+node-7
+
diff --git a/resources/template/qpi-report.j2 b/resources/template/qpi-report.j2
new file mode 100644
index 00000000..afe9bfb8
--- /dev/null
+++ b/resources/template/qpi-report.j2
@@ -0,0 +1,18 @@
+Sample QPI Report
+{% for host in groups['compute'] %}
+{% set qpi_result = hostvars[host].qpi_result %}
+
+Host: {{ hostvars[host].ansible_hostname }}
+QPI: {{ qpi_result.score }}
+Spec: {{ qpi_result.spec.name }}
+
+{% for section in qpi_result.section_results %}
+- {{ section.name }}: {{ section.result.score }}
+{% for metric in section.result.metric_results %}
+ - {{ metric.name }}: {{ metric.result.score }}
+{% for workload in metric.result.workload_results %}
+ - {{ workload.name }}: {{ workload.score }}
+{% endfor %}
+{% endfor %}
+{% endfor %}
+{% endfor %}
diff --git a/resources/template/qpi-report.sample b/resources/template/qpi-report.sample
new file mode 100644
index 00000000..cb9e9308
--- /dev/null
+++ b/resources/template/qpi-report.sample
@@ -0,0 +1,46 @@
+Sample QPI Report
+
+Host: node-26
+QPI: 1.41147857985
+Spec: compute
+
+- SSL: 1.41147857985
+ - ssl_rsa: 1.41147857985
+ - rsa_sign_512: 1.25261808935
+ - rsa_verify_512: 1.33973907536
+ - rsa_sign_1024: 1.31933223495
+ - rsa_verify_1024: 1.46972456907
+ - rsa_sign_2048: 1.8615470852
+ - rsa_verify_2048: 1.3683903146
+ - rsa_sign_4096: 1.31537708129
+ - rsa_verify_4096: 1.36510018898
+
+Host: node-28
+QPI: 1.28082308651
+Spec: compute
+
+- SSL: 1.28082308651
+ - ssl_rsa: 1.28082308651
+ - rsa_sign_512: 1.13628081136
+ - rsa_verify_512: 1.24882238433
+ - rsa_sign_1024: 1.16100601465
+ - rsa_verify_1024: 1.33382620817
+ - rsa_sign_2048: 1.72057174888
+ - rsa_verify_2048: 1.23917640038
+ - rsa_sign_4096: 1.16846229187
+ - rsa_verify_4096: 1.2384388324
+
+Host: node-27
+QPI: 1.41542492777
+Spec: compute
+
+- SSL: 1.41542492777
+ - ssl_rsa: 1.41542492777
+ - rsa_sign_512: 1.25857845591
+ - rsa_verify_512: 1.34193319426
+ - rsa_sign_1024: 1.32097981222
+ - rsa_verify_1024: 1.4807103336
+ - rsa_sign_2048: 1.86378923767
+ - rsa_verify_2048: 1.36600306932
+ - rsa_sign_4096: 1.31635651322
+ - rsa_verify_4096: 1.37504880601
diff --git a/resources/template/ssh.cfg.j2 b/resources/template/ssh.cfg.j2
new file mode 100644
index 00000000..2fe049e2
--- /dev/null
+++ b/resources/template/ssh.cfg.j2
@@ -0,0 +1,14 @@
+# Connect to target node through jump host
+#
+# OpenSSH 7.3:
+# ProxyJump jumphost
+# before OpenSSH 7.3
+# ProxyCommand ssh -o 'ForwardAgent yes' jumphost 'ssh-add && nc %h %p'
+
+{% for (name, host) in hosts_meta.items() %}
+Host {{ name }}
+ HostName {{ host.ansible_ssh_host }}
+ User root
+ ProxyCommand ssh -o 'ForwardAgent yes' fuel-master 'ssh-add && nc %h %p'
+
+{% endfor %}
diff --git a/resources/template/ssh.cfg.sample b/resources/template/ssh.cfg.sample
new file mode 100644
index 00000000..efa45ab6
--- /dev/null
+++ b/resources/template/ssh.cfg.sample
@@ -0,0 +1,56 @@
+Host node-5
+ HostName 10.20.5.12
+ User root
+ # Use `ProxyCommand` for OpenSSH before 7.3
+ ProxyCommand ssh -o 'ForwardAgent yes' fuel-master 'ssh-add && nc %h %p'
+ # `ProxyJump` is available since OpenSSH 7.3
+ # ProxyJump fuel-master
+
+Host node-4
+ HostName 10.20.5.14
+ User root
+ # Use `ProxyCommand` for OpenSSH before 7.3
+ ProxyCommand ssh -o 'ForwardAgent yes' fuel-master 'ssh-add && nc %h %p'
+ # `ProxyJump` is available since OpenSSH 7.3
+ # ProxyJump fuel-master
+
+Host node-7
+ HostName 10.20.5.15
+ User root
+ # Use `ProxyCommand` for OpenSSH before 7.3
+ ProxyCommand ssh -o 'ForwardAgent yes' fuel-master 'ssh-add && nc %h %p'
+ # `ProxyJump` is available since OpenSSH 7.3
+ # ProxyJump fuel-master
+
+Host node-6
+ HostName 10.20.5.16
+ User root
+ # Use `ProxyCommand` for OpenSSH before 7.3
+ ProxyCommand ssh -o 'ForwardAgent yes' fuel-master 'ssh-add && nc %h %p'
+ # `ProxyJump` is available since OpenSSH 7.3
+ # ProxyJump fuel-master
+
+Host node-1
+ HostName 10.20.5.10
+ User root
+ # Use `ProxyCommand` for OpenSSH before 7.3
+ ProxyCommand ssh -o 'ForwardAgent yes' fuel-master 'ssh-add && nc %h %p'
+ # `ProxyJump` is available since OpenSSH 7.3
+ # ProxyJump fuel-master
+
+Host node-3
+ HostName 10.20.5.11
+ User root
+ # Use `ProxyCommand` for OpenSSH before 7.3
+ ProxyCommand ssh -o 'ForwardAgent yes' fuel-master 'ssh-add && nc %h %p'
+ # `ProxyJump` is available since OpenSSH 7.3
+ # ProxyJump fuel-master
+
+Host node-2
+ HostName 10.20.5.13
+ User root
+ # Use `ProxyCommand` for OpenSSH before 7.3
+ ProxyCommand ssh -o 'ForwardAgent yes' fuel-master 'ssh-add && nc %h %p'
+ # `ProxyJump` is available since OpenSSH 7.3
+ # ProxyJump fuel-master
+
diff --git a/resources/template/system-info.j2 b/resources/template/system-info.j2
new file mode 100644
index 00000000..305a2af2
--- /dev/null
+++ b/resources/template/system-info.j2
@@ -0,0 +1,16 @@
+System Information from inxi
+============================
+
+{% for host in groups['compute'] %}
+{{ hostvars[host].ansible_hostname }}
+-----------------------------
+
+{{ ('CPU Brand', hostvars[host].system_info.cpu[0])|justify }}
+{{ ('Disk', hostvars[host].system_info.disk[0])|justify }}
+{{ ('Host Name', hostvars[host].system_info.hostname[0])|justify }}
+{{ ('Kernel', hostvars[host].system_info.kernel[0])|justify }}
+{{ ('Memory', hostvars[host].system_info.memory[0])|justify }}
+{{ ('Operating System', hostvars[host].system_info.os[0])|justify }}
+{{ ('Product', hostvars[host].system_info.product[0])|justify }}
+
+{% endfor %}
diff --git a/resources/template/system-info.sample b/resources/template/system-info.sample
new file mode 100644
index 00000000..371243e2
--- /dev/null
+++ b/resources/template/system-info.sample
@@ -0,0 +1,36 @@
+System Information from inxi
+============================
+
+node-26
+-----------------------------
+
+CPU Brand.................2 Deca core Intel Xeon E5-2650 v3s (-HT-MCP-SMP-) speed/max: 1200/3000 MHz
+Disk............................................................................1200.3GB (0.8% used)
+Host Name.........................................................................node-26.zte.com.cn
+Kernel..............................................................4.4.0-66-generic x86_64 (64 bit)
+Memory.............................................................................3836.1/128524.1MB
+Operating System.................................................................Ubuntu 16.04 xenial
+Product......................................................................................EC600G3
+
+node-28
+-----------------------------
+
+CPU Brand.................2 Deca core Intel Xeon E5-2650 v3s (-HT-MCP-SMP-) speed/max: 1200/3000 MHz
+Disk............................................................................1200.3GB (0.8% used)
+Host Name.........................................................................node-28.zte.com.cn
+Kernel..............................................................4.4.0-66-generic x86_64 (64 bit)
+Memory.............................................................................3826.6/128524.1MB
+Operating System.................................................................Ubuntu 16.04 xenial
+Product......................................................................................EC600G3
+
+node-27
+-----------------------------
+
+CPU Brand.................2 Deca core Intel Xeon E5-2650 v3s (-HT-MCP-SMP-) speed/max: 1200/3000 MHz
+Disk............................................................................1200.3GB (0.8% used)
+Host Name.........................................................................node-27.zte.com.cn
+Kernel..............................................................4.4.0-66-generic x86_64 (64 bit)
+Memory.............................................................................3922.4/128524.1MB
+Operating System.................................................................Ubuntu 16.04 xenial
+Product......................................................................................EC600G3
+