SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
โคข Open full site

Deploy CAP with SAP HANA Cloud project as MTA

Deploy your SAP HANA Cloud and Cloud Application Programming Model application as a Multi-Target Application (MTA) to SAP BTP, Cloud Foundry runtime

Overview

🎓 intermediate 20 min. SAP HANA CloudIntermediateSAP HANASAP Business Application StudioSAP Cloud Application Programming ModelSAP BTP Cloud Foundry Environment

You will learn

  • โœ”You will prepare our project for deployment via Multi Target Application to SAP BTP, Cloud Foundry runtime
  • โœ”You will use the Cloud MTA Build tool to package your project for deployment
  • โœ”You will deploy your application to SAP BTP, Cloud Foundry runtime
Unknown U Unknown July 26, 2024
Created by March 30, 2021
Contributors

Prerequisites

Prerequisites

  • This tutorial is designed for SAP HANA Cloud. It is not designed for SAP HANA on premise or SAP HANA, express edition.
  • You have completed all previous tutorials in this Mission or have at least developed up to the point of adding User Authentication to your application.

Steps

Intro

Note: This is an optional tutorial as part of this mission on SAP HANA Cloud plus Cloud Application Programming Model for those that want to fully deploy like a production application. There are limited resources allocated in an SAP BTP trial or free tier account and you should consider deleting this content after deploying to avoid using up all of these resources.


Step 1 Project final adjustments and preparations
โ€”

  1. In this tutorial mission we’ve combined several different development types (HANA, CAP, Fiori) and wizards into a single project making it easy to develop and test locally. We just need a couple of more adjustments before we can deploy the complete application in a production ready format.

  2. We will begin with the xs-security.json file. We need to make one adjustment to this file. Remember that we added the oauth2-configuration section to allow authentication redirection from the SAP Business Application Studio testing. We want add a similar redirection allowance for when our application will be running from SAP BTP Cloud Foundry, environment. Add a line for https://*.hana.ondemand.com/**. Your xs-security.json should now look like this:

    xs-security.json adjustments
    xs-security.json adjustments

  3. The other adjustment needs to be made in the mta.yaml file in the root of the project. This is the file that will control the build and deployment of the application.

  4. The adjustment we want to make is to the app router module section. The wizard added default-env.json file to the project so that we could test from the SAP Business Application Studio. However we don’t want these files to be present in a “real” deployment, instead getting configuration from the bound service instances. Therefore we can tell the builder to exclude these files from this module making sure they aren’t part of any productive deployment. That way we can keep these files in our project for future testing and development but ensure that they don’t accidentally make it into a production deployment.

    mta.yaml app router module build parameters
    mta.yaml app router module build parameters

Step 2 Use the Cloud MTA Build tool to package your project for deployment
+
Step 3 Deploy your application to SAP BTP, Cloud Foundry runtime
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 3
1. Project final adjustments and preparations 2. Use the Cloud MTA Build tool to package your project for deployment 3. Deploy your application to SAP BTP, Cloud Foundry runtime

Learn more →