2016-11-05 01:25:06 +08:00
|
|
|
[tox]
|
2019-12-06 01:42:24 +08:00
|
|
|
envlist = {centos,ubuntu}-{container,non_container}-{all_daemons,collocation,lvm_osds,shrink_mon,shrink_osd,shrink_osd_legacy,lvm_batch,add_osds,rgw_multisite,purge,lvm_auto_discovery}
|
2019-10-08 23:23:08 +08:00
|
|
|
{centos,ubuntu}-non_container-switch_to_containers
|
|
|
|
{centos,ubuntu}-container-{cluster,ooo_collocation,infra_lv_create}
|
2018-10-25 22:15:36 +08:00
|
|
|
infra_lv_create
|
2017-07-12 21:02:32 +08:00
|
|
|
|
2016-11-05 01:25:06 +08:00
|
|
|
skipsdist = True
|
|
|
|
|
2018-08-09 06:12:30 +08:00
|
|
|
# a test scenario for the lv-create.yml and lv-teardown playbooks
|
|
|
|
[testenv:infra_lv_create]
|
|
|
|
whitelist_externals =
|
|
|
|
vagrant
|
|
|
|
bash
|
|
|
|
cp
|
|
|
|
mkdir
|
2018-08-09 20:26:58 +08:00
|
|
|
cat
|
2018-08-09 06:12:30 +08:00
|
|
|
passenv=*
|
|
|
|
setenv=
|
2019-06-15 05:31:39 +08:00
|
|
|
ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
|
2019-01-22 21:25:45 +08:00
|
|
|
ANSIBLE_CONFIG = {toxinidir}/ansible.cfg
|
2018-08-09 06:12:30 +08:00
|
|
|
ANSIBLE_ACTION_PLUGINS = {toxinidir}/plugins/actions
|
|
|
|
ANSIBLE_CALLBACK_PLUGINS = {toxinidir}/plugins/callback
|
|
|
|
ANSIBLE_CALLBACK_WHITELIST = profile_tasks
|
|
|
|
# only available for ansible >= 2.2
|
|
|
|
ANSIBLE_STDOUT_CALLBACK = debug
|
|
|
|
deps= -r{toxinidir}/tests/requirements.txt
|
|
|
|
changedir={toxinidir}/tests/functional/centos/7/infra_lv_create
|
|
|
|
commands=
|
|
|
|
vagrant up --no-provision {posargs:--provider=virtualbox}
|
|
|
|
bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}
|
|
|
|
|
|
|
|
cp {toxinidir}/infrastructure-playbooks/lv-create.yml {toxinidir}/lv-create.yml
|
|
|
|
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/lv-create.yml
|
|
|
|
|
|
|
|
cp {toxinidir}/infrastructure-playbooks/lv-teardown.yml {toxinidir}/lv-teardown.yml
|
|
|
|
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/lv-teardown.yml --extra-vars "ireallymeanit=yes"
|
|
|
|
|
2018-08-09 20:26:58 +08:00
|
|
|
cat {toxinidir}/lv-create.log
|
|
|
|
|
2018-08-09 06:12:30 +08:00
|
|
|
vagrant destroy --force
|
|
|
|
|
2017-01-27 00:38:10 +08:00
|
|
|
# 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=
|
2017-05-25 20:50:37 +08:00
|
|
|
cp {toxinidir}/infrastructure-playbooks/{env:PURGE_PLAYBOOK:purge-cluster.yml} {toxinidir}/{env:PURGE_PLAYBOOK:purge-cluster.yml}
|
2019-01-22 21:25:45 +08:00
|
|
|
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/{env:PURGE_PLAYBOOK:purge-cluster.yml} --extra-vars "\
|
2017-05-03 00:15:23 +08:00
|
|
|
ireallymeanit=yes \
|
2017-05-25 20:50:37 +08:00
|
|
|
remove_packages=yes \
|
2017-09-02 01:52:54 +08:00
|
|
|
ceph_stable_release={env:CEPH_STABLE_RELEASE:luminous} \
|
2017-05-03 00:15:23 +08:00
|
|
|
fetch_directory={env:FETCH_DIRECTORY:{changedir}/fetch} \
|
2017-05-25 20:50:37 +08:00
|
|
|
ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \
|
|
|
|
ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \
|
2019-01-22 21:25:45 +08:00
|
|
|
ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-luminous} \
|
2017-05-03 00:15:23 +08:00
|
|
|
"
|
2017-08-23 22:12:40 +08:00
|
|
|
|
2018-12-04 16:21:51 +08:00
|
|
|
# re-setup lvm
|
2019-01-22 21:25:45 +08:00
|
|
|
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/tests/functional/lvm_setup.yml
|
2018-12-04 16:21:51 +08:00
|
|
|
|
2017-08-23 22:12:40 +08:00
|
|
|
# set up the cluster again
|
2019-04-10 00:20:35 +08:00
|
|
|
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/{env:PLAYBOOK:site.yml.sample} --extra-vars @ceph-override.json --extra-vars "\
|
2017-09-02 01:52:54 +08:00
|
|
|
ceph_stable_release={env:CEPH_STABLE_RELEASE:luminous} \
|
2017-08-23 22:12:40 +08:00
|
|
|
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} \
|
2019-01-22 21:25:45 +08:00
|
|
|
ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-luminous} \
|
2017-08-23 22:12:40 +08:00
|
|
|
"
|
|
|
|
# test that the cluster can be redeployed in a healthy state
|
2019-03-04 17:01:07 +08:00
|
|
|
py.test -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/{env:INVENTORY} {toxinidir}/tests/functional/tests
|
2017-08-23 22:12:40 +08:00
|
|
|
|
|
|
|
[purge-lvm]
|
|
|
|
commands=
|
|
|
|
cp {toxinidir}/infrastructure-playbooks/{env:PURGE_PLAYBOOK:purge-cluster.yml} {toxinidir}/{env:PURGE_PLAYBOOK:purge-cluster.yml}
|
2019-01-22 21:25:45 +08:00
|
|
|
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/{env:PURGE_PLAYBOOK:purge-cluster.yml} --extra-vars "\
|
2017-08-23 22:12:40 +08:00
|
|
|
ireallymeanit=yes \
|
|
|
|
remove_packages=yes \
|
2017-09-02 01:52:54 +08:00
|
|
|
ceph_stable_release={env:CEPH_STABLE_RELEASE:luminous} \
|
2017-08-23 22:12:40 +08:00
|
|
|
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} \
|
2019-01-22 21:25:45 +08:00
|
|
|
ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-luminous} \
|
2017-08-23 22:12:40 +08:00
|
|
|
"
|
|
|
|
|
2019-01-22 21:25:45 +08:00
|
|
|
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/tests/functional/lvm_setup.yml
|
2017-08-23 22:12:40 +08:00
|
|
|
|
2017-01-27 00:38:10 +08:00
|
|
|
# set up the cluster again
|
2019-01-22 21:25:45 +08:00
|
|
|
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/{env:PLAYBOOK:site.yml.sample} --extra-vars "\
|
2017-09-02 01:52:54 +08:00
|
|
|
ceph_stable_release={env:CEPH_STABLE_RELEASE:luminous} \
|
2017-05-03 00:15:23 +08:00
|
|
|
fetch_directory={env:FETCH_DIRECTORY:{changedir}/fetch} \
|
2017-05-25 20:50:37 +08:00
|
|
|
ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \
|
|
|
|
ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \
|
2019-01-22 21:25:45 +08:00
|
|
|
ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-luminous} \
|
2017-05-03 00:15:23 +08:00
|
|
|
"
|
2017-01-27 00:38:10 +08:00
|
|
|
# test that the cluster can be redeployed in a healthy state
|
2019-03-04 17:01:07 +08:00
|
|
|
py.test -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/{env:INVENTORY} {toxinidir}/tests/functional/tests
|
2017-01-27 00:38:10 +08:00
|
|
|
|
2017-08-31 06:07:28 +08:00
|
|
|
[shrink-mon]
|
|
|
|
commands=
|
|
|
|
cp {toxinidir}/infrastructure-playbooks/shrink-mon.yml {toxinidir}/shrink-mon.yml
|
2019-01-22 21:25:45 +08:00
|
|
|
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/shrink-mon.yml --extra-vars "\
|
2017-08-31 06:07:28 +08:00
|
|
|
ireallymeanit=yes \
|
2019-01-22 21:25:45 +08:00
|
|
|
mon_to_kill={env:MON_TO_KILL:mon2} \
|
|
|
|
ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-luminous} \
|
2017-08-31 06:07:28 +08:00
|
|
|
"
|
|
|
|
[shrink-osd]
|
|
|
|
commands=
|
|
|
|
cp {toxinidir}/infrastructure-playbooks/shrink-osd.yml {toxinidir}/shrink-osd.yml
|
2019-01-22 21:25:45 +08:00
|
|
|
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/shrink-osd.yml --extra-vars "\
|
2019-01-29 17:42:57 +08:00
|
|
|
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-luminous} \
|
2017-08-31 06:07:28 +08:00
|
|
|
ireallymeanit=yes \
|
|
|
|
osd_to_kill=0 \
|
|
|
|
"
|
|
|
|
|
2019-12-06 01:42:24 +08:00
|
|
|
[shrink-osd-legacy]
|
|
|
|
commands=
|
|
|
|
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/infrastructure-playbooks/shrink-osd-ceph-disk.yml --extra-vars "\
|
|
|
|
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-luminous} \
|
|
|
|
ireallymeanit=yes \
|
|
|
|
osd_to_kill=0,3 \
|
|
|
|
"
|
|
|
|
|
2017-08-25 20:36:07 +08:00
|
|
|
[switch-to-containers]
|
|
|
|
commands=
|
|
|
|
cp {toxinidir}/infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml {toxinidir}/switch-from-non-containerized-to-containerized-ceph-daemons.yml
|
2019-01-22 21:25:45 +08:00
|
|
|
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/switch-from-non-containerized-to-containerized-ceph-daemons.yml --extra-vars "\
|
2017-08-25 20:36:07 +08:00
|
|
|
ireallymeanit=yes \
|
|
|
|
fetch_directory={env:FETCH_DIRECTORY:{changedir}/fetch} \
|
|
|
|
ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \
|
2018-09-08 01:38:41 +08:00
|
|
|
ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \
|
2019-01-22 21:25:45 +08:00
|
|
|
ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-luminous} \
|
2017-08-25 20:36:07 +08:00
|
|
|
"
|
|
|
|
|
2019-03-04 17:01:07 +08:00
|
|
|
py.test -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts-switch-to-containers {toxinidir}/tests/functional/tests
|
2017-08-25 20:36:07 +08:00
|
|
|
|
2018-10-16 23:05:10 +08:00
|
|
|
[add-osds]
|
|
|
|
commands=
|
|
|
|
ansible-playbook -vv -i {changedir}/hosts-2 --limit osd1 {toxinidir}/tests/functional/setup.yml
|
2019-01-22 21:25:45 +08:00
|
|
|
ansible-playbook -vv -i {changedir}/hosts-2 --limit osd1 {toxinidir}/tests/functional/lvm_setup.yml
|
2018-10-16 23:05:10 +08:00
|
|
|
cp {toxinidir}/infrastructure-playbooks/add-osd.yml {toxinidir}/add-osd.yml
|
|
|
|
ansible-playbook -vv -i {changedir}/hosts-2 --limit osd1 {toxinidir}/add-osd.yml --extra-vars "\
|
|
|
|
ireallymeanit=yes \
|
|
|
|
fetch_directory={env:FETCH_DIRECTORY:{changedir}/fetch} \
|
2019-01-22 21:25:45 +08:00
|
|
|
ceph_stable_release={env:CEPH_STABLE_RELEASE:luminous} \
|
2018-10-16 23:05:10 +08:00
|
|
|
ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \
|
|
|
|
ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \
|
2019-01-22 21:25:45 +08:00
|
|
|
ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-luminous} \
|
2018-10-16 23:05:10 +08:00
|
|
|
"
|
2019-03-04 17:01:07 +08:00
|
|
|
py.test -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts-2 {toxinidir}/tests/functional/tests
|
2018-10-16 23:05:10 +08:00
|
|
|
|
2018-10-25 04:27:28 +08:00
|
|
|
[rgw-multisite]
|
|
|
|
commands=
|
|
|
|
bash -c "cd {changedir}/secondary && vagrant up --no-provision {posargs:--provider=virtualbox}"
|
|
|
|
bash -c "cd {changedir}/secondary && bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}/secondary"
|
2019-10-04 22:07:05 +08:00
|
|
|
ansible-playbook --ssh-common-args='-F {changedir}/secondary/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey' -vv -i {changedir}/secondary/hosts {toxinidir}/tests/functional/setup.yml
|
|
|
|
ansible-playbook --ssh-common-args='-F {changedir}/secondary/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey' -vv -i {changedir}/secondary/hosts {toxinidir}/tests/functional/lvm_setup.yml
|
2019-04-06 12:01:35 +08:00
|
|
|
# ensure the rule isn't already present
|
|
|
|
ansible -i localhost, all -c local -b -m iptables -a 'chain=FORWARD protocol=tcp source=192.168.0.0/16 destination=192.168.0.0/16 jump=ACCEPT action=insert rule_num=1 state=absent'
|
|
|
|
ansible -i localhost, all -c local -b -m iptables -a 'chain=FORWARD protocol=tcp source=192.168.0.0/16 destination=192.168.0.0/16 jump=ACCEPT action=insert rule_num=1 state=present'
|
2019-10-04 22:07:05 +08:00
|
|
|
ansible-playbook --ssh-common-args='-F {changedir}/secondary/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey' -vv -i {changedir}/secondary/hosts {toxinidir}/{env:PLAYBOOK:site.yml.sample} --extra-vars "\
|
2018-10-25 04:27:28 +08:00
|
|
|
ireallymeanit=yes \
|
|
|
|
fetch_directory={env:FETCH_DIRECTORY:{changedir}/secondary/fetch} \
|
2019-01-22 21:25:45 +08:00
|
|
|
ceph_stable_release={env:CEPH_STABLE_RELEASE:luminous} \
|
2018-10-25 04:27:28 +08:00
|
|
|
ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \
|
|
|
|
ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \
|
2019-01-22 21:25:45 +08:00
|
|
|
ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-luminous} \
|
2018-10-25 04:27:28 +08:00
|
|
|
"
|
2018-10-29 20:30:59 +08:00
|
|
|
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/tests/functional/rgw_multisite.yml --extra-vars "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}"
|
2019-10-04 22:07:05 +08:00
|
|
|
ansible-playbook --ssh-common-args='-F {changedir}/secondary/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey' -vv -i {changedir}/secondary/hosts {toxinidir}/tests/functional/rgw_multisite.yml --extra-vars "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}"
|
2018-10-29 20:30:59 +08:00
|
|
|
bash -c "cd {changedir}/secondary && vagrant destroy --force"
|
2018-11-29 01:46:45 +08:00
|
|
|
ansible -i localhost, all -c local -b -m iptables -a 'chain=FORWARD protocol=tcp source=192.168.0.0/16 destination=192.168.0.0/16 jump=ACCEPT action=insert rule_num=1 state=absent'
|
2018-10-25 04:27:28 +08:00
|
|
|
|
2016-11-05 01:25:06 +08:00
|
|
|
[testenv]
|
2016-11-05 02:01:28 +08:00
|
|
|
whitelist_externals =
|
|
|
|
vagrant
|
|
|
|
bash
|
2017-01-10 20:53:17 +08:00
|
|
|
pip
|
2017-01-11 06:56:07 +08:00
|
|
|
cp
|
2017-09-22 05:47:36 +08:00
|
|
|
sleep
|
2018-10-16 23:05:10 +08:00
|
|
|
rm
|
2016-11-05 01:25:06 +08:00
|
|
|
passenv=*
|
2017-08-28 22:59:28 +08:00
|
|
|
sitepackages=True
|
2016-11-05 01:25:06 +08:00
|
|
|
setenv=
|
2019-06-15 05:31:39 +08:00
|
|
|
ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config -o ControlMaster=auto -o ControlPersist=600s -o PreferredAuthentications=publickey
|
2018-10-25 20:42:54 +08:00
|
|
|
ANSIBLE_CONFIG = {toxinidir}/ansible.cfg
|
2016-11-05 01:25:06 +08:00
|
|
|
ANSIBLE_ACTION_PLUGINS = {toxinidir}/plugins/actions
|
2018-03-13 19:30:09 +08:00
|
|
|
ANSIBLE_CALLBACK_PLUGINS = {toxinidir}/plugins/callback
|
2017-10-13 00:43:29 +08:00
|
|
|
ANSIBLE_CALLBACK_WHITELIST = profile_tasks
|
2016-12-16 02:23:17 +08:00
|
|
|
ANSIBLE_STDOUT_CALLBACK = debug
|
2019-01-22 21:25:45 +08:00
|
|
|
ANSIBLE_KEEP_REMOTE_FILES = 1
|
2019-02-13 23:35:57 +08:00
|
|
|
ANSIBLE_CACHE_PLUGIN = memory
|
|
|
|
ANSIBLE_GATHERING = implicit
|
2019-01-22 21:25:45 +08:00
|
|
|
# only available for ansible >= 2.5
|
|
|
|
centos: CEPH_ANSIBLE_VAGRANT_BOX = centos/7
|
|
|
|
fedora: CEPH_ANSIBLE_VAGRANT_BOX = fedora/29-atomic-host
|
|
|
|
# Set the vagrant box image to use
|
|
|
|
centos-non_container: CEPH_ANSIBLE_VAGRANT_BOX = centos/7
|
|
|
|
centos-container: CEPH_ANSIBLE_VAGRANT_BOX = centos/atomic-host
|
|
|
|
ubuntu: CEPH_ANSIBLE_VAGRANT_BOX = ceph/ubuntu-xenial
|
|
|
|
|
|
|
|
# Set the ansible inventory host file to be used according to which distrib we are running on
|
|
|
|
ubuntu: _INVENTORY = hosts-ubuntu
|
|
|
|
INVENTORY = {env:_INVENTORY:hosts}
|
|
|
|
container: CONTAINER_DIR = /container
|
|
|
|
container: PLAYBOOK = site-docker.yml.sample
|
2019-03-27 03:22:41 +08:00
|
|
|
container: PURGE_PLAYBOOK = purge-docker-cluster.yml
|
2019-01-22 21:25:45 +08:00
|
|
|
non_container: PLAYBOOK = site.yml.sample
|
|
|
|
shrink_mon: MON_TO_KILL = mon2
|
2018-06-05 11:56:55 +08:00
|
|
|
shrink_osd: COPY_ADMIN_KEY = True
|
2019-12-06 01:42:24 +08:00
|
|
|
shrink_osd_legacy: COPY_ADMIN_KEY = True
|
2019-07-30 02:47:49 +08:00
|
|
|
ooo_collocation: CEPH_DOCKER_IMAGE_TAG = v3.2.5-stable-3.2-luminous-centos-7
|
2019-10-08 23:23:08 +08:00
|
|
|
CEPH_STABLE_RELEASE = luminous
|
2019-01-22 21:25:45 +08:00
|
|
|
|
2018-05-31 18:02:26 +08:00
|
|
|
deps= -r{toxinidir}/tests/requirements.txt
|
2016-11-05 01:25:06 +08:00
|
|
|
changedir=
|
2019-01-22 21:25:45 +08:00
|
|
|
all_daemons: {toxinidir}/tests/functional/all_daemons{env:CONTAINER_DIR:}
|
|
|
|
cluster: {toxinidir}/tests/functional/all_daemons{env:CONTAINER_DIR:}
|
|
|
|
shrink_mon: {toxinidir}/tests/functional/shrink_mon{env:CONTAINER_DIR:}
|
|
|
|
shrink_osd: {toxinidir}/tests/functional/shrink_osd{env:CONTAINER_DIR:}
|
2019-12-06 01:42:24 +08:00
|
|
|
shrink_osd_legacy: {toxinidir}/tests/functional/shrink_osd_legacy{env:CONTAINER_DIR:}
|
2016-12-01 02:20:07 +08:00
|
|
|
# tests a 1 mon, 1 osd, 1 mds and 1 rgw centos7 cluster using docker
|
2019-01-22 21:25:45 +08:00
|
|
|
collocation: {toxinidir}/tests/functional/collocation{env:CONTAINER_DIR:}
|
|
|
|
purge: {toxinidir}/tests/functional/all_daemons{env:CONTAINER_DIR:}
|
|
|
|
switch_to_containers: {toxinidir}/tests/functional/all_daemons
|
|
|
|
lvm_osds: {toxinidir}/tests/functional/lvm-osds{env:CONTAINER_DIR:}
|
|
|
|
lvm_batch: {toxinidir}/tests/functional/lvm-batch{env:CONTAINER_DIR:}
|
2019-12-06 00:01:55 +08:00
|
|
|
lvm_auto_discovery: {toxinidir}/tests/functional/lvm-auto-discovery{env:CONTAINER_DIR:}
|
2019-01-22 21:25:45 +08:00
|
|
|
ooo_collocation: {toxinidir}/tests/functional/ooo-collocation
|
|
|
|
add_osds: {toxinidir}/tests/functional/add-osds{env:CONTAINER_DIR:}
|
|
|
|
rgw_multisite: {toxinidir}/tests/functional/rgw-multisite{env:CONTAINER_DIR:}
|
2017-07-04 23:12:32 +08:00
|
|
|
|
2016-11-05 01:25:06 +08:00
|
|
|
commands=
|
2017-03-23 01:38:12 +08:00
|
|
|
rhcs: ansible-playbook -vv -i "localhost," -c local {toxinidir}/tests/functional/rhcs_setup.yml --extra-vars "change_dir={changedir}" --tags "vagrant_setup"
|
2017-03-22 23:14:41 +08:00
|
|
|
|
2016-11-09 07:00:09 +08:00
|
|
|
vagrant up --no-provision {posargs:--provider=virtualbox}
|
2016-11-05 02:01:28 +08:00
|
|
|
bash {toxinidir}/tests/scripts/generate_ssh_config.sh {changedir}
|
2016-11-05 01:25:06 +08:00
|
|
|
|
2018-10-25 22:15:36 +08:00
|
|
|
# configure lvm
|
2019-12-06 00:01:55 +08:00
|
|
|
!lvm_batch-!lvm_auto_discovery: ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/tests/functional/lvm_setup.yml
|
2019-01-22 21:25:45 +08:00
|
|
|
|
|
|
|
rhcs: ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/tests/functional/rhcs_setup.yml --extra-vars "ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} repo_url={env:REPO_URL:} rhel7_repo_url={env:RHEL7_REPO_URL:}" --skip-tags "vagrant_setup"
|
|
|
|
|
|
|
|
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/tests/functional/setup.yml
|
|
|
|
|
|
|
|
ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/{env:PLAYBOOK:site.yml.sample} --extra-vars "\
|
2017-10-31 21:39:29 +08:00
|
|
|
delegate_facts_host={env:DELEGATE_FACTS_HOST:True} \
|
2017-05-03 00:15:23 +08:00
|
|
|
fetch_directory={env:FETCH_DIRECTORY:{changedir}/fetch} \
|
2019-01-22 21:25:45 +08:00
|
|
|
ceph_stable_release={env:CEPH_STABLE_RELEASE:luminous} \
|
2017-05-03 00:15:23 +08:00
|
|
|
ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \
|
|
|
|
ceph_docker_image={env:CEPH_DOCKER_IMAGE:ceph/daemon} \
|
2019-01-22 21:25:45 +08:00
|
|
|
ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest-luminous} \
|
2018-06-05 11:56:55 +08:00
|
|
|
copy_admin_key={env:COPY_ADMIN_KEY:False} \
|
2017-05-03 00:15:23 +08:00
|
|
|
"
|
2017-03-16 19:16:09 +08:00
|
|
|
|
2018-06-26 19:42:27 +08:00
|
|
|
# wait 30sec for services to be ready
|
2019-04-04 10:09:12 +08:00
|
|
|
sleep 30
|
2017-09-22 05:47:36 +08:00
|
|
|
# test cluster state using ceph-ansible tests
|
2019-04-04 10:09:12 +08:00
|
|
|
py.test -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/{env:INVENTORY} {toxinidir}/tests/functional/tests
|
2017-09-22 05:47:36 +08:00
|
|
|
|
|
|
|
# reboot all vms
|
2019-04-01 23:22:50 +08:00
|
|
|
all_daemons: ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/tests/functional/reboot.yml
|
2017-09-22 05:47:36 +08:00
|
|
|
|
2018-06-26 19:42:27 +08:00
|
|
|
# wait 30sec for services to be ready
|
2017-09-22 05:47:36 +08:00
|
|
|
# retest to ensure cluster came back up correctly after rebooting
|
2019-04-01 23:22:50 +08:00
|
|
|
all_daemons: py.test -n 8 --durations=0 --sudo -v --connection=ansible --ansible-inventory={changedir}/{env:INVENTORY} {toxinidir}/tests/functional/tests
|
2016-12-23 04:13:08 +08:00
|
|
|
|
2017-10-03 04:46:28 +08:00
|
|
|
# handlers/idempotency test
|
2019-04-01 23:22:50 +08:00
|
|
|
all_daemons: ansible-playbook -vv -i {changedir}/{env:INVENTORY} {toxinidir}/{env:PLAYBOOK:site.yml.sample} --extra-vars "delegate_facts_host={env:DELEGATE_FACTS_HOST:True} fetch_directory={env:FETCH_DIRECTORY:{changedir}/fetch} ceph_stable_release={env:CEPH_STABLE_RELEASE:luminous} 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_BIS:latest-bis-luminous} copy_admin_key={env:COPY_ADMIN_KEY:False} " --extra-vars @ceph-override.json
|
2017-10-03 04:46:28 +08:00
|
|
|
|
2019-01-22 21:25:45 +08:00
|
|
|
purge: {[purge]commands}
|
2017-08-25 20:36:07 +08:00
|
|
|
switch_to_containers: {[switch-to-containers]commands}
|
2017-08-31 06:07:28 +08:00
|
|
|
shrink_mon: {[shrink-mon]commands}
|
|
|
|
shrink_osd: {[shrink-osd]commands}
|
2019-12-06 01:42:24 +08:00
|
|
|
shrink_osd_legacy: {[shrink-osd-legacy]commands}
|
2018-10-16 23:05:10 +08:00
|
|
|
add_osds: {[add-osds]commands}
|
2018-10-25 04:27:28 +08:00
|
|
|
rgw_multisite: {[rgw-multisite]commands}
|
2017-01-27 00:38:10 +08:00
|
|
|
|
2016-11-05 02:01:28 +08:00
|
|
|
vagrant destroy --force
|