Usage Scenario
Deploying a CAP application on SAP Business Technology Platform involves several steps, including setting up the required services, configuring the deployment environment, and deploying the application itself.
- Setup SAP BTP Environment:
- Log in to the SAP BTP Cockpit.
- Set up the necessary subaccounts and entitlements for the services you need.
- Make sure the necessary entitlements for the Cloud Foundry environment are available.
- Prepare Your CAP Application:
- Create your CAP project.
- Ensure the application is ready for deployment and has the necessary configurations for the target environment.
- Configure Deployment Settings in the mta.yaml file.
- Define the required services and their bindings in the deployment descriptor.
- Build the Application:
- Use the CAP tooling or the appropriate build tools to build the application.
- Ensure that the application builds successfully without any errors or warnings.
- Deploy the Application:
- Use the Cloud Foundry CLI or the SAP Business Application Studio to deploy the application to SAP BTP.
- Monitor the deployment process for any errors or issues that might arise.
By following these steps, you can effectively deploy a CAP application on SAP BTP and ensure its smooth operation within the SAP cloud environment.
Deployment Process
- Considering step 1 in place (Access to SAP BTP, Cloud Foundry environment, a CF space created and a SAP HANA Cloud database instance configured and running), the focus will be on the next steps, starting with the preparation of the application for deployment.
- Prepare Your CAP Application:
Prerequisites for preparing the application for deployment:
- SAP HANA Cloud database is configured in our CAP project: cds add hana --for production
- Authentication and authorization is configured by using the SAP Authorization and Trust Management Service: cds add xsuaa --for production This will generate an xs-security.json file, with roles/scopes derived from authorization-related annotations in the CDS models created. Ensure to rerun cds compile --to xsuaa in case of changes to the annotations in the project.
- Using Multi Target Application-Based Deployment For the actual execution of the deploument the Cloud MTA Build tool will be used (cloud mta build tool). cds add mta
In order to understand the Multi-Target Application Project we will deep dive into the next subject: the MTA Development Project.