The DC/OS command line interface (DC/OS CLI) is a utility to manage cluster nodes, install and manage packages, inspect the cluster state, and manage services and tasks.
DC/OS 1.10.0 requires DC/OS CLI 0.5.x.
To list available commands, run
dcos with no parameters:
dcos Command line utility for the Mesosphere Datacenter Operating System (DC/OS). The Mesosphere DC/OS is a distributed operating system built around Apache Mesos. This utility provides tools for easy management of a DC/OS installation. Available DC/OS commands: auth Authenticate to DC/OS cluster cluster Manage connections to DC/OS clusters config Manage the DC/OS configuration file experimental Experimental commands. These commands are under development and are subject to change help Display help information about DC/OS job Deploy and manage jobs in DC/OS marathon Deploy and manage applications to DC/OS node Administer and manage DC/OS cluster nodes package Install and manage DC/OS software packages service Manage DC/OS services task Manage DC/OS tasks Get detailed command description with `dcos <command> --help`.
Displaying the DC/OS CLI version
To display the DC/OS CLI version, run:
DC/OS CLI versions and configuration files
DC/OS CLI 0.4.x and 0.5.x use a different structure for the location of configuration files.
DC/OS CLI 0.4.x has a single configuration file, which by default is stored in
~/.dcos/dcos.toml. In DC/OS CLI 0.4.x you can optionally change the location of the configuration file using the
DCOS_CONFIG environment variable.
DC/OS CLI 0.5.x has a configuration file for each connected cluster, which by default are stored in
~/.dcos/clusters/<cluster_id>/dcos.toml. In DC/OS CLI 0.5.x you can optionally change the base portion (
~/.dcos) of the configuration directory using the
DCOS_DIR environment variable.
- Updating to the DC/OS CLI 0.5.x and running any CLI command triggers conversion from the old to the new configuration structure.
- After you call
dcos cluster setup, (or after conversion has occurred), if you attempt to update the cluster configuration using a
dcos config setcommand, the command prints a warning message saying the command is deprecated and cluster configuration state may now be corrupted.
The DC/OS CLI supports the following environment variables, which can be set dynamically.
DCOS_CLUSTER (DC/OS CLI 0.5.x and higher only)
The attached cluster. To set the attached cluster, set the variable with the command:
DCOS_CONFIG (DC/OS CLI 0.4.x only)
The path to a DC/OS configuration file. If you put the DC/OS configuration file in
/home/jdoe/config/dcos.toml, set the variable with the command:
If you have the
DCOS_CONFIG environment variable configured:
- After conversion to the new configuration structure,
DCOS_CONFIGis no longer honored.
- Before you call
dcos cluster setup, you can change the configuration pointed to by
dcos config set. This command prints a warning message saying the command is deprecated and recommends using
dcos cluster setup.
DCOS_DIR (DC/OS CLI 0.5.x and higher only)
The path to a DC/OS configuration directory. If you want the DC/OS configuration directory to be
/home/jdoe/config, set the variable with the command:
dcos cluster setupcommand.
export DCOS_DIR=<path/to/config_dir> (optional, default when not set is ~/.dcos) dcos cluster setup <url>
This setting generates and updates per cluster configuration under
$DCOS_DIR/clusters/<cluster_id>. Sets newly set up cluster as the attached one.
Indicates whether to verify SSL certificates or set the path to the SSL certificates. You must set this variable manually. Setting this environment variable is equivalent to setting the
dcos config set core.ssl_verify option in the DC/OS configuration file. For example, to indicate that you want to set the path to SSL certificates:
Prints log messages to stderr at or above the level indicated. This is equivalent to the
--log-level command-line option. The severity levels are:
- debug Prints all messages to stderr, including informational, warning, error, and critical.
- info Prints informational, warning, error, and critical messages to stderr.
- warning Prints warning, error, and critical messages to stderr.
- error Prints error and critical messages to stderr.
- critical Prints only critical messages to stderr.
For example, to set the log level to warning:
Indicates whether to print additional debug messages to
stdout. By default this is set to
false. For example:
Installing the CLI
The recommended method to install the DC/OS CLI is from the DC/OS web interface. Or, you can manually install the CLI by using the instructions below.…Read More
Configuring the CLI
You can access DC/OS CLI configuration with the dcos cluster and dcos config command groups.…Read More
Updating the CLI
You can update the DC/OS CLI to the latest version or downgrade to an older version.…Read More
Connecting to Multiple Clusters
You can connect the CLI to multiple DC/OS clusters using dcos cluster. dcos cluster has subcommands to set up connections to and attach to clusters and rename and remove clusters.…Read More
Uninstalling the CLI
You can uninstall the CLI with these commands for your operating system.…Read More
DC/OS Enterprise CLI
The DC/OS Enterprise CLI provides commands for DC/OS Enterprise features: dcos security and dcos backup.…Read More