Deploying a Large Application
Page last updated: October 15, 2015
This topic describes constraints and recommended settings for deploying applications between 750 MB and 1 GB to Cloud Foundry.
Deployment Considerations and Limitations
Cloud Foundry supports application uploads up to 1 GB.
The deployment process involves uploading, staging, and starting the app. Your app must successfully complete each of these phases within the time limits that your administrator establishes for each phase. The default time limits for the phases are as follows:
- Upload: 15 minutes
- Stage: 15 minutes
- Start: 60 seconds
Note: Your administrator can change these defaults. Check with your administrator for the actual time limits set for app deployment.
To deploy large apps to Cloud Foundry, ensure the following:
Your network connection speed is sufficient to upload your app within the 15 minute limit. Pivotal recommends a minimum speed of 874 KB/s.
Note: Cloud Foundry provides an authorization token that is valid for a minimum of 20 minutes.
The total size of the files to upload for your app does not exceed 1 GB.
You allocate enough memory for all instances of your app. Use either the
-m
flag withcf push
or set an app memory value in yourmanifest.yml
file.You allocate enough disk space for all instances of your app. Use either the
-k
flag withcf push
or set a disk space allocation value in yourmanifest.yml
file.If you use an app manifest file,
manifest.yml
, be sure to specify adequate values for your app for attributes such as app memory, app start timeout, and disk space allocation.For more information about using manifests, refer to the Deploying with Application Manifests topic.
You push only the files that are necessary for your application.
To meet this requirement, push only the directory for your application, and remove unneeded files or use the
.cfignore
file to specify excluded files.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
: Controls the maximum time that the cf CLI waits for an app to stage after Cloud Foundry successfully uploads and packages the app. Value set in minutes.CF_STARTUP_TIMEOUT
: Controls the maximum time that the cf CLI waits for an app to start. Value set in minutes.cf push -t TIMEOUT
: Controls the maximum time that the cf CLI waits for an app to start. When you use this flag, the cf CLI ignores any app start timeout value set in the manifest or in theCF_STARTUP_TIMEOUT
environment variable. Value set in seconds.
For more information about using the cf CLI to deploy apps, refer to the Push section of the Getting Started with the cf CLI topic.
Note: Changing the timeout setting for the cf CLI does not change the timeout limit for Cloud Foundry server-side jobs such as staging or starting applications. Server-side timeouts must be changed in the manifest. Because of the differences between the Cloud Foundry and cf CLI timeout values, your app might successfully start even though the cf CLI reports
App failed
. Runcf apps APP_NAME
to review the actual status of your app.
Default Settings and Limitations Summary Table
This table provides summary information of constraints and default settings to consider when you deploy a large app to Cloud Foundry.
Setting | Note |
---|---|
App Package Size | Maximum: 1 GB | Authorization Token Grace Period | Default: 20 minutes, minimum |
CF_STAGING_TIMEOUT |
cf CLI environment variable Default: 15 minutes |
CF_STARTUP_TIMEOUT |
cf CLI environment variable Default: 5 minutes |
cf push -t TIMEOUT |
App start timeout maximum Default: 60 seconds |
Disk Space Allocation | Default: 1024 MB |
Internet Connection Speed | Recommended Minimum: 874 KB/s |