]>
Commit | Line | Data |
---|---|---|
d2e6a577 | 1 | [tox] |
b32b8144 | 2 | envlist = {centos7,xenial}-{filestore,bluestore}-{activate,dmcrypt_plain,dmcrypt_luks} |
d2e6a577 FG |
3 | skipsdist = True |
4 | ||
5 | [testenv] | |
6 | whitelist_externals = | |
7 | vagrant | |
8 | bash | |
9 | git | |
b32b8144 | 10 | sleep |
d2e6a577 FG |
11 | passenv=* |
12 | setenv= | |
13 | ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config | |
94b18763 | 14 | ANSIBLE_ACTION_PLUGINS = {envdir}/tmp/ceph-ansible/plugins/actions |
d2e6a577 FG |
15 | ANSIBLE_STDOUT_CALLBACK = debug |
16 | ANSIBLE_RETRY_FILES_ENABLED = False | |
3a9019d9 | 17 | ANSIBLE_SSH_RETRIES = 5 |
d2e6a577 FG |
18 | VAGRANT_CWD = {changedir} |
19 | CEPH_VOLUME_DEBUG = 1 | |
20 | deps= | |
3efd9988 FG |
21 | ansible==2.4.1 |
22 | testinfra==1.7.1 | |
d2e6a577 | 23 | pytest-xdist |
28e407b8 | 24 | notario>=0.0.13 |
d2e6a577 | 25 | changedir= |
3efd9988 FG |
26 | centos7-filestore-activate: {toxinidir}/centos7/filestore/activate |
27 | centos7-bluestore-activate: {toxinidir}/centos7/bluestore/activate | |
28 | xenial-filestore-activate: {toxinidir}/xenial/filestore/activate | |
29 | xenial-bluestore-activate: {toxinidir}/xenial/bluestore/activate | |
b32b8144 FG |
30 | xenial-bluestore-dmcrypt_plain: {toxinidir}/xenial/bluestore/dmcrypt-plain |
31 | xenial-bluestore-dmcrypt_luks: {toxinidir}/xenial/bluestore/dmcrypt-luks | |
32 | xenial-filestore-dmcrypt_plain: {toxinidir}/xenial/filestore/dmcrypt-plain | |
33 | xenial-filestore-dmcrypt_luks: {toxinidir}/xenial/filestore/dmcrypt-luks | |
34 | centos7-bluestore-dmcrypt_plain: {toxinidir}/centos7/bluestore/dmcrypt-plain | |
35 | centos7-bluestore-dmcrypt_luks: {toxinidir}/centos7/bluestore/dmcrypt-luks | |
36 | centos7-filestore-dmcrypt_plain: {toxinidir}/centos7/filestore/dmcrypt-plain | |
37 | centos7-filestore-dmcrypt_luks: {toxinidir}/centos7/filestore/dmcrypt-luks | |
d2e6a577 FG |
38 | commands= |
39 | git clone -b {env:CEPH_ANSIBLE_BRANCH:master} --single-branch https://github.com/ceph/ceph-ansible.git {envdir}/tmp/ceph-ansible | |
28e407b8 AA |
40 | # XXX Ideally we should be able to consume the requirements for ceph-ansible directly, |
41 | # but the master branch doesn't pin dependencies so we can't guarantee to work correctly | |
42 | #pip install -r {envdir}/tmp/ceph-ansible/requirements.txt | |
d2e6a577 FG |
43 | |
44 | vagrant up --no-provision {posargs:--provider=virtualbox} | |
3efd9988 | 45 | bash {toxinidir}/../scripts/generate_ssh_config.sh {changedir} |
d2e6a577 FG |
46 | |
47 | # use ceph-ansible to deploy a ceph cluster on the vms | |
48 | 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}" | |
49 | ||
50 | # prepare nodes for testing with testinfra | |
51 | ansible-playbook -vv -i {changedir}/hosts {envdir}/tmp/ceph-ansible/tests/functional/setup.yml | |
52 | ||
53 | # test cluster state using ceph-ansible tests | |
54 | testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {envdir}/tmp/ceph-ansible/tests/functional/tests | |
55 | ||
3efd9988 FG |
56 | # make ceph-volume simple take over all the OSDs that got deployed, disabling ceph-disk |
57 | ansible-playbook -vv -i {changedir}/hosts {changedir}/test.yml | |
58 | ||
d2e6a577 | 59 | # reboot all vms |
94b18763 | 60 | bash {toxinidir}/../scripts/vagrant_reload.sh {env:VAGRANT_UP_FLAGS:"--no-provision"} {posargs:--provider=virtualbox} |
d2e6a577 | 61 | |
b32b8144 FG |
62 | # wait 2 minutes for services to be ready |
63 | sleep 120 | |
64 | ||
d2e6a577 FG |
65 | # retest to ensure cluster came back up correctly after rebooting |
66 | testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {envdir}/tmp/ceph-ansible/tests/functional/tests | |
67 | ||
68 | vagrant destroy --force |