redhat-cip.openstack-certification
ansible-role-openstack-certification
An Ansible role to automate the certification process.
Pre-requisites
In order to fully understand the content of this ansible role, one needs to be familiar with the following documentation.
In the above article, the certification workflow and terminology is explained in details.
Role Variables
| Variable name | Required | Default | Type | Description |
|---|---|---|---|---|
| openstack_certification_output_format | False | text | String | Output format for rhcert-ci print. (values: text, junit, html) |
| openstack_certification_results_download | False | No | Bool | Enable downloading the results file (/var/rhcert/results.xml). |
| openstack_certification_output_filename | False | cert.txt | String | Output filename for rhcert-ci print |
| openstack_certification_test_type | False | test | String | Type of suite of tests to run. (values: test, tag, program) |
| openstack_certification_tests | False | self_check,supportable,director | Array | List of tests to run. |
| openstack_certification_tags | False | [] | Array | List of tags to run. |
| openstack_certification_programs | False | [] | Array | List of programs to run. |
| openstack_certification_supported_apis_and_extensions | False | N/A | Array | List of supported APIs and extensions. |
| openstack_certification_enable_rhsm_repo | False | Yes | Bool | When No/False, RHSM registration will be omitted. |
| openstack_certification_repo_file | False | N/A | String | Path to a repo file, which will be copied to the host. |
| openstack_certification_uc_tempest_conf | True | N/A | String | Path to a tempest configuration file on undercloud node. |
| openstack_certification_overcloud_node_ip | False | "" | String | IP address of a controller/compute node for director test. |
| openstack_certification_baremetal_driver | False | pxe_ipmitool | String | Ironic driver used for the certification. |
| openstack_certification_uc_instackenv | False | /home/stack/instackenv.json | String | Path to the instackenv.json file on undercloud. |
| openstack_certification_uc_stackrc | False | /home/stack/stackrc | String | Path to the undercloud rc file on undercloud. |
| openstack_certification_uc_overcloudrc | True | /home/stack/overcloudrc | String | Path to the overcloud rc file on undercloud. |
| openstack_certification_container_names | False | [] | Array | List of container images for trusted_container test. |
Variables details
Supported Tests
Available options for openstack_certification_tests are :
self_checksupportabledirectortempest_configsaharacinder_consistency_groupscinder_volumesmanila_share_extendmanila_share_managedmanila_share_shrinkmanila_sharesmanila_snapshot_managedmanila_snapshot_mountablemanila_snapshot_revert_to_snapshotmanila_snapshot_share_from_snapshotmanila_snapshotsneutron_address_scopeneutron_agentsneutron_attribute_extensionsneutron_availability_zonesneutron_dhcp_extraneutron_flavorneutron_gateway_extraneutron_gmanneutron_ip_availabilityneutron_ipv4neutron_ipv6neutron_l2_multi_providerneutron_l3_extra_routeneutron_l3_flavorsneutron_l3_haneutron_lbaasv2neutron_meteringneutron_mtuneutron_qosneutron_rbacneutron_security_groupsneutron_service_typesneutron_subnet_allocationneutron_subnet_default_poolneutron_tagsneutron_trunkbaremetaltrusted_container
Supported Tags
Available options for openstack_certification_tags are :
osqaportablecertificationrealtimemanilanetworkvirtualizationwlancinderusbneutronbaremetal
Supported Programs
Available options for openstack_certification_programs are :
baremetalcloudcontainerhardwareopenstacksoftware
Supported APIs and extensions:
Available options for openstack_certification_supported_apis_and_extensions are :
qosclonesnapshotsvolume_typesquota-set-extensionbackupsmultiple-backendsavailabilityimage_metadataconsistencygroupsvolume_transfersextensionsvolumesuser_messagesload_balancersubnetsagent_managementqosprovider_networkslbaas_listenersservice_type_managementlbaas_agent_schedulerfwaasmeteringextra_dhcp_optionsquotasdhcp_agent_schedulerport_securitytrunklbaas_poolsload_balancersnetworkssecurity_groupsrevisionssubnetpoolsflavors_extensionsl3_agent_schedulerlbaas_membersversionsfloating_ipsaddress_scopesbgpallowed_address_pairroutersextensionsvpnaasportslbaas_health_monitorcluster-templatesjobsjob-binariesjob-binary-internalsnode-group-templatesdata-sourcesplugins
Example
To run the role from the repository:
$ git clone https://github.com/redhat-cip/ansible-role-openstack-certification.git
$ cd ansible-role-openstack-certification
$ mkdir roles && ln -s $(pwd) roles/openstack-certification
Then set required variables in the playbook.yaml and define hosts file:
$ cat hosts
[controller]
<IP> ansible_user=<user>
[compute]
<IP> ansible_user=<user>
[undercloud]
<IP> ansible_user=<user>
And run it:
$ ansible-playbook playbook.yaml -i hosts
If you have more groups defined in your hosts file, you can limit groups which the tests are supposed to be executed on by:
$ ansible-playbook playbook.yaml -i hosts -l controller,compute
or replace all in playbook.yaml by list of the groups, for example:
hosts:
- compute
- controller
Usage with InfraRed
Run the following steps to execute the role by infrared:
Install infrared and add ansible-role-openstack-certification plugin by providing the url to this repo:
(infrared)$ ir plugin add https://github.com/redhat-cip/ansible-role-openstack-certification.git --src-path infrared_pluginYou can verify that the plugin is imported by:
(infrared)$ ir plugin listFrom infrared directory symlink roles path:
$ ln -s $(pwd)/plugins $(pwd)/plugins/ansible-role-openstack-certification/infrared_plugin/rolesCopy group_vars to infrared workspace:
$ cp -r plugins/ansible-role-openstack-certification/group_vars/ .workspaces/active/If you want to change the test set for a node, just modify group_vars as needed.
Run the plugin:
(infrared)$ ir ansible-role-openstack-certification
License
Apache 2.0
Author Information
Distributed-CI Team distributed-ci@redhat.com
ansible-galaxy install redhat-cip.openstack-certification