2 envlist = {centos7,xenial}-{filestore,bluestore}-{create,prepare_activate}
12 ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config
13 ANSIBLE_STDOUT_CALLBACK = debug
14 ANSIBLE_RETRY_FILES_ENABLED = False
15 VAGRANT_CWD = {changedir}
22 centos7-filestore-create: {toxinidir}/centos7/filestore/create
23 centos7-bluestore-create: {toxinidir}/centos7/bluestore/create
24 xenial-filestore-create: {toxinidir}/xenial/filestore/create
25 xenial-bluestore-create: {toxinidir}/xenial/bluestore/create
26 # TODO: these are placeholders for now, eventually we want to
27 # test the prepare/activate workflow of ceph-volume as well
28 xenial-filestore-prepare_activate: {toxinidir}/xenial/filestore/prepare_activate
29 xenial-bluestore-prepare_activate: {toxinidir}/xenial/bluestore/prepare_activate
30 centos7-filestore-prepare_activate: {toxinidir}/xenial/filestore/prepare_activate
31 centos7-bluestore-prepare_activate: {toxinidir}/xenial/bluestore/prepare_activate
33 git clone -b {env:CEPH_ANSIBLE_BRANCH:master} --single-branch https://github.com/ceph/ceph-ansible.git {envdir}/tmp/ceph-ansible
35 vagrant up --no-provision {posargs:--provider=virtualbox}
36 bash {toxinidir}/../scripts/generate_ssh_config.sh {changedir}
38 # create logical volumes to test with on the vms
39 ansible-playbook -vv -i {changedir}/hosts {envdir}/tmp/ceph-ansible/tests/functional/lvm_setup.yml
41 # ad-hoc/local test setup for lvm
42 ansible-playbook -vv -i {changedir}/hosts {changedir}/setup.yml
44 # use ceph-ansible to deploy a ceph cluster on the vms
45 ansible-playbook -vv -i {changedir}/hosts {envdir}/tmp/ceph-ansible/site.yml.sample --extra-vars "fetch_directory={changedir}/fetch ceph_dev_branch={env:CEPH_DEV_BRANCH:master} ceph_dev_sha1={env:CEPH_DEV_SHA1:latest}"
47 # prepare nodes for testing with testinfra
48 ansible-playbook -vv -i {changedir}/hosts {envdir}/tmp/ceph-ansible/tests/functional/setup.yml
50 # test cluster state using ceph-ansible tests
51 testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {envdir}/tmp/ceph-ansible/tests/functional/tests
54 vagrant reload --no-provision
56 # retest to ensure cluster came back up correctly after rebooting
57 testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {envdir}/tmp/ceph-ansible/tests/functional/tests
59 vagrant destroy --force