aboutsummaryrefslogtreecommitdiffstats
path: root/resources/template
diff options
context:
space:
mode:
Diffstat (limited to 'resources/template')
-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
8 files changed, 290 insertions, 0 deletions
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
+