aboutsummaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-05-16 08:29:20 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-05-16 08:29:20 +0000
commitb5a115179cc75be6ca853d740dfce393fc8c1fd2 (patch)
tree7f4dda28214d72e49eadd364673e6fa11164623a /resources
parenteeb3cad4c3bf94b7b5f7da6cde190364bb10fca6 (diff)
parent704d1340fb09b5ffad0282bc143d41e2afebd0bf (diff)
Merge "Add support for manually installed (not using installer) OPNFV pod"
Diffstat (limited to 'resources')
-rw-r--r--resources/ansible_roles/qtip-workspace/defaults/main.yml1
-rw-r--r--resources/ansible_roles/qtip-workspace/files/template/group_vars/all.yml1
-rw-r--r--resources/ansible_roles/qtip-workspace/files/template/hosts9
-rw-r--r--resources/ansible_roles/qtip-workspace/files/template/run.yml4
-rw-r--r--resources/ansible_roles/qtip-workspace/files/template/setup.yml10
-rw-r--r--resources/ansible_roles/qtip-workspace/files/template/teardown.yml2
-rw-r--r--resources/ansible_roles/qtip-workspace/files/template/templates/hosts9
7 files changed, 28 insertions, 8 deletions
diff --git a/resources/ansible_roles/qtip-workspace/defaults/main.yml b/resources/ansible_roles/qtip-workspace/defaults/main.yml
index 68dafbc2..7f6407d3 100644
--- a/resources/ansible_roles/qtip-workspace/defaults/main.yml
+++ b/resources/ansible_roles/qtip-workspace/defaults/main.yml
@@ -12,6 +12,7 @@ installer: fuel
installer_master_host: fuel-master
installer_master_group:
+ manual: dummy-group
fuel: fuel-masters
apex: apex-underclouds
diff --git a/resources/ansible_roles/qtip-workspace/files/template/group_vars/all.yml b/resources/ansible_roles/qtip-workspace/files/template/group_vars/all.yml
index 2967f6eb..3d41e1b4 100644
--- a/resources/ansible_roles/qtip-workspace/files/template/group_vars/all.yml
+++ b/resources/ansible_roles/qtip-workspace/files/template/group_vars/all.yml
@@ -14,6 +14,7 @@ qtip_dump: dump
qtip_cache: "{{ qtip_cache }}"
qtip_workdir: "{% raw %}{{ ansible_env.HOME }}{% endraw %}/qtip-workdir-{{ lookup('pipe', 'date +%Y%m%d-%H%M') }}"
installer_master_group:
+ manual: dummy-group
fuel: fuel-masters
apex: apex-underclouds
diff --git a/resources/ansible_roles/qtip-workspace/files/template/hosts b/resources/ansible_roles/qtip-workspace/files/template/hosts
index b8b4bbe6..b8b256a9 100644
--- a/resources/ansible_roles/qtip-workspace/files/template/hosts
+++ b/resources/ansible_roles/qtip-workspace/files/template/hosts
@@ -1,4 +1,13 @@
localhost ansible_connection=local
+{% if installer != 'manual' %}
[{{ installer_master_group[installer] }}]
{{ installer_master_host }}
+{% else %}
+[SUT]
+# Add hosts in system under test, example::
+#
+# host-1 ansible_host=192.168.10.1 ansible_host=22 ansile_user=root
+#
+# See http://docs.ansible.com/ansible/intro_inventory.html for details
+{% endif %} \ No newline at end of file
diff --git a/resources/ansible_roles/qtip-workspace/files/template/run.yml b/resources/ansible_roles/qtip-workspace/files/template/run.yml
index 9bb865d6..f8e71f0c 100644
--- a/resources/ansible_roles/qtip-workspace/files/template/run.yml
+++ b/resources/ansible_roles/qtip-workspace/files/template/run.yml
@@ -16,14 +16,14 @@
- { role: qtip, tasks: setup-local, tags: [setup] }
-- hosts: compute
+- hosts: SUT
roles:
# prepare environment
- { role: qtip, tasks: setup-node, tags: [setup] }
-- hosts: compute
+- hosts: SUT
roles:
# run test and collect metrics
diff --git a/resources/ansible_roles/qtip-workspace/files/template/setup.yml b/resources/ansible_roles/qtip-workspace/files/template/setup.yml
index a522d67b..d165a9fe 100644
--- a/resources/ansible_roles/qtip-workspace/files/template/setup.yml
+++ b/resources/ansible_roles/qtip-workspace/files/template/setup.yml
@@ -10,8 +10,14 @@
# Prepare connection to SUT (System Under Test)
---
-
-- hosts: [fuel-masters, apex-underclouds]
+{% if installer == 'manual' %}
+- hosts: localhost
+ gather_facts: no
+ tasks:
+ - debug: "msg='please add hosts to SUT group in `hosts` file manually.'"
+{% else %}
+- hosts: [{{ installer_master_group[installer] }}]
gather_facts: no
roles:
- { role: qtip, tasks: generate-inventory }
+{% endif %}
diff --git a/resources/ansible_roles/qtip-workspace/files/template/teardown.yml b/resources/ansible_roles/qtip-workspace/files/template/teardown.yml
index cd0b9a2c..dc659930 100644
--- a/resources/ansible_roles/qtip-workspace/files/template/teardown.yml
+++ b/resources/ansible_roles/qtip-workspace/files/template/teardown.yml
@@ -7,7 +7,7 @@
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################
-- hosts: compute
+- hosts: SUT
roles:
# teardown environment
diff --git a/resources/ansible_roles/qtip-workspace/files/template/templates/hosts b/resources/ansible_roles/qtip-workspace/files/template/templates/hosts
index cbbfcfef..492651b0 100644
--- a/resources/ansible_roles/qtip-workspace/files/template/templates/hosts
+++ b/resources/ansible_roles/qtip-workspace/files/template/templates/hosts
@@ -4,12 +4,15 @@ localhost ansible_connection=local
[{{ installer_master_group[installer] }}]
{{ installer_master_host }}
-[fuel-groups:children]
+[SUT] # system under test
+compute
+
+[node-groups:children]
{% for group in hosts|sort %}
{{ group }}
{% endfor %}
-[fuel-groups:vars]
+[node-groups:vars]
ansible_ssh_common_args=-F ./ssh.cfg
{% for group in hosts|sort %}
@@ -19,4 +22,4 @@ ansible_ssh_common_args=-F ./ssh.cfg
{% endfor %}
{% endfor %}
-{% endraw %} \ No newline at end of file
+{% endraw %}