Skip to content

klueska-mesosphere/dcos-cli

 
 

Repository files navigation

DC/OS Command Line Interface

The DC/OS Command Line Interface (CLI) is a cross-platform command line utility that provides a user-friendly yet powerful way to manage DC/OS clusters.

Installation and usage

If you're a user of DC/OS, please follow the installation instructions. Otherwise, follow the instructions below to set up your development environment.

Detailed help and usage information is available through the dcos help command and for specific subcommands through dcos <subcommand> --help.

Additional documentation for the CLI and for the DC/OS in general is available in the DC/OS docs.

Development setup

Requirements

  1. git must be installed to download the source code for the DC/OS CLI.
  2. go 1.11+ or docker.
  3. win-bash must be installed if you are using Windows in order to run setup scripts from the Makefile.

Using Docker

  1. Clone git repo for the dcos cli:

    git clone [email protected]:dcos/dcos-cli.git
    
  2. Change directory to the repo directory:

    cd dcos-cli
    
  3. Build the binary:

    make
    

Using Go

  1. Clone git repo for the dcos cli:

    git clone [email protected]:dcos/dcos-cli.git
    

    or:

    go get github.com/dcos/dcos-cli
    
  2. Change directory to the repo directory:

    cd project/path/outside/$GOPATH/dcos-cli
    

    or:

    cd $GOPATH/src/github.com/dcos/dcos-cli
    export GO111MODULE=on
    
  3. Build the binary:

    export NO_DOCKER=1
    make
    

Using the DC/OS CLI

The DC/OS CLI will be built in the directory build/<platform>/.

Running tests

Unit tests

make test

Integration tests

You need to have a running DC/OS cluster in order to run the integration tests. Using a Python virtual environment is recommended.

export DCOS_TEST_DEFAULT_CLUSTER_USERNAME=<username to access the cluster>
export DCOS_TEST_DEFAULT_CLUSTER_PASSWORD=<password to access the cluster>
export DCOS_TEST_DEFAULT_CLUSTER_HOST=<IP or domain of the cluster>
cd tests
pip install -r requirements.txt
pytest integration

Releasing

Releasing a new version of the DC/OS CLI is done through an automated Jenkins build which is triggered automatically for new tags and on pushes to master.

Tagged versions can be found in the "Releases" page:

https://github.com/dcos/dcos-cli/releases

The binaries built from the master branch are continuously published to:

Contributing

Contributions are always welcome! Please refer to our contributing guidelines.

Packages

No packages published

Languages

  • Go 80.3%
  • Python 8.9%
  • Shell 6.8%
  • Groovy 2.9%
  • Other 1.1%