Installing HANA Express on AWS – Detailed Walkthrough
Introduction
This blog details the steps to deploy your own HANA Express (HXE) Instance on Amazon Web Services (AWS).
A couple of reasons I used AWS to host a HXE instance –
- Didn’t have a computer with the recommended specs (namely the 16GB of RAM)
- Initially I tried using SAP’s Cloud Appliance Library to deploy a HXE instance but unfortunately its restricted to the region “US EAST”, which isn’t ideal from Australia.
- AWS provides a lot of flexibility and is cost effective for hosting your own HANA system 🙂
The other motivation for this blog is to highlight some of the “quirks” I ran into following the SAP installation guides when deploying to HXE to AWS e.g. libtool7 missing and hostname update etc.
Hopefully this will save other people’s time.
1. Download the required files for HANA Express
HANA Express Binary Files
Register on the HANA Express site and download the binary files.
JAVA JRE 8 installation
Download the “Linux x64 RPM” file from the Java.com Downloads section.
2. Upload Installation files to AWS S3
In my S3 bucket I created a folder called “HANA Express” and uploaded the installation files –
I also made the “HANA Express” folder public so I can easily transfer the files to my EC2 instance later. This permission can be removed after you’ve transferred the files to your EC2 instance.
3. Create Virtual Private Cloud (VPC)
Create a simple VPC to host the HANA Express instance using AWS “Scenario 1 – VPC with a Single Public Subnet” as the template.
First select the VPC Service in AWS and then start the “VPC Wizard”
Select “Scenario 1 – VPC with a Single Public Subnet”
Enter a name for the VPC and Subnet for easier identification. If desired you can also tweak the VPC / Subnet size by adjusting the CIDR block (I left the default values)
Select “Create VPC” and once complete AWS will have created all the required artifacts for your VPC.
4. Create EC2 Instance
Next step is to create an EC2 Instance to host our HXE system.
Select the EC2 service in AWS and select “Launch Instance” –
Select the AMI – “SUSE Linux Enterprise Server 12 SP 1 (HVM), SSD Volume Type”
Select the Instance Type – I would recommend “Memory Optimized” type, either r3.large or r3.xlarge.
These are the two options provided with SAP CAL. Pricing for EC2 instance types can be found at AWS EC2 Pricing
Configure the Instance – Select your VPC and Subnet created earlier –
Add Storage – Depending on your EC2 instance type you’ll need to add some additional storage. The minimum recommended storage for HANA Express is 120GB.
Add Tags – Give your EC2 Instance a key/value name to help identify it if you have multiple EC2 instances e.g. “ec2-hanaex”.
Create Security Group –
The security group copies the ports/access provided with the SAP CAL HXE instance as detailed in the Getting Started Guide.
I’ve added some additional ports TCP
30030 – 30032 for XSA
53075 – WEBIDE
Note the ports are configured to be accessible by everyone, which is obviously not a great idea 🙂 There are many options with AWS to secure your EC2 / VPC. A good starting point is the AWS EC2 Security Guide
Review – The last step is to review and launch your instance. AWS will prompt you to create a new Key Pair (or use an existing key pair).
Download the new key pair to your computer and then your new EC2 instance will be created and launched –
5. Assign Elastic IP
To give your EC2 a static public IP/DNS, you can create and assign an “Elastic IP”
In the EC2 Service on the left-hand menu select “Elastic IPs” under the sub-menu “Network & Security”
Select the “Allocate New Address” button and create a new Elastic IP using VPC –
Then select your newly created Elastic IP the select the “Action” button and “Associate Address”
Select your EC2 instance and click “Associate” –
Now your EC2 instance will have a public DNS / IP Address which will remain static until you disassociate the EIP
6. Connect & Copy HXE Install Files to EC2 Instance
Connect to your EC2 Instance using your SSH client.
Navigate to the location where you downloaded the Private Key (.pem) and enter the following SSH command (substituting in the values relevant for your instance)
ssh -i “keypairname.pem” ec2-user@public.dns.name.compute.amazonaws.com
e.g.
Now you’ve connect to your instance, copy the install files in AWS S3 (from step 2) to your EC2 instance –
Navigate to the “Root Directory”
Create a folder called “install_files”
Change directory to the “install_files
Use wget to transfer the install files from S3 to EC2
The commands are below –
Note the URL for each file is in the file properties in AWS S3.
After you’ve transferred the files from S3 the “install_files” folder should contain the following files –
7. Install HANA XE Prerequisites
Install JAVA JRE 8
Run the command from the “install_files” directory to install JAVA JRE 8 –
sudo rpm -ivh jre-8u111-linux-x64.rpm
After doing so you can run the command “java – version” to confirm the JRE installed correctly
Install OpenSSL 0.9.8
Run Yast with the command below –
Select “Software” -> “Software Management”
Search for “openssl” and on the results on select the package named “libopenssl0_9_8” so the “+” symbol appears. This means the package will be installed –
Choose “Accept” and the OpenSSL 0.9.8 package will be installed
Install Libtool Runtime Library
Found my original installation failed without this installed. Following the same steps as OpenSSL, install the “libltdl7” package
8. Update the Hostname
When creating the EC2 instance AWS defaults the hostname which is derived from the EC2 instance Private IP of e.g.
This caused issues with my first installation of HXE because the above private DNS isn’t accessible from the internet. I could access some services using the public DNS however when logging onto the WebIDE of HXE it would redirect to XS UAA (auth service) using the private DNS. This would fail because the private DNS can’t be access from the internet.
To get around this issue I updated the hostname of the EC2 Instance to match the Elastic IP I attached to the EC2 instance.
Steps to do this are –
Run YAST and select
Network Services -> Hostnames
Add a new entry –
IP Address = Private IP Address of EC2 instance
Hostname = Public DNS of your EC2 Instance which is derived from your Elastic IP
Host Alias = Public Hostname derived from your Elastic IP
e.g.
Now Navigate to the Main Yast menu and select
System -> Network Services
Select the “Hostname/DNS” tab and update the hostname and domain accordingly –
Also uncheck the “Change Hostname via DHCP”
e.g.
Save and close Yast.
Now update the cloud.cfg file to preserve the hostname after each restart.
From the command line run the following –
Update the line with “preserve_hostname:” to “true”
Save / Exit cloud.cfg
Reboot your EC2 Instance.
After logging back in EC2 hostname should have updated similar to below –
9. Install HANA Express
You’re now ready to install the HANA Express server. Follow the steps in the SAP Binary HANA Express installation tutorial or the corresponding video tutorial
I personally found the video tutorial easier to follow.
Congratulations, you’ve now got your own personal HANA Express instance running on AWS!
Now you’re ready to prepare your system for the HXE tutorials – Start Using SAP HANA, express edition
Hello Stephen,
cool post.
How much did you pay to Amazon for using AWS in this case? I do not expect it's free.
Best Regards
Radek
Hi Radek,
The costs vary from month to month depending on usage; to give you a rough idea (I'm using EC2 Instance type - r3.xlarge 32GB)
$20 USD per month if I don't use the instance (ESB storage costs make up the majority of this)
$50 - $70 USD per month (approx 10 - 15 hrs of use per week)
You can set-up "Billing Alarms" if price thresholds that you've set are exceeded as well.
For detailed estimates AWS have a pricing calculator below -
AWS Pricing Estimator
Thanks,
Stephen
Thanks, Stephen! Nice walkthrough, was looking for something like that. +1 to Radek's question, curious about the cost.
Gotta love the "quirks", whole industry would be out of business if it wasn't for them. 🙂
Thanks for putting up detailed guide Stephen. I ran into an issue while logging in as xsa_admin. I am getting connection refused error on port 30030. I have checked the port is listed on the inbound rules (same as 8090 is ). I am using Hana Express 2.0. XSEngine is running. Could you give me any pointer on this? Similarly, I am not able to pull up webide page (hxehost:53075) as well. Thanks !
I followed the steps but i'm running into the following issue. Can someone help?
Output line 262: ##ERROR## step :"Product Installer" reported: Installing the Product Installer application failed: Could not delete service lcm-view-grantor: Error executing request DELETE https://ec2-52-11-106-188.us-west-2.compute.amazonaws.com:39030/v2/user_provided_service_instances/50e84dba-f6f2-4c00-a1c4-eb294e849c38: java.net.SocketTimeoutException: Read timed out (local port 42814 to address 10.0.0.102 (ec2-52-11-106-188.us-west-2.compute.amazonaws.com), remote port 39030 to address 10.0.0.102 (ec2-52-11-106-188.us-west-2.compute.amazonaws.com))
Output line 263: com.sap.xs2rt.installation.util.InstallationException: Installing the Product Installer application failed: Could not delete service lcm-view-grantor: Error executing request DELETE https://ec2-52-11-106-188.us-west-2.compute.amazonaws.com:39030/v2/user_provided_service_instances/50e84dba-f6f2-4c00-a1c4-eb294e849c38: java.net.SocketTimeoutException: Read timed out (local port 42814 to address 10.0.0.102 (ec2-52-11-106-188.us-west-2.compute.amazonaws.com), remote port 39030 to address 10.0.0.102 (ec2-52-11-106-188.us-west-2.compute.amazonaws.com))
Output line 324: ##ERROR## step :"Audit Log UI" reported: Installing the Audit Log UI application failed: Execution of command 'deploy /hana/shared/HXE/xs/installation-scripts/installation/../../installdata/apps/auditlog/ui/auditlog-ui.mtar' failed.
Output line 325: com.sap.xs2rt.installation.util.InstallationException: Installing the Audit Log UI application failed: Execution of command 'deploy /hana/shared/HXE/xs/installation-scripts/installation/../../installdata/apps/auditlog/ui/auditlog-ui.mtar' failed.
Update of SAP HANA Express Edition components failed.
Error occurred while executing Update SAP HANA Express Edition System and Components.
You can send feedback to SAP with this form: https://ec2-52-11-106-188.us-west-2.compute.amazonaws.com:1129/lmsl/HDBLCM/HXE/feedback/feedback.html
Log file written to '/var/tmp/hdb_HXE_hdblcm_update_2017-01-19_18.39.33/hdblcm.log' on host 'ec2-52-11-106-188'.
Failed to install HANA Extended Services (XSA).
Hi
We have a similar issue. Did you manage to resolve it?
Kind regards,
Pierre
I have the same error : "timeout when deleting service lcm-view-grantor".
When executing the "xs services" command, the service lcm-view-grantor does not appears.
is there a way to restart the installation at the step it failed or do I have to uninstall hana completely and try again from scratch?
Hello
Thanks for the post.
Are you sure that it works with r3.large ? does anyone test it ?
Actually with r3.large we get only 15 Gib RAM and HANA Express needs 16.
Hi,
r3.large is one of the configurations available from the SAP Cloud Appliance Library so I would hope it works 🙂
Cheers,
Stephen
Thank you for you post. Good job. I've followed it and I've installed HANA. Previously I've worked during hours because of dump linked to server address.
Christophe
I have a question. I've followed exactly (I suppose) all the post.
Now I see the Xs Engine like in the screen.
But unable to go on any address.
My user on AWS : ec2-user@ec2-52-41-xxx-xxx:
The result of xs apps :
cockpit-admin-web-app STARTED 1/1 128 MB <unlimited> https://ec2-52-41-xxx-xxx:51046
But when I try one of this address :
https://ec2-52-41-xxx-xxx.us-west-2.compute.amazonaws.com:51046
or https://52.41.xxx.xxx:51046
I've the following error
Firefox can't find address ec2-52-41-xxx-xxx.
I've also put this line in my hosts
52.41.xxx.xx hxehost
And last information : result of ifconfig
inet adr = 10.0.0.111 instead of external address ?
I've tried several changes but don't find any solution. I think I'm not too fare of the wanted result.
Thanks for your help.
Christophe
Which ports have you added in the security group? I would double check that. In addition to the 51046 port, I would also add 39032 in the list. Internally all the traffic is getting routed to 39032 port and adding this port to the list of open ports helped in my case at least.
Hi
i have HANA express virtual machine , when im trying to set the API it's shown ssl error.
any idea how to pass this issue ?
You can also use SAP Hana One from the AWS marketplace, and the installation is mostly automated.
https://aws.amazon.com/marketplace/pp/B009KA3CRY
i am trying to install hana sp 2.0. i have been following the same method but the installation failing every time. Giving errors like - Starting system...
Configuring software...
Update of SAP HANA Express Edition components failed.
Update of SAP HANA XS Advanced Runtime failed
Installation failed
error installing
Cannot install
need help.....
Stephen
Excellent blog !! I am able to install Express as well as the 2.0 SP1 by following the steps .. really helped a lot .thanks again .
I followed all steps in this tutorial but the installation fails with the following error:
Hello Stephen, pls have you installed hana express on GCP successfully? is the process the same?