]> git.proxmox.com Git - ceph.git/blob - ceph/src/ceph-volume/ceph_volume/tests/functional/simple/tox.ini
c3b7d3648a1d8eb2f65104cfdcce8a42cd442305
[ceph.git] / ceph / src / ceph-volume / ceph_volume / tests / functional / simple / tox.ini
1 [tox]
2 envlist = centos7-{filestore,bluestore}-{activate,dmcrypt_plain,dmcrypt_luks}
3 skipsdist = True
4
5 [testenv]
6 deps = mock
7 whitelist_externals =
8 vagrant
9 bash
10 git
11 sleep
12 cp
13 passenv=*
14 setenv=
15 ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config
16 ANSIBLE_ACTION_PLUGINS = {envdir}/tmp/ceph-ansible/plugins/actions
17 ANSIBLE_STDOUT_CALLBACK = debug
18 ANSIBLE_RETRY_FILES_ENABLED = False
19 ANSIBLE_SSH_RETRIES = 5
20 VAGRANT_CWD = {changedir}
21 CEPH_VOLUME_DEBUG = 1
22 DEBIAN_FRONTEND=noninteractive
23 changedir=
24 centos7-filestore-activate: {toxinidir}/centos7/filestore/activate
25 centos7-bluestore-activate: {toxinidir}/centos7/bluestore/activate
26 centos7-bluestore-dmcrypt_plain: {toxinidir}/centos7/bluestore/dmcrypt-plain
27 centos7-bluestore-dmcrypt_luks: {toxinidir}/centos7/bluestore/dmcrypt-luks
28 centos7-filestore-dmcrypt_plain: {toxinidir}/centos7/filestore/dmcrypt-plain
29 centos7-filestore-dmcrypt_luks: {toxinidir}/centos7/filestore/dmcrypt-luks
30 commands=
31 git clone -b {env:CEPH_ANSIBLE_BRANCH:master} --single-branch https://github.com/ceph/ceph-ansible.git {envdir}/tmp/ceph-ansible
32 pip install -r {envdir}/tmp/ceph-ansible/tests/requirements.txt
33
34 bash {toxinidir}/../scripts/vagrant_up.sh {env:VAGRANT_UP_FLAGS:"--no-provision"} {posargs:--provider=virtualbox}
35 bash {toxinidir}/../scripts/generate_ssh_config.sh {changedir}
36
37 cp {toxinidir}/../playbooks/deploy.yml {envdir}/tmp/ceph-ansible
38
39 # use ceph-ansible to deploy a ceph cluster on the vms
40 ansible-playbook -vv -i {changedir}/hosts {envdir}/tmp/ceph-ansible/deploy.yml --extra-vars "fetch_directory={changedir}/fetch ceph_dev_branch={env:CEPH_DEV_BRANCH:master} ceph_dev_sha1={env:CEPH_DEV_SHA1:latest} toxinidir={toxinidir}"
41
42 # prepare nodes for testing with testinfra
43 ansible-playbook -vv -i {changedir}/hosts {envdir}/tmp/ceph-ansible/tests/functional/setup.yml
44
45 # test cluster state testinfra
46 py.test -n 4 --sudo -v --connection=ansible --ssh-config={changedir}/vagrant_ssh_config --ansible-inventory={changedir}/hosts {toxinidir}/../tests
47
48 # make ceph-volume simple take over all the OSDs that got deployed, disabling ceph-disk
49 ansible-playbook -vv -i {changedir}/hosts {changedir}/test.yml
50
51 # reboot all vms
52 bash {toxinidir}/../scripts/vagrant_reload.sh {env:VAGRANT_UP_FLAGS:"--no-provision"} {posargs:--provider=virtualbox}
53
54 # wait 2 minutes for services to be ready
55 sleep 120
56
57 # retest to ensure cluster came back up correctly after rebooting
58 py.test -n 4 --sudo -v --connection=ansible --ssh-config={changedir}/vagrant_ssh_config --ansible-inventory={changedir}/hosts {toxinidir}/../tests
59
60 vagrant destroy {env:VAGRANT_DESTROY_FLAGS:"--force"}