]> git.proxmox.com Git - ceph.git/blame_incremental - ceph/src/ceph-volume/ceph_volume/tests/functional/lvm/tox.ini
import new upstream nautilus stable release 14.2.8
[ceph.git] / ceph / src / ceph-volume / ceph_volume / tests / functional / lvm / tox.ini
... / ...
CommitLineData
1[tox]
2envlist = {centos7,xenial}-{filestore,bluestore}-{create,prepare_activate,dmcrypt}
3skipsdist = True
4
5[testenv]
6deps = mock
7whitelist_externals =
8 vagrant
9 bash
10 git
11 cp
12 sleep
13passenv=*
14setenv=
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
23changedir=
24 # plain/unencrypted
25 centos7-filestore-create: {toxinidir}/centos7/filestore/create
26 centos7-bluestore-create: {toxinidir}/centos7/bluestore/create
27 xenial-filestore-create: {toxinidir}/xenial/filestore/create
28 xenial-bluestore-create: {toxinidir}/xenial/bluestore/create
29 # dmcrypt
30 centos7-filestore-dmcrypt: {toxinidir}/centos7/filestore/dmcrypt
31 centos7-bluestore-dmcrypt: {toxinidir}/centos7/bluestore/dmcrypt
32 xenial-filestore-dmcrypt: {toxinidir}/xenial/filestore/dmcrypt
33 xenial-bluestore-dmcrypt: {toxinidir}/xenial/bluestore/dmcrypt
34 # TODO: these are placeholders for now, eventually we want to
35 # test the prepare/activate workflow of ceph-volume as well
36 xenial-filestore-prepare_activate: {toxinidir}/xenial/filestore/prepare_activate
37 xenial-bluestore-prepare_activate: {toxinidir}/xenial/bluestore/prepare_activate
38 centos7-filestore-prepare_activate: {toxinidir}/xenial/filestore/prepare_activate
39 centos7-bluestore-prepare_activate: {toxinidir}/xenial/bluestore/prepare_activate
40commands=
41 git clone -b {env:CEPH_ANSIBLE_BRANCH:master} --single-branch https://github.com/ceph/ceph-ansible.git {envdir}/tmp/ceph-ansible
42 pip install -r {envdir}/tmp/ceph-ansible/tests/requirements.txt
43
44 bash {toxinidir}/../scripts/vagrant_up.sh {env:VAGRANT_UP_FLAGS:"--no-provision"} {posargs:--provider=virtualbox}
45 bash {toxinidir}/../scripts/generate_ssh_config.sh {changedir}
46
47 # create logical volumes to test with on the vms
48 ansible-playbook -vv -i {changedir}/hosts {envdir}/tmp/ceph-ansible/tests/functional/lvm_setup.yml
49
50 # ad-hoc/local test setup for lvm
51 ansible-playbook -vv -i {changedir}/hosts {changedir}/setup.yml
52
53 cp {toxinidir}/../playbooks/deploy.yml {envdir}/tmp/ceph-ansible
54
55 # use ceph-ansible to deploy a ceph cluster on the vms
56 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}"
57
58 # prepare nodes for testing with testinfra
59 ansible-playbook -vv -i {changedir}/hosts {envdir}/tmp/ceph-ansible/tests/functional/setup.yml
60
61 # test cluster state using testinfra
62 py.test -n 4 --sudo -v --connection=ansible --ssh-config={changedir}/vagrant_ssh_config --ansible-inventory={changedir}/hosts {toxinidir}/../tests
63
64 # reboot all vms - attempt
65 bash {toxinidir}/../scripts/vagrant_reload.sh {env:VAGRANT_UP_FLAGS:"--no-provision"} {posargs:--provider=virtualbox}
66
67 # after a reboot, osds may take about 20 seconds to come back up
68 sleep 30
69
70 # retest to ensure cluster came back up correctly after rebooting
71 py.test -n 4 --sudo -v --connection=ansible --ssh-config={changedir}/vagrant_ssh_config --ansible-inventory={changedir}/hosts {toxinidir}/../tests
72
73 # destroy an OSD, zap it's device and recreate it using it's ID
74 ansible-playbook -vv -i {changedir}/hosts {changedir}/test.yml
75
76 # retest to ensure cluster came back up correctly
77 py.test -n 4 --sudo -v --connection=ansible --ssh-config={changedir}/vagrant_ssh_config --ansible-inventory={changedir}/hosts {toxinidir}/../tests
78
79 vagrant destroy {env:VAGRANT_DESTROY_FLAGS:"--force"}