How to build, deploy fiori app to SAP Cloud Foundry

0
352

Dear SAPLearners, in this blog post we will learn how to deploy fiori app to SAP Cloud Foundry from SAP Business Application Studio.

✋ Prerequisites

To complete this tutorial, you will need:

📚 Step-by-Step Procedure

1. Launch SAP Business Application Studio and continue with same fiori app.

Build and Deploy Fiori App

2. Right-click on mta.yml file and choose Build MTA.

3. MTA build will start and you can see the progress in the terminal.

4. After 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 which generates the deployment-ready multi-target
application (MTA) archive .mtar file from the artifacts of an fiori project.

6. Now right-click on the .mtar file and choose Deploy MTA Archive from the context menu.

Also Read: How to create and deploy Node.js App with SCP Cloud Foundry

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, its 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

  1. Standalone and
  2. Portal

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 portal site.

13. To run the fiori app in standalone mode we need to construct the URL and the structure is like below.

https://<SubscriberSubdomain>.<PortalHost>.<PortalDomain>/<sapCloudService>.<appName>-<appVersion>/index.html

SubscriberSubdomainYou can get the subdomain from subaccount Overview section
PortalHostcpp
PortalDomaincfapps.<region>.hana.ondemand.com, replace <region> with subaccount region
sapCloudServiceThe manifest.json file, check screen-shot below
appNameThe manifest.json file, check screen-shot below
appVersionThe 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.

Conclusion

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! 🙏

Continue Learning

How to integrate Fiori apps in SAP Cloud Platform Portal

FAQs

What is the HTML5 Application Repository?

The HTML5 Application Repository centrally stores the applications’ static content on the SAP Cloud Platform.

Other References

mail

SAPLearners.com is now on Telegram. Click here to join our channel and stay updated with the latest tutorials and updates.

Like us on Facebook and follow us on Twitter.