vagrant
bash
git
+ cp
+ sleep
passenv=*
setenv=
ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config
+ ANSIBLE_ACTION_PLUGINS = {envdir}/tmp/ceph-ansible/plugins/actions
ANSIBLE_STDOUT_CALLBACK = debug
ANSIBLE_RETRY_FILES_ENABLED = False
+ ANSIBLE_SSH_RETRIES = 5
VAGRANT_CWD = {changedir}
CEPH_VOLUME_DEBUG = 1
deps=
- ansible==2.4.1
- testinfra==1.7.1
+ ansible~=2.6,<2.7
+ testinfra
pytest-xdist
+ notario>=0.0.13
changedir=
# plain/unencrypted
centos7-filestore-create: {toxinidir}/centos7/filestore/create
centos7-bluestore-prepare_activate: {toxinidir}/xenial/bluestore/prepare_activate
commands=
git clone -b {env:CEPH_ANSIBLE_BRANCH:master} --single-branch https://github.com/ceph/ceph-ansible.git {envdir}/tmp/ceph-ansible
+ # XXX Ideally we should be able to consume the requirements for ceph-ansible directly,
+ # but the master branch doesn't pin dependencies so we can't guarantee to work correctly
+ #pip install -r {envdir}/tmp/ceph-ansible/requirements.txt
- vagrant up --no-provision {posargs:--provider=virtualbox}
+ bash {toxinidir}/../scripts/vagrant_up.sh {env:VAGRANT_UP_FLAGS:"--no-provision"} {posargs:--provider=virtualbox}
bash {toxinidir}/../scripts/generate_ssh_config.sh {changedir}
# create logical volumes to test with on the vms
# ad-hoc/local test setup for lvm
ansible-playbook -vv -i {changedir}/hosts {changedir}/setup.yml
+ cp {toxinidir}/../playbooks/deploy.yml {envdir}/tmp/ceph-ansible
+
# use ceph-ansible to deploy a ceph cluster on the vms
- 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}"
+ 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}"
# prepare nodes for testing with testinfra
ansible-playbook -vv -i {changedir}/hosts {envdir}/tmp/ceph-ansible/tests/functional/setup.yml
# test cluster state using ceph-ansible tests
testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {envdir}/tmp/ceph-ansible/tests/functional/tests
- # reboot all vms
- vagrant reload --no-provision
+ # reboot all vms - attempt
+ bash {toxinidir}/../scripts/vagrant_reload.sh {env:VAGRANT_UP_FLAGS:"--no-provision"} {posargs:--provider=virtualbox}
# retest to ensure cluster came back up correctly after rebooting
testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {envdir}/tmp/ceph-ansible/tests/functional/tests
# destroy an OSD, zap it's device and recreate it using it's ID
- create: ansible-playbook -vv -i {changedir}/hosts {changedir}/test.yml
+ ansible-playbook -vv -i {changedir}/hosts {changedir}/test.yml
# retest to ensure cluster came back up correctly
- create: testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {envdir}/tmp/ceph-ansible/tests/functional/tests
+ testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {envdir}/tmp/ceph-ansible/tests/functional/tests
vagrant destroy --force