Skip to content

Latest commit

 

History

History
68 lines (57 loc) · 1.42 KB

links.md

File metadata and controls

68 lines (57 loc) · 1.42 KB

Deploy Your Multi-Target Application (MTA)

https://developers.sap.com/tutorials/btp-app-cap-mta-deployment..html

Generate MTA deployment descriptor (mta.yaml)

cds add mta

Exclude CSV files from deployment

build-parameters:
  before-all:
   - builder: custom
     commands:
      - npm install --production
      - npx -p @sap/cds-dk cds build --production
      - npx rimraf gen/db/src/gen/data

Add Authorization and Trust Management service (XSUAA)

modules:
      - name: cpapp-srv
      ...
      requires:
        - name: cpapp-db
        - name: cpapp-uaa
resources:
   ...
 - name: cpapp-uaa
   type: org.cloudfoundry.managed-service
   parameters:
     service: xsuaa
     service-plan: application
     path: ./xs-security.json
     config:
       xsappname: cpapp-${space}    #  name + space dependency
       tenant-mode: dedicated
       role-collections:
         - name: 'RiskManager-${space}'
           description: Manage Risks
           role-template-references:
             - $XSAPPNAME.RiskManager
         - name: 'RiskViewer-${space}'
           description: View Risks
           role-template-references:
             - $XSAPPNAME.RiskViewer

Build, deploy, and test mtar file

Build the MTA module from your project root folder:

mbt build -t ./

Deploy the module to your current Cloud Foundry space:

cf deploy cpapp_1.0.0.mtar