This is an automated email from the ASF dual-hosted git repository.

klueska pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git


The following commit(s) were added to refs/heads/master by this push:
     new c132007  Added docs describing how to use the new CLI.
c132007 is described below

commit c132007309d2291537f6dc0ac6424092f47532db
Author: Armand Grillet <agril...@mesosphere.io>
AuthorDate: Thu Nov 22 10:33:28 2018 -0500

    Added docs describing how to use the new CLI.
    
    The documentation describes the main commands of the new CLI, how to
    activate it, how to build Mesos including this component, and how to
    write a configuration file for it.
    
    Review: https://reviews.apache.org/r/69390/
---
 docs/cli.md  | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 docs/home.md |  1 +
 2 files changed, 72 insertions(+)

diff --git a/docs/cli.md b/docs/cli.md
new file mode 100644
index 0000000..5dd3472
--- /dev/null
+++ b/docs/cli.md
@@ -0,0 +1,71 @@
+---
+title: Apache Mesos - CLI
+layout: documentation
+---
+
+# The new CLI
+
+
+The new Mesos Command Line Interface provides one executable Python 3
+script to run all default commands and additional custom plugins.
+
+Two of the subcommands available allow you to debug running containers:
+
+* `mesos task exec`, to run a command in a running task's container.
+* `mesos task attach`, to attach your local terminal to a running task
+  and stream its input/output.
+
+## Building the CLI
+
+For now, the Mesos CLI is still under development and not built as part
+of a standard Mesos distribution.
+
+The CLI can be built using [Autotools](configuration/autotools.md) and
+[Cmake options](configuration/cmake.md). If necessary, check the options
+described in the linked pages to set Python 3 before starting a build.
+
+The result of this build will be a `mesos` binary that can be executed.
+
+## Using the CLI
+
+Using the CLI without building Mesos is also possible. To do so, activate
+the CLI virtual environment by following the steps described below:
+
+```
+$ cd src/python/cli_new/
+$ PYTHON=python3 ./bootstrap
+$ source activate
+$ mesos
+```
+
+Calling `mesos` will then run the CLI and calling `mesos-cli-tests` will
+run the integration tests.
+
+##  Configuring the CLI
+
+The CLI uses a configuration file to know where are the masters of the cluster
+and the plugins that can be used on top of the default ones provided.
+
+The file, which should be located at `~/.mesos/config.toml`, looks like this:
+
+```
+# The `plugins` is an array listing the absolute paths of the
+# plugins you want to add to the CLI.
+plugins = [
+  "</absolute/path/to/plugin-1/directory>",
+  "</absolute/path/to/plugin-2/directory>"
+]
+
+# The `master` is a field that has to be composed of an
+# `address` or `zookeeper` field, but not both. For example:
+[master]
+  address = "10.10.0.30:5050"
+  # The `zookeeper` field has an `addresses` array and a `path` field.
+  # [master.zookeeper]
+  #   addresses = [
+  #     "10.10.0.31:5050",
+  #     "10.10.0.32:5050",
+  #     "10.10.0.33:5050"
+  #   ]
+  #   path = "/mesos"
+```
diff --git a/docs/home.md b/docs/home.md
index e05b65d..d0f3eb3 100644
--- a/docs/home.md
+++ b/docs/home.md
@@ -25,6 +25,7 @@ layout: documentation
 * [Upgrades](upgrades.md) for upgrading a Mesos cluster.
 * [Logging](logging.md)
 * [Monitoring / Metrics](monitoring.md)
+* [Debugging using the new CLI](cli.md)
 * [Operational Guide](operational-guide.md)
 * [Fetcher Cache Configuration](fetcher.md)
 * [Fault Domains](fault-domains.md)

Reply via email to