forked from ceph/ceph-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
79 lines (71 loc) · 4.09 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
[tox]
envlist = {ansible2.2}-{xenial_cluster,journal_collocation,centos7_cluster,dmcrypt_journal,dmcrypt_journal_collocation,docker_cluster,purge_cluster,purge_dmcrypt,docker_dedicated_journal,docker_dmcrypt_journal_collocation,update_dmcrypt}
skipsdist = True
# extra commands for purging clusters
# that purge the cluster and then set it up again to
# ensure that a purge can clear nodes well enough that they
# can be redployed to.
[purge]
commands=
cp {toxinidir}/infrastructure-playbooks/purge-cluster.yml {toxinidir}/purge-cluster.yml
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/purge-cluster.yml --extra-vars="ireallymeanit=yes fetch_directory={changedir}/fetch"
# set up the cluster again
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/site.yml.sample --extra-vars="fetch_directory={changedir}/fetch"
# test that the cluster can be redeployed in a healthy state
testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {toxinidir}/tests/functional/tests
# extra commands for performing a rolling update
# currently this hardcodes the release to kraken
# as we're still installing jewel by default
[update]
commands=
cp {toxinidir}/infrastructure-playbooks/rolling_update.yml {toxinidir}/rolling_update.yml
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/rolling_update.yml --extra-vars="ceph_stable_release=kraken ireallymeanit=yes fetch_directory={changedir}/fetch"
testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {toxinidir}/tests/functional/tests
[testenv]
whitelist_externals =
vagrant
bash
pip
cp
passenv=*
setenv=
ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config
ANSIBLE_ACTION_PLUGINS = {toxinidir}/plugins/actions
# only available for ansible >= 2.2
ANSIBLE_STDOUT_CALLBACK = debug
docker_cluster: PLAYBOOK = site-docker.yml.sample
docker_dedicated_journal: PLAYBOOK = site-docker.yml.sample
docker_dmcrypt_journal_collocation = site-docker.yml.sample
deps=
ansible1.9: ansible==1.9.4
ansible2.1: ansible==2.1
ansible2.2: ansible==2.2.1
-r{toxinidir}/tests/requirements.txt
changedir=
# tests a 1 mon, 1 osd, 1 mds and 1 rgw xenial cluster using raw_multi_journal OSD scenario
xenial_cluster: {toxinidir}/tests/functional/ubuntu/16.04/cluster
# tests a 1 mon 1 osd centos7 cluster using journal_collocation OSD scenario
journal_collocation: {toxinidir}/tests/functional/centos/7/journal-collocation
# tests a 1 mon 1 osd centos7 cluster using dmcrypt_dedicated_journal OSD scenario
dmcrypt_journal: {toxinidir}/tests/functional/centos/7/dmcrypt-dedicated-journal
# tests a 1 mon 1 osd centos7 cluster using dmcrypt_journal_collocation OSD scenario
dmcrypt_journal_collocation: {toxinidir}/tests/functional/centos/7/dmcrypt-journal-collocation
# tests a 1 mon, 1 osd, 1 mds and 1 rgw centos7 cluster using raw_multi_journal OSD scenario
centos7_cluster: {toxinidir}/tests/functional/centos/7/cluster
# tests a 1 mon, 1 osd, 1 mds and 1 rgw centos7 cluster using docker
docker_cluster: {toxinidir}/tests/functional/centos/7/docker-cluster
docker_dedicated_journal: {toxinidir}/tests/functional/centos/7/docker-cluster-dedicated-journal
docker_dmcrypt_journal_collocation: {toxinidir}/tests/functional/centos/7/docker-cluster-dmcrypt-journal-collocation
purge_cluster: {toxinidir}/tests/functional/ubuntu/16.04/cluster
purge_dmcrypt: {toxinidir}/tests/functional/centos/7/dmcrypt-dedicated-journal
update_dmcrypt: {toxinidir}/tests/functional/centos/7/dmcrypt-dedicated-journal
commands=
vagrant up --no-provision {posargs:--provider=virtualbox}
bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/{env:PLAYBOOK:site.yml.sample} --extra-vars="fetch_directory={changedir}/fetch"
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/tests/functional/setup.yml
testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {toxinidir}/tests/functional/tests
purge_cluster: {[purge]commands}
purge_dmcrypt: {[purge]commands}
update_dmcrypt: {[update]commands}
vagrant destroy --force