Skip to content

Latest commit

 

History

History
133 lines (75 loc) · 4.41 KB

File metadata and controls

133 lines (75 loc) · 4.41 KB

Configure and Run Geo Relations Application

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.

Services

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

Deployment

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:

Deploy the Application Using Manifest Files

  1. Open a command line window.

  2. 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
  1. Ensure you are in the folder that contains the manifest.yaml file.

  2. Run the following command:

cds build --production
  1. 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"

Deploy the Application Using MTA

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.

Prerequisites

Follow steps 1-4 in the Deploy Your Multi-Target Application (MTA) tutorial.

Build the Application

  1. Build the MTA module:
mbt build

This creates a mtar file <xxx.mtar> in the current folder.

Deploy the Application:

  1. Deploy the module to your current Cloud Foundry space:
cf deploy <path/to/mtar>
  1. The deployment can take some minutes. After successful deployment, check if all the services have been created:
cf services
  1. 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.

  1. Open the URL of your deployed UI application in a browser.

Create a Role

After the application is deployed, you will see two Role Templates in SAP BTP cockpit.

RoleTemplate

Now, you need to create a new role using role template 'Viewer'.

  1. Go to Roles.

  2. Add new role by choosing +.

  3. Configure role attributes. In the Role Template field, choose Viewer.

RoleStep1

  1. Choose Next.

  2. Specify the Country attribute of your choice.

RoleStep2

  1. Choose Next.

  2. Select the role collection of your preference with .

RoleStep3

  1. Choose Next.

  2. Review the role.

  3. Choose Finish.

  4. Ensure that the chosen role collection is assigned to the application's user.