SAP / cf-html5-apps-repo-cli-plugin

Cloud Foundry CLI plugin to work with SAP Cloud HTML5 Applications Repository
Apache License 2.0
43 stars 6 forks source link

Trying to see a fiori app in the CF apps command output. Only .mtar build works for UI5/Fiori apps. Can't see logs of HTML5 apps #72

Closed ankit142 closed 6 months ago

ankit142 commented 6 months ago

Description

Trying to see a fiori app in the CF apps command output. Only .mtar build works for UI5/Fiori apps. Can't see logs of HTML5 apps

Environment

CLI Output

Set environment variable DEBUG=1, run the flow and paste output here.

micellius commented 6 months ago

@ankit142 , we are sorry about confusion that you've got with CF CLI html5-plugin. I guess there is a misunderstanding of how UI5/Fiori applications are represented the BTP. Let me help you to understand the basic concepts. SAP BTP offers:

The UI5/Fiori applications are static resources that intend to run on the client-side (in the browser), and therefore are not applications from runtime environment point of view, but a content that is uploaded to HTML5 Applications Repository service. That is the reason, why you can't see HTML5 applications in the output of cf apps.

Instances of HTML5 Applications Repository may be seen with cf services. HTML5 Applications Repository has two plans:

To consume UI5/Fiori apps that were uploaded to HTML5 Applications Repository the web-server application is required. SAP offers AppRouter library to help you develop web-server application that is integrated with HTML5 Applications Repository service. This deployment option is known as "Standalone AppRouter". If in your project you use this option, you have an AppRouter-based application that is deployed to your Cloud Foundry org/space. You can see the logs of this AppRouter-based application with cf logs. That logs are the logs of the web-server that serves UI/Fiori applications you developed.

The other option to consume UI5/Fiori apps is to use SAP Build Work Zone SaaS application, managed by SAP BTP for you. In this case content that you deployed to HTML5 Applications Repository is served by AppRouter that is not part of your Cloud Foundry org/space, and therefore you can't use cf logs command to view web-server application logs. Instead, you have the "HTML5 Applications" entry in the BTP Cockpit UI that allows you to view and download the logs of managed AppRouter that are related to your UI5/Fiori apps. This is currently the only supported option to view/download logs of UI5/Fiori apps, if you chose to use "Managed AppRouter" option.

During development in the SAP Business Application Studio, the UI5/Fiori apps are usually not deployed to HTML5 Applications Repository service, but served by development web-server that runs in the workspace and serves static content from the file system of the workspace. The logs of the development web-server are only available within SAP Business Application Studio.

The CF CLI html5-plugin is used to interact with HTML5 Applications Repository service, deploy and explore the content it hosts. Since the HTML5 Applications Repository service is only a storage of static resources that are organized in some semantic units (HTML5 applications), it does not have access to runtime logs of the web-servers. Therefore these logs are not accessible via html5-plugin as well.

I hope this helps to better understand how UI/Fiori applications and their logs are treated in BTP, and eliminates the source of confusion.