Skip to Content
Technical Articles

SAP Cloud Application Programming Model – Demo5

Hello Community

In this page, Let’s learn how to deploy CAP apps to Cloud Foundry environment of SAP Cloud Platform.

Links to my prior blogs:

https://blogs.sap.com/2020/05/01/sap-cloud-application-programming-model-demo1/

https://blogs.sap.com/2020/05/03/sap-cloud-application-programming-model-demo2/

https://blogs.sap.com/2020/05/10/sap-cloud-application-programming-model-demo3/

https://blogs.sap.com/2020/05/16/sap-cloud-application-programming-model-demo4/

I used my earlier blog: https://blogs.sap.com/2020/05/03/sap-cloud-application-programming-model-demo2/ to structure the project.

Two approaches are available in deploying the application to Cloud Foundry Environment.

  1. Deployment using cf push
  2. Deployment using multi target application(MTA) concept

cf push deployment process:

Execute the below commands from terminal in project directory.

cds add hana: configures the application to SAP HANA db.

cds build/all: Build the application: adds few folders and files to our project.

cf create-service hanatrial hdi-shared studentreport-db-hdi-container: Create service

cf push -f gen/db/: Push the application

add https:// to above routes and run in new window.

Deployment using multi target application(MTA) concept:  builds convenient features compared to cf push deployment approach.

Follow the below steps for second deployment process:

cds add mta: Generate MTA descriptor file.

Above command adds this file to our project.

mbt build: Builds the application archive

cf deploy mta_archives/studentreport_1.0.0.mtar

 

copy the application name from the terminal, add https:// and run the URL in new window. Finally the output looks the same way as the first approach with minimal steps.

Please Suggest/ Comment..

Thank you!! 🙂

#EnhanceLearning

BR//Dhanasupriya Sidagam

6 Comments
You must be Logged on to comment or reply to a post.