Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sap-samples/ui5-deployments
Showcases a simple UI5 freestyle application and its deployment options to SAP BTP, Cloud Foundry Environment
https://github.com/sap-samples/ui5-deployments
approuter cloud-foundry cloudfoundry managed-approuter mta open-source sample sample-code sap-btp sapui5 standalone-approuter ui5
Last synced: about 1 month ago
JSON representation
Showcases a simple UI5 freestyle application and its deployment options to SAP BTP, Cloud Foundry Environment
- Host: GitHub
- URL: https://github.com/sap-samples/ui5-deployments
- Owner: SAP-samples
- License: apache-2.0
- Created: 2022-11-02T15:49:11.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-01T02:08:38.000Z (about 2 years ago)
- Last Synced: 2023-08-04T22:52:37.074Z (over 1 year ago)
- Topics: approuter, cloud-foundry, cloudfoundry, managed-approuter, mta, open-source, sample, sample-code, sap-btp, sapui5, standalone-approuter, ui5
- Language: JavaScript
- Homepage: https://blogs.sap.com/2022/11/01/build-and-deploy-ui5-freestyle-applications-to-sap-btp-cloud-foundry-environment/
- Size: 273 KB
- Stars: 11
- Watchers: 7
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Build & Deploy SAPUI5 Freestyle Applications to SAP BTP, Cloud Foundry Environment
[![REUSE status](https://api.reuse.software/badge/github.com/SAP-samples/ui5-deployments)](https://api.reuse.software/info/github.com/SAP-samples/ui5-deployments)
## Intro
This repo aims to showcase a simple UI5 freestyle application that can be deployed to SAP BTP, Cloud Foundry Environment with:
- Managed approuter setup
- Standalone approuter setup
- Hybrid setupA full explanation can be found in this [SAP Community blog post](https://blogs.sap.com/2022/11/01/build-and-deploy-ui5-freestyle-applications-to-sap-btp-cloud-foundry-environment/).
## Requirements
- Access to a SAP BTP subaccount (trial is sufficient)
- Cloud foundry environment provisioned
- Launchpad, Workzone, or comparable subscription with managed approuter functionality
- Quota for the HTML5 Application Repository Service
- Developer-Access to a CF Space
- SAP Business Application Studio Subscription or comparable local IDE like VSCode
- CF CLI & Node available locally on your machine or in BAS dev space## Build Steps
Run the mbt build command with either of the mta.yaml files either directly or via the npm scripts in the root package.json:
- mbt build -p=cf -s=./_build_standalone -t=../mta_archives
- mbt build -p=cf -s=./_build_managed -t=../mta_archivesMore info: https://sap.github.io/cloud-mta-build-tool/usage/
### Standalone mta
- This will generate an mtar that includes a standalone approuter that will be deployed together with the html5 module
- This way you have full control of your approuter### Managed mta
- This will generate an mtar which will leverage the managed approuter for running after deployment
- This will only work if you have subscribed to a service that includes the managed approuter functionality (launchpad/portal/workzone)## Deploy Steps
Enable cf deploy and cf undeploy commands (see also [multiapps-cli-plugin](https://github.com/cloudfoundry/multiapps-cli-plugin))
- cf install-plugin multiappsLogin to your preferred BTP Cloud Foundry Space & deploy the MTAR archives
- cf login
- cf deploy ./mta_archives/ui5-standalone_1.0.0.mtar -f
- cf deploy ./mta_archives/ui5-managed_1.0.0.mtar -fIn case of undeploy, you can undeploy the mta projects completely using:
- cf undeploy ui5-standalone --delete-services --delete-service-keys
- cf undeploy ui5-managed --delete-services --delete-service-keys## After Deployment
### Verify service instances and application
Make sure that all service instances and the cf application for the standalone scenario have been deployed successfully### Verify html5 app content in html5 application repository
Make sure that the html5 module content has been uploaded successfully in the html5 app repo host service instance
- cf html5-list & cf html5-infoMore info: https://sap.github.io/cf-html5-apps-repo-cli-plugin/
### Authorize
- map the generated user role templates to a role collection and assign it to your endusers### Execute
run the app either via
- the custom route of the approuter (standalone)
- the html5 applications tab on the left (managed - requires a a managed approuter e.g. from launchpad service)## Further Topics
### Testing the app within BAS
- Navigate to the html5module folder and execute npm run start
- The ui5.yaml is used to proxy the requests via pathmapping (substitutes the xs-app files)
- (Needs to be maintained on same subaccount as BAS instance - see comments in ui5.yaml)## How to obtain support
[Create an issue](https://github.com/SAP-samples//issues) in this repository if you find a bug or have questions about the content.
For additional support, [ask a question in SAP Community](https://answers.sap.com/questions/ask.html).## Contributing
If you wish to contribute code, offer fixes or improvements, please send a pull request. Due to legal reasons, contributors will be asked to accept a DCO when they create the first pull request to this project. This happens in an automated fashion during the submission process. SAP uses [the standard DCO text of the Linux Foundation](https://developercertificate.org/).## Code of Conduct
The [SAP-samples CoC](https://github.com/SAP-samples/.github/blob/main/CODE_OF_CONDUCT.md) applies.## License
Copyright (c) 2022 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the [LICENSE](LICENSE) file.