Skip to content

Latest commit

 

History

History
138 lines (101 loc) · 4.88 KB

File metadata and controls

138 lines (101 loc) · 4.88 KB

Deploy Content Using the Generic Application Content Deployer

Deploy content from the HTML5 Application Repository using the Generic Application Content Deployer (GACD).

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.

  1. Create an MTA development descriptor (mta.yaml file).

    See Defining Multitarget Application Development Descriptors.

  2. 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":

    Sample Code:

    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
    
    
    
  3. To create an MTA archive (mtar file), build your content with theMTA Build Tool (MBT).

    Run the following command:

    Sample Code:

    mbt build
    

    For more information on MBT build options, see: How to build an MTA archive from the project sources

  4. Deploy the MTA archive (mtar file) using the CLI command cf deploy.

    Run the following command:

    Sample Code:

    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