diff options
author | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-05-11 20:03:33 +0800 |
---|---|---|
committer | Yujun Zhang <zhang.yujunz@zte.com.cn> | 2017-05-15 15:02:06 +0000 |
commit | 29608d3e5a01a0454b8a230b5549f60c9c701a0e (patch) | |
tree | 5accf06c9a77e11f36bc0472fe0c4202f4a7394a /docs | |
parent | 0af297e4e9622cb6d040e9e30daffe1d43970aaa (diff) |
Update readme of running with native `ansible-playbook` command
Change-Id: Idd021dd6301c7ced7658460622ba4961b071c3c2
Signed-off-by: Yujun Zhang <zhang.yujunz@zte.com.cn>
Diffstat (limited to 'docs')
-rw-r--r-- | docs/testing/developer/devguide/ansible.rst (renamed from docs/testing/user/userguide/ansible.rst) | 62 | ||||
-rw-r--r-- | docs/testing/developer/devguide/index.rst | 1 | ||||
-rw-r--r-- | docs/testing/user/userguide/index.rst | 1 |
3 files changed, 34 insertions, 30 deletions
diff --git a/docs/testing/user/userguide/ansible.rst b/docs/testing/developer/devguide/ansible.rst index ff2cb0a3..ab2cb55c 100644 --- a/docs/testing/user/userguide/ansible.rst +++ b/docs/testing/developer/devguide/ansible.rst @@ -7,42 +7,23 @@ Run with Ansible **************** QTIP benchmarking tasks are built upon `Ansible`_ playbooks and roles. If you are familiar with Ansible, it is possible -to run it with ``ansible-playbook`` command. +to run it with ``ansible-playbook`` command. And it is useful during development of ansible modules or testing roles. .. _Ansible: https://www.ansible.com/ Create workspace ================ -There is a playbook in ``tests/integration`` used for creating a new workspace for QTIP benchmarking:: +There is a playbook in ``resources/ansible_roles/qtip-workspace`` used for creating a new workspace:: - cd qtip/tests/integration - ansible-playbook workspace-create.yml - -You will be prompted for required information for the Pod under test:: - - (qtip) ➜ integration git:(master) ✗ ansible-playbook workspace-create.yml - name of the pod under test (used in reporting) [qtip-pod]: - scenario deployed in the pod: [default]: - installer type of the pod (apex|fuel|other) [fuel]: - master host/vm of the installer (accessible by `ssh <hostname>`): f5 - workspace name (new directory will be created) [workspace]: - - PLAY [localhost] *************************************************************** - - TASK [qtip-workspace : generating workspace] *********************************** - - PLAY RECAP ********************************************************************* - localhost : ok=0 changed=0 unreachable=0 failed=0 - - -You may hit ``Enter`` to accept default value + cd resources/ansible_roles/qtip-workspace + ansible-playbook create.yml NOTE: if this playbook is moved to other directory, configuration in ``ansible.cfg`` needs to be updated accordingly. The ansible roles from QTIP, i.e. ``<path_of_qtip>/resources/ansible_roles`` must be added to ``roles_path`` in `Ansible configuration file`_. For example:: - roles_path = ../../resources/ansible_roles + roles_path = ~/qtip/resources/ansible_roles .. _Ansible configuration file: @@ -89,22 +70,45 @@ If several jumps are required to reach the master node, we may chain the jump ho NOTE: ``ProxyJump`` is equivalent to the long ``ProxyCommand`` option, but it is only available since OpenSSH 7.3 -Setup testing environment -------------------------- +Automatic setup +--------------- -Run the setup playbook to generate ansible inventory of system under test by querying the slave nodes from the installer +#. Modify ``<workspace>/group_vars/all.yml`` to set installer information correctly +#. Modify ``<workspace>/hosts`` file to set installer master host correctly +#. Run the setup playbook to generate ansible inventory of system under test by querying the slave nodes from the installer master:: cd workspace ansible-playbook setup.yml -Currently, QTIP supports automatic discovery from `apex`_ and `fuel`_ - .. _apex: https://wiki.opnfv.org/display/apex .. _fuel: https://wiki.opnfv.org/display/fuel It will update the ``hosts`` and ``ssh.cfg`` +Currently, QTIP supports automatic discovery from `apex`_ and `fuel`_. + +Manual setup +------------ + +If your installer is not supported or you are +testing hosts not managed by installer, you may add them manually in ``[compute]`` group in ``<workspace>/hosts``:: + + [compute:vars] + ansible_ssh_common_args=-F ./ssh.cfg + + [compute] + node-2 + node-4 + node-6 + node-7 + +And ``ssh.cfg`` for ssh connection configuration:: + + Host node-5 + HostName 10.20.5.12 + User root + Run the tests ------------- diff --git a/docs/testing/developer/devguide/index.rst b/docs/testing/developer/devguide/index.rst index bd25a5b7..40baca9c 100644 --- a/docs/testing/developer/devguide/index.rst +++ b/docs/testing/developer/devguide/index.rst @@ -11,6 +11,7 @@ QTIP Developer Guide :maxdepth: 2 overview.rst + ansible.rst arch.rst framework.rst cli.rst diff --git a/docs/testing/user/userguide/index.rst b/docs/testing/user/userguide/index.rst index dd54e576..d0d555f8 100644 --- a/docs/testing/user/userguide/index.rst +++ b/docs/testing/user/userguide/index.rst @@ -12,7 +12,6 @@ QTIP User Guide :maxdepth: 2 overview.rst - ansible.rst cli.rst api.rst compute.rst |