After your are ready with the application coding, you now need to adjust the application to your own environment. To do that, you have to adapt the manifest.yaml and the service.js files.
Find the manifest.yaml and services-manifest.yml files in your installation folder and open it. You have to adapt the manifest.yaml and the service.js files only if you have used different names in the configurations so far. If you have followed all the configurations with the exact names inside, leave the manifest.yaml and the service.js files as they are.
In case you are wondering about the correct service names, you can look them up in the SAP BTP Cockpit.
Note: Adapt the application security descriptor (xs-security.json) with
redirect-uris
parameter to restrict access as much as possible depending on the landscape domain as mentioned in the SAP Help Portal: Listing Allowed Redirect URIs
You will use the Cloud Foundry Command Line Interface (cf CLI) for the deployment. In case you have not installed it yet, do it as mentioned in the Prerequisites.
Deployment can be done either using a manifest file or an MTA file. You can choose one of the following options:
-
Open a command line window.
-
Log in to the account and space:
cf login -sso
or alternatively log in to the account and space using your SAP BTP credentials:
cf login
-
Ensure you are in the folder that contains the manifest.yaml file.
-
Run the following command:
cds build --production
- Run the following command, using the CF service push plugin:
cf create-service-push --vars-file vars-dev.yml --push-as-subprocess
Note: Adjust the
vars-dev.yml
accordingly.
In case Create-Service-Push plugin is missing, run the following command to install it.
cf install-plugin -r CF-Community "Create-Service-Push"
The deployment is based on an MTA (Multi-Target Application, sometimes also called MultiApps) technology. The MTA is an SAP-proprietary way to do deployments consisting of multiple modules that can be implemented in different technologies.
Follow steps 1-4 in the Deploy Your Multi-Target Application (MTA) tutorial.
- Build the MTA module:
mbt build
This creates a mtar
file <xxx.mtar>
in the current folder.
- Deploy the module to your current Cloud Foundry space:
cf deploy <path/to/mtar>
- The deployment can take some minutes. After successful deployment, check if all the services have been created:
cf services
- In the deploy log, find the URL of your deployed app.
Example URL: geo.cfapps.us10.hana.ondemand.com
Using the command
CF apps
you can always look up this information.
- Open the URL of your deployed UI application in a browser.
After the application is deployed, you will see two Role Templates in SAP BTP cockpit.
Now, you need to create a new role using role template 'Viewer'.
-
Go to Roles.
-
Add new role by choosing +.
-
Configure role attributes. In the Role Template field, choose Viewer.
-
Choose Next.
-
Specify the Country attribute of your choice.
-
Choose Next.
-
Select the role collection of your preference with ☑.
-
Choose Next.
-
Review the role.
-
Choose Finish.
-
Ensure that the chosen role collection is assigned to the application's user.