The application modules defined in the “modules” section of the deployment descriptor may depend on resources.
The resources may be used as:
- platform services managed by the deployer or only used by the applications
- configuration entries used by the applications and services
In the resources section, the following elements are mandatory:
name- Must be unique within the MTA it identifies
Optional resource attributes include:
-
type- the resource type is one of a reserved list of resource types supported by the MTA-aware deployment tools, for example:com.sap.xs.uaa,com.sap.xs.hdi-container,com.sap.xs.job-scheduler; the type indicates to the deployer how to discover, allocate, or provision the resource, for example, a managed service such as a database, or a user-provided service. Whentypeis not defined,resourceis used for configurations only for other modules and resources. -
description- non-translatable, free-text string; the string is not meant to be presented on application user interfaces (UI) -
properties- a structured set of name-value pairs -
parameters- reserved variables that affect the behavior of the MTA-aware tools, such as the deployer -
active- its value can betrueorfalseand the default value istrue. If set tofalse, the resource is not processed and it is ignored in therequireslist of the application that requires it. -
processed-after- the attribute is used to create an order, in which resources should be processed. If a resource has this attribute, it will be processed after the other resources in a higher position are processed. The attribute value is a structured set of a list comprised of other resource names of the same MTA.By default recourses process in parallel, but if you want to enable an order of resources, see Sequential Resource Processing.
-
optional- its value can betrueorfalseand the default value isfalse. If set totrue, the resource processing is fail-safe.
If you deploy an application with a resource type attribute active set to false, the resource is not provisioned and no binding is created. If you have already deployed the application with the resource type attribute active set to true, the binding to the resource is removed.
Deployment with managed-service, existing-service and user-provided service
No binding is created and in case of managed-service, no service is created.
**Deployment with org.cloudfoundry.existing-service-key **
No binding to an application environment will be done in the following cases:
- If the
org.cloudfoundry.existing-service-keyresource itself is set toactive: false - If the
org.cloudfoundry.existing-service-keyresource is set toactive: true, but refers to a resource, which is set toactive: false
Deployment with configuration resources (cross MTA dependencies)
If the configuration resource is set to active: false, then:
- If the requires section of the module type expects a list, then the environment variable assigned to this list is empty and subscriptions between the modules is not created
- If the requires section does not expect a list, then no environment variable is created
See section “Optional resources” below for more information.
System-specific parameters for the deployment descriptor must be included in a so-called MTA deployment extension descriptor.
To describe resources that are not mission-critical for the operation of your Multitarget Application, proceed as described below.
This option is available with schema version
3.1.
You can declare some resources as optional, which mitigates the cases when they are not listed, not available, or have failed to be created or updated. This means that when the deployer cannot allocate the required resource due to any of these reasons, it generates a warning and continues processing. Alternatively, if a resource is not declared as optional, the deployer generates an error and stops processing.
The following excerpt is a code example for the MANIFEST.MF file.
... resources: ... - name: log type: com.sap.xs.auditlog optional: true ...
In the above example:
- If the
logmanaged resource is not provided by the platform or landscape, a warning is logged and traced and the MTA deployment continues while ignoring the error. - The available values for the
optionalparameter aretrueandfalse, with the latter being the default.
-
org.cloudfoundry.managed-serviceIn cases you have to choose a managed service and/or service plan that is not listed in Predefined MTA Resource Types, you define it using the
org.cloudfoundry.managed-serviceresource type with the following parameters:-
(Required)
service- Name of the service to create. -
(Optional)
service-name- Service instance name. Default value is the resource name.Service names that do not comply with the Cloud Foundry limitation of 50 symbols are automatically corrected. In such cases, the name is shortened and its end is replaced with a hash code.
-
(Required)
service-plan- Name of the service plan.
For example:
resources: - name: my-postgre-service type: org.cloudfoundry.managed-service parameters: service: postgresql service-plan: v9.6-devTo choose a different service plan for a predefined MTA resource type, for example to change the service plan for
PostgreSQLservice, you define it using:resources: - name: my-postgre-service type: org.postgresql parameters: service-plan: v9.6-devUpdating managed service instances is fail-safe by default in certain scenarios, specifically when the service broker is involved. This behavior exists for legacy compatibility with service brokers that did not support plan updates in the Cloud Controller v2 API. If this fail-safe behavior is not desired, you can control it by using the
fail-on-service-updateparameter. For more information, see Resource-Specific Parameters, Updating Service Plans, Updating Service Instance Parameters, Updating Service Tags.The
optionalparameter takes precedence over thefail-on-service-updateparameter. Ifoptional: trueis specified, it overrides the behavior of thefail-on-service-updatesetting. -
-
org.cloudfoundry.existing-serviceТо indicate that the (named) service exists, without managing its lifecycle, you define the service name by using the
org.cloudfoundry.existing-serviceresource type with the following parameters:- (Optional)
service-name- Service instance name. Default value is the resource name.
- (Optional)
-
org.cloudfoundry.existing-service-keyExisting service keys can be modeled as a resource of type
org.cloudfoundry.existing-service-key, which checks and uses their credentials. For more information, see Service Keys. -
org.cloudfoundry.user-provided-serviceCreate or update a user-provided service configured with the following resource parameters:
-
(Optional)
service-name- Name of the service to create. Default value is the resource name.Service names that do not comply with the Cloud Foundry limitation of 50 symbols are automatically corrected. In such cases, the name is shortened and its end is replaced with a hash code.
-
(Required)
config- Map value, containing the service creation configuration, for example url and user credentials (user and password)
resources: - name: my-destination-service type: org.cloudfoundry.user-provided-service parameters: config: <credential1>: <value1> <credential2>: <value2> -
-
configurationFor more information, see Cross-MTA Dependencies.
Modify the default MTA resource types by providing specific properties or parameters in the MTA deployment descriptor.
Predefined MTA Resource Types and Mapped Services
|
Resource Type |
Service |
Service Plan |
Created Service |
|---|---|---|---|
|
|
|
|
Plain schema |
|
|
|
|
SAP HANA secure store |
|
|
|
|
HDI container |
|
|
|
|
Job Scheduler |
|
|
|
|
Application UAA |
|
|
|
|
Application UAA |
|
|
|
|
Application UAA |
|
|
|
|
Application UAA |
|
|
|
|
Streams logs of bound applications to a central application logging stack |
|
|
|
|
Portal services |
|
|
|
|
Portal services |
|
|
|
|
Audit log service |
|
|
|
|
Audit log service |
|
|
|
|
Automatically increase or decrease the number of application instances based on a policy you define. |
|
|
|
|
Streams logs of bound applications to a central application logging stack |
|
|
|
|
Establishes a secure and reliable connectivity between cloud applications and on-premise systems |
|
|
|
|
Provides a secure and a reliable access to destination configurations |
|
|
|
|
Feature Flags service for controlling feature rollout |
|
|
|
|
|
|
|
|
|
Highly available and distributed consistent object store |
|
|
|
|
MongoDB document-oriented database system. |
|
|
|
|
MongoDB document-oriented database system |
|
|
|
|
PostgreSQL object-relational database system |
|
|
|
|
PostgreSQL object-relational database system |
|
|
|
|
RabbitMQ messaging |
|
|
|
|
RabbitMQ messaging |
|
|
|
|
Redis in-memory data structure store |
|
|
|
|
Redis in-memory data structure store |
Resource parameters have platform-specific semantics. To reference a parameter value, use the placeholder notation ${<parameter>}, for example, ${default-host}.
It is also possible to declare metadata for parameters and properties defined in the MTA deployment descriptor; the mapping is based on the parameter or property keys. For example, you can specify if a parameter is required (
optional: false) or can be modified (overwritable: true).
The following parameters are supported:
If you can't find a specific parameter from the native Cloud Foundry manifest here, refer to Prerequisites and Restrictions to see which Cloud Foundry features are currently not supported.
MTA Development and Deployment Parameters
|
Parameter |
Scope |
Read-Only / Write |
Description |
Default Value |
Example |
|---|---|---|---|---|---|
|
|
Resource |
Write |
Applies namespace to the service name. If the namespace value is not provided in the CLI options, it is not applied. For more information, see Fine-Grained Configuration. |
|
|
|
|
Resource |
Write |
Defines service creation parameters. More information in Service Instance Parameters. |
n/a |
|
|
|
Resource |
Read-Only |
Default value for the
|
Generated as described in the description. |
|
|
|
Resource |
Read-Only |
The name of the service in the Cloud Foundry environment to be created for this resource, based on the resource name with or without a name-space prefix. |
The resource name with or without a name-space prefix |
|
|
|
Resource |
Read-Only |
Default value for the |
Generated as described in the description. |
|
|
|
Resource |
Write |
When this parameter is set to true, the deployment will fail on every service update failure. By default, service updates are fail-safe for asynchronous calls (Cloud Foundry API calls that result in a call to the service broker). When the parameter is set to false, deployments will not fail on service update failures, as the updates will be made fail-safe even for calls that do not result in a call to the respective service broker. For more information, see: |
n/a (fails only on asynchronous calls) |
|
|
|
Resource |
Write |
The type of the created service |
Empty, or as specified in resource-type |
|
|
|
Resource |
Write |
Used when consuming an existing service key. Specifies the name of the service key. See Consumption of Service Keys for more information. |
The name of the resource. |
|
|
|
Resource |
Write |
The name of the service in the Cloud Foundry environment to be created for this resource, based on the resource name with or without a name-space prefix.
|
|
|
|
|
Resource |
Write |
The plan of the created service |
Empty, or as specified in resource-type |
|
|
|
Resource |
Write |
Some services employ a list of custom tags, which provide an easier way for applications to parse |
n/a |
|
|
|
Resource |
Write |
Use this parameter to specify the service broker you want to employ when you create your service. This can be useful for testing purposes, among others. |
Name of service broker you want to be used. |
|
|
|
Resource |
Write |
This parameter allows you to specify the service configuration changes to |
The default value for all is |
In the example above,
Note that these 3 key-value pairs can be in any order. |
|
|
Resource |
Write |
The URL to which logs for bound applications are streamed.
|
n/a |
|
For a better understanding of the interactions among the service, service broker, and service instances, see Provisioning and integrating service instances.
Related Information