Using application manifests to deploy applications
Note: These instructions use the cf version 6. The instructions are not compatible with any cf version < 6
Introduction
Application manifests can be used to describe application deployments.
Per default the "cf push" command reads the manifest.yml file from the current working directory and deploys your application as specified.
You can tell "cf push" to use another manifest file by using the -f option like this:
cf push -f /directory/manifest.yml
A minimal application manifest
---
applications:
- name: my_app
memory: 512M
host: my_app
- name: A name for your application used to reference it in the Cloud Foundry context.
- memory: The amount of RAM assigned to your applications container. (Allowed units: M, MB for Megabytes or G, GB for Gigabytes)
- host: A subdomain for your application. The host and domain are combined to form your applications route (host.domain)
Extended example
---
applications:
- name: my_app
memory: 512M
instances: 1
host: app_name
domain: de.a9sapp.eu
buildpack: https://github.com/cloudfoundry/heroku-buildpack-ruby.git
path: .
env:
RAILS_ENV: production
RACK_ENV: production
services:
- postgresql-app_name
- swift-app_name
- instances: The number of application instances running your application
- domain: The domain for your application
- buildpack: The buildpack's url used to package and run your application
- path: The path where your applications files reside. All files in the given directory except those defined in .cfignore will be uploaded to anynines
- env: provides the possibility to define environment variables that are initialized in your application's container
- services: An array of service names that your application should be bound to. The service's credentials will be available to your application via the VCAP_SERVICES environment variable
In addition to these basic use cases application manifests can contain multiple application configurations and inherit from other manifests. For more information and advanced use case descriptions please have a look at the Cloud Foundry documentation.
0
Please sign in to leave a comment.
Comments
0 comments