Ansible playbooks for testing clusters running on OpenStack.
Ensure that Ansible is installed, either via the system package manager or pip. If required, use a virtualenv to avoid interference with the system python packages. For example:
virtualenv venv
source venv/bin/activate
pip install -U pip
pip install -r requirements.txt
Install Ansible role dependencies from Ansible Galaxy:
ansible-galaxy install \
-p ansible/roles \
-r requirements.yml
Edit the configuration file etc/cluster-infra.yml to configure the cluster and the Ansible inventory that will be generated.
First, ensure that OpenStack authentication environment variables are set, typically by sourcing an OpenStack environment file.
To create a cluster:
ansible-playbook -i ansible/inventory -e @etc/cluster-infra.yml ansible/cluster-create.yml
To perform some basic checks on a cluster:
ansible-playbook -i ansible/inventory -e @etc/cluster-infra.yml ansible/cluster-check.yml
To destroy a cluster:
ansible-playbook -i ansible/inventory -e @etc/cluster-infra.yml ansible/cluster-destroy.yml