forked from cloudfoundry/docs-dev-guide
-
Notifications
You must be signed in to change notification settings - Fork 0
/
v3-commands.html.md.erb
132 lines (111 loc) · 4.94 KB
/
v3-commands.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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
---
title: Using Experimental cf CLI Commands
owner: CF CLI
---
<p class="note"><strong>Note</strong>: This topic only applies to cf CLI v6. Commands with <code>v3-</code> prefixes do not exist in cf CLI v7. For more information, see <a href="../cf-cli/v7.html">Upgrading to cf CLI v7</a>.</p>
This topic describes how to use the experimental Cloud Foundry Command Line Interface (cf CLI) commands offered by the Cloud Controller V3 API.
These commands provide developers with the ability to better orchestrate app deployment workflows. New features include the deployment and management of apps with multiple processes and uploading and staging multiple versions of a single app.
<%= vars.v3_cli_versions %>
For more information about cf CLI commands, see the [Cloud Foundry CLI Reference Guide](../cf-cli/cf-help.html). For more information about the Cloud Controller V3 API, see the [API documentation](http://v3-apidocs.cloudfoundry.org/).
<p class="note"><strong>Note</strong>: Because these commands are experimental, they are not guaranteed to be available or compatible in subsequent cf CLI releases.</p>
##<a id='overview'></a> Overview
The new commands include a `v3-` prefix. While the syntax of some experimental commands is based on the existing cf CLI, these commands call the V3 API and support new flags to unlock additional features. Other commands expose the new primitives of apps, such as by performing operations on an app's packages and droplets.
In the V2 APIs, running and staging an app are tightly coupled operations. As a result, an app cannot be staging and running at the same time. The V3 APIs offer developers more granular control over the uploading, staging, and running of an app.
##<a id='commands'></a> Commands
<p class="note"><strong>Note</strong>: This topic only applies to cf CLI v6. Commands with <code>v3-</code> prefixes do not exist in cf CLI v7. For more information, see <a href="../cf-cli/v7.html">Upgrading to cf CLI v7</a>.</p>
Consult the following table for a description of the experimental commands.
<table>
<tr>
<th>Command</th>
<th>Description</th>
</tr>
<tr>
<td><code>v3-apply-manifest</code></td>
<td>Applies manifest properties to an app</td>
</tr>
<tr>
<td><code>v3-apps</code></td>
<td>Lists all apps in the target space</td>
</tr>
<tr>
<td><code>v3-create-app</code></td>
<td>Creates a V3 app</td>
</tr>
<tr>
<td><code>v3-create-package</code></td>
<td>Uploads a V3 package</td>
</tr>
<tr>
<td><code>v3-delete</code></td>
<td>Deletes a V3 app</td>
</tr>
<tr>
<td><code>v3-droplets</code></td>
<td>Lists droplets of an app</td>
</tr>
<tr>
<td><code>v3-env</code></td>
<td>Shows all environment variables for an app</td>
</tr>
<tr>
<td><code>v3-get-health-check</code></td>
<td>Shows the type of health check performed on an app</td>
</tr>
<tr>
<td><code>v3-packages</code></td>
<td>Lists packages of an app</td>
</tr>
<tr>
<td><code>v3-push</code></td>
<td>Pushes a new app or syncs changes to an existing app</td>
</tr>
<tr>
<td><code>v3-restart</code></td>
<td>Stops all instances of an app and then starts them again, which may cause downtime</td>
</tr>
<tr>
<td><code>v3-restart-app-instance</code></td>
<td>Terminates and then instantiates an app instance</td>
</tr>
<tr>
<td><code>v3-set-droplet</code></td>
<td>Sets the droplet used to run an app</td>
</tr>
<tr>
<td><code>v3-set-env</code></td>
<td>Sets an environment variable for an app</td>
</tr>
<tr>
<td><code>v3-set-health-check</code></td>
<td>Changes type of health check performed on an app's process</td>
</tr>
<tr>
<td><code>v3-ssh</code></td>
<td>SSH to an app container instance</td>
</tr>
<tr>
<td><code>v3-stage</code></td>
<td>Creates a new droplet for an app</td>
</tr>
<tr>
<td><code>v3-start</code></td>
<td>Starts an app</td>
</tr>
<tr>
<td><code>v3-stop</code></td>
<td>Stops an app</td>
</tr>
<tr>
<td><code>v3-unset-env</code></td>
<td>Removes an environment variable from an app</td>
</tr>
</table>
##<a id='considerations'></a> Considerations
Keep in mind the following considerations when using the experimental commands:
* `v3-push` supports only a subset of features of `push`. In particular, it does not support app manifests.
* For some commands, such as `set-env`, `ssh`, and `bind-service`, no new V3 version exists. In those cases, use the old commands.
* You can use V3 and old commands together, but some combinations may give unexpected results. For example, if you use V3 commands to create an app with a package but it is not staged, or you use `v3-push` to push an app but it fails to stage, the old `apps` command does not return the app.
##<a id='procfile'></a> Declaring Multiple App Processes with a Procfile
Developers can supply a Procfile with their app in order to run multiple long-lived processes using a single codebase.
To use a Procfile, include it in the root of your app directory and push your app.
For more information about Procfiles, see the [About Procfiles](../buildpacks/prod-server.html#procfile) section of the <em>Production Server Configuration</em> topic.