-
Notifications
You must be signed in to change notification settings - Fork 224
/
Copy pathlarge-app-deploy.html.md.erb
90 lines (69 loc) · 5.07 KB
/
large-app-deploy.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
---
title: Deploying large apps
owner: CAPI
---
When you deploy apps larger than 750 MB to <%= vars.app_runtime_first %>, you must observe additional constraints and recommended settings.
## <a id='considerations'></a> Deployment considerations and limitations
Deployment involves uploading, staging, and starting the app. For more information about the default time limits for uploading, staging, and starting an app, see [Deployment](app-lifecycle.html#deployment) in _Application container life cycle_.
To deploy large apps to <%= vars.app_runtime_abbr %>, ensure that:
* The total size of the files to upload for your app does not exceed <%= vars.max_app_size %>.
* Your network connection speed is sufficient to upload your app within the 15-minute limit. The minimum recommended speed is 874 KB per second. <%= vars.app_runtime_abbr %> provides an authorization token that is valid for a minimum of 20 minutes.
* You allocate enough memory for all instances of your app. Use either the `-m` flag with `cf push` or set an app memory value in your `manifest.yml` file.
* You allocate enough disk space for all instances of your app. Use either the `-k` flag with `cf push` or set a disk space allocation value in your `manifest.yml` file.
* You allocate enough log quota for all instances of your app. Use either the `-l` flag with `cf push` or set a log rate limit in your `manifest.yml` file.
* If you use an app manifest file, `manifest.yml`, specify adequate values for your app for attributes such as app memory, app start timeout, and disk space allocation. For more information about using app manifests, see [Deploying with app manifests](manifest.html).
* The size of each environment variable for your app does not exceed 130 KB. This includes <%= vars.app_runtime_abbr %> system environment variables such as `VCAP_SERVICES` and `VCAP_APPLICATION`. For more information, see [<%= vars.app_runtime_abbr %> environment variables](environment-variable.html).
* If VCAP_SERVICES gets too large, either because of too many service bindings or too much data provided by the services, review the other two [Credential Delivery Methods](../services/application-binding.html#credential-delivery-methods); both of these have a limit of 1 MB.
* You push only the files that are necessary for your app. To meet this requirement, push only the directory for your app, and remove unneeded files or use the `.cfignore` file to specify excluded files. For more information about specifying excluded files, see [Ignore unnecessary files when pushing](prepare-to-deploy.html#exclude) in _Considerations for Designing and Running an App in the Cloud_.
* You configure Cloud Foundry Command Line Interface (cf CLI) staging, startup, and timeout settings to override settings in the manifest, as necessary:
* `CF_STAGING_TIMEOUT`: The maximum time in minutes that the cf CLI waits for an app to stage after <%= vars.app_runtime_abbr %> uploads and
packages the app.
* `CF_STARTUP_TIMEOUT`: The maximum time in minutes that the cf CLI waits for an app to start
* `cf push -t TIMEOUT`: The maximum time in seconds that <%= vars.app_runtime_abbr %> allows to elapse between starting an app and the first healthy response from the app. When you use this flag, the cf CLI ignores any app start timeout value set in the manifest.
For more information about using the cf CLI to deploy apps, see [Push](../../cf-cli/getting-started.html#push) in _Getting Started with the cf CLI_.
<p class="note important">
Changing the timeout setting for the cf CLI does not change the timeout limit for <%= vars.app_runtime_abbr %>
server-side jobs such as staging or starting apps. You must change server-side timeouts in the manifest. Because of the differences between the
<%= vars.app_runtime_abbr %> and cf CLI timeout values, your app might start even though the cf CLI reports <code>App failed</code>. To review the status of your app, run <code>cf apps APP-NAME</code>, where <code>APP-NAME</code> is the name of your app.</p>
## <a id='limits_table'></a> Default settings and limitations summary
The following table provides a summary of the constraints and default settings to consider when you deploy a large app to <%= vars.app_runtime_abbr %>:
<table class="table" >
<thead><tr>
<th>Setting</th>
<th>Note</th>
</tr></thead>
<tr>
<td>App package size</td>
<td>Maximum: <%= vars.max_app_size_table %></td>
</tr>
<tr>
<td>Authorization token grace period</td>
<td>Default: 20 minutes, minimum</td>
</tr>
<tr>
<td><code>CF_STAGING_TIMEOUT</code></td>
<td>cf CLI environment variable
<br>
Default: 15 minutes</td>
</tr>
<tr>
<td><code>CF_STARTUP_TIMEOUT</code></td>
<td>cf CLI environment variable
<br>
Default: 5 minutes</td>
</tr>
<tr>
<td><code>cf push -t TIMEOUT</code></td>
<td>App start timeout maximum
<br>
Default: 60 seconds</td>
</tr>
<tr>
<td>Disk space allocation</td>
<td>Default: 1024 MB</td>
</tr>
<tr>
<td>Internet connection speed</td>
<td>Recommended minimum: 874 KB per second</td>
</tr>
</table>