Shakedown Test Harness for DCOS in Containerised Form
236
DC/OS test harness.
*A shakedown is a period of testing or a trial journey undergone by a ship, aircraft or other craft and its crew before being declared operational.
For DCOS Shakedown testing, you can go with either the "Shakedown as Docker Container" or "Shakedown as a native Installation" option.
Pull the docker image -
docker pull servergurus/dcos-shakedown
Run shakedown commands via the docker container -
docker run -it servergurus/dcos-shakedown <command_name>
For example, docker run -it servergurus/dcos-shakedown shakedown --help
Usage: shakedown [OPTIONS] [TESTS]...
Shakedown is a DC/OS test-harness wrapper for the pytest tool.
Options:
-u, --dcos-url TEXT URL to a running DC/OS cluster.
-f, --fail [fast|never] Sepcify whether to continue testing when
encountering failures. (default: never)
-m, --timeout INTEGER Seconds after which to terminate a running
test
--ssh-user TEXT Username for cluster ssh authentication
-i, --ssh-key-file PATH Path to the SSH keyfile to use for
authentication.
-q, --quiet Suppress all superfluous output.
-k, --ssl-no-verify Suppress SSL certificate verification.
-o, --stdout [pass|fail|skip|all|none]
Print the standard output of tests with the
specified result. (default: fail)
-s, --stdout-inline Display output inline rather than after test
phase completion.
-p, --pytest-option TEXT Options flags to pass to pytest.
-t, --oauth-token TEXT OAuth token to use for DC/OS authentication.
-n, --username TEXT Username to use for DC/OS authentication.
-w, --password TEXT Password to use for DC/OS authentication.
--no-banner Suppress the product banner.
--version Show the version and exit.
--help Show this message and exit.
shakedown --dcos-url=http://dcos.example.com [options] [path_to_tests]
--dcos-url is required.~/.shakedown TOML file (command-line takes precedence)shakedown --help is your friend.Shakedown can be run against multiple DC/OS clusters in parallel by setting the DCOS_CONFIG_ENV environmental variable to a unique file, eg:
DCOS_CONFIG_ENV='shakedown-custom-01.toml' shakedown --dcos-url=http://dcos.example.com [options] [path_to_tests]
Shakedown requires Python 3.4+.
The recommended Shakedown installation method is via the PyPI Python Package Index repository at https://pypi.python.org/pypi/dcos-shakedown. To install the latest version and all required modules:
pip3 install dcos-shakedown
dcos-shakedown has a number of dependencies which need to be available. One of those dependencies, the cryptography module requires a number of OS level libraries in order to install correctly which include: build-essential libssl-dev libffi-dev python-dev. For environments other than linux please read Stackoverflow. On a new ubuntu environment the following should install dcos-shakedown.
apt-get updateapt-get install python3 python3-pip build-essential libssl-dev libffi-dev python-devpip3 install dcos-shakedownTo pull and install from our master branch on GitHub:
git clone https://github.com/dcos/shakedown.git
cd shakedown
pip3 install -r requirements.txt && pip3 install -e .
Or if you do not wish to pin to a version of dcos-cli:
pip3 install -r requirements-edge.txt && pip3 install -e .
If you'd like to isolate your Shakedown Python environment, you can do so using the virtualenv tool. To create a new virtual environment in $HOME/shakedown:
pip3 install virtualenv
virtualenv $HOME/shakedown
source $HOME/shakedown/bin/activate
pip3 install dcos-shakedown
This virtual environment can then be activated in new terminal sessions with:
source $HOME/shakedown/bin/activate
Shakedown is a testing tool as well as a library. Many helper functions are available via from shakedown import * in your tests. See the API documentation for more information.
Shakedown is licensed under the Apache License, Version 2.0. For additional information, see the LICENSE file included at the root of this repository.
Content type
Image
Digest
Size
190.7 MB
Last updated
about 8 years ago
docker pull servergurus/dcos-shakedown