What is the SAP Business Technology Platform (BTP)?
SAP BTP Platform is a platform as a service developed by SAP SE for creating new applications or extending existing applications in a secure cloud computing environment managed by SAP. The SAP BTP Platform integrates data and business processes (Source)
Prerequisites
Install NPM on your client e.g. on MacOS
brew install npm
npm install --global del-cli
npm install --global --safe js-yaml
Install Cloudfoundry CLI Tools for your Operating Systems (Read more)
brew install cloudfoundry/tap/cf-cli@7
Add additional Cloudfoundry Plugins to deploy Multi-Target Apps
cf add-plugin-repo CF-Community https://plugins.cloudfoundry.org
cf install-plugin multiapps -f
Make sure to add, within the settings of the site manager, the security header
content-security-policy
with the value
default-src * 'unsafe-inline' 'unsafe-eval' data: blob:;
Step 1 – Open existing Application and Export App
- Open an existing or create a new application
- Open Application Properties (Click on the Application Name in the Left upper corner)
- Click on the Icon Download Application
Step 2 – Fill out the Metadata (Manifest)
To upload the Simplifier Application on the SAP BTP Cloudfoundry HTML5 Repository , you have to provide the following metadata like in the screenshot above
Key | Example Value | Further Information |
Server URL | https://demo.simplifier.io | Current URL of a public Simplifier Instance for providing Backendservices using our REST APIs like User Management, Business Objects, Connectors |
Destination | Simplifier | Name of the BTP HTTP Destination (Read more). There is no need to create the Destination before. |
Version | 1.2.3 | App Version Number |
Disk Quota | 2g | disk_quota defines the disk space for your app instance (Read more) |
Number of Instance | 1 | Number of instances for running your app (Default 1) (Read more) |
Memory | 1g | Memory Limit of your App Instance (Read more). The default memory limit is 1g |
Route | cfapps.eu10.hana.ondemand.com | Route which matches the path of an incoming request (Read more) |
Tenant Host Pattern | (.*).api.cf.eu10.hana.ondemand.com(.*) | The Tennant Host Pattern is a string containing a regular expression with a capturing group. The request host is matched against this regular expression. The value of the first capturing group is used as the tenant subdomain. (Read more) |
Route Source | simpDest | Regular expression that matches an incoming request path. To ensure the RegEx matches the complete path, wrap it with ^ and $, for example, “^/sap/ui5/1(.*)$”. A request matches a particular route if its path contains the specified regular expression. (Read more) |
Step 3 – Click on the Download Button
Step 4 – Checkout our SAP BTP Converter
Checkout our Open-Source Simplfier-SAP-BTP Converter from GitHub into a local work directory like simplifier-workspace
cd /home/myUser/simplifier-workspace
git clone https://github.com/simplifier-ag/simplifier-sap-btp-converter.git
Step 5 – Extract Archive into same workspace
Extract the downloaded ZIP File into your simplifier workspace from the cloned GitHub project – you will get
- Manifest.yml (Metadata File)
- <NameofyourApp>.zip
Extract the <NameofyourApp>.zip again and copy the www directory as well as package.json and xs-app.json like this structure
Step 6 – Start Converter
Start the Converter into your local simplifier workspace directory
npm run convert "Extracted Folder App-Name"
When conversion is finished two new subfolder shared-build and app-build is created.
The shared-build is content shared between multiple simplifier apps, it needs to be deployed only once and not for every app.
Step 7 – Check Conversion
Check the following files and adjust values to your needs
- app-build/<Appname>/manifest.json
- app-build/<Appname>/xs-app.json
- shared-build/xs-security.json
- shared-build/destination.json
- app-build/mta.yaml
- shared-build/mta.yaml
If you have to change something, please run the build process again
Step 8 – Deploy the shared resources
You can skip this step if you already deployed the shared resources for another simplifier app
Make sure you are logged in to BTP
cf login
Make sure you enter your api endpoint for your cloudfoundry environment like https://api.cf.us10-001.hana.ondemand.com
Your Email address and your BTP Password
Within the shared-build directory
Install
npm install
Deploy
npm run deploy
Step 9 – Deploy the app
Make sure you are logged in to BTP
cf login
Make sure you enter your api endpoint for your cloudfoundry environment like https://api.cf.us10-001.hana.ondemand.com
Your Email address and your BTP Password
Within the app-build directory
Install
npm install
Deploy
npm run deploy
Step 10 – Logon on SAP BTP Platform
1. Navigate into the Subaccount where you want to deploy the business application
2. Navigate to Subscriptions into subaccount and select Work Zone Service
Step 11 – Configuring SAP Build Work Zone Service
- Go to Channel Manager and refresh the HTML5 Apps Content Channel
When changing the App or the integration in the SAP Build Work Zone refresh the Content Channel
Switch to Content Manager in the Sidebar Menu and select Content Explorer
Choose the HTML5 Apps Channel
Add App to Content Manager – you do not need to add the shared resources
Hit Back to Content Manager and choose the specified role – in this example Role Everyone
Edit the role, assign Simplifier App and Save the Role Defintion
Repeat the Steps also with specific Groups Assignment