59ace056a83de96a18282687fe56d4a84e99a287
1. Add ability to create mutable and immutable TOML configuration. The DCOS config cli should be the only one using the mutable version 2. Add ability to list of all the properties in the TOML configuration. Test: tox
DCOS CLI ======= DCOS CLI with modular subcommands.
Setup
Make sure you meet requirements for installing packages
Install the "wheel" project:
pip install wheelInstall the tox project:
pip install toxClone git repo for the dcos cli:
git clone git@github.com:mesosphere/dcos-cli.gitChange directory to the repo directory:
cd dcos-cliCreate a virtualenv for the dcos cli project:
virtualenv --prompt='(dcos-cli) ' env
Configure Development Environment
Activate the virtualenv:
source env/bin/activateInstall project in develop mode:
pip install -e .Export DCOS_PATH:
export DCOS_PATH=<path-to-project>/envExport DCOS_CONFIG:
mkdir $DCOS_PATH/config touch $DCOS_PATH/config/Dcos.toml export DCOS_CONFIG=$DCOS_PATH/env/config/Dcos.toml
Running POC
List command help:
dcos --helpRun subcommand:
dcos config --help
Running Tests:
Run tests using tox:
toxRun tests using tox through docker:
CHECKOUT=<path-to-repo> \ export DOCKER_REPO=mesosphere/python-tox \ export DOCKER_TAG=v1 \ sudo docker run -it -v $CHECKOUT:/dcos-cli $DOCKER_REPO:$DOCKER_TAG tox -c /dcos-cli/tox.ini
Notes
Submodule writing notes gathered so far:
- Because we are using python's pip to install packages it looks like we can't install packages that share the same python's package of other installed packages because they will conflict once deployed to virtualenv directory structure.
- Currently we require that subcommands implement an info command. For
example dcos-subcommand implements
subcommand info.
Description
Languages
Python
89.4%
Mustache
4%
HTML
4%
Shell
2.1%
reStructuredText
0.4%
Other
0.1%