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. Real use case for SAP Business Technology Platform Cloud Foundry environment where user-provided service are needed is Dynatrace service. With dynatrace you can monitor your application and get insights of it.
To create user-provided services, you need 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
The step represents the initial creation of service instance.
That approach uses deployment descritpr 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.
The step represents the the update of service instance when it have changed parameters.
That approach uses deployment descritpr 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 doesnt have any bound applications
Processing service "my-simple-service"...
Updating service "my-simple-service"...
Note
|
The service credential foo defined in deployment descriptor with value baz is overwritten with value bar coming from extension descriptor
|