Deploying with App Manifests
Page last updated:
This topic provides basic procedures and guidance for deploying apps with a manifest file.
Overview
Manifests provide consistency and reproducibility, and can help you automate deploying apps. Both manifests and command line options allow you to override the default attribute values of cf push
. These attributes include things like number of instances, disk space limit, and memory limit.
cf push
follows rules of precedence when setting attribute values:
- Manifests override most recent values, including defaults and values set by commands such as
cf scale
. - Command line options override manifests.
For a full list of attributes you can specify in an app manifest, see App Manifest Attribute Reference.
Deploy an App with a Manifest
The following procedure describes how to deploy an app with a minimal manifest. 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.Note: By default, the
cf push
command uses themanifest.yml
file in the app directory. To specify a different location for the manifest, pass its local path to the-f
flag when you runcf 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 command line options, they override the values specified in the manifest. For more information, see Deploy Multiple Apps with One Manifest.
Deploy Multiple Apps with One Manifest
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.
General Rules
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
.- If your manifest is not named
manifest.yml
or not in the current working directory, use the-f
command line option.
- If your manifest is not named
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
.
Procedure
To deploy multiple apps with a manifest:
Note: 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. VMware Tanzu Application Service for VMs pushes the apps in the order specified in the manifest.
Note: 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