Deploy content from the HTML5 Application Repository using the Generic Application Content Deployer (GACD).
-
cf CLIis installed locally, see Download and Install the Cloud Foundry Command Line Interface. -
The multitarget application (MTA) plug-in for the Cloud Foundry command-line interface to deploy MTAs is installed locally. For more information, see Install the MultiApps CLI Plugin in the Cloud Foundry Environment.
-
The Cloud MTA Build Tool (MBT) is installed, see Cloud MTA Build Tool: Download
You can deploy your content to the HTML5 Application Repository using the GACD (Generic Application Content Deployer) module. The GACD module has the module type com.sap.application.content. This module type enables the deploy plug-in generic application content deploy support. It means that when a module is processed in the cf deploy flow, the deploy service locates the service resource that is required as a target for the deploy and deploys the corresponding content.zip file.
-
Create an MTA development descriptor (mta.yaml file).
See Defining Multitarget Application Development Descriptors.
-
In the MTA development descriptor (mta.yaml file), define the deployer module:
This is an example for an MTA that contain a folder for an application "app1" and an application "app2":
ID: testdeployer _schema-version: '3.1' modules: # GACD Deployer Module name: html5-apps-content type: com.sap.application.content path: . requires: - name: html5-apps-xsuaa - name: html5-apps-html5-repo-host parameters: content-target: true build-parameters: build-result: resources requires: - name: app1 artifacts: - app1.zip target-path: resources/ - name: app2 artifacts: - app2.zip target-path: resources/ # HTML5 Modules - name: app1 type: html5 path: app1 build-parameters: build-result: dist builder: custom commands: - npm install - npm run build:cf supported-platforms: [] - name: app2 type: html5 path: app2 build-parameters: build-result: dist builder: custom commands: - npm install - npm run build:cf supported-platforms: [] resources: # HTML5 Application Repository service instance - name: html5-apps-html5-repo-host type: org.cloudfoundry.managed-service parameters: service: html5-apps-repo service-name: html5-apps-html5-repo-host-service service-plan: app-host # SAP Authorization and Trust Management service (technical name: xsuaa) - name: html5-apps-xsuaa type: org.cloudfoundry.managed-service parameters: path: ./xs-security.json service: xsuaa service-name: html5-apps-xsuaa service-plan: application -
To create an MTA archive (mtar file), build your content with theMTA Build Tool (MBT).
Run the following command:
mbt buildFor more information on MBT build options, see: How to build an MTA archive from the project sources
-
Deploy the MTA archive (mtar file) using the CLI command cf deploy.
Run the following command:
cf deploy <path-to-mtar-file>For example, from the directory where your mtar file is located, run
cf deploy myapp_0.0.1.mtar.
Related Information
Deploying Content with Generic Application Content Deployment