This example shows how to preserve manually created service bindings, during an MTA deployment, that are created outside of the MTA. A real use case for that is a multi-tenant scenario where bindings are created during tenant onboarding of a multitenant application, and those bindings are not maintained by MTA deployment.
Modelled via a module level parameter keep-existing
and parameter option service-bindings
:
modules:
- name:...
parameters:
keep-existing:
service-bindings: true
-
SAP Help Portal: Module-Specific Parameters
In this part the MTA will initially be deployed with two applications and one service instance. However, there is no binding between them.
You can deploy it directly from an mtad.yaml
file:
$ cf deploy ./ -f ;
Alternatively, you can build an MTAR archive from the mta.yaml
file:
$ mbt build -p cf -t . ;
And then deploy the built MTAR archive:
$ cf deploy a.cf.app_0.0.0.mtar -f ;
Run the following commands:
$ cf bind-service cf-app-keeping-bindings dummy-service
$ cf bind-service cf-app-resetting-bindings dummy-service
$ cf deploy -f ;
or
$ cf deploy a.cf.app_0.0.0.mtar -f ;