Wednesday 6 May 2020

Connecting SAC to HANA Cloud the Easy Way – Using Application Studio to Deploy the HAA (Hana Analytics Adapter)

Finding this information can be hard, it is often good to refer to a text/static version so I have captured the steps in this blogpost.

The are 6 main parts to connect SAC to HANA Cloud

1. Access the Business Application Studio
2. Hana Analytics Adapter Configuration
3. Create Role Collection
4. Assign Role to Cloud Platform Users
5. Verify Access to InA using Application URLs
6. SAP Analytics Cloud Connection

Pre-requisites


◉ SAP HANA Cloud with an HDI Container created
◉ SAP Analytics Cloud
◉ Business Application Studio


1. Access the Business Application Studio


You need to have both the subscription enabled and the role collections assigned to your user (Trust Configuration: SAP ID Service – Role Collection Assignment).

Full details of how to provision the App Studio the first time can be found here.

With that in place you should then be able to launch App Studio from the subaccount.
Go to Application.

SAP HANA Cloud, SAP Analytics Cloud, SAP HANA Tutorial and Materials, SAP HANA Learning, SAP HANA Exam Prep

Login to the Business Application Studio with your Cloud Platform credentials

SAP HANA Cloud, SAP Analytics Cloud, SAP HANA Tutorial and Materials, SAP HANA Learning, SAP HANA Exam Prep

Create a New Dev Space with the application type as SAP Cloud Business Application

SAP HANA Cloud, SAP Analytics Cloud, SAP HANA Tutorial and Materials, SAP HANA Learning, SAP HANA Exam Prep

After creating the Dev Space, we can click on the name to enter it.

SAP HANA Cloud, SAP Analytics Cloud, SAP HANA Tutorial and Materials, SAP HANA Learning, SAP HANA Exam Prep

2. Hana Analytics Adapter Configuration


Now we are inside our space in the Business Application Studio we can configure the HAA (Hana Analytics Adapter). The clever people from the SAP HANA Academy have created an npm we can use.

Open a New Terminal

SAP HANA Cloud, SAP Analytics Cloud, SAP HANA Tutorial and Materials, SAP HANA Learning, SAP HANA Exam Prep

Type the npm install command into the terminal

npm install -g generator-saphanaacademy-haa

SAP HANA Cloud, SAP Analytics Cloud, SAP HANA Tutorial and Materials, SAP HANA Learning, SAP HANA Exam Prep

Execute the installed package, with yo.

cd projects
yo

? What project name would you like? haa
? Would you like to create a new directory for this project? Yes
## You are binding the HAA to this HDI Container, multiple can be added later if required
? What is the name of your HDI container? covid-nhs
## SAC Tenant name, if you have multiple these can be adjusted in the mta.yaml
? What is the host of your client application? mytenant.hcs.cloud.sap
## Yes = SSO to DB, No = HDI Container user used for DB connection
? Will you be requiring named HANA users? No
? Would you like to add multi-tenant application support? No
## Space name in your SCP sub-account
? Which Cloud Foundry space do you intend to deploy to? dev

SAP HANA Cloud, SAP Analytics Cloud, SAP HANA Tutorial and Materials, SAP HANA Learning, SAP HANA Exam Prep

Upon completion, open the newly created project.

Current file version is xsahaa-release-1.5.10-release.zip

SAP HANA Cloud, SAP Analytics Cloud, SAP HANA Tutorial and Materials, SAP HANA Learning, SAP HANA Exam Prep

Extract the downloaded xsahaa-release-1.5.10-release.zip

Drag and drop the file java-xsahaa.war into the project srv/target directory.

SAP HANA Cloud, SAP Analytics Cloud, SAP HANA Tutorial and Materials, SAP HANA Learning, SAP HANA Exam Prep

We can now select Build MTA on the mta.yaml file

SAP HANA Cloud, SAP Analytics Cloud, SAP HANA Tutorial and Materials, SAP HANA Learning, SAP HANA Exam Prep

When the build completes check the Task build log shows something similar to below with
BUILD SUCCESS. The log should open automatically.

Once successfully built we should see the MTA archive folder with the .mtar file inside.

We can now select the haa_0.0.1.mtar, right click and choose Deploy MTA Archive

SAP HANA Cloud, SAP Analytics Cloud, SAP HANA Tutorial and Materials, SAP HANA Learning, SAP HANA Exam Prep

You should be prompted to login to your SCP API Endpoint. Something similar to below. You can then see the organisation and space.

https://api.cf.eu20.hana.ondemand.com

3. Create Role Collection


After successful deployment we will have a 1 new application, 2 new services and 1 new role.

These can be seen in the Cloud Platform Cockpit, Subaccount.

Create a New Role Collection

SAP HANA Cloud, SAP Analytics Cloud, SAP HANA Tutorial and Materials, SAP HANA Learning, SAP HANA Exam Prep

Click the HAA Access role created.

SAP HANA Cloud, SAP Analytics Cloud, SAP HANA Tutorial and Materials, SAP HANA Learning, SAP HANA Exam Prep

Add Role to the Role Collection.

SAP HANA Cloud, SAP Analytics Cloud, SAP HANA Tutorial and Materials, SAP HANA Learning, SAP HANA Exam Prep

4. Assign Role to Cloud Platform Users


Within the Cloud Platform Subaccount we can navigate to Trust Configuration

SAP HANA Cloud, SAP Analytics Cloud, SAP HANA Tutorial and Materials, SAP HANA Learning, SAP HANA Exam Prep

Type in the users email address that you wish to assign the role to.

Click Show Assignments

Click Assign Role Collection

SAP HANA Cloud, SAP Analytics Cloud, SAP HANA Tutorial and Materials, SAP HANA Learning, SAP HANA Exam Prep

Select the HAA Access Role Collection

SAP HANA Cloud, SAP Analytics Cloud, SAP HANA Tutorial and Materials, SAP HANA Learning, SAP HANA Exam Prep

5. Verify Access to InA using Application URLs


We can see our new application URLs, by navigating to the Cloud Platform space Applications

SAP HANA Cloud, SAP Analytics Cloud, SAP HANA Tutorial and Materials, SAP HANA Learning, SAP HANA Exam Prep

The Base URL (Application Route) is shown after selecting the haa app.

SAP HANA Cloud, SAP Analytics Cloud, SAP HANA Tutorial and Materials, SAP HANA Learning, SAP HANA Exam Prep

Click the URL to open the base HAA page, no authentication is required yet.

SAP HANA Cloud, SAP Analytics Cloud, SAP HANA Tutorial and Materials, SAP HANA Learning, SAP HANA Exam Prep

# Heartbeat URL Path
/sap/bc/ina/service/v2/HeartBeat

SAP HANA Cloud, SAP Analytics Cloud, SAP HANA Tutorial and Materials, SAP HANA Learning, SAP HANA Exam Prep

## GetServerInfo URL Path
/sap/bc/ina/service/v2/GetServerInfo

SAP HANA Cloud, SAP Analytics Cloud, SAP HANA Tutorial and Materials, SAP HANA Learning, SAP HANA Exam Prep

6. SAP Analytics Cloud Connection


We can now establish a Live Direct connection to HANA Cloud, using the SAP HANA connection option.

SAP HANA Cloud, SAP Analytics Cloud, SAP HANA Tutorial and Materials, SAP HANA Learning, SAP HANA Exam Prep

No comments:

Post a Comment