Beruflich Dokumente
Kultur Dokumente
How-to Connect your HANA Cloud Platform Mobile Service Account to your On-Premise OData
Service
How-to
Applicable Releases:
HANA Cloud Connector 2.x
HANA Cloud Platform Mobile Services
Version 1.0 - April 2015
Document History
Document Version
Authored By
Description
1.0
Technology RIG
TABLE OF CONTENTS
1.
Scenario .......................................................................................................................................... 4
2.
Background ..................................................................................................................................... 4
3.
4.
1.
SCENARIO
In this document we will go through the process of connecting your HANA Cloud Platform Mobile Services
(HCPms) account to the OData services in your on premise network. We will install the SAP HANA Cloud
connector (HCC) which is an on premise agent that runs in your network and takes care of securely
connecting cloud applications, running on SAP HANA Cloud Platform (HCP), with OData services in your
network. After the installation, we will go step by step though the basic configuration in HCP, HCPms and the
HCC.
Finally we will test the connectivity through HCPms through the HCC all the way to your backend system by
creating an application registration in the HCPms and then requesting the OData service document.
2.
BACKGROUND
You have an HCPms account for managing mobile applications in an on-demand environment. Your
application data resides in your on premise network. You want to securely connect your on-demand
applications with your on premise data.
The SAP HANA Cloud Platform is the in-memory Platform-as-a-Service offering from SAP, which enables
customers and developers to build, extend, and run applications on SAP HANA in the cloud. With flexible
subscription models and optional services for apps, database, and infrastructure, it provides instant access
to the full power of SAP HANA.
This is the landscape model for the HCP connecting to your backend systems. We will be installing,
configuring and/or testing all the gold colored boxes in this picture
3.
Be sure to have your Internet browser up to date and use Google Chrome if possible
Hardware prerequisites, for installing the HANA Cloud Connector physical or virtual machine:
Memory: minimum 1 GB RAM, 4 GB recommended
Hard disk space: minimum 1 GB, recommended 20 GB
CPU: minimum single core 3 GHz, dual core 2 GHz recommended\
Operating System requirements:
4.
STEP-BY-STEP PROCEDURE
4.1
...
The cloud connector can run on Linux, Windows or the Mac OS operating systems. For this exercise we are
going to install the Windows OS version. The configuration steps below that are the same no matter which
platform you decide to install the Cloud Connector. If you choose to install on one of the other platforms,
follow the installation instructions and then continue with step 4.2 of this document
Choos e the menu option Fil e -> New -> Pr ojec t
1. Download the Windows .msi HANA Cloud connector file from the link
https://tools.hana.ondemand.com/#cloud
2. Put the installation file on the server were it is to be installed and execute the .msi file to start the
installer wizard
3. Once the wizard starts, click the Next button to start the installation process.
4. Specify the path where you want the software installed. You can leave the default path or change it as
you like
5. Specify the secure port to use for the Cloud Connector. The default port is 8443. If have other things
running on the 8443 port, you may need to change the port.
6. Leave the box checked so the system will automatically start the cloud connector
4.2
1. Open browser and go to the link https:// <server name>:<secure port> (e.g. https://localhost:8443 if
you are on the same machine)
2. If you get the following error, click on Advanced. This error comes because you dont have yet any
valid certificate for this localhost server
User Name
Password
Administrator
manage
5. Choose Master as the installation type since this is your first time you are installing the product and
this is the only SAP HANA Cloud Connector in your system. Click on Apply
6. The first time you log in, you need to change the password. Change it to whatever you like and then
click on Save
7. Connect to your Hana Cloud Platform account. Provide the following initial configuration and click on
Apply. Proxy information is only needed if you are in a network that requires a proxy to communicate
to the internet, like for example the inside your corporate network.
Parameter
Value
Landscape Host
hanatrial.ondemand.com
Account Name
<your account name on the landscape host>. It can be found on the top
left corner of your SAP HANA Cloud Cockpit. Usually it is your S# or I#
followed by the word trial (e,g S000000trial, I000000trial)
4.3
User Name
<your user name on the landscape host> (for the trial account it is your
SCN Use-id)
Password
only if required
only if required (
1. The connector is configured and connected to the Hana Cloud Platform. Now we need to add some
connections with the backend systems. Click on Access Control
3. Enter the following information and click on Save. What you are doing in this step is to assign to a real
backend system a virtual name. In this way you can decouple the cloud based application from the
backend infrastructure. You can also create a virtual port, which of course can be different from the
real one
Parameter
Description
Virtual Host
Virtual Port
4321 (It does not have to be the same as the actual port.)
Internal Host
Internal Port
Protocol
HTTP
Principal Type
kerberos
Back-end Type
SAP Gateway
Example settings:
4. Now you need to add all the resources related to the usages you want to have available to your
application. These resources are the paths to be concatenated with the server URL in order to have
the complete paths to the resources.
Highlight the server entry you just made. In the resources area below click on the Add button
Value
URL Path
Access Policy
6. At the end you should have something that looks like this configuration
7. Completing the back end configuration your SAP HANA Cloud connector has been properly configured
if the status is green and its connected
8. You have successfully installed and configured your SAP HANA Cloud Connector.
4.4
...
Now that your SAP HANA Cloud Connector is configured with a virtual server pointing to a given real server.
You now have to point to the virtual server you have created and its mappings to it all the related resources
on the Hana Cloud Platform. You are going to setup, in the SAP HANA Cloud Cockpit, a new destination:
this destination will give you access to the backend systems through the Cloud Connector.
These are the actions to perform in order to configure this destination:
Choos e the menu option Fil e -> New -> Pr ojec t
1. From the HANA Cloud cockpit click on the left side on the link Destinations
Value
Name
mygatewaysystem
Type
Description
URL
ProxyType
Internet
Authentication
NoAuthentication
That concludes the setup and configuration of the HANA Cloud Connector in the HANA Cloud
Platform
4.5
1. Log on to the Hana Cloud Platform mobile services (HCPms) from your HCP account by going to
Services and selecting the link Go to Service under the SAP HANA Cloud Platform Mobile Service area
2. Log on to your HCPms administration cockpit. It should look similar to the screen shot below:
3. Click on the Applications option. If this is a new installation you will have no applications listed if this is
your first time creating an application definition. If you have already defined applications, you will get a
list of the defined application in the left column and if you choose an application the basic info will be
on the right hand side of the screen
4. Press the
5. You will get the following popup to start the application definition. The required fields are marked with
an asterisk (*). Fill in the required fields and press the Save button when you are finished. Details of
what should be filled in the screen are provided in the following table.
Field
Value
Application ID
Version
1.0
Name
Type
Native
Description
(Optional)
Vendor
(Optional)
Security
None
Configuration
4. Once you save your definition you will get a screen that looks something like this. You can then
continue to the next step defining the backend configuration.
4.6
1. To complete your Application Definition, you can create the backend configuration from the
application definition screen that was shown in the previous steps by pressing on the Backend icon.
2. Fill in the in the fields on the screen and press the Save button when you are done. The table below
provides information on what goes in to each of the fields
Field
Backend URL
Authentication
Type
Value
<the path to your OData service> Make sure you specify the virtual hose and port not
the actual host and port
(e.g.http://myvirtualhost:8000/sap/opu/odata/IWFND/RMTSAMPLEFLIGHT)
No Authentication
Maximum
Connections
500
Certificate Alias
Rewrite Mode
Relative Paths
Proxy Type
Leave blank.
Rewrite URL on HANA Mobile Server
Leave blank
OnPremise
3. You will get a delay warning saying that the connection was successfully created but it may take up to
5 minutes to be created in the HCP database and cache. So you may have to wait for a bit before you
can continue. Press the OK button to clear the message
4. Click on the application name in the left hand column to bring up the application details again. Notice
your Application URL. This is the back end connection you specified using the virtual server. You can
test the connection from the HCP to you backend system by clicking on the Ping button at the bottom
of the screen
5. If you configured everything right in the cloud connector and the HCP and HCPms you should get a
successful ping
6. That completes the application configuration click the OK button to clear the pop-up and then click the
home button
in the upper left corner of the screen to return to the main screen
Notice that you have an application definition created and also a connection. Any backend you create
in an application definition also get populated in the connections
4.7
1. To simulate a device registration you can use a REST client tool to issue a POST request to the
application URL you defined in the HCPms cockpit. For this exercise, we will use the Postman
application in the Google Chrome browser. The process will be similar for other tools. Launch the
Postman tool
Field
URL
Value
https://hcpms-<yourtrial>.hanatrial.ondemand.com/odata/applications/latest/<your
application>/Connections
Request Type POST
Header
Content-Type
Form Data
Raw
Type
XML Data
XML
<?xml version='1.0' encoding='UTF-8'?>
<entry xmlns='http://www.w3.org/2005/Atom'
xmlns:d='http://schemas.microsoft.com/ado/2007/08/dataservices'
xmlns:m='http://schemas.microsoft.com/ado/2007/08/dataservices/metadata'>
<content type='application/xml'>
<m:properties>
<d:DeviceType>Android</d:DeviceType>
</m:properties>
</content>
</entry>
application/atom+xml; charset=UTF-8
3. If everything was entered correctly, you should get a return code of 201 Created message in the Status
area at the bottom of the screen
4. You can also confirm by logging back on to the HCPms cockpit and now you should see an additional
registration.
5. If you click on the Registrations and Users icon you can see the details
4.8
1. With a new connection to the application defined on the SMP server it is now possible to communicate
with the backend service. In this case just the service document will be retrieved using an HTTP get to
verify that indeed the gateway server is being communicated with
Go back to the Rest client and create a get request with the following information and press the Send
button
Field
URL
Request Type
Value
https://hcpms-<yourtrial>.hanatrial.ondemand.com/<your application>/
(e.g. https://hcpms-i007387trial.hanatrial.ondemand.com/com.sap.flight/)
GET
X-SMP-APPCID
Authorization
The username and password encoded using HTTP BASIC authorization. Note: even
though we defined no authorization in the set-up, if your backend requires
authorization you will need to specify the user and password in the Rest client. You
can specify it in the tool or when you execute it the browser will prompt you for it.
2. After you press the Send button you should get a 200 Status OK and the service data returned in the
body of the message similar to below
3. That concludes the process of configuring and testing the HCPms and the HCC
www.sap.com