forked from cloudfoundry/docs-bosh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcli-v2-diff.html.md.erb
106 lines (80 loc) · 4.58 KB
/
cli-v2-diff.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
---
title: Differences between CLI v2 vs v1
---
<p class="note">Note: Applies to CLI v2 v2.0.13+.</p>
## <a id="general"></a> General
The BOSH CLI v2 differs from v1 in two main ways: it is stateless, and it hyphenates single commands.
<strong>Statelessness</strong>
The BOSH CLI v2 does not store values for a current environment or configuration.
In v1, you set the environment by passing a Director endpoint to `bosh target` and set the deployment by passing a manifest
file to `bosh deployment`. Then you could run `bosh deploy` with no arguments.
In contrast, the BOSH CLI v2 is stateless. To specify a Director instance and deployment manifest to run a command over,
you do one of the following:
* Pass the BOSH environment in with the `-e` flag and the deployment in with the `-d` flag, or
* Set the command shell environment variable `BOSH_ENVIRONMENT` to your Director endpoint or alias and set `BOSH_DEPLOYMENT` to your deployment name. You can also use `bosh alias-env` to create an alias for your BOSH environment configuration, to avoid having to reference the Director endpoint and credential information for every command.
<strong>Hyphenation</strong>
The BOSH v2 CLI also hyphenates single commands that v1 represented as space-separated word pairs.
For example, `bosh delete deployment` in v1 corresponds to `bosh delete-deployment` in v2.
| Before | After
|-----------------------------|-----------------------------
| bosh-init deploy <manifest> | bosh create-env <manifest>
| bosh-init delete <manifest> | bosh delete-env <manifest>
| bosh target <ip> | bosh alias-env my-env -e <ip>
| bosh status | bosh env
| bosh -t my-env ... | bosh -e my-env ...
| bosh -d manifest-path ... | bosh -d deployment-name ... [3]
| bosh deployment <manifest> | n/a
| bosh deploy | bosh deploy <manifest>
| bosh delete deployment | bosh delete-deployment
| bosh tasks --no-filter | bosh tasks
| bosh tasks recent 1000 | bosh tasks -r=1000
| bosh download manifest dep | bosh manifest
| bosh vms my-dep | bosh instances
| bosh vms my-dep | bosh -d my-dep vms
- Most commands require (`--environment`) `-e` and `--deployment` (`-d`) flags
- `--deployment` (`-d`) flag accepts a deployment name instead of a manifest
- bosh-init CLI is now absorbed by the bosh CLI. One binary!
- Variety of commands (create-env/delete-env/etc.) accept simple interpolation flags (`-v/-l`)
- All commands support friendlier non-TTY output, forceful TTY output and `--json` formatting
- All command names now use dashes instead of spaces
- All commands expect 'piece1/piece2' formatting for instances, releases, and stemcells
- `^+C` doesnt ask for task cancellation and just exits CLI command (task continue to run)
- Sorts all tables in a more consistent manner
- Stores configuration file in `~/.bosh/config` instead of `~/.bosh_config`
- Most of the output formatting have changed
---
## <a id="cmd"></a> Notable differences per command
- `bosh alias-env` and all commands
- only allows connections to Director configured with verifiable certificates
- no longer asks to interactively log in
- `bosh log-in`
- no longer accepts username or password arguments
- `bosh task`
- removed `--no-track` flag without replacement
- `bosh tasks`
- improves argument syntax (`-r` for recent and `-a` for all)
- `bosh deploy`
- no longer checks or requires `director_uuid` in the deployment manifest
- to achieve similar safety make sure to give unique deployment names across environments
- `bosh instances`
- no longer accepts deployment name argument in favor of using global `--deployment` (`-d`) flag
- `bosh vms`
- no longer accepts deployment name argument in favor of using global `--deployment` (`-d`) flag
- `bosh logs`
- adds `-f` flag similar to `tail -f` (uses `bosh ssh` command internally)
- `bosh ssh`
- improves argument syntax, use `ssh --help` for more info
- support for running commands against multiple machines
- adds `--opts` flag to pass through options to ssh command for port forwarding etc.
- adds `-r` flag to collate results from multiple machines
- `bosh scp`
- improves argument syntax
- support for running command against multiple machines
- `bosh delete-deployment`
- removes explicit argument for specifying deployment in favor of global `--deployment` (`-d`) flag
- `bosh add-blob`
- requires a path to its release destination
- no longer uses symlinks to manage blobs but rather places file directly into `blobs/`
---
Next: [Global Flags](cli-global-flags.html)
Previous: [CLI v2](cli-v2.html)