[tox] envlist = {ansible2.2}-{xenial_cluster,journal_collocation,centos7_cluster,dmcrypt_journal,dmcrypt_journal_collocation,docker_cluster,purge_cluster_collocated} skipsdist = True [testenv] whitelist_externals = vagrant bash pip cp passenv=* setenv= ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config ANSIBLE_ACTION_PLUGINS = {toxinidir}/plugins/actions # only available for ansible >= 2.2 ANSIBLE_STDOUT_CALLBACK = debug docker_cluster: PLAYBOOK = site-docker.yml.sample deps= ansible1.9: ansible==1.9.4 ansible2.1: ansible==2.1 ansible2.2: ansible==2.2 -r{toxinidir}/tests/requirements.txt changedir= # tests a 1 mon, 1 osd, 1 mds and 1 rgw xenial cluster using raw_multi_journal OSD scenario xenial_cluster: {toxinidir}/tests/functional/ubuntu/16.04/cluster # tests a 1 mon 1 osd centos7 cluster using journal_collocation OSD scenario journal_collocation: {toxinidir}/tests/functional/centos/7/journal-collocation # tests a 1 mon 1 osd centos7 cluster using dmcrypt_dedicated_journal OSD scenario dmcrypt_journal: {toxinidir}/tests/functional/centos/7/dmcrypt-dedicated-journal # tests a 1 mon 1 osd centos7 cluster using dmcrypt_journal_collocation OSD scenario dmcrypt_journal_collocation: {toxinidir}/tests/functional/centos/7/dmcrypt-journal-collocation # tests a 1 mon, 1 osd, 1 mds and 1 rgw centos7 cluster using raw_multi_journal OSD scenario centos7_cluster: {toxinidir}/tests/functional/centos/7/cluster # tests a 1 mon, 1 osd, 1 mds and 1 rgw centos7 cluster using docker docker_cluster: {toxinidir}/tests/functional/centos/7/docker-cluster # creates a cluster, purges the cluster and then brings the cluster back up purge_cluster_collocated: {toxinidir}/tests/functional/centos/7/journal-collocation commands= # install latest stable version of ansible 2.2 from github, this can be removed # when there is a release > 2.2.1.0 ansible2.2: pip install --upgrade git+git://github.com/ansible/ansible.git@stable-2.2 vagrant up --no-provision {posargs:--provider=virtualbox} bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir} ansible-playbook -vv -i {changedir}/hosts {toxinidir}/{env:PLAYBOOK:site.yml.sample} --extra-vars="fetch_directory={changedir}/fetch" ansible-playbook -vv -i {changedir}/hosts {toxinidir}/tests/functional/setup.yml testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {toxinidir}/tests/functional/tests purge_cluster_collocated: cp {toxinidir}/infrastructure-playbooks/purge-cluster.yml {toxinidir}/purge-cluster.yml purge_cluster_collocated: ansible-playbook -vv -i {changedir}/hosts {toxinidir}/purge-cluster.yml --extra-vars="ireallymeanit=yes fetch_directory={changedir}/fetch" # set up the cluster again purge_cluster_collocated: ansible-playbook -vv -i {changedir}/hosts {toxinidir}/{env:PLAYBOOK:site.yml.sample} --extra-vars="fetch_directory={changedir}/fetch" # test that the cluster can be redeployed in a healthy state purge_cluster_collocated: testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {toxinidir}/tests/functional/tests vagrant destroy --force