This approach for content deployment relies on an intermediate Cloud Foundry application that communicates with the content backend. This application includes both the content and the content specific deployer.
The content specific deployer is defined as an application dependency during design time. It is then included in the MTA archive. During deployment, it serves as a client for the actual content deployment to the content backend.
This approach is a natural successor to Deploying Content with Simulated App Execution. When possible, it is recommended to use the current approach instead of the legacy one. Normally, there is only one dedicated content deployer for each content type that handles both approaches.
Supported content types that currently allow deployment with CF Task execution:
-
HDI content - MTA module type
com.sap.xs.hdi
. For more information, see The SAP HDI Deployer -
FLP content - MTA module type
com.sap.portal.content
-
HTML5 Content - MTA module type
com.sap.html5.application.content
. For more information, see Deploy Content Using HTML5 Application Deployer
The following diagram illustrates the steps and BTP components involved in the process of content deployment with CF task execution:
The following steps describe the process of content deployment with CF Task execution:
-
A developer/operator runs MTA deployment
-
SAP Cloud Deployment service creates or reuses a service instance provided by an SAP application
-
During this step:
-
SAP Cloud Deployment service creates a Cloud Foundry application that serves as a content application
-
SAP Cloud Deployment service binds the service instance to the content application
-
SAP Cloud Deployment service uploads the combination of content and content deployer as application bits
-
-
SAP Cloud Deployment service runs CF tasks, including the one responsible for actual content deployment
-
The dedicated CF task of the content application triggers the content deployer, which in turn performs the actual content deployment. During this step:
-
The CF task reads content details from the bound service instance and identifies the content endpoint and the required authentication
-
The CF task executes the content deployment to the content endpoint
-
-
The CF task completed successfully
-
The MTA deployment completes and SAP Cloud Deployment service reports the status to the developer/operator
The Content Deployer and Service Instance follow the same rules as the ones from Deploying Content with Simulated App Execution.
Tasks are native to Cloud Foundry and are valuable in various scenarios, which demand one-off jobs. For more information, see Tasks.
CF tasks, dedicated for content deployment, are predefined from the SAP Cloud Deployment service and must not be changed by the end customer. They are represented by the module level parameter tasks
.
Below you can find the modeling for supporting the content deployment scenario for MTA module type com.sap.xs.hdi
:
_schema-version: "3.1" ID: my.app version: "1.1" - name: module-db type: com.sap.xs.hdi parameters: buildpack: nodejs_buildpack //Predefined parameter no-route: true // Predefined parameter - skipping route mapping to the app no-start: true // Predefined parameter - skipping start of the app because only tasks are important in the scenario memory: 256M // Predefined parameter tasks: // Predefined parameter – all details below define the CF tasks - name: deploy memory: 256M command: npm start // Shell script that will be used for triggering actual content deployment properties: EXIT: 1 // Predefined property – instructs the HDI deployer to exit when done requires: - name: hdi-service resources: - name: hdi-service // Provides content endpoint for the actual content deployment. Content endpoint could be different based on the used database type: com.sap.xs.hdi-container