You can access DC/OS CLI configuration with the dcos cluster and dcos config command groups.
Environment variables
The DC/OS CLI supports the following environment variables, which can be set dynamically.
DCOS_CLUSTER
To set the attached cluster, set the variable with the command:
export DCOS_CLUSTER=<cluster_name>
DCOS_DIR
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:
export DCOS_DIR=/home/jdoe/config
The next time you can run the dcos cluster setup command
, the cluster configuration will be created under /home/jdoe/clusters/<cluster_id>/
instead of the default ~/.dcos/clusters/<cluster_id>/
.
DCOS_SSL_VERIFY
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:
export DCOS_SSL_VERIFY=false
DCOS_VERBOSITY
Prints log messages to stderr at or above the level indicated. DCOS_VERBOSITY=1
is equivalent to the -v
command-line option. DCOS_VERBOSITY=2
is equivalent to the -vv
command-line option.