Monday, 17 October 2016

DIY: HANA express edition on Amazon Cloud

If you want to use HANA express edition on aws you probably want to install your own instance to get familiar with SAP HANA installation on the cloud and get more control over your configurations and application deployments.

Follow the below blog to install you free HANA expresses edition and make it accessible from the internet. Most of the steps are very straight forward and it will take you 3-4 hours to download and install.

1. Download the HANA express binary

Get yourself familiar with SAP HANA, express edition.
Chose S3 service from aws console.

DIY: HANA express edition on Amazon Cloud

Create a new S3 bucket “hanabag” or of any name you want.

DIY: HANA express edition on Amazon Cloud

Open the bucket and upload the hxe.tgz to S3 bucket

DIY: HANA express edition on Amazon Cloud

Add files to upload the binaries to the bucket.

DIY: HANA express edition on Amazon Cloud

You will see the uploaded in the S3 online storage bucket

DIY: HANA express edition on Amazon Cloud

2. Create the EC2 instance

Size : m4.xlarge (16 GB RAM)  — >  HANA express will not install on  4 and 8GB RAM instance .

File system : root partition 50 GB — >  50 GB  EBS General Purpose SSD (gp2) volumes for root

For simplicity , I have used root partition for installation.

You can also create a separate partition  /hana of 50 GB .

3. Copy installation files from S3 to EC2.

Login into the putty console and create a directory /hana/download  Copy the installation files from s3 bucket.

#mkdir /hana/download

#aws s3 cp s3://hanabag/hxe.tgz .

DIY: HANA express edition on Amazon Cloud

Untar the installation file

#tar -xvf hxe.tgz

4. Run HANA installation

Install the missing library or else installation will fail somewhere it between .

#yast2 -i libltdl7

DIY: HANA express edition on Amazon Cloud

Run installation with below command.  The installation is pretty straightforward.

cd /hana/download/HANA_10_DEE/DATA_UNITS/HDB_SERVER_LINUX_X86_64

sudo ./hdblcm -s HXE -H <external hostname> –hdbinst_server_import_content=off

DIY: HANA express edition on Amazon Cloud

Summary before execution:

=========================

SAP HANA Components Installation

Installation Parameters

Remote Execution: ssh

Installation Path: /hana/shared

Local Host Name: ip-172-31-18-186

SAP HANA System ID: HXE

Instance Number: 00

Database Mode: multiple_containers

Database Isolation: low

System Usage: development

Location of Data Volumes: /hana/data/HXE

Location of Log Volumes: /hana/log/HXE

Directory containing custom configurations: /hana/download/HANA_10_DEE/DATA_UNITS/HDB_SERVER_LINUX_X86_64/configurations/custom

Certificate Host Names: ip-172-31-18-186 -> ip-172-31-18-186

System Administrator Home Directory: /usr/sap/HXE/home

System Administrator Login Shell: /bin/bash

System Administrator User ID: 1001

ID of User Group (sapsys): 79

Restart system after machine reboot?: Yes

Software Components

SAP HANA Database

Install version 1.00.122.01.1470046197

Location: /hana/download/HANA_10_DEE/DATA_UNITS/HDB_SERVER_LINUX_X86_64/server

SAP HANA AFL (incl.PAL,BFL,OFL,HIE)

Do not install

Do you want to continue? (y/n): y

DIY: HANA express edition on Amazon Cloud

DIY: HANA express edition on Amazon Cloud

You have installed HXE system with HDB00 instance.
Check the status of hana with HDB info command.

DIY: HANA express edition on Amazon Cloud

5. Set for accessing SAP HANA from outside the AWS network. (Optional)

A public DNS record is created to  access your ec2 instance from outside world (from outside Amazon VPC. But this is not a permanent record.  Every time you reboot ec2 instance a new Public DNS record is created and associated with it.

For this purpose, we use Elastic IP. An Elastic IP address is a public IP address, which is reachable from the Internet. If your instance does not have a public IP address, you can associate an Elastic IP address with your instance to enable communication with the Internet; for example, to connect to your instance from your local computer.
  1. Open the Amazon VPC console at https://console.aws.amazon.com/vpc/.
  2. In the navigation pane, choose Elastic IPs.
  3. Click on “Allocate New Address”
  4. Right click “Create association” and select the new EC2 instance created.
  5. Make entry of this elastic IP in your /etc/hosts file to replace 127.0.0.0
  6. Now if you have a registered Public domain , you can redirect to elastic IP address.
You can permanently use this IP address or the Public domain address to reach your installation from your internet.

What will AWS instance and storage Cost ?

All cost are region specific , below I have considered US East (N. Virginia) region.

EC2 – Cost

Pricing is per instance-hour consumed for each instance, from the time an instance is launched until it is terminated or stopped. Each partial instance-hour consumed will be billed as a full hour.

16 GB instance m4.xlarge is NOT  under free tier . You will be paying around 5.8 $ for a full day of usage. So consider shutting down your instance when not in use.

DIY: HANA express edition on Amazon Cloud

EBS – Cost

Free tier covers 30 GB of Amazon Elastic Block Storage in any combination of General Purpose (SSD) or Magnetic, plus 2 million I/Os (with EBS Magnetic) and 1 GB of snapshot storage. 

You can choose various  type of storage while creating the EC2 instance. I usually use the default option  i.e. SSD2

Even if your EC2 is stopped , you will still be paying for the EBS storage attached to your instance.

DIY: HANA express edition on Amazon Cloud

Elastic IP – Cost

You will be charged $0.005/hour only if the instance associated with it is not running or if you have reserved an elastic IP and not associated with any running EC2.

Source: scn.sap.com

No comments:

Post a Comment