Updates |
---|
[2013-02-21] Updated guide to show upgrade to HANA Revision 48[2013-02-21] Added statement about other cloud infrastructure providers (CloudShare, PT, KT) |
Welcome
This document describes how to update your HANA One, developer edition on Amazon Web Services (AWS) to a later revision. This guide only works with HANA Developer Edition on AWS, not with other cloud providers. For CloudShare and PT, we suggest to create a second instance and either restore a backup into this instance, or to export/import all data and models using the export/import functions from the studio. For KT, we currently suggest to stay on SPS4 until you free trial period expires end of February and then create a new instance. [Note: For SPS5, if you want to use the Predictive Analytics Library or XS Engine, we recommend to go with instance sizes >>16GB]
If you still have HANA version 1.00.28 or 1.00.35 on your AWS images, the following will guide you to update to 1.00.48 (SPS5).
[Note: Updating your HANA DB is a per-requisite for the installation of a license key (see Developer Center HOWTO - Get and Install a SAP HANA One, Developer Edition License File) that you need to request within 90 days of running your instance]
You can read the step-by-step guide below, or watch and follow along this 4 minute video tutorial (this shows the procedure to upgrade from Revision 28 o Revision 35, but the only difference to an upgrade to Revision 48 is that you have to call update.sh instead of hdbupd):
Step 1 - Create a EBS Volume with the update installer
We have created a Elastic Block Store (EBS) Snapshot with the update installer that we have shared with all registered HANA@AWS users. The Snapshot Id's for the various regions are:
AWS Region | Snapshot Id |
---|---|
us-east-1 | snap-fcf25ebc |
us-west-1 | snap-5ae48275 |
us-west-2 | snap-42b42c7b |
eu-west-1 | snap-5603b87e |
ap-southeast-1 | snap-bcc65e8f |
ap-northeast-1 | snap-2644a905 |
sa-east-1 | snap-9a2e26ab |
To create a new volume from the snapshot (see screen shot):
- Navigate to the AWS Console on https://console.aws.amazon.com [logon with the AWS account you used to create your HANA instance]
- Choose EC2
- Make sure you are working in the Region you created your HANA instance in (dropdown in top right corner)
- Pick INSTANCES > Instances from the Navigation panel
- Select your HANA instance and look for the Zoneproperty on the Description tab. Remember the value for Zone, as you will need it later
- Pick ELASTIC BLOCK STORAGE > Snapshots from the Navigation panel
- Change the Viewingfilter dropdown to Private Snapshots - you should see a 5 GB snapshot in the list, with one of the Snapshot Id's listed above (depending on your region). The description of the snapshot should be "SAP HANA One Developer Edition Rev 48"
- Right-click the snapshot and pick Create Volume from Snapshot from the context menu. Or select the snapshot and click the Create Volume button, whatever you prefer
- On the popup, enter 5 GiB as Sizeand pick the Zonevalue you found on your HANA instance from the Availability Zone dropdown
- Click the Yes, Create button
=> You have created a new EBS volume with the update installer.
Step 2 - Attach the newly created EBS volume to your HANA instance
Next, you will have to attach the volume you created in Step 1 to your HANA instance:
- Pick ELASTIC BLOCK STORAGE > Volumes from the Navigation panel
- In the list of volumes, you should see your newly created 5 GB volume in State "available"
- Right-click the volume and pick Attach Volume from the context menu. Or select the volume and pick Attach Volume from the More... menu button, whatever you prefer
- From the Instancesdropdown, pick your HANA instance
[Note: if you don't see your HANA instance in the dropdown, check that the Availability Zone of your volume is the same as the one of your instance. If it's not, delete the volume and go back to Step 1] - Remember the value shown for Deviceon the popup, as you will need it later
- Click the Yes, Attach button - the Statecolumn for your volume should change to "in use"
=> You have attached the EBS volume with the HANA update installer to your HANA instance.
Step 3 - Mount the device
OK, here's some Linux stuff - you now need to "mount" the device associated with your volume into the file system of your HANA instance. This will allow you to switch to a directory in the file system and see the content of the volume. So mount the device:
- Use an SSH client (e.g. putty) to logon to the OS of your AWS instance as user root. [Note: if you don't remember how to logon to the OS, check Section 5 of Get your own SAP HANA One, developer edition on Amazon Web Services]
- Create a new directory (e.g. /sap/update, but choose whatever you want) by executing
mkdir /sap/update - Mount the device that is associated with the volume you created (the value for Device that you remember from Step 2, it will look somewhat like /dev/sdf) to the directory you just created by executing
mount /dev/sdf /sap/update
[Note: use your values for device and directory when executing the mount device directory command] - Check the content of your update directory (you should see a file update.shalong with some sub-directories) by executing
ls /sap/update
[Note: use your value for directory when executing the ls directory command]
=> You have everything in place to start the update process
Step 4 - Update your HANA DB
So far it was all preparation - now let's run the update:
- Navigate into the update directory you created by executing
cd /sap/update
[Note: use your value for directory when executing the cd directory command] - start the update installer by executing
./update.sh - When prompted, choose your HANA DB with SID HDB by typing 0
- When prompted, enter the password of user hdbadm - if you ignored our advice and never changed the password of that user, it is HANAabcd1234.
[Note: if you ignored our advice and never changed the password for hdbadm, now might be a good time to change it. Exit the update installer, execute passwd hdbadm, enter and confirm the new password and start the update installer again] - The update will run for a couple of minutes and as a last step will stop and start the HANA DB, install the additional package HANA_AFL (the application functions library you need to call those built-in statistical functions)
- Check the version of your HANA DB, either by double-clicking the connection in HANA Studio or from the Linux command line (you will need to become user hdbadm) by executing:
su - hdbadm
./HDB version
exit
=> Congratulations! You have now updated your HANA DB on AWS to version 1.00.35
Step 5 - Clean up
Done? Not quite. You have created an EBS volume that you don't need any more, and AWS will charge you for that volume. Although it's not going to be a lot of money, it seems like a good idea to delete the volume. To delete the volume:
- In your SSH session, navigate out of the update directory and back into the root users home directory by executing
cd ~ - Unmount the device by executing
umount /sap/update - This was the last command you need to execute in your SSH session, so you can end the session by executing
exit - Go back to your AWS Console on https://console.aws.amazon.com
- Pick ELASTIC BLOCK STORE > Volumes from the Navigation panel
- Right-click the volume and pick Detach Volume or Force Detach from the context menu. Or select the volume and pick Detach Volume or Force Detach from the More... menu button, whatever you prefer.
- On the popup, click the Yes, Detach (or Yes, Force) button. The State column of the volume should not change to "available"
[Note: you might have to press the Refreshbutton to see the Statecolumn change] - Right-click the volume and pick Delete Volume from the context menu. Or select the volume and pick Delete Volume from the More... menu button, whatever you prefer.
=> Now you're really, really done
In case of trouble...
We tested the update procedure extensively, and never experienced issues. However, we're dealing with software here, so things can go wrong
Please let us know on the forum about any issues with the update. Some typical sources for trouble:
- You don't see the snapshot with the update. Please contact inmemorydevcenter@sap.com
- You cannot attach the volume to your HANA instance. Check that the availability zones for instance and volume are identical
- You cannot logon to you HANA instance via SSH as it keeps asking for the root password. You need to pass your AWS key pair to SSH client as explained in Get your own SAP HANA One, developer edition on Amazon Web Services (Part 5). If you don't have the *.pem file, you are screwed. In that case your only option is to create key pair, download the *.pem file and create a fresh instance (as described in the pre-requisites section of the above-mentioned document)
- Sometimes the installation seems to fail and prints an error log such as this:
SAP HANA Database Installation Manager - SAP AFL Installation 1.00.48.372797
****************************************************************************
Checking installation...
Preparing package "AFL"...
Installing SAP Application Function Libraries to /usr/sap/HDB/exe/linuxx86_64/plugins/afl_1.00.48.372797_941843...
Installing package 'AFL' ...
Stopping system...
Activating plugin...
Starting system...
ERR: Installation failed
ERR: error installing
ERR: Cannot install
ERR: Start instance 00 on master host imdbhdb failed.
ERR: Cannot establish http connection to 'imdbhdb' (Net::HTTP: connect: Connection refused)
Log file written to '/var/tmp/hdb_afl_2013-02-08_07.07.43/hdbinst_afl.log'
If you see this error, wait for a few minutes and then check it the database is running - the start command sometimes runs into a timeout situation and exits with an error code although the DB is still starting up nicely
- The update fails or the DB doesn't start up after the update. Try to manually stop and start the DB (run ./HDB stop then ./HDB start as hdbadm) and check in HANA Studio if it comes up green within a few minutes. If it doesn't, have a look into the update log file (the path is shown at the end of the update) to find any clues. Also check the server logs (from the Studio by double-clicking the connection - you will have to enter the hdbadm credentials). If you cannot get the updated HANA DB started, send us the logs to inmemorydevcenter@sap.com
I hope you won't need any of these options and everything works smoothly. If you have any suggestions on how this HOWTO document can be improved, please leave a comment below.
Have fun with your HANA developer instance!