Common testing content for OpenStack-Ansible
Go to file
Andy McCrae 29f507927e
Add test-install-openstack-hosts to test-prepare-host
The test-install-openstack-hosts.yml playbook was only being used by
the openstack_hosts role, being that this is a common setup task used in
various tests this playbook is now being included in the
"test-prepare-host.yml" playbook.

Change-Id: I52cb3f57570f56a9d65efd291945d14b2e729ee6
2016-09-21 11:03:55 -05:00
common-tasks Merge "Only override UCA repo url on OpenStack CI" 2016-09-06 13:34:06 +00:00
doc Introduced all the scaffolding for test repo 2016-08-12 14:50:07 +00:00
network_interfaces Modularize networking 2016-09-16 17:07:15 +01:00
releasenotes Introduced all the scaffolding for test repo 2016-08-12 14:50:07 +00:00
tests Include openstack_hosts in test-prepare-host.yml 2016-09-21 12:10:09 +01:00
.gitignore Update testing bits for consistency 2016-09-16 21:19:23 -05:00
.gitreview Introduced all the scaffolding for test repo 2016-08-12 14:50:07 +00:00
ansible-role-requirements-gen.sh Added role requirements file to the tests repo 2016-09-13 11:37:49 +00:00
ansible-role-requirements.yaml Added role requirements file to the tests repo 2016-09-13 11:37:49 +00:00
bindep.txt Compress test execution logs 2016-09-09 10:58:01 +01:00
create-grant-db.yml Fix the central repository to work with CentOS 2016-09-02 15:04:43 +00:00
destroy_containers.yml Fix container destroy/create 2016-09-16 12:47:42 -05:00
ensure-rabbitmq.yml Add convergence test for test repo. 2016-08-30 14:37:25 +00:00
iptables-clear.sh Setup iptables-clear.sh 2016-05-26 11:33:41 +01:00
LICENSE Introduced all the scaffolding for test repo 2016-08-12 14:50:07 +00:00
manual-test.rc Update testing bits for consistency 2016-09-16 21:19:23 -05:00
README.rst Modularize networking 2016-09-16 17:07:15 +01:00
run_tests.sh Update testing bits for consistency 2016-09-16 21:19:23 -05:00
setting-nodepool-variables.yml Create common task for nodepool specific tasks 2016-08-26 14:38:55 -05:00
setup.cfg modify the home-page info with the developer documentation 2016-09-20 16:32:22 +05:30
setup.py Introduced all the scaffolding for test repo 2016-08-12 14:50:07 +00:00
test-install-etcd.yml Add vars and plays for neutron to work 2016-09-20 17:01:19 +01:00
test-install-galera.yml Fix up syntax and dir structure 2016-05-19 16:37:18 +01:00
test-install-glance.yml Remove unused hostname var from test playbooks 2016-09-12 09:08:38 -04:00
test-install-infra.yml Fix test-vars and rabbit play 2016-05-23 12:00:39 +01:00
test-install-keystone.yml Modularize networking 2016-09-16 17:07:15 +01:00
test-install-memcached.yml Fix up syntax and dir structure 2016-05-19 16:37:18 +01:00
test-install-neutron.yml Address ansible_ssh_* var deprecation 2016-09-19 11:06:48 +01:00
test-install-nova.yml Remove unused hostname var from test playbooks 2016-09-12 09:08:38 -04:00
test-install-openstack-hosts.yml Add tests for the openstack_hosts role 2016-08-26 00:05:28 +00:00
test-install-rabbitmq.yml Fix up syntax and dir structure 2016-05-19 16:37:18 +01:00
test-install-swift.yml Adjust test-install-swift to work for MR swift 2016-09-19 16:21:38 +01:00
test-install-tempest.yml Add Nova vars/plays 2016-05-26 11:33:20 +01:00
test-prepare-containers.yml Address ansible_ssh_* var deprecation 2016-09-19 11:06:48 +01:00
test-prepare-host.yml Add test-install-openstack-hosts to test-prepare-host 2016-09-21 11:03:55 -05:00
test-prepare-keys.yml Address ansible_ssh_* var deprecation 2016-09-19 11:06:48 +01:00
test-requirements.txt Introduced all the scaffolding for test repo 2016-08-12 14:50:07 +00:00
test-setup-host.yml Add setup-host play 2016-05-20 14:53:54 +01:00
test-setup-swifthosts.yml Address ansible_ssh_* var deprecation 2016-09-19 11:06:48 +01:00
test-vars.yml Merge "Set workers to optimize memory usage for test repo" 2016-09-20 19:46:22 +00:00
tox.ini Use common log commands for tox config 2016-09-19 10:57:23 -04:00
Vagrantfile Introduced all the scaffolding for test repo 2016-08-12 14:50:07 +00:00

OpenStack-Ansible testing

This is the openstack-ansible-tests repository, providing a framework and consolidation of testing configuration and playbooks. This can be used to integrate new projects, and ensure that code duplication is minimized whilst allowing the addition of new testing scenarios with greater ease.

Roles Currently using the openstack-ansible-tests repository

  • openstack-ansible-galera_server
  • openstack-ansible-tests
  • openstack-ansible-os_rally
  • openstack-ansible-memcached_server
  • openstack-ansible-openstack_hosts
  • openstack-ansible-repo_build
  • openstack-ansible-repo_server
  • openstack-ansible-lxc_container_create
  • openstack-ansible-os_keystone
  • openstack-ansible-os_aodh
  • openstack-ansible-os_zaqar

Variables are generic and based on inventory so variable overrides should be able to be very minimal.

Role Integration

To enable the openstack-ansible-tests repository add the following to your repositories tox.ini, at the bottom of the [testenv:ansible]] stanza, in the commands section.

rm -rf {toxinidir}/tests/playbooks
git clone https://git.openstack.org/openstack/openstack-ansible-tests \
          {toxinidir}/tests/playbooks

To override variables you can create a role-overrides.yml file inside tests, which you can include in your tox.ini. You will have to set the rolename for the repository due to how the base repository is cloned when gates run, the below example shows keystone's settings:

-e @{toxinidir/tests/keystone-overrides.yml \
-e "keystone_rolename={toxinidir}" \

In your repositories tests/test.yml file, you can call any of the included playbooks, for example:

- include: playbooks/test-prepare-keys.yml

Network Settings

The networking can be configured and setup using the bridges variable.

The base option, when only 1 interface is required is to specify just a single base - this is only for backwards compatibility with existing test setup and will default to br-mgmt with an IP of 10.1.0.1.

bridges:
  - "br-mgmt"

To allow a more complicated network setup we can specify ip_addr: The IP address on the interface. netmask: Netmask of the interface (defaults to 255.255.255.0) name: Name of the interface veth_peer: Set up a veth peer for the interface

For example, a Nova setup may look like this:

bridges:
  - name: "br-mgmt"
    ip_addr: "10.1.0.1"
  - name: "br-vxlan"
    ip_addr: "10.1.1.1"
  - name: "br-vlan"
    ip_addr: "10.1.2.1"
    veth_peer: "eth12"