Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

d2iq-archive/dcos-helloworld

Repository files navigation

DCOS HelloWorld Subcommand

Basic DCOS subcommand

Setup

  1. Run from source or run from binary. If you would like to run from a binary, continue to 'Binary' section below.

  2. Make sure you meet requirements for installing packages

  3. Clone git repo for the dcos helloworld cli:

    git clone [email protected]:mesosphere/dcos-helloworld.git
    
  4. Change directory to the repo directory:

    cd dcos-helloworld
    
  5. Make sure that you have virtualenv installed. If not type:

    sudo pip install virtualenv
    
  6. Create a virtualenv for the project:

    make env
    

Configure Environment and Run

  1. source the setup file to add the dcos-helloworld command line interface to your PATH:

    source env/bin/activate
    
  2. Get started by calling the DCOS HelloWorld CLI's help:

    dcos-helloworld help
    

Binary:

Create Binary:

  1. Install pyinstaller:

    pip install pyinstaller

  2. Create hellworld cli binary:

    make binary

Run Binary:

  1. Update PATH to have the dcos-helloworld binary. The created binary is is in folder dist:

    PATH=/path/to/binary:$PATH

Running Tests:

Setup

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.

Running

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

Other Useful Commands

  1. List all of the supported test environments:

    tox --listenvs
    
  2. Run a specific set of tests:

    tox -e <testenv>
    

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •