]> git.proxmox.com Git - ceph.git/blob - ceph/src/ceph-volume/ceph_volume/tests/functional/simple/tox.ini
update sources to v12.2.4
[ceph.git] / ceph / src / ceph-volume / ceph_volume / tests / functional / simple / tox.ini
1 [tox]
2 envlist = {centos7,xenial}-{filestore,bluestore}-{activate,dmcrypt_plain,dmcrypt_luks}
3 skipsdist = True
4
5 [testenv]
6 whitelist_externals =
7 vagrant
8 bash
9 git
10 sleep
11 passenv=*
12 setenv=
13 ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config
14 ANSIBLE_STDOUT_CALLBACK = debug
15 ANSIBLE_RETRY_FILES_ENABLED = False
16 ANSIBLE_SSH_RETRIES = 5
17 VAGRANT_CWD = {changedir}
18 CEPH_VOLUME_DEBUG = 1
19 deps=
20 ansible==2.4.1
21 testinfra==1.7.1
22 pytest-xdist
23 changedir=
24 centos7-filestore-activate: {toxinidir}/centos7/filestore/activate
25 centos7-bluestore-activate: {toxinidir}/centos7/bluestore/activate
26 xenial-filestore-activate: {toxinidir}/xenial/filestore/activate
27 xenial-bluestore-activate: {toxinidir}/xenial/bluestore/activate
28 xenial-bluestore-dmcrypt_plain: {toxinidir}/xenial/bluestore/dmcrypt-plain
29 xenial-bluestore-dmcrypt_luks: {toxinidir}/xenial/bluestore/dmcrypt-luks
30 xenial-filestore-dmcrypt_plain: {toxinidir}/xenial/filestore/dmcrypt-plain
31 xenial-filestore-dmcrypt_luks: {toxinidir}/xenial/filestore/dmcrypt-luks
32 centos7-bluestore-dmcrypt_plain: {toxinidir}/centos7/bluestore/dmcrypt-plain
33 centos7-bluestore-dmcrypt_luks: {toxinidir}/centos7/bluestore/dmcrypt-luks
34 centos7-filestore-dmcrypt_plain: {toxinidir}/centos7/filestore/dmcrypt-plain
35 centos7-filestore-dmcrypt_luks: {toxinidir}/centos7/filestore/dmcrypt-luks
36 commands=
37 git clone -b {env:CEPH_ANSIBLE_BRANCH:master} --single-branch https://github.com/ceph/ceph-ansible.git {envdir}/tmp/ceph-ansible
38
39 vagrant up --no-provision {posargs:--provider=virtualbox}
40 bash {toxinidir}/../scripts/generate_ssh_config.sh {changedir}
41
42 # use ceph-ansible to deploy a ceph cluster on the vms
43 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}"
44
45 # prepare nodes for testing with testinfra
46 ansible-playbook -vv -i {changedir}/hosts {envdir}/tmp/ceph-ansible/tests/functional/setup.yml
47
48 # test cluster state using ceph-ansible tests
49 testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {envdir}/tmp/ceph-ansible/tests/functional/tests
50
51 # make ceph-volume simple take over all the OSDs that got deployed, disabling ceph-disk
52 ansible-playbook -vv -i {changedir}/hosts {changedir}/test.yml
53
54 # reboot all vms
55 vagrant reload --no-provision
56
57 # wait 2 minutes for services to be ready
58 sleep 120
59
60 # retest to ensure cluster came back up correctly after rebooting
61 testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {envdir}/tmp/ceph-ansible/tests/functional/tests
62
63 vagrant destroy --force