Skip to Content

Between Christmas and New Year I’ve had some time at home to play around with SAP HANA Cloud. This time I was wondering how to make it easier to run SAP HANA Cloud on your machine with very little efforts to setup the infrastructure.

The persona for this script

The person that I wrote this script for is somebody

  • who likes to understand what you can do with SAP HANA Cloud
  • doesn’t want to spend too much time and create a big data footprint on the hard drive
  • or simply wants to try out something new (just like me) 🙂

The list of assets

After thinking through this is my list of assets I wanted to use

  • a virtualized Ubuntu machine
  • SAP HANA Cloud
  • the related SDK and the Eclipse Tools
  • a bash script to install everything properly with close-to-zero effort

Step 1: Setup a virtualized Ubuntu

After trying out the latest version Ubuntu 12.10 and Ubuntu 12.04 I found out that the more stable release is 12.04. With 12.10 I faced several issues with bad performance and after crawling the internet that seems to be a known issue that hasn’t been fixed, yet.

So I took Ubuntu 12.04 desktop and installed it on VirtualBox on my MacBook Pro. This went pretty quickly and took me around 5 minutes.

Remember the password you’ve given the system 🙂

Step 2: Download SAP HANA Cloud SDK

Start Ubuntu and the Firefox browser, go to the SAP HANA Cloud Update Site and download the SAP HANA Cloud SDK.

Store it in the Downloads folder of your user.

Step 3: Store and run the bash-script

Now we get to the fun part of all of this.

Start the terminal in Ubuntu. For that you click on the Dash Home button at the top left and type-in Terminal into the search box. Click on the Terminal button showing up below the search field.

Screen Shot 2013-01-17 at 2.05.53 PM.png

Now you change to the Downloads folder and create a bash file called install.sh. For that you need to be logged-on as a root user.

sudo -s

cd Downloads

sudo gedit install.sh

Take the text below and copy and paste it to the editor in your Ubuntu system.

#!/bin/bash

echo “###########################################################”

echo “## Define variables for pre-downloaded software and URLs”

echo “###########################################################”

echo “# Neo SDK (get the file at https://tools.hana.ondemand.com/)”

echo “# The file needs to be stored in the Downloads folder”

echo “# The filename for the SDK will be provided as a parameter”

echo “# when this script is started”

filenameNeoSdk=$1

urlCloudTools=https://tools.hana.ondemand.com/juno

echo “# Ensure that the script changes into the Downloads folder”

cd $HOME/Downloads

echo “###########################################################”

echo “## Update your ubuntu system”

echo “###########################################################”

apt-get update

echo “# Now upgrade assuming that all questions from the”

echo “# upgrade will be answered with yes”

apt-get upgrade –assume-yes

apt-get autoclean

apt-get autoremove

echo “###########################################################”

echo “## Install some additional packages”

echo “###########################################################”

echo “# Install JDK”

apt-get install openjdk-7-jre-headless –assume-yes

echo “###########################################################”

echo “## Install Eclipse”

echo “###########################################################”

echo “# Get Eclipse Juno for Linux (32 bit)”

wget http://mirror.netcologne.de/eclipse//technology/epp/downloads/release/juno/SR1/eclipse-jee-juno-SR1-linux-gtk.tar.gz&mirror_id=580

echo “# Unzip the Eclipse  tar file into the current folder”

tar xzf eclipse-jee-juno-SR1-linux-gtk.tar.gz

echo “# Move it to the opt directory”

mv eclipse /opt/

echo “###########################################################”

echo “## Start Eclipse”

echo “###########################################################”

/opt/eclipse/eclipse -clean

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, provide the name of the SDK file as a parameter and wait until Eclipse starts.

./install.sh neo-sdk-1.17.0.zip

What will the script do? It’ll

  • first update the Ubuntu OS itself (till line 24)
  • install Java on Ubuntu (line 30)
  • install Eclipse Juno (line 35 – 40)
  • start Eclipse (line 45)

Step 4: Setting up Eclipse

This is the part I’m still not happy with. Ideally one could install the SAP HANA tools via the command line, too. Unfortunately I wasn’t able to make that work. In theory this should work with the p2 director application, but I wasn’t able to provide the SCN credentials to the script.

So just follow the instructions on the SAP HANA Cloud Update Site on step number 3 and you’re done 🙂

Step 5: Taking advantage of the VM

Once you were able to setup everything properly you should create a snapshot of your VM and secure it. From this point on you can restore the VM whenever you want and have a fully functional development environment for SAP HANA Cloud.


Not 100% there, yet

If I compare what I’ve tried to achieve and what I was able to do I wasn’t successful in automating everything. There are a few things left:

  • In case you have an idea how to automate the installation of the SAP HANA tools via the command line, please let me know and I’ll update this blog accordingly.
  • Adding the SAP HANA Cloud server automatically would be another thing I’d like to see being automated. Again maybe some of you have an idea on how to best do it via the command line. Please let me know.
  • Any other idea how to improve the script? Please add a comment to this blog and I’ll try to incorporate it.

It was a nice exercise to setup the script and install the development environment for SAP HANA Cloud.

I hope you find this useful, too.

Best,

Rui

Change on Jan 30th: Edited the script based on Craig’s proposal to provide the filename of the SDK via a parameter to the script

To report this post you need to login first.

8 Comments

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

  1. Mark Teichmann

    Nice start but my persona (always testing new stuff and never having time for anything) would like to have it easier:

    How about a downloadable Ubuntu Image with already installed Neo SDK. Just log in, fill in my SCN credentials, update Ubuntu and Eclipse to latest Version and I am done while sipping a cup of coffee.

    Cheers,

    Mark

    (0) 
    1. Rui Nogueira Post author

      Hi Mark,

      thanks for your feedback. Having a ready-to-use Ubuntu image that one could download would have been ideal. And that was my initial idea, too. But when I read the Ubuntu licensing terms I didn’t feel comfortable doing that.

      So I took the second best idea I’ve had 🙂

      Rui

      (0) 
  2. Tom Van Doorslaer

    Great work Rui!

    In the run-up to TechEd Madrid, I also had the whacky idea to gear up my personal Ubuntu laptop as an SAP machine.

    I’ve had some fun installing all the netweaver cloud tools on my Ubuntu machine as well.

    Encountered quite a few hiccups, but even with my non-existing Linux knowledge, managed to get it working after all.

    After the dev environment, I wanted to install the Trial ABAP stack as well, but hit a dead end. Even tried it with Wine, but to no avail.

    I eventually gave up and returned to Windows (8) which also fails the ABAP trial installation.

    Back to square 1 🙂

    (0) 
  3. Ninad Shrirang Pundalik

    Hi Rui,

    Is it possible for you to upload the script as a GitHub Gist or a similar code sharing repo? We could then collaborate and improve the script. I have an idea for downloading the Netweaver SDK, and would like to give it a shot 🙂 .

    Ninad

    (0) 

Leave a Reply