It hit me again. Sometimes there are things that simply don’t work, yet, on my Mac. One of those things is the development and deployment of an HANA XS application on the SAP HANA Cloud Platform. In this blog I’ll explain how you can setup such a system on your Mac using an Ubuntu VM.

Preparing for my sessions at SAP TechEd 2013 I wanted to present how to create HANA XS apps on the SAP HANA Studio and deploying those to the HANA XS instance on my trial account on the SAP HANA Cloud Platform.

First of all and most importantly SAP already provides developer editions of the SAP HANA Client and SAP HANA Studio.

But currently SAP HANA Client doesn’t support Mac OS.

But you can get around this. Based on a blog I wrote end of last year (Setting up Ubuntu for SAP HANA Cloud) I’ve done some improvements and collected various hints and how-tos from other pages on SCN and in the web.

The result was a bash script that you run on a plain Ubuntu system, in my case inside an Ubuntu VM, providing you with

  • an Eclipse installation
  • an installed SAP HANA Client
  • an installed SAP HANA Studio
  • a properly setup SAP HANA Cloud Platform SDK

These are the steps you need to go through

  1. Install an Ubuntu VM on your Mac (5 minutes)
  2. Download all necessary files (around 10-15 minutes with a fast internet connection)
  3. Create and run the install.sh bash script (5 minutes)

After that you can start developing and use resources like the following blogs or web pages to deploy HANA XS applications on SAP HANA Cloud Platform with an Ubuntu VM on your Mac! And all of that in around 20-30 minutes.

1. Install Ubuntu VM

I currently use VMware Fusion to install and run virtual machines on my desktop. But there are others you can use, too.

On the Ubuntu side I’ve used the newly released Ubuntu 13.10, 64 bit. It worked fine for me.

If somehow possible try assign your VM something around 2GB of RAM. I had issues with 1GB of RAM and finally gave the VM 4GB of RAM and didn’t have any issues with that setting anymore.

Once you’ve done that you need to:

  • start Ubuntu
  • switch to Terminal
  • login as sudo
  • switch to the Downloads folder

Screen Shot 2013-10-20 at 7.05.57 AM.png

Screen Shot 2013-10-20 at 7.04.50 AM.png

Screen Shot 2013-10-20 at 7.10.40 AM.png

2. Download all necessary assets

In this step you have to download all the necessary files for the installation. To do that call the Firefox browser and get all the downloads you can see in the following list. In total we are talking about 7 files (aprox. 1GB in total):

  • Files you get on https://hanadeveditionsapicl.hana.ondemand.com/hanadevedition/
    • sap_hana_client_linux64.tgz: the SAP HANA Client
      • Select the tab “HANA Client” and click on the row “SAP HANA Client Developer Edition” for “Linux86 64bit”
      • Click on “Accept and Download” under the Developer License agreement
      • After a few seconds you get a pop-up. Select “Save File” and the file sap_hana_client_linux64.tgz will be downloaded in your Downloads folder of your Ubuntu system
    • sap_hana_studio_linux64.tgz: the SAP HANA Studio
      • Select the tab “HANA Studio” and click on the row “SAP HANA Studio Developer Edition” for “Linux86 64bit”
      • Click on “Accept and Download” under the Developer License agreement
      • After a few seconds you get a pop-up. Select “Save File” and the file sap_hana_studio_linux64.tgz will be downloaded in your Downloads folder of your Ubuntu system
    • ngdbc.jar: the SAP HANA JDBC Drivers for re-distribution
      • Select the tab  “HANA Driver” and click on the row “SAP HANA JDBC Drivers for re-distribution”
      • Click on “Accept and Download” under the SAP HANA Driver License Agreement
      • After a few seconds you get a pop-up. Select “Save File” and the file ngdbc.jar will be downloaded in your Downloads folder of your Ubuntu system
  • Files you get on http://eclipse.org/downloads/
    • eclipse-jee-kepler-SR1-linux-gtk-x86_64.tar.gz: Eclipse Kepler
      • Select the Eclipse Package Solution “Eclipse IDE for Java EE Developers Eclipse IDE for Java EE Developers” for “Linux 64bit”
      • You’ll be re-directed to a page where you’ll have to select the mirror page for your download. To download the file as quickly as possible use a mirror site that is nearby
      • After a few seconds you get a pop-up. Select “Save File” and the file eclipse-jee-kepler-SR1-linux-gtk-x86_64.tar.gz will be downloaded in your Downloads folder of your Ubuntu system
  • Files you get on https://tools.hana.ondemand.com/#cloud
    • neo-sdk-javaee6-wp-2.18.12.1.zip: the SAP HANA Cloud Platform SDK
      • Select the current SDK for “Java EE 6 Web Profile” and click on the link called “neo-sdk-javaee6-wp-2.x.zip” (e.g. like neo-sdk-javaee6-wp-2.18.12.1.zip)
      • You’ll be re-directed to a page where you’ll have to read and accept the “SAP Developer License”. To confirm that you need to click on “I Have Read And Agree”
      • After a few seconds you get a pop-up. Select “Save File” and the file neo-sdk-javaee6-wp-2.18.12.1.zip will be downloaded in your Downloads folder of your Ubuntu system
    • sapjvm-7.1.011-linux-x64.tar.gz: the SAP JVM (Java Virtual Machine)
        • Select a  Linux version 7.x with a *.gz file name and click on a link called “sapjvm-7.x-linux-x64.tar.gz” (e.g. like sapjvm-7.1.011-linux-x64.tar.gz)
        • After a few seconds you get a pop-up. Select “Save File” and the file sapjvm-7.1.011-linux-x64.tar.gz will be downloaded in your Downloads folder of your Ubuntu system

At the end of this procedure you should have a list of 6 files in the Downloads folder of your home directory.

3. Create and run the install.sh bash script

Now we are getting to the meat. You need to create a bash file called install.sh.

But before there is one important point that you need to consider:

Please do NOT use this script for usage in any productive environment! This script is aiming to setup a development environment for you so that you can try out the various developer editions of the SAP products that the script installs.

Now that this is clear please go to your Ubuntu terminal and type the following command

sudo gedit install.sh

A text editor opens up with an empty document. Now take the complete text of the file I’ve attached to this blog (install.sh.txt.zip), unzip the file and paste the content of the file into the text editor of your Ubuntu system that just opened up.

You need to ensure that the text #!/bin/bash is really on the first line. Save the file and exit the editor by closing it.

Before you can run it you need to make the bash file executable. You do that with the following command:

chmod +x install.sh

The only thing left to do now is to run the script and wait until the installation is done. Inside your Downloads folder where the install.sh file is just type the following command and press the return key:

./install.sh

After the script is ready you will have all the software installed in the /opt/sapdev folder of your Ubuntu VM. Depending on the speed of your internet connection this may take a couple of minutes.

4. Using the software

As I wanted to keep this as straight-forward as possible and didn’t pay too much attention (actually no attention at all) around making this available for a specific user account on the Ubuntu system you need to call all the apps as sudo.

If there is enough interest in this topic and if people have suggestions how to adapt the script accordingly I might adapt the script to address this issue.

But if you just want to use it you can start Eclipse in the folder /opt/sapdev/eclipse by calling ./eclipse as sudo.

sudo /opt/sapdev/eclipse/eclipse

Please be aware that you still need to install the  Eclipse plugins for SAP HANA Cloud Platform manually as described in the documentation.

You can start the SAP HANA Studio from the folder /opt/sapdev/hanastudio.

sudo /opt/sapdev/hanastudio/hdbstudio

When using the SAP HANA Studio and you get the question where to find regi you need to provide it via the path /opt/sapdev/hanaclient.
The regi application is inside that folder.

5. More food

Currently there are already very good blogs and other resources explaining how you can connect SAP HANA Studio to your HANA instance  on the SAP HANA Cloud Platform. Here’s a list of good examples you can use:

Don’t miss the openSAP course Introduction to SAP HANA Cloud Platform for more insights into the usage of SAP HANA Cloud Platform.

Hope that this blog is useful for you.

Best,

Rui

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Steffen Goetz

    Hi Rui,

    Great article!

    With your instructions I could successfully install the software on lubuntu 13.10 🙂

    I manually stepped through the install script to know exactly what is done.

    I had to make little changes on some of the steps:

    1. I had to add /opt/sapdev/sapjvm_7/bin to the PATH environment variable.
    2. I changed the ownership of /opt/sapdev and all underlying files to my dev user, so I do not need to be root to run the apps.
    3. I created symbolic links in /usr/local/bin for
      /opt/sapdev/eclipse/eclipse
      /opt/sapdev/hanastudio/hdbstudio
      /opt/sapdev/saphcpsdk/tools/neo.sh

    I have one more question:

    Why do I need hdbstudio and additionally an eclipse installation.

    Couldn’t I do everything within hdbstudio?

    Cheers!

    Steffen

    (0) 

Leave a Reply