Openstack Component Testing Ansible Roles
Octario is a collection of Ansible roles and playbooks for testing OpenStack Components on RHEL/CentOS.
It supports the following testers or test frameworks:
- PEP8
- unit
- functional
- fullstack
There are two ways to use Octario. By cloning and installing Octario or by using the InfraRed framework. We'll cover both.
Note: octario
is not provisioning the node on which it will run the tests. It's assumed
that the tester node is provided by the user by specifying it in the hosts file.
git clone https://github.com/redhat-openstack/octario && cd octario virtualenv ~/octario_venv && source ~/octario_venv/bin/activate pip install .
git clone https://github.com/redhat-openstack/infrared && cd infrared virtualenv ~/ir_venv && source ~/ir_venv/bin/activate pip install . infrared plugin add octario
First, create an inventory file that will include the IP address or the hostname of your tester node.
vi hosts
[tester]
my_tester_host ansible_user=cloud-user
Edit octario.yml
with your component details. Make sure to specify name and version!
component:
name: nova
version: 9
Run octario! :) Choose one of testers and run the following command in octario root directory
ansible-playbook -vvv -i hosts playbooks/pep8.yml --extra-vars @octario.yml
pep8.yml can be replaced with [unittest, functional, fullstack].yml
infrared octario --t <tester_name> --dir <component_path>
For example:
infrared octario --t pep8 --dir $WORKSPACE/neutron
You can specify your own tester
export TESTER=my_new_cool_tester
ansible-playbook -vvv -i hosts playbooks/custom-tester.yml --extra-vars @octario.yml
You can use external role with octario
.
cp -r new_role octario/roles
export ROLE=new_role
ansible-playbook -vvv -i hosts playbooks/custom-role.yml --extra-vars @octario.yml
The following drawing added to simplify work-flow overview of octario
for simple testers
as pep8, unittest and functional.
Patching of RPMs is deprecated in Octario.
Please use Octario as InfraRed plugin to achieve patching.
Using InfraRed and its' patch-components plugin instead, example:
$ infrared plugin add patch-components $ infrared plugin add octario
$ infrared patch-components --component-name neutron --component-path /patch/to/neutron/source/code --component-version 14 $ infrared octario --t dsvm-functional --dir /patch/to/neutron/source/code
See the /docs directory of this repo.