Global Flags
Note
Applies to CLI v2.
Help flag¶
bosh -hshows global flags described here and all available commandsbosh <command> -hshows command specific options
Version flag¶
-vflag shows CLI version.
Note
To see Director version use bosh env command.
Environment flags¶
--environment(-e) flag allows to specify Director VM address or environment alias (BOSH_ENVIRONMENTenvironment variable)--ca-certflag allows to specify CA certificate used for connecting for Director and UAA (BOSH_CA_CERTenvironment variable)
CLI does not provide a way to skip SSL certificate validation to encourage secure Director configuration.
See CLI environments for details.
Authentication flags¶
--clientflag allows to specify basic auth username or UAA client ID (BOSH_CLIENTenvironment variable)--client-secretflag allows to specify basic auth password or UAA client secret (BOSH_CLIENT_SECRETenvironment variable)
CLI does not provide a way to specify UAA user login information since all non-interactive use (in scripts) should use UAA clients. bosh log-in command allows to log in interactively as a UAA user.
Output flags¶
-nflag affirms any confirmation that typically requires user input (BOSH_NON_INTERACTIVE=trueenvironment variable)--jsonflag changes output format to JSON--ttyflag forces output to include all decorative text typically visible when command is not redirected--no-colorflag disables colors (enabled by default when command is redirected)
CLI makes a distinction between decorative text (table headings) and primary content (such as tables). To make it eas easy to parse command output via other tools (such as grep) when decorative text is automatically hidden when command output is redirected.
Deployment flag¶
--deployment(-d) flag allows to specify deployment for a command (BOSH_DEPLOYMENTenvironment variable)
Several commands that can operate in a Director and a deployment context (such as bosh tasks command) account for presence of this flag and filter their output based on a deployment.
SOCKS5 Tunneling¶
See tunneling for details.
HTTP proxy¶
Some commands such as create-env may require usage of an http proxy to access internet or the iaas. Define HTTP_PROXY, HTTPS_PROXY and NO_PROXY environment variables according to go-lang support documented in detail in x/net/http/httpproxy#Config
export HTTP_PROXY=http://myproxy.com:3128 export HTTPS_PROXY=http://myproxy.com:3128 export NO_PROXY="asinglehost.mydomain.com,mywholedomain.org,.onlymysubdomains.org,192.168.10.11,172.17.11.0/24"
Logging¶
Along with the UI output (stdout) and UI errors (stderr), CLI can output more verbose logs.
Logging is disabled by default (BOSH_LOG_LEVEL defaults to none).
To enable logging, set the BOSH_LOG_LEVEL environment variable to one of the following values: debug, info, warn, error, none (default)
Logs write to stdout (debug & info) & stderr (warn & error) by default.
To write logs to a file, set the BOSH_LOG_PATH environment variable to the path of the file to create and/or append to.