+++ /dev/null
-[fuel-master]
-fuel-master
-
-[local]
-localhost ansible_connection=local
-
--- /dev/null
+[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 %}
--- /dev/null
+[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
+
##############################################################################
---
-# Prepare connection to SUT (System Under Test)
-- hosts: fuel-master
- gather_facts: no
- tasks:
- - name: collect facts of fuel hosts
- fuel:
- - name: add compute node to ansible inventory
- add_host:
- name: "{{ hosts_meta[item]['ip'] }}"
- groups: compute
- ansible_user: root
- ansible_ssh_common_args: '-o StrictHostKeyChecking=No -o ProxyJump=fuel-master'
- with_items: "{{ hosts.compute }}"
-
# Execute compute benchmark plan and collect data
# - system information
# - test condition
--- /dev/null
+##############################################################################
+# 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
+##############################################################################
+
+# Prepare connection to SUT (System Under Test)
+- hosts: fuel-master
+ gather_facts: no
+ tasks:
+ - name: collect facts of fuel hosts
+ fuel:
+ - name: update inventory file
+ template: src=./hosts.j2 dest=./hosts
+ delegate_to: localhost
+ - name: update ssh.cfg file
+ template: src=./ssh.cfg.j2 dest=./ssh.cfg
+ delegate_to: localhost
--- /dev/null
+# 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 %}
--- /dev/null
+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
+