App manifests provide consistency and reproducibility, and can help you automate deploying apps. This topic provides basic procedures and guidance for deploying apps with a manifest file to VMware Tanzu Application Service for VMs (TAS for VMs). Both manifests and command line options allow you to override the default attribute values of cf push
. These attributes include the number of app instances, disk space limit, memory limit, and log rate limit.
cf push
follows rules of precedence when setting attribute values:
cf scale
.Command line options override manifests.
The manifest configuration is additive and will not modify any unspecified properties or remove any existing environment variables, routes, or services.
For a full list of attributes you can specify in an app manifest, see App manifest attribute reference.
By default, the cf push
command uses the manifest.yml
file in the app directory. To specify a different location for the manifest, pass its local path to the -f
flag when you run cf push
.
For more information about manifest format and attributes, see App Manifest Attribute Reference.
To deploy an app with a manifest:
Create a manifest.yml
file in the root directory of your app.
Important By default, the cf push
command uses the manifest.yml
file in the app directory. To specify a different location for the manifest, pass its local path to the -f
flag when you run cf push
.
Add the following content to the file:
---
applications:
- name: YOUR-APP
Where YOUR-APP
is the name of your app.
Run:
cf push
If you specify any values with command-line flags, they override the values specified in the manifest. For more information, see Deploy multiple apps with one manifest.
For more information about manifest format and attributes, see App manifest attribute reference.
This section describes how to deploy multiple apps with a minimal manifest. For more information about manifest format and attributes, see App Manifest Attribute Reference.
Follow these general rules when deploying multiple apps with one manifest:
Use a no-route
line in the description of any app that provides background services to another app.
You cannot use any command line options with cf push
except for -f
and --no-start
.
manifest.yml
or not in the current working directory, use the -f
command line option.To push a single app rather than all of the apps described in the manifest, provide the desired app name by running cf push YOUR-APP
.
Important Each app must be in a subdirectory under the same parent directory.
To deploy multiple apps with a manifest:
Important Each app must be in a subdirectory under the same parent directory.
Create a manifest.yml
file in the directory that contains the apps.
Add each app and its directory to the file. TAS for VMs pushes the apps in the order specified in the manifest.
If you push multiple apps using a manifest and one fails to deploy, TAS for VMs does not attempt to push apps specified after the app that failed.
---
applications:
- name: APP-ONE
path: ./APP-ONE-DIRECTORY
- name: APP-TWO
path: ./APP-TWO-DIRECTORY
Where:
APP-ONE
is the name of the first app you want TAS for VMs to push.APP-ONE-DIRECTORY
is the directory containing the first app.APP-TWO
is the name of the second app you want TAS for VMs to push.APP-TWO-DIRECTORY
is the directory containing the second app.From the directory that contains the apps and the manifest, run:
cf push