Table of Contents
This example shows how to model a simple Cloud Foundry application (CF app) in an MTA, deploy it, set specific attributes and configure the deployer behavior.
The example demostrates 2 different approaches that lead to the same result.
This approach uses deployment descriptor mtad.yaml
and ready application binaries appBits.zip
:
$ cf deploy ./ -f ;
This approach uses development descriptor mta.yaml
and application binaries appBits.zip
to build an MTAR archive:
$ mbt build -p cf -t . ;
The built MTAR is then deployed:
$ cf deploy a.cf.app_0.0.0.mtar -f ;
$ cf mta a.cf.app ;
Showing health and status ...
OK
Version: 0.0.0
Apps:
name requested state instances memory disk urls
my-cf-app started 1/1 1G 1G orgname-spacename-my-mta-managed-app-module.cfapps.sap.hana.ondemand.com, my-custom-host.at.some.domain
$ cf app my-cf-app ;
Showing health and status for app my-cf-app in org ********** / space ******** as **********...
name: my-cf-app
requested state: started
routes: orgname-spacename-my-mta-managed-app-module.cfapps.sap.hana.ondemand.com, my-custom-host.at.some.domain
last uploaded: Thu 22 Aug 00:46:00 EEST 2019
stack: cflinuxfs4
buildpacks: staticfile
type: web
instances: 1/1
memory usage: 1024M
state since cpu memory disk details
#0 running 2019-08-21T21:46:14Z 1.1% 12.2M of 1G 5.3M of 1G
$ cf env my-cf-app | grep "MY_CF_APP_ENV_VARIABLE" ;
MY_CF_APP_ENV_VARIABLE: HELLO MTA
$ cf env my-cf-app | grep "A_MORE_COMPLEX_VAR" ;
A_MORE_COMPLEX_VAR: { "can be an entire":"json object", "with": [ "nested": { "elements": "https://each-host-is-registered-for-all-specified-domans.cfapps.sap.hana.ondemand.com" } ]