/ Follow the trail

Spin-up SAP HXE

Ok, I admit 2017 has not been a good year in terms of blogging. A multitude of distractions and competing business priorities did not leave much time to dabble with technology and share my experiences. One of my resolutions for 2018 is to change this, shifting my odyssey more towards IIoT, Digital Thread & Digital Twin and the underlying, living product models. All this through the lens SAP technologies such as the Cloud Platform ("CP"), SAP HANA, SAP PLM/PPM/VC to name a few.

A little while ago I had an use case that called for an in-memory data engine with advanced analytical data processing capabilities for spatial data sets collected from several IOT sensors. This scenario was a perfect opportunity that warranted the installation of local HANA capabilities using SAP's HANA Express Edition ("HXE"). I opted for the binary installation as I am always interested understanding the plumbing.

Building a virtual machine with Enterprise Linux Server

I plan to run the HANA Express Edition on my home server so I can access its capabilities remotely. VirtualBox is my preferred choice when it comes to hypervisors. Second we need to select an OS for the guest, here SAP requires either an Enterprise Server installation - SUSE or Red Hat, I choose SLES for SAP. In preparation, download both the hypervisor and guest OS (DVD1.iso only is required) for building the virtual machine.

Setup and size the virtual machine

Install the VirtualBox software by following the installation steps. Once successfully installed its time to size the VM and install the guest OS. Open VirtualBox, click New, and use the following steps as guidance:

  • Name and operating system: enter a name for the virtual machine, select 'Linux' as type and select the respective Linux version. If you cant find your distribution, select 'Other Linux'.
  • Memory size: SAP's recommends 16GB, depending on your system select an reasonable amount but don't overdo it. In my case, I selected 8192MB. Size can be changed afterwards under VM settings.
  • Harddisk: We're creating a new VM, so select 'create a virtual hard disk now'.
  • Harddisk type: An advanced setting for our intent and purposes, choose 'VDI' (VirtualBox Disk Image).
  • Storage on physical hard disk: Select a fixed size of 60GB - SAP recommends 120GB.

Once VM is succesfully generated you should be able to see this in VirtualBox in powered off state.

As a post installation I suggest installing the VM Guest Tools which can be downloaded as VirtualBox Extension Pack. In order to apply the package you must run VirtualBox as administrator - right-click application and select 'Run as Administrator'. Select File->Preferences->Extensions and add extension package you just downloaded by following the onscreen instructions.

Installing SLES for SAP

Since this is a net new VM, no Operating System is available at this time - turning on the VM will result in a fatal error. In VirtualBox select Settings > Storage. In the Storage Tree select the 'CD' image under IDE controller and point to the newly downloaded .iso image file. Click 'Start' which will initiate the installation of the SLES for SAP distribution on the virtual machine.
Note: Do not forget to remove the reference to the .ISO image file as from this virtual drive to prevent re-installation.

As the SLES for SAP installation starts, follow the on screen instructions. Couple of suggestions as we go through the installation choices:

  • Select SUSE Linux Enterprise Server for SAP Applications as operating system and enable the remote desktop protocol ("RDP").
  • Skip the add-on products as HXE does not require any at this time.
  • Leave suggested partitioning as recommended by the installation wizard.
  • Suggest removing the 'GNOME Desktop Environment' software installation options.
  • Disable the firewall service.
  • Replace Default Systemd Target with value 'Text'.

As a post installation step the hostname must be properly set and assigned the Loopback IP to associates it with 127.0.0.2 (loopback) IP address in /etc/hosts. The simplest way to do this is using YaST, a Linux installation and configuration tool by entering yast in the terminal window.

  1. In YaST Control Center go to System > Network Settings and select Hostname/DNS (Alt-s).
  2. Enter a hostname, e.g. hxe2host and remove the Domain name
  3. Select option 'Assign Hostname to Loopback IP' to make hostname resolvable at all times, even without an active network
  4. Select 'OK' to save the updated network configuration and exit YaST.
  5. Restart the virtual machine.

Enter command cat /etc/HOSTNAME and validate the newly assigned hostname in step 2 is returned. Enter cat /etc/hosts and a entry for the newly created hostname with the localized IP address (127.0.0.2). For more details on SLES network configuring capabilities have a look at the SUSE Administration Guide.

Downloading HXE

Before we can deploy SAP HXE we must ensure a 64-bit Java SE Runtime Environment 8 or higher is available on the target machine. The runtime is required for running the SAP download manager. Once downloaded, go to the target directory and enter the following command: zypper install jre-8u152-linux-x64.rpm and follow installation instructions.

Before you can download the latest SAP HANA Express Edition version you must register the product. Follow the on screen instructions and click the 'register' button. Select the on-premise installation option and click on the Linux version of the download manager. A binary application, 'HXEDownloadManager_linux.bin' gets downloaded. Executing this application requires two terminal commands:

  1. First the file must be made executable: chmod +x HXEDownloadManager_linux.bin.
  2. Then we execute this application: ./HXEDownloadManager_linux.bin.

If all was successful the SAP HANA, Express Edition Download Manager 2.0 SPS 02 is opened. Ensure the Platform option states 'Linux/x86-64' and Image reflects 'Binary Installer'. Choose a target directory for the downloads, i.e. '/root/Downloads'. Next select the 'Server only installer' option. If interested in additional features (XSA, WebIDE and HANA Cockpit) - also select 'Applications' and click the download button. Once completed the download folder should contain the files named 'hxe.tgz' or 'hxexsa.tgz' depending on the selected download.
Note: the XSA installation requires more memory ~12GB, which can be increased on the virtual machine.

Installing HXE

Next step is to extract the two files which were downloaded and start in installation of the HXE. Installing the server from the root's home directory results in permission related issues therefore unpack the files on root level. For example, navigate to directory cd /opt and extract the files from within the directory with the following commands:

tar -xvzf ~/Downloads/hxe.tgz
tar -xvzf ~/Downloads/hxexsa.tgz

Upon completion of the extracts the folder should contain a sub-directory 'HANA_EXPRESS_20' and the installation file named 'setup_hxe.sh'. Start the installation by issuing the command: sudo ./setup_hxe.sh and follow the instructions during the installation procedure. If HANA Express Edition server install correctly a success message is issued in the terminal.

########################################################################
# Summary after execution                                              #
########################################################################
Server Installation...(OK)
XSC Installation...(OK)
HXE Optimization...(OK)

For more details, refer to /var/tmp/setup_hxe_2018-01-14_02.58.30.log

To validate the HXE server is properly installed, log into the terminal as HXEADM user. Enter the command HDB info and validate the following services are running:

  • hdbnameserver
  • hdbcompileserver
  • hdbdiserver
  • hdbwebdispatcher

If any of these services are missing you can re-start the server HDB start. When the prompt returns to the terminal, system is started. In a browser window, enter http://hxe2host:8090 in the browser; when successful the page below should be presented. Congrats and happy coding!

180111_HXE2_XS-Engine-2

Accessing the guest from the host

When installing the hypervisor on a laptop and/or desktop you can access the guest running SAP HXE. VirtualBox has several options to accomplish this NAT, Bridge Connection and Host-only Network to name a few. My personal preference goes to bridged networking as it makes the guest available across the LAN just like the host machine. Follow these simple steps to expose the guest on the local network:

  • Power down the Hypervisor hosting SAP HXE.
  • Select Machine Tools and select Machine > Settings > Network.
  • Select the Adapter 1 tab, ensure 'Enable Network Adapter' is checked, select attached to 'Bridged Adapter' and select the preferred host interface.
  • Power up the HXE Hypervisor.
  • Login with HXEADM, validate all HXE services are running and determine guest's ip address sudo ifconfig.

180118_HXE2_VB-Bridged-Network

  • Open a browser window on any machine in the loacl network and enter http://eth0-ip-address:8090.

When successfull the same SAP XSEngine successpage should be presented. Next stop is the integration with TensorFlow and developing the Digital Twin/Digital Thread analytical capabilities.

If you use Disqus comments, just uncomment this block. The only thing you need to change is "test-apkdzgmqhj" - which should be replaced with your own Disqus site-id.