forked from cloudfoundry/docs-bosh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcli-global-flags.html.md.erb
70 lines (43 loc) · 2.92 KB
/
cli-global-flags.html.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
title: CLI Global Flags
---
<p class="note">Note: Applies to CLI v2.</p>
## <a id="help"></a> Help flag
- `bosh -h` shows global flags described here and all available commands
- `bosh <command> -h` shows command specific options
---
## <a id="version"></a> Version flag
- `-v` flag shows CLI version.
<p class="note">Note: To see Director version use `bosh env` command.</p>
---
## <a id="env"></a> Environment flags
- `--environment` (`-e`) flag allows to specify Director VM address or environment alias (`BOSH_ENVIRONMENT` environment variable)
- `--ca-cert` flag allows to specify CA certificate used for connecting for Director and UAA (`BOSH_CA_CERT` environment variable)
CLI does not provide a way to skip SSL certificate validation to encourage secure Director configuration.
See [CLI environments](cli-envs.html) for details.
---
## <a id="auth"></a> Authentication flags
- `--client` flag allows to specify basic auth username or UAA client ID (`BOSH_CLIENT` environment variable)
- `--client-secret` flag allows to specify basic auth password or UAA client secret (`BOSH_CLIENT_SECRET` environment 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.
---
## <a id="output"></a> Output flags
- `-n` flag affirms any confirmation that typically requires use input (`BOSH_NON_INTERACTIVE=true` environment variable)
- `--json` flag changes output format to JSON
- `--tty` flag forces output to include all decorative text typically visible when command is not redirected
- `--no-color` flag 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.
---
## <a id="deployment"></a> Deployment flag
- `--deployment` (`-d`) flag allows to specify deployment for a command (`BOSH_DEPLOYMENT` environment 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.
---
## <a id="tunnel"></a> SOCKS5 Tunneling
See [tunneling](cli-tunnel.html) for details.
---
## <a id="logging"></a> 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.