Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / ceph-volume / ceph_volume / tests / functional / lvm / tox.ini
1 [tox]
2 envlist = {centos7,xenial}-{filestore,bluestore}-{create,prepare_activate}
3 skipsdist = True
4
5 [testenv]
6 whitelist_externals =
7     vagrant
8     bash
9     git
10 passenv=*
11 setenv=
12   ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config
13   ANSIBLE_STDOUT_CALLBACK = debug
14   ANSIBLE_RETRY_FILES_ENABLED = False
15   VAGRANT_CWD = {changedir}
16   CEPH_VOLUME_DEBUG = 1
17 deps=
18   ansible==2.4.1
19   testinfra==1.7.1
20   pytest-xdist
21 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
32 commands=
33   git clone -b {env:CEPH_ANSIBLE_BRANCH:master} --single-branch https://github.com/ceph/ceph-ansible.git {envdir}/tmp/ceph-ansible
34
35   vagrant up --no-provision {posargs:--provider=virtualbox}
36   bash {toxinidir}/../scripts/generate_ssh_config.sh {changedir}
37
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
40
41   # ad-hoc/local test setup for lvm
42   ansible-playbook -vv -i {changedir}/hosts {changedir}/setup.yml
43
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}"
46
47   # prepare nodes for testing with testinfra
48   ansible-playbook -vv -i {changedir}/hosts {envdir}/tmp/ceph-ansible/tests/functional/setup.yml
49
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
52
53   # reboot all vms
54   vagrant reload --no-provision
55
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
58
59   vagrant destroy --force