Deploy to SAP Cloud Foundry (SAP BTP)

Unofficial Content
This documentation is valid for:

Prerequisites:


To deploy a GeneXus Application to SAP Cloud Foundry, follow the steps described below:

  1. Cloud Foundry Configuration
  2. Data Store Configuration
  3. Application Deployment
     

Cloud Foundry Configuration

Log into SAP Cloud Foundry Trial (if you do not have an account, you have to create one). Once there, select trial:

TrialBTPCockpit_png

Then, select the dev Space as shown below:

trialOverview_png

In the left menu, select Services > Service Marketplace. Then, search for Hana using the search box, and select SAP HANA Cloud:

HanaServices_png

The next step is to create a new instance of the service. So, select Instances and press the New Instance button:

SAPHanaCloudCreate_png

This will open a Popup Wizard that will inform you to follow a link if you want to manage SAP Hana Cloud Instances, click on that link.

ManageSapHanaInstancesMsg_png

This will redirect you to a new page and ask to select an account to login with

LoginRedirectHanaDatabase_png

Log in or select an account and continue.

SAP HANA Cloud Central will load, on this page select Create
SAPHanaCloudCreate2_png
 

This will launch a new Wizard to setup the new hana database to be created.

CreatePaso1_png

On the first step select SAP Hana Cloud, SAP HANA Database, and proceed to the next step.

CreatePaso2_pngOn this next step lets setup the HANA instance name and the password of the DBADMIN (Save this password somewhere we will use it later)

After setting up these properties, continue to the next step.

CreatePaso3_png
 

On this step it lets you configure the space that will be assigned to the database (by default it is 120Gb)

After setting up this (if you decided to change the default) continue to the next step.

On this 4th step, the wizard lets you setup replicas but this functionality is unavailable for trial instances.

Proceed to the 5th and last step.

CreatePaso5_png
This step allows you to setup the accessibility to this database, for you to be able to reach this database from GeneXus you will have to select Allow all IP addresses.

After this last step, select Create Now, and while the database is creating lets go to Service Instances of the SAP BTP Cockpit.

Here you will see the new database as an instance, select the 3 dots and Create Service Key

CreateServiceKey_20211112145624_1_png

This will open a Popup to create de Service Key, here select the name you want for the Service Key and select Create

NewServiceKey_png

After creating the Service Key save the json of the Service Key because you will need it to configure the database on GeneXus.
 

Data Store Configuration

To be able to use the HANA Cloud, you need to configure the Data Store. To achieve this, go to the Knowledge Base Preferences and select the Environment you want to deploy. Then, select the desired Data Store, and set the following properties with the values you have on the JSON you retrieved from the HDI container Key:

Use Custom JDBC URL = True
Use Custom JDBC URL = JSON URL field
Server Name = JSON host field
User Id = DBADMIN
Password = DBADMIN password that you created.
Database Schema = The schema name you want to use.
You should have something like this:

SAPHanaCloudGXDSSetup_png

This will allow you to work on your application using the SAP HANA Cloud directly even if you are still developing on your PC and have not deployed yet to SAP BTP.

After executing all the queries, you are ready to deploy the application to SAP BTP.


Application Deployment

To deploy the application, go to Build > Deploy Application and select the objects you want to deploy. Select SAP Cloud Platform (Cloud Foundry) as Target.

Then you need to set up the following Deploy Properties:

Cloud Foundry CLI Directory = the directory where you have installed the Cloud Foundry client (e.g.: C:\Program Files\Cloud Foundry)
API Endpoint = endpoint where your Cloud Foundry account is located.
Organization Name = organization name of your Cloud Foundry account (e.g.: p123456789trial).
Space Name = space name of the Cloud Foundry (e.g.: dev).
User = user account used to log into the SAP Cloud Foundry.
Password = user's password.
HANA Instance Name = name of the service created (e.g.: myHANAdb).
Application Name = name you want to give to the application.
In the routes field, it will show you where the app has been deployed and you can access it by adding /servlet/com.<Knowledge Base name>.<object you want to access>

(e.g.: https://deploycf-wacky-klipspringer.cfapps.eu10.hana.ondemand.com/servlet/com.deploycf.fioribaseobjects.fiorilaunchpad)

Availability

This applies from GeneXus 16 upgrade 10 onwards for Java Environments.