2016-11-05 01:25:06 +08:00
|
|
|
[tox]
|
2017-05-23 02:13:04 +08:00
|
|
|
envlist = {dev,jewel,luminous,rhcs}-{ansible2.2,ansible2.3}-{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,update_docker_cluster}
|
2017-08-23 22:12:40 +08:00
|
|
|
{dev,luminous}-{ansible2.2,ansible2.3}-{bluestore_journal_collocation,bluestore_cluster,bluestore_dmcrypt_journal,bluestore_dmcrypt_journal_collocation,bluestore_docker_cluster,bluestore_docker_dedicated_journal,bluestore_docker_dmcrypt_journal_collocation,lvm_osds,purge_lvm_osds}
|
2017-07-12 21:02:32 +08:00
|
|
|
|
2016-11-05 01:25:06 +08:00
|
|
|
skipsdist = True
|
|
|
|
|
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}
|
|
|
|
ansible-playbook -vv -i {changedir}/hosts {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-05-06 04:51:54 +08:00
|
|
|
ceph_stable_release={env:CEPH_STABLE_RELEASE:kraken} \
|
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} \
|
|
|
|
ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest} \
|
2017-05-03 00:15:23 +08:00
|
|
|
"
|
2017-08-23 22:12:40 +08:00
|
|
|
|
|
|
|
# set up the cluster again
|
|
|
|
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/{env:PLAYBOOK:site.yml.sample} --extra-vars "\
|
|
|
|
ceph_stable_release={env:CEPH_STABLE_RELEASE:kraken} \
|
|
|
|
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} \
|
|
|
|
ceph_dev_branch={env:CEPH_DEV_BRANCH:master} \
|
|
|
|
ceph_dev_sha1={env:CEPH_DEV_SHA1:latest} \
|
|
|
|
"
|
|
|
|
# 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
|
|
|
|
|
|
|
|
[purge-lvm]
|
|
|
|
commands=
|
|
|
|
cp {toxinidir}/infrastructure-playbooks/{env:PURGE_PLAYBOOK:purge-cluster.yml} {toxinidir}/{env:PURGE_PLAYBOOK:purge-cluster.yml}
|
|
|
|
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/{env:PURGE_PLAYBOOK:purge-cluster.yml} --extra-vars "\
|
|
|
|
ireallymeanit=yes \
|
|
|
|
remove_packages=yes \
|
|
|
|
ceph_stable_release={env:CEPH_STABLE_RELEASE:kraken} \
|
|
|
|
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} \
|
|
|
|
"
|
|
|
|
|
|
|
|
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/tests/functional/lvm_setup.yml
|
|
|
|
|
2017-01-27 00:38:10 +08:00
|
|
|
# set up the cluster again
|
2017-06-01 00:53:37 +08:00
|
|
|
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/{env:PLAYBOOK:site.yml.sample} --extra-vars "\
|
2017-05-06 04:51:54 +08:00
|
|
|
ceph_stable_release={env:CEPH_STABLE_RELEASE:kraken} \
|
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} \
|
|
|
|
ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest} \
|
2017-07-17 23:26:48 +08:00
|
|
|
ceph_dev_branch={env:CEPH_DEV_BRANCH:master} \
|
|
|
|
ceph_dev_sha1={env:CEPH_DEV_SHA1:latest} \
|
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
|
|
|
|
testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {toxinidir}/tests/functional/tests
|
|
|
|
|
2017-02-18 04:33:30 +08:00
|
|
|
# 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
|
2017-05-03 00:15:23 +08:00
|
|
|
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/rolling_update.yml --extra-vars "\
|
|
|
|
ireallymeanit=yes \
|
|
|
|
ceph_stable_release={env:UPDATE_CEPH_STABLE_RELEASE:kraken} \
|
|
|
|
fetch_directory={env:FETCH_DIRECTORY:{changedir}/fetch} \
|
2017-06-06 22:43:14 +08:00
|
|
|
ceph_docker_registry={env:CEPH_DOCKER_REGISTRY:docker.io} \
|
|
|
|
ceph_docker_image={env:UPDATE_CEPH_DOCKER_IMAGE:ceph/daemon} \
|
|
|
|
ceph_docker_image_tag={env:UPDATE_CEPH_DOCKER_IMAGE_TAG:latest} \
|
2017-07-17 23:26:48 +08:00
|
|
|
ceph_dev_branch={env:UPDATE_CEPH_DEV_BRANCH:master} \
|
|
|
|
ceph_dev_sha1={env:UPDATE_CEPH_DEV_SHA1:latest} \
|
2017-05-03 00:15:23 +08:00
|
|
|
"
|
2017-02-18 04:33:30 +08:00
|
|
|
|
|
|
|
testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {toxinidir}/tests/functional/tests
|
|
|
|
|
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
|
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=
|
2016-11-05 01:49:18 +08:00
|
|
|
ANSIBLE_SSH_ARGS = -F {changedir}/vagrant_ssh_config
|
2016-11-05 01:25:06 +08:00
|
|
|
ANSIBLE_ACTION_PLUGINS = {toxinidir}/plugins/actions
|
2016-12-16 02:23:17 +08:00
|
|
|
# only available for ansible >= 2.2
|
|
|
|
ANSIBLE_STDOUT_CALLBACK = debug
|
2016-12-02 00:19:19 +08:00
|
|
|
docker_cluster: PLAYBOOK = site-docker.yml.sample
|
2017-06-06 22:43:14 +08:00
|
|
|
update_docker_cluster: PLAYBOOK = site-docker.yml.sample
|
2017-05-25 20:50:37 +08:00
|
|
|
purge_docker_cluster: PLAYBOOK = site-docker.yml.sample
|
|
|
|
purge_docker_cluster: PURGE_PLAYBOOK = purge-docker-cluster.yml
|
2017-02-11 00:37:52 +08:00
|
|
|
docker_dedicated_journal: PLAYBOOK = site-docker.yml.sample
|
2017-03-22 22:16:06 +08:00
|
|
|
docker_dmcrypt_journal_collocation: PLAYBOOK = site-docker.yml.sample
|
2017-07-12 21:02:32 +08:00
|
|
|
bluestore_docker_cluster: PLAYBOOK = site-docker.yml.sample
|
|
|
|
bluestore_docker_dedicated_journal: PLAYBOOK = site-docker.yml.sample
|
|
|
|
bluestore_docker_dmcrypt_journal_collocation: PLAYBOOK = site-docker.yml.sample
|
|
|
|
|
2017-05-15 22:54:01 +08:00
|
|
|
rhcs: CEPH_STABLE_RELEASE = jewel
|
2017-04-04 05:11:55 +08:00
|
|
|
jewel: CEPH_STABLE_RELEASE = jewel
|
2017-05-05 22:18:11 +08:00
|
|
|
jewel: CEPH_DOCKER_IMAGE_TAG = tag-build-master-jewel-ubuntu-16.04
|
2017-07-12 21:02:32 +08:00
|
|
|
jewel: UPDATE_CEPH_STABLE_RELEASE = kraken
|
2017-05-16 00:46:49 +08:00
|
|
|
luminous: CEPH_STABLE_RELEASE = luminous
|
2017-07-12 21:02:32 +08:00
|
|
|
luminous: CEPH_DOCKER_IMAGE_TAG = tag-build-master-luminous-ubuntu-16.04
|
2017-05-16 00:46:49 +08:00
|
|
|
luminous: UPDATE_CEPH_STABLE_RELEASE = luminous
|
|
|
|
luminous: UPDATE_CEPH_DOCKER_IMAGE_TAG = tag-build-master-luminous-ubuntu-16.04
|
2017-07-26 02:46:22 +08:00
|
|
|
lvm_osds: CEPH_STABLE_RELEASE = luminous
|
2016-11-05 01:25:06 +08:00
|
|
|
deps=
|
2017-05-11 01:10:13 +08:00
|
|
|
ansible2.2: ansible==2.2.3
|
2017-05-23 02:13:04 +08:00
|
|
|
ansible2.3: ansible==2.3.1
|
2016-11-05 01:25:06 +08:00
|
|
|
-r{toxinidir}/tests/requirements.txt
|
|
|
|
changedir=
|
2017-07-27 23:05:59 +08:00
|
|
|
# tests a 1 mon, 1 osd, 1 mds and 1 rgw xenial cluster using non-collocated OSD scenario
|
2016-12-02 06:48:06 +08:00
|
|
|
xenial_cluster: {toxinidir}/tests/functional/ubuntu/16.04/cluster
|
2017-07-27 23:05:59 +08:00
|
|
|
# tests a 1 mon 1 osd centos7 cluster using collocated OSD scenario
|
2017-07-08 00:30:06 +08:00
|
|
|
journal_collocation: {toxinidir}/tests/functional/centos/7/jrn-col
|
2017-07-27 23:05:59 +08:00
|
|
|
# tests a 1 mon 1 osd centos7 cluster using dmcrypt non-collocated OSD scenario
|
2017-07-08 00:30:06 +08:00
|
|
|
dmcrypt_journal: {toxinidir}/tests/functional/centos/7/crypt-ded-jrn
|
2017-07-27 23:05:59 +08:00
|
|
|
# tests a 1 mon 1 osd centos7 cluster using dmcrypt collocated OSD scenario
|
2017-07-08 00:30:06 +08:00
|
|
|
dmcrypt_journal_collocation: {toxinidir}/tests/functional/centos/7/crypt-jrn-col
|
2017-07-27 23:05:59 +08:00
|
|
|
# tests a 1 mon, 1 osd, 1 mds and 1 rgw centos7 cluster using non-collocated OSD scenario
|
2016-12-02 06:59:27 +08:00
|
|
|
centos7_cluster: {toxinidir}/tests/functional/centos/7/cluster
|
2017-04-06 02:36:51 +08:00
|
|
|
# an alias for centos7_cluster, this makes the name better suited for rhcs testing
|
|
|
|
cluster: {toxinidir}/tests/functional/centos/7/cluster
|
2016-12-01 02:20:07 +08:00
|
|
|
# tests a 1 mon, 1 osd, 1 mds and 1 rgw centos7 cluster using docker
|
2017-07-08 00:30:06 +08:00
|
|
|
docker_cluster: {toxinidir}/tests/functional/centos/7/docker
|
|
|
|
update_docker_cluster: {toxinidir}/tests/functional/centos/7/docker
|
|
|
|
purge_docker_cluster: {toxinidir}/tests/functional/centos/7/docker
|
|
|
|
docker_dedicated_journal: {toxinidir}/tests/functional/centos/7/docker-ded-jrn
|
|
|
|
docker_dmcrypt_journal_collocation: {toxinidir}/tests/functional/centos/7/docker-crypt-jrn-col
|
2017-01-27 20:12:10 +08:00
|
|
|
purge_cluster: {toxinidir}/tests/functional/ubuntu/16.04/cluster
|
2017-07-08 00:30:06 +08:00
|
|
|
purge_dmcrypt: {toxinidir}/tests/functional/centos/7/crypt-ded-jrn
|
|
|
|
update_dmcrypt: {toxinidir}/tests/functional/centos/7/crypt-ded-jrn
|
2017-03-08 04:05:03 +08:00
|
|
|
update_cluster: {toxinidir}/tests/functional/centos/7/cluster
|
2017-07-08 00:30:06 +08:00
|
|
|
bluestore_journal_collocation: {toxinidir}/tests/functional/centos/7/bs-jrn-col
|
|
|
|
bluestore_cluster: {toxinidir}/tests/functional/centos/7/bluestore
|
|
|
|
bluestore_dmcrypt_journal: {toxinidir}/tests/functional/centos/7/bs-crypt-ded-jrn
|
|
|
|
bluestore_dmcrypt_journal_collocation: {toxinidir}/tests/functional/centos/7/bs-crypt-jrn-col
|
|
|
|
bluestore_docker_cluster: {toxinidir}/tests/functional/centos/7/bs-docker
|
|
|
|
bluestore_docker_dedicated_journal: {toxinidir}/tests/functional/centos/7/bs-dock-ded-jrn
|
|
|
|
bluestore_docker_dmcrypt_journal_collocation: {toxinidir}/tests/functional/centos/7/bs-dock-crypt-jrn-col
|
2017-07-26 02:46:22 +08:00
|
|
|
lvm_osds: {toxinidir}/tests/functional/centos/7/lvm-osds
|
2017-08-23 22:12:40 +08:00
|
|
|
purge_lvm_osds: {toxinidir}/tests/functional/centos/7/lvm-osds
|
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-07-17 23:26:48 +08:00
|
|
|
dev: ansible-playbook -vv -i "localhost," -c local {toxinidir}/tests/functional/dev_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
|
|
|
|
2017-07-26 02:46:22 +08:00
|
|
|
lvm_osds: ansible-playbook -vv -i {changedir}/hosts {toxinidir}/tests/functional/lvm_setup.yml
|
2017-08-23 22:12:40 +08:00
|
|
|
purge_lvm_osds: ansible-playbook -vv -i {changedir}/hosts {toxinidir}/tests/functional/lvm_setup.yml
|
2017-07-26 02:46:22 +08:00
|
|
|
|
2017-05-03 04:49:50 +08:00
|
|
|
rhcs: ansible-playbook -vv -i {changedir}/hosts {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"
|
2017-03-22 23:14:41 +08:00
|
|
|
|
2017-05-03 00:15:23 +08:00
|
|
|
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/{env:PLAYBOOK:site.yml.sample} --extra-vars "\
|
|
|
|
fetch_directory={env:FETCH_DIRECTORY:{changedir}/fetch} \
|
2017-05-06 04:51:54 +08:00
|
|
|
ceph_stable_release={env:CEPH_STABLE_RELEASE:kraken} \
|
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} \
|
|
|
|
ceph_docker_image_tag={env:CEPH_DOCKER_IMAGE_TAG:latest} \
|
2017-07-17 23:26:48 +08:00
|
|
|
ceph_dev_branch={env:CEPH_DEV_BRANCH:master} \
|
|
|
|
ceph_dev_sha1={env:CEPH_DEV_SHA1:latest} \
|
2017-05-03 00:15:23 +08:00
|
|
|
"
|
2017-03-16 19:16:09 +08:00
|
|
|
|
2016-12-04 10:08:53 +08:00
|
|
|
ansible-playbook -vv -i {changedir}/hosts {toxinidir}/tests/functional/setup.yml
|
2016-11-05 01:25:06 +08:00
|
|
|
|
2016-12-04 10:09:37 +08:00
|
|
|
testinfra -n 4 --sudo -v --connection=ansible --ansible-inventory={changedir}/hosts {toxinidir}/tests/functional/tests
|
2016-12-23 04:13:08 +08:00
|
|
|
|
2017-01-27 00:38:10 +08:00
|
|
|
purge_cluster: {[purge]commands}
|
2017-08-23 22:12:40 +08:00
|
|
|
purge_lvm_osds: {[purge-lvm]commands}
|
2017-01-27 00:38:10 +08:00
|
|
|
purge_dmcrypt: {[purge]commands}
|
2017-05-25 20:50:37 +08:00
|
|
|
purge_docker_cluster: {[purge]commands}
|
2017-02-18 04:33:30 +08:00
|
|
|
update_dmcrypt: {[update]commands}
|
2017-03-08 04:05:03 +08:00
|
|
|
update_cluster: {[update]commands}
|
2017-06-06 22:43:14 +08:00
|
|
|
update_docker_cluster: {[update]commands}
|
2017-01-27 00:38:10 +08:00
|
|
|
|
2016-11-05 02:01:28 +08:00
|
|
|
vagrant destroy --force
|