Common testing content for OpenStack-Ansible
Go to file
Jesse Pretorius aac2f5411d Compress test execution logs
The volume of logs we collect in CI jobs are extensive. This
patch ensures that the logs collected are compressed to reduce
the space taken in CI systems.

PYTHONUNBUFFERED is also set to ensure that the console log
from the CI jobs is recorded in the exact order of execution.

Change-Id: I323987e281eff6245189109e6c4b17e999739b8c
Related-Bug: #1620849
2016-09-09 10:58:01 +01: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
releasenotes Introduced all the scaffolding for test repo 2016-08-12 14:50:07 +00:00
tests Remove duplicate memcached_server entry 2016-09-02 17:00:26 +01:00
.gitignore Introduced all the scaffolding for test repo 2016-08-12 14:50:07 +00:00
.gitreview Introduced all the scaffolding for test repo 2016-08-12 14:50:07 +00:00
LICENSE Introduced all the scaffolding for test repo 2016-08-12 14:50:07 +00:00
README.rst Add a README 2016-05-26 16:14:39 +01:00
Vagrantfile Introduced all the scaffolding for test repo 2016-08-12 14:50:07 +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
debian-network-interfaces.cfg.j2 Fix the central repository to work with CentOS 2016-09-02 15:04:43 +00:00
destroy_containers.yml Separated operations of creating and destroying test containers from test-prepare-container.yml 2016-08-17 19:11:26 +00: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
network_config.cfg.j2.sample Use a templated network conf 2016-08-26 08:40:49 +01:00
redhat-network-interfaces.cfg.j2 Fix the central repository to work with CentOS 2016-09-02 15:04:43 +00:00
run_tests.sh Add convergence test for test repo. 2016-08-30 14:37:25 +00:00
setting-nodepool-variables.yml Create common task for nodepool specific tasks 2016-08-26 14:38:55 -05:00
setup.cfg Introduced all the scaffolding for test repo 2016-08-12 14:50:07 +00:00
setup.py Introduced all the scaffolding for test repo 2016-08-12 14:50:07 +00:00
test-install-galera.yml Fix up syntax and dir structure 2016-05-19 16:37:18 +01:00
test-install-glance.yml Added tasks in nova and neutron test yml files 2016-08-24 16:35:18 +00:00
test-install-infra.yml Fix test-vars and rabbit play 2016-05-23 12:00:39 +01:00
test-install-keystone.yml Added tasks in nova and neutron test yml files 2016-08-24 16:35:18 +00:00
test-install-memcached.yml Fix up syntax and dir structure 2016-05-19 16:37:18 +01:00
test-install-neutron.yml Added tasks in nova and neutron test yml files 2016-08-24 16:35:18 +00:00
test-install-nova.yml Include creation of nova-api database 2016-08-30 10:56:54 -07: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 Genericize rolenames 2016-05-23 15:45:17 +01:00
test-install-tempest.yml Add Nova vars/plays 2016-05-26 11:33:20 +01:00
test-prepare-containers.yml Separated operations of creating and destroying test containers from test-prepare-container.yml 2016-08-17 19:11:26 +00:00
test-prepare-host.yml Fix the central repository to work with CentOS 2016-09-02 15:04:43 +00:00
test-prepare-keys.yml Improve key prep for tests when not using root 2016-08-30 09:34:28 -05: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 added ansible_pkg_mgr check for apt modules in test-setup-swifthosts.yml 2016-08-12 18:37:03 +00:00
test-vars.yml Fix the central repository to work with CentOS 2016-09-02 15:04:43 +00:00
tox.ini Compress test execution logs 2016-09-09 10:58:01 +01:00

README.rst

OpenStack-Ansible testing

This is a PoC for centralizing the testing within OpenStack-Ansible. Aiming to move out the common pieces so that changes that affect testing don't have to occur in every single repository. This allows you to run the common set of plays based on your requirements, and will work based on the inventory specs. The aim is to avoid (as much as possible) the requirement to change the same thing in 50 different places.

Steps so far:

  1. Move out playbooks for role installs
  2. Move out variables to become a test-default vars.
  3. Genericize rolename calls

General notes

I've patched some issues that I've put upstream (Mostly for nova):

These are incorporated in the patches I have for the repositories.

Discussion points

Variable locations/precendence

Currently using testing defaults as an include within the play files - this lives inside the generic repository (this one) Using a {rolename}-overrides.yml within each role's repository we can set various vars that are non-default (these are pretty minimal though for the roles I've done. nova/glance/keystone/swift). Open to suggestions/discussion.

Rolename includes

To use a generic keystone playbook for testing (as an example), we need to set the rolename to be a default of os_keystone (this is how we specify it in ansible-role-requirements). However for keystone testing we need it to be openstack-ansible-os_keystone, so there are 2 options:

  1. We set the the ansible-role-requirements to clone ALL repos to openstack-ansible-x and code the rolenames as such.
  2. We have a var per repo to specify its own rolename (e.g. openstack-ansible-os_keystone) and use the shortname as a default.

I've gone with option 2 for the purposes of this PoC Open to other suggestions/discussion.

Inventory management

For swift I have split out the group/host_vars so that very little is in the inventory, I think this is the way forward. This isn't generic to roles - so isn't really covered in this, but I'd like a uniform method of preparing hosts.

Method of running plays

There was an idea to simply run the test.yml from the generic repo which will call all the appropriate repos. This will fail if the requirements repositories don't exist though, regardless of whether they are used. For example, rabbitmq isn't used by swift, but you would need to download the role just to be able to ignore the rabbitmq role. I've gone with the alternative, for the purposes of this PoC, which is to specify in the role repositories, which generic playbooks to run.

I think the decisions made so far are solid but feel free to give ideas/discuss etc. Here are the 4 repositories I have working with this method, so you can see the patch required to get it working on each repository: