Deploy the Java web application to HANA Cloud

Here we deploy the war directly to the SAP HCP( HANA Could Platform) not from the Eclipse. Yes they do have written some tools for eclipse where we can connect to HANA Could and we can deploy from the eclipse.

In this we see the steps to deploy the Java Web application to SAP HCP. You need to follow some steps while developing the Dynamic web application in eclipse follow the below post for

  1. Creating the Dynamic web application
  2. Creating the HANA Database
  3. Creating the HANA Datasource binding
  4. Configure HANA database with Hibernate + JPA

Here we use the trail HANA Cloud account so we can deploy only one application.

1: Login to the SAP HCP Cockpit

2: Click on the “Java Applications” from the left side Navigation panel.

3: Click on “Deploy Application”. if you already have one you can delete the application but need to stop the application before deleting.(Note : if the binding is already created select the check box to say not to delete the binding).

4: Select the war file

deploywar

5: The name of the application will be generated automatically based on war file name.

6: Runtime has to select very carefully, check this link to chose Runtime, in our example we will use “Java Web Tomcat 7”

7: Other Things dont change, these are related to process and CPU’s other stuff we will not worry now.( even i dont know much about these, i have trail version 😦 ). these can be configured when we have licence in trail version they have some limitations.

8: Click “Deploy”, it will upload the .war file the it ask to start.

9. if you already have the data binding created you can start. Other wise just close.

10. To create binding follow the post last section.

11. Then Start the Application from SAP HCP Cockpit.

 

 

Creating HANA Database

In my previous post we have created the SAP HANA Colud developer Account. Now we will see how to create HANA MDC (Row) database.

After Login to the SAP HCP Cockpit, on the Navigation Bar we have “Databases & Schemas” Click that.

Click “New” to create a database and enter the “Database ID” we can choose any name here,

dbcreation

Give the Password for the “SYSTEM” User, this is require to login to the Database in the next step.

Now press “Save” it will take some 15 – 20 min.

we can see the progress in the “Events” tab from Navigation bar. once the event “Database started successfully” is raised, go to the “Overview” tab.

Which look as below.

Where status is “STARTED”

database started

Now we need to configure the Schema in the Database which we created. to do that we need the user for the same.

Lets create the Database user first, we can not use SYSTEM user for db access that’s why.

Creating DB user

Click on the “Administration Tools : SAP HANA Cockpit” link which will open the Fiori Application in new window( Which is called HANA Cockpit).

Then Give the User name as “SYSTEM” and password which is given in previous step

It will say you dont have permission, dont worry we are using Trail account we have to see these errors, click “OK”.

Now in the Fiori Lanchpad click on the “Manage Roles and Users” Tile, which will open the new Fiori app (SAP HANA Web-based Development Workbench: Security) 

hanauser

In the Above Screen right click on the users and select new user in the context menu

Enter the User name, Which is ALLCAPS “SAP Stranded” period, and password (Temp password once user is logged in he has to change this) and Save from the main menu as in the previous screen shot.

usernamepassword

Add Roles user

Click on the “+” icon in “Granted roles” tab

addroles

Search of “ide” as below and select all press “OK”

roles

Do the same to add one more role CONTENT_ADMIN”

Yes, we have created the HANA MDC database and added the User which is having role to access and modify the database though SAP HANA Databse WebIDE

Confirm the user and roles are proper 

Log out from the Security App ( yes we are working on SYSTEM user till now)

Login with the New user which is created, and temp password which is given while creating the user.

Once login it will ask to change the Password for the user.

Continue reading