Dear SAPLearners, in this blog post we will learn how to deploy Fiori app to SAP Cloud Foundry from SAP Business Application Studio.
Table of contents
To complete this tutorial, you will need:
- Create a Fiori App in SAP Business Application Studio.
- Subscribe to Cloud Portal service in SAP Cloud Foundry subaccount.
📚 Step-by-Step Procedure
1. Launch SAP Business Application Studio and continue with the same Fiori app.
Build and Deploy Fiori App
2. Right-click on the mta.yml file and select Build MTA.
3. MTA build will start and you can see the progress in the terminal.
4. After a successful build, two new folders will be created.
- mta_archives and .mtar file under this folder.
- resources and ui-content.zip file under this folder.
5. The Cloud MTA Build Tool is the tool that generates the deployment-ready multi-target
application (MTA) archive .mtar file from the artifacts of a Fiori project.
6. Now right-click on the .mtar file and choose Deploy MTA Archive from the context menu.
7. Finally, our fiori app file got deployed to SAP Cloud Foundry successfully. You will see errors here in the terminal if deployment failed.
8. Navigate to SAP Cloud Platform Cloud Foundry cockpit subaccount and then to dev space. Under Service Instance section you will find 3 instances created for our Fiori application.
9. From where does these instances created 🧐? These are created based on the services mentioned in the mta.yml file of our project. These are added by the SAP BAS by default based on the options we choose during Fiori project creation.
Run Fiori App
10. After that, it’s time to run the application. Using app-host service , HTML5 application is deployed to HTML5 Application Repository in SAP Cloud Platform Cloud Foundry.
12. There are 2 ways to run HTML5 applications. They are
- Standalone and
In the blog post, we will look at running the applications in standalone mode, and next tutorial we will show you how to access the Fiori app from the portal site.
13. To run the fiori app in standalone mode we need to construct the URL and the structure is like below.
|SubscriberSubdomain||You can get the subdomain from the subaccount Overview section|
|PortalDomain||cfapps.<region>.hana.ondemand.com, replace <region> with subaccount region|
|sapCloudService||The manifest.json file, check screen-shot below|
|appName||The manifest.json file, check screen-shot below|
|appVersion||The manifest.json file, check screen-shot below|
14. Finally, by following above step, the final URL in my case is like below.
15. Wohooo!!! 🙌 we are able to run the fiori app successfully.
Congrats!! you have successfully learned how to build and deploy fiori app to SAP Cloud Foundry.
Please feel free to comment and let us know your feedback. Subscribe for more updates.
If you liked it ❤️, please share it! Thanks! 🙏
What is the HTML5 Application Repository?
The HTML5 Application Repository centrally stores the applications’ static content on the SAP Cloud Platform.
- How to create and deploy Node.js App in SCP Cloud Foundry
- How to perform authentication in Node.js App in SAP Cloud Foundry
- SCP Cloud Foundry Tutorials