User-provided service instances enable developers to use services that are not available in the marketplace with their apps running on Cloud Foundry.
The example will demonstrate how to manage User-Provided Service Instances with MTA. A real use case for SAP Business Technology Platform Cloud Foundry environment where user-provided services are needed is Dynatrace service. With Dynatrace you can monitor your application and get insights from it.
To create user-provided services, you need a resource with type org.cloudfoundry.user-provided-service.
The resource has only one required parameter config that represents credentials of the service.
-
Resources → Special Resource Types
This step represents the initial creation of the service instance.
This approach uses deployment descriptor mtad.yaml
$ cf deploy ./ -f
...
Processing service "my-simple-service"...
Creating service "my-simple-service" from MTA resource "my-simple-service"...
Skipping deletion of services, because the command line option "--delete-services" is not specified.
Process finished.This step represents the update of the service instance when it has changed parameters.
This approach uses deployment descriptor mtad.yaml and extension descriptor service-credentials.mtaext:
$ cf deploy ./ -e service-credentials.mtaext -f
...
Uploading 1 files...
../create.service.example.mtar
OK
Uploading 1 files...
./service-credentials.mtaext
OK
...
Service "my-simple-service" exists but doesn't have any bound applications
Processing service "my-simple-service"...
Updating service "my-simple-service"...|
Note
|
The service credential foo defined in the deployment descriptor with value baz is overwritten with value bar coming from the extension descriptor.
|