Ansible playbooks and roles for QA automation for OSP18 and up.
- This code is intended to run on top of the image https://quay.io/repository/shiftstack-qe/shiftstack-client
- The container must have access to the Openstack API and the external Openstack network.
- The container should have internet access.
- The container should have the vault-password-file in the expected place.
oc rsh shiftstackclient -n openstack \
git clone https://github.com/shiftstack/shiftstack-qa.git
oc rsh shiftstackclient -n openstack \
cd shiftstack-qa && ansible-galaxy collection install -r requirements.yaml -f
where:
- requirements includes the dependencies and the local collection.
- shiftstack.stages: The local collection including the automation.
You can list the tasks on a playbook:
oc rsh shiftstackclient -n openstack \
ansible-navigator run shiftstack-qa/playbooks/{playbook_name}.yaml --list-tasks
For running:
oc rsh shiftstackclient -n openstack \
ansible-navigator run shiftstack-qa/playbooks/{playbook_name}.yaml --extra-vars @shiftstack-qa/jobs_definitions/{job_definition_name}.yaml
where:
- playbooks includes one playbook per scenario to be tested (formerly known as a job template).
- jobs_definitions includes one job configuration to be tested using the playbook (formerly known as job pipeline).
Thanks to ansible-navigator
, the run generates JSON file with format:
/home/shifstack/artifacts/{playbook_name}-artifact-{time_stamp}.json
You can easily replay the run & troubleshoot in interactive mode with:
oc rsh shiftstackclient -n openstack \
ansible-navigator replay /home/cloud-admin/artifacts/{playbook_name}-artifact-{time_stamp}.json -m interactive
Requires Python>=3.9
pip install pre-commit && git config --global init.templateDir ~/.git-template && pre-commit init-templatedir ~/.git-template && pre-commit install