Commit Graph

100 Commits (bf99751ce1a3f9a2cb7bc7b1d78e01dcdb8dbbd4)

Author SHA1 Message Date
Andrew Schoen 000110d2a2 tests: convert extra-vars to use json
This will prevent ansible from misreading any of these values. There
were failures with xenial deployments because the value set for
``ceph_rhcs`` was being treated as a boolean True even though I'd set
the value to false. This is because boolean values passed in with
--extra-vars must use the json format.

The formatting of the json is very important as you need a '\' to escape
the starting and ending json to make tox happy. Also, each line needs to
end with '\' if it's a multi-line command.

Another thing to note is that if you want to use extra vars at the
command line to respond to a vars_prompt it must be in key/value format.
This is why we have a -e and a --extra-vars on the purge and update
tests.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-03-16 14:23:41 -05:00
Andrew Schoen d76b1d9609 tests: change USE_CEPH_RHCS to CEPH_RHCS
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-03-15 16:37:21 -05:00
Andrew Schoen e3c8f7db4e tests: use CEPH_STABLE to set the value for ceph_stable
When using CEPH_DEV=true you'll need to set CEPH_STABLE=false so that
that an upstream repo file doesn't get created.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-03-15 16:37:21 -05:00
Andrew Schoen b1f5798607 tests: reformat tox.ini for better readability
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-03-15 16:37:21 -05:00
Andrew Schoen 19a5362868 tests: adds the ability to set the ceph_stable_release value
Use CEPH_STABLE_RELEASE to set the name of the ceph release you plan to
install. When testing an upgrade scenario you'll also need to set
UPGRADE_CEPH_STABLE_RELEASE.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-03-15 16:37:20 -05:00
Andrew Schoen fbe2aca9af tests: add the ability to run tests with shaman repos
To run tests that deploy shaman repos set CEPH_DEV=true and optionally
use CEPH_DEV_BRANCH and CEPH_DEV_SHA1 to define with branch and sha1 to
test. CEPH_DEV_BRANCH defaults to master and CEPH_DEV_SHA1 defaults to
latest.

For example, this would run the journal_collocation test with the latest
build of the master branch:

  CEPH_DEV=true tox -rve ansible2.2-journal_collocation

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-03-15 16:37:20 -05:00
Andrew Schoen 635f204001 tests: use CEPH_ORIGIN to control the value of ceph_origin
For example, the following would run the journal collocation test and
would install ceph from the repos already on the nodes:

  CEPH_ORIGIN=distro tox -rve ansible2.2-journal_collocation

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-03-15 16:37:20 -05:00
Andrew Schoen 1f40347bd2 tests: when running test set USE_RHCS=true to install set ceph_rhcs=true
When invoking the tests if USE_RHCS=true is set then all tests will be
run with ceph_rhcs=True.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-03-15 16:37:20 -05:00
Andrew Schoen 04c113b05f tests: adds an update_cluster testing scenario
This updates the centos 7 cluster scenario from jewel to kraken using
the rolling_update playbook.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-03-09 09:52:26 -06:00
Sébastien Han 7b216aa8e0 ci: add docker-cluster-dmcrypt-journal-collocation scenario
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-02-21 15:56:09 -05:00
Andrew Schoen 36eaca693b tests: enable the docker_dedicated_journal scenario
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-02-21 15:55:38 -05:00
Andrew Schoen 0cdc6fb79a tests: adds a new ansible2.2-update_dmcrypt scenario
This performs a rolling update on a cluster using dmcrypt dedicated
journals.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-02-21 12:31:27 -06:00
Sébastien Han 549a25c5bc Revert "ci: dummy commit to debug"
This reverts commit ff135a5024.
2017-01-31 09:19:55 +01:00
Sébastien Han ff135a5024 ci: dummy commit to debug
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-01-30 16:12:36 +01:00
Andrew Schoen 2a87c13f17 tests/purge_cluster: setup a xenial cluster instead of centos7
The purge_dmcrypt scenario also tests centos7, so change this one to
xenial so we can have more test coverage.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-01-27 06:12:10 -06:00
Andrew Schoen e05df64fd0 tests: adds purge_cluster and purge_dmcrypt scenarios
This also removes the purge_cluster_collocated scenario as it's not
needed now because of purge_cluster.

Moving all the purge commands into its own section allows for ease of
reuse when creating new purge scenarios.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-01-26 10:41:29 -06:00
Alfredo Deza 6b46da5538 tests: remove the pip install ansible from stable github branch
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2017-01-16 16:19:25 -05:00
Alfredo Deza 1a4886a561 tests: bump ansible testing version to 2.2.1 for the 2.2 environment
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2017-01-16 16:18:55 -05:00
Andrew Schoen 48ac9579b6 tests: copy purge-cluster.yml to root of ceph-ansible
There is an Ansible bug which makes the playbook fail when we are
running a playbook from the non-git root directory. The real problem is
that the ansible.cfg is not honoured and we are including variable from
roles/<role>/defaults/main.yml

The fix is too copy the purge cluster playbook on the git root directory
and execute it.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-01-10 16:56:07 -06:00
Andrew Schoen 6d3a334439 tests: test with the latest ansible stable-2.2 branch from github
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-01-10 15:27:19 -06:00
Andrew Schoen 0ce18daa49 tests: adds a purge_cluster_collocated scenario
This scenario brings up a 1 mon 1 osd cluster using journal collocation,
purges the cluster and then verifies it can redeploy the cluster.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-01-03 15:57:17 -06:00
Andrew Schoen 529d0f4103 tests: preserve newlines in ansible output when testing
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-15 12:23:17 -06:00
Andrew Schoen 7c1a45260d tests: run testinfra with --sudo
It needs this so that the modules can use sudo

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:19 -06:00
Andrew Schoen 465bafc444 tests: run the setup.yml playbook with tox
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:19 -06:00
Andrew Schoen 870a4358f0 tests: use testinfra in tox.ini instead of pytest directly
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-06 14:56:18 -06:00
Andrew Schoen 155bcf5ae2 tests: rename the directory for centos7_cluster
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-01 16:59:27 -06:00
Andrew Schoen 234b2c1cc2 tests: removes unused xenial_conf_tests and xenial_mon_osd scenarios
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-01 16:56:06 -06:00
Andrew Schoen da6d68c042 tests: rename the directory for xenial_cluster
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-01 16:49:40 -06:00
Andrew Schoen af568b7e62 tests: docker_cluster should use the site-docker.yml playbook
This commits allows for scenarios to pick their own playbook while
defaulting to use site.yml.sample.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-01 10:28:55 -06:00
Andrew Schoen 11c13ad7c0 tests: adds a docker_cluster scenario
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-01 10:28:54 -06:00
Alfredo Deza 10df63dcf9 tests: use underscores to prevent tox combinatorial issues
Signed-off-by: Alfredo Deza <adeza@redhat.com>

Resolves: colocated#tests
2016-11-29 16:08:42 -05:00
Andrew Schoen 138e5a9421 tests: change centos7-cluster to use raw_multi_journal
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-11-28 15:10:07 -06:00
Andrew Schoen eae3463a9e tests: change xenial-cluster to use raw_multi_journal
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-11-28 15:05:48 -06:00
Andrew Schoen a05a1b9b0f testing: change raw-multi-journal to journal-collocation
We want to test journal collocation here because we're gonna switch
xenial-cluster and centos7-cluster to use a dedicated journal.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-11-28 15:04:04 -06:00
Andrew Schoen c6e96897ba testing: rename the dmcrypt-dedicated-journal to dmcrypt-journal
We're going to assume all scenarios use a dedicated journal unless
otherwise specified.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-11-28 14:58:09 -06:00
Andrew Schoen c212162afb tests: adds a scenario using OSD dmcrypt_journal_collocation
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-11-28 12:03:00 -06:00
Andrew Schoen 9f432bfb05 tests: adds a dmcrypt-dedicated-journal testing scenario
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-11-28 12:02:32 -06:00
Andrew Schoen 20ac2cad9d testing: each scenario should use it's own fetch_directory
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-11-21 17:08:39 -06:00
Andrew Schoen 0570d2911b testing: remove the timeout for the ansible-playbook call
This isn't available on OSX and we'll end up hitting this timeout when
we don't want to, let's just remove it.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-11-18 14:15:34 -06:00
Alfredo Deza 2e9d2f872c testing: add a timeout per ansible call to workaround possible gatherkeys issues
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-11-17 12:48:25 -05:00
Sébastien Han a10aecea83 ci: bump ansible version to 2.2
ceph-ansible is now fully compliant with ansible 2.2 so bumping the
ansible version to make we test the right things.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-11-16 16:44:45 +01:00
Andrew Schoen 118834b752 tests: adds comments to tox.ini describing each scenario
Signed-off-by: Andrew Schoen <aschoen@redhat.com>

Resolves: vagrant#boxes
2016-11-10 12:05:23 -06:00
Andrew Schoen 4a2e06cb45 tests: adds the centos7-cluster scenario to tox.ini
Signed-off-by: Andrew Schoen <aschoen@redhat.com>

Resolves: vagrant#boxes
2016-11-10 12:05:23 -06:00
Andrew Schoen c5b3378a18 tests: adds the xenial mon-osd-mds-rgw scenario as xenial-cluster
I tried adding the scenario as xenial-mon-osd-mds-rgw but for
whatever reason tox refused to select that environment. Changing the
name to xenial-cluster fixed that though.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>

Resolves: vagrant#boxes
2016-11-10 12:05:23 -06:00
Andrew Schoen db657ed8e1 tests: provide a way use libvirt with vagrant and tox
This allows for:

tox -- --provider=libvirt

Signed-off-by: Andrew Schoen <aschoen@redhat.com>

Resolves: vagrant#boxes
2016-11-08 17:00:09 -06:00
Andrew Schoen 99fc84276e tests: updates tox to test the new scenarios
This also turns on -vv for ansible and adds an environment for
ansible==1.9.4 testing.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>

Resolves: testing#updates
2016-11-08 12:37:04 -06:00
Andrew Schoen d5a7f3de8f tests: require a group_vars folder in the scenario dir
This will allow for no changes needed in the ansible playbook command
when adding new scenarios. Each scenario will just need a hosts file and
a group_vars directory to define how the cluster should be setup.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-11-04 16:35:45 -05:00
Alfredo Deza 8427e5a4a3 tests: make the tox.ini config call the ssh config helper script
Signed-off-by: Alfredo Deza <adeza@redhat.com>

Resolves: pytest#harness
2016-11-04 14:13:30 -04:00
Andrew Schoen e319ccf691 tests: remove the need for a setenv entry per scenario in tox.ini
Signed-off-by: Andrew Schoen <aschoen@redhat.com>

Resolves: pytest#harness
2016-11-04 14:13:30 -04:00
Andrew Schoen 80e955cc40 tests: adds a tox.ini to run the functional tests
This currently tests the initial-members scenario for both ansible 2.1
and ansible 2.2. It assumes a hosts file and vagrant_ssh_config exists
in the scenario directory.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>

Resolves: pytest#harness
2016-11-04 14:13:30 -04:00