Basic DCOS subcommand
Make sure you meet requirements for installing packages
Clone git repo for the dcos spark cli:
git clone [email protected]:mesosphere/dcos-spark.git
Change directory to the repo directory:
cd dcos-spark
Make sure that you have virtualenv installed. If not type:
sudo pip install virtualenv
Create a virtualenv for the project:
make env
TODO: Talk about how to configure the root dcos cli
source
the setup file to add thedcos-spark
command line interface to yourPATH
:source env/bin/activate
Get started by calling the DCOS Spark CLI's help:
dcos-spark help
When invoking dcos subcommands from the dev env it includes the dcos-
as a prefix, however when this is included into DCOS it will be a subcommand of dcos and will be invoked by dcos spark
. dcos-spark help
translates to dcos spark help
when installed into the dcos-cli.
Leaving the env
deactivate
Tox, our test runner, tests against both Python 2.7 and Python 3.4 environments.
If you're using OS X, be sure to use the officially distributed Python 3.4 installer_ since the Homebrew version is missing a necessary library.
Tox will run unit and integration tests in both Python environments using a temporarily created virtualenv.
You should ensure DCOS_CONFIG
is set and that the config file points to the Marathon
instance you want to use for integration tests.
There are two ways to run tests, you can either use the virtualenv created by make env
above:
make test
Or, assuming you have tox installed (via sudo pip install tox
):
tox
List all of the supported test environments:
tox --listenvs
Run a specific set of tests:
tox -e <testenv>