Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Rui-Nogueira
Advisor
Advisor

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.

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-...

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

8 Comments