- created ec2 instance of suse enterprise 12
m3.xlarge, a memory optimized instance.
- launched and created.
.pemfile and added to
- testing connection:
ssh -i ~/.ssh/sap-encollab-hana-express.pem firstname.lastname@example.org
- used cyberduck to do FTP’ing because easier. Just point “use public key authentication” to the
—- this did not work. !failed!
One of the more interesting announcements from SAP Tech Ed Vegas 2016 was the reveal of HANA Express a full, free version of HANA for everyone. HANA Express is free up to 32G of memory use. Unlike the old SAP Development Edition, there seems to be no specification that you cannot use HXE in a production environment.
Our goal today is to create our very own cloud hosted instance of HANA Express, and this guide will tell you:
- what you’ll need to get HANA Express
- what you’ll need to run upload Virtual Machines to AWS
- what you need to do to upload a Virtual Machine and convert it to an EC2 instance
- How you can connect to your cloud hosted HANA Express box
Be aware that there will be cost involved in running an EC2 instance. Be sure to check it out and see if that is acceptable to you.
We’ll need several things before we can go forth and start using AWS tools.
First, we’ll need HANA Express from the HANA Express website, where you’ll find the download manager. You’ll have to sign up ofcourse, but it’s a quick process and you’ll have it on your computer in no time.
For people who do not have java installed, this is unfortunately a prerequisite for running the download manager, so if you haven’t done so, please install Java first. Since this is a command-line heavy guide, the quickest check is opening a terminal or cmd window and giving it a
java -version. If you get results, you’re ok. If not, you can get Java from Oracle.
java --jar path/to/HXEdownloadmanager.jar into your terminal to start the download manager.
In a flash of mental clarity, SAP have provided two different types of download for us: Binary, or Virtual Machine. You could do this whole thing from scratch by downloading the binaries, downloading openSUSE Enterprise 12 and going bananas. The easiest option though is to download the Virtual Machine. I just download the one that had the example applications, but it’s your choice.
Once all the
.ova files are in, we can get started on AWS. The first thing to do is to check if the AWS CLI tools are installed. Typing
aws --version will be enough to check. If you get a
command not found or similar message, please install it from the website. It’s available for most OS’ses .
The first thing on AWS we’ll do is create an S3 bucket and set up the necessary roles.
Next, think of a name for your bucket. Bucket names have to be unique, so you’ll need to come up with something specific to you. Make not of it. In the rest of this guide, I’ll be using bucket-name, this means you’ll have to replace those bits with your actual bucket name.
Creation is straight forward:
aws s3 mb s3://bucket-name
Next, we’ll need a role called
vmimport, so we’ll create a file called
trust-policy.json and add:
--role-name vmimport --assume-role-policy-document file://trust-policy.json
Then created file
role-policy.json with the following content. Don’t forget to replace the
bucket-name with your actual bucket name:
aws iam put-role-policy --role-name vmimport --policy-name vmimport --policy-document file://role-policy.json
Now it’s time to upload the image to the S3 bucket created earlier.
aws s3 cp hxexsa.ova s3://bucket-name/ --region my-region
AWS uses it’s ‘multi-part upload’ for larger files, which means it’s going to break up your image into smaller chunks, upload them in parallel and assemble them at the end. It makes the upload itself faster, and it means you can recover from connection failure faster.
In case of the HANA virtual machine, it got chunked into 1061 parts! Progress will be reported straight into your terminal.
Once it’s done, the image needs to be converted into an EC2 instance. The command to do this takes a JSON file containing the details. So, create a file called
containers.json and add:
Finally, the command to start the conversion is:
aws ec2 import-image --description "HANA Express" --region my-region --disk-containers file://containers.json
This will bring up a message telling you that the import is “Pending”, along the lines of
ImportTaskId. You can use this to check the status of the import, like so:
aws ec2 describe-import-image-tasks --import-task-ids import-ami-fhb6stp1 --region ap-southeast-2
AWS will tell you in another JSON based response: