mirror of https://github.com/ceph/ceph-ansible.git
tests: adds a scenario for purging containerized clusters
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
(cherry picked from commit ecdb6f4967
)
Conflicts:
tox.ini
pull/1575/head
parent
2009f84230
commit
10e21c235d
19
tox.ini
19
tox.ini
|
@ -1,5 +1,5 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = {jewel,kraken,rhcs}-{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,update_cluster,cluster}
|
envlist = {jewel,kraken,rhcs}-{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,update_cluster,cluster,purge_docker_cluster}
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
# extra commands for purging clusters
|
# extra commands for purging clusters
|
||||||
|
@ -8,16 +8,23 @@ skipsdist = True
|
||||||
# can be redployed to.
|
# can be redployed to.
|
||||||
[purge]
|
[purge]
|
||||||
commands=
|
commands=
|
||||||
cp {toxinidir}/infrastructure-playbooks/purge-cluster.yml {toxinidir}/purge-cluster.yml
|
cp {toxinidir}/infrastructure-playbooks/{env:PURGE_PLAYBOOK:purge-cluster.yml} {toxinidir}/{env:PURGE_PLAYBOOK:purge-cluster.yml}
|
||||||
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/purge-cluster.yml --extra-vars "\
|
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/{env:PURGE_PLAYBOOK:purge-cluster.yml} --extra-vars "\
|
||||||
ireallymeanit=yes \
|
ireallymeanit=yes \
|
||||||
ceph_stable_release={env:CEPH_STABLE_RELEASE:jewel} \
|
remove_packages=yes \
|
||||||
|
ceph_stable_release={env:CEPH_STABLE_RELEASE:kraken} \
|
||||||
fetch_directory={env:FETCH_DIRECTORY:{changedir}/fetch} \
|
fetch_directory={env:FETCH_DIRECTORY:{changedir}/fetch} \
|
||||||
|
ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \
|
||||||
|
ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \
|
||||||
|
ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest} \
|
||||||
"
|
"
|
||||||
# set up the cluster again
|
# set up the cluster again
|
||||||
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/site.yml.sample --extra-vars "\
|
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/site.yml.sample --extra-vars "\
|
||||||
ceph_stable_release={env:CEPH_STABLE_RELEASE:jewel} \
|
ceph_stable_release={env:CEPH_STABLE_RELEASE:jewel} \
|
||||||
fetch_directory={env:FETCH_DIRECTORY:{changedir}/fetch} \
|
fetch_directory={env:FETCH_DIRECTORY:{changedir}/fetch} \
|
||||||
|
ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \
|
||||||
|
ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \
|
||||||
|
ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest} \
|
||||||
"
|
"
|
||||||
# test that the cluster can be redeployed in a healthy state
|
# 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
|
testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {toxinidir}/tests/functional/tests
|
||||||
|
@ -49,6 +56,8 @@ setenv=
|
||||||
# only available for ansible >= 2.2
|
# only available for ansible >= 2.2
|
||||||
ANSIBLE_STDOUT_CALLBACK = debug
|
ANSIBLE_STDOUT_CALLBACK = debug
|
||||||
docker_cluster: PLAYBOOK = site-docker.yml.sample
|
docker_cluster: PLAYBOOK = site-docker.yml.sample
|
||||||
|
purge_docker_cluster: PLAYBOOK = site-docker.yml.sample
|
||||||
|
purge_docker_cluster: PURGE_PLAYBOOK = purge-docker-cluster.yml
|
||||||
docker_dedicated_journal: PLAYBOOK = site-docker.yml.sample
|
docker_dedicated_journal: PLAYBOOK = site-docker.yml.sample
|
||||||
docker_dmcrypt_journal_collocation: PLAYBOOK = site-docker.yml.sample
|
docker_dmcrypt_journal_collocation: PLAYBOOK = site-docker.yml.sample
|
||||||
rhcs: CEPH_RHCS = true
|
rhcs: CEPH_RHCS = true
|
||||||
|
@ -76,6 +85,7 @@ changedir=
|
||||||
cluster: {toxinidir}/tests/functional/centos/7/cluster
|
cluster: {toxinidir}/tests/functional/centos/7/cluster
|
||||||
# tests a 1 mon, 1 osd, 1 mds and 1 rgw centos7 cluster using docker
|
# 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_cluster: {toxinidir}/tests/functional/centos/7/docker-cluster
|
||||||
|
purge_docker_cluster: {toxinidir}/tests/functional/centos/7/docker-cluster
|
||||||
docker_dedicated_journal: {toxinidir}/tests/functional/centos/7/docker-cluster-dedicated-journal
|
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
|
docker_dmcrypt_journal_collocation: {toxinidir}/tests/functional/centos/7/docker-cluster-dmcrypt-journal-collocation
|
||||||
purge_cluster: {toxinidir}/tests/functional/ubuntu/16.04/cluster
|
purge_cluster: {toxinidir}/tests/functional/ubuntu/16.04/cluster
|
||||||
|
@ -104,6 +114,7 @@ commands=
|
||||||
|
|
||||||
purge_cluster: {[purge]commands}
|
purge_cluster: {[purge]commands}
|
||||||
purge_dmcrypt: {[purge]commands}
|
purge_dmcrypt: {[purge]commands}
|
||||||
|
purge_docker_cluster: {[purge]commands}
|
||||||
update_dmcrypt: {[update]commands}
|
update_dmcrypt: {[update]commands}
|
||||||
update_cluster: {[update]commands}
|
update_cluster: {[update]commands}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue