Sign inSign up

saplabs/hanaexpressxsa

By saplabs

•Updated 10 months ago

Official image for SAP HANA, express edition and XSA on Linux for Docker Engine.

Image
14

6.9K

saplabs/hanaexpressxsa repository overview

Overview

SAP HANA, express edition is a streamlined version of the SAP HANA platform which enables developers to jumpstart application development in the cloud or personal computer to build and deploy modern applications that use up to 32GB memory. SAP HANA, express edition includes the in-memory data engine with advanced analytical data processing engines for business, text, spatial, and graph data - supporting multiple data models on a single copy of the data.

The software license allows for both non-production and production use cases, enabling you to quickly prototype, demo, and deploy next-generation applications using SAP HANA, express edition without incurring any license fees.

This installation does not support Docker for Windows or Docker for Mac.

Prerequisites:


Compatible Operating Systems

SAP HANA, express edition for Docker has been tested on the following Linux operating system versions:

Linux OS: SLES

OS Version: 12.2, 12.3, 12.4

Docker Editions: Community⁠

Manage Storage System

overlay2 is recommended as the storage driver, with ext4 or xfs as the backend file system. The minimum volume size of the backend file system mounting is 100G. If your current disk size is less than 100G, please resize it.

To use overlay2, create or edit the file /etc/docker/daemon.json to include the following:

{
"storage-driver": "overlay2"
}

Restart the docker service. For example, on SuSE:

sudo systemctl restart docker.service

devicemapper is an available alternative storage driver for valid Docker versions. Keep in mind, devicemapper is no longer being supported by Docker.

For more information on the storage driver, visit the Docker storage drivers⁠ documentation page.

Edit the /etc/sysctl.conf File

Before you can start the container, ensure that the following parameters are set in your host's /etc/sysctl.conf file. The host can be a virtual machine, physical machine, or a cloud instance.

fs.file-max=20000000
fs.aio-max-nr=262144
vm.memory_failure_early_kill=1
vm.max_map_count=135217728
net.ipv4.ip_local_port_range=60000 65535

To edit the sysctl.conf file, use the vi command to open the file and press i to switch to interactive mode. Edit the file as necessary, hit the esc key, and type and enter :wq! to write and save the changes.

sudo /sbin/sysctl -p

Edit the /etc/hosts File

The hxehost IP address is private to the installation. In order for applications to access hxehost, add the hxehost IP address to your machine's hostname map. The hostname map is your machine's /etc/hosts file. You must edit /etc/hosts if you want to access any XS Advanced applications, or use HANA Cockpit, from your machine.

Use the following command:

sudo sh -c 'echo <hxehost_IP_address>    hxehost >> /etc/hosts'

Log in to your Docker account

Log in to your Docker account by executing:

sudo docker login

Follow the prompts and provide your Docker ID and password.


Proxy Settings

Ensure your proxy settings have been properly set up. See HTTP/HTTPS proxy⁠ in the Docker documentation.

Optional: Test Your Docker installation

Test your Docker installation by running the "Hello World" container application. Run the following command from your Docker-enabled command prompt:

sudo docker run --name helloWorld alpine echo hello

If successful, the following should display:

Unable to find image 'alpine:latest' locally
latest: Pulling from library/alpine
88286f41530e: Pull complete
Digest: sha256:<log_number>
Status: Downloaded newer image for alpine:latest
hello

If hello is printed, you have successfully pulled the container image alpine (a demo Linux distribution), and ran the instance of the container helloWorld , and ran the command echo with an input parameter of hello.

If you did not get this output, the Docker installation has not been completed or the Docker daemon can not connect to the internet. Review the process and check the Docker Documentation⁠ for more information in troubleshooting your Docker installation.

Remove the alpine image with the following command:

sudo docker image rm alpine -f

Prepare Docker Container


Set up password for SAP HANA, express edition

To make your system more secure, you specify your own password before you create your container. This is done by creating a json file as opposed to having a default password. The file can be stored locally or on another system accessible by URL. If the file is to be stored locally, store it in the /data/<directory_name> directory you created earlier.

Create the json file with one of the following formats:

vi <file_name>.json

Press i to start editing and use one of the following formats to create the file:

{
"master_password" : "<password>"
}

or:

{
"system_user_password" : "<password>",
"default_tenant_system_user_password" : "<second_password>"
}

Here is an example:

{
"master_password" : "SAPhxe123"
}

Press esc and then enter wq! to write and save the file.

This file serves as the master password for your SAP HANA, express edition users. The password must comply with these rules:

  • At least 8 characters
  • At least 1 uppercase letter
  • At least 1 lowercase letter
  • At least 1 number
  • Can contain special characters, but not ` (backtick), $ (dollar sign), \ (backslash), ' (single quote), or " (double quotation marks).
  • Cannot contain dictionary words
  • Cannot contain simplistic or systemic values, like strings in ascending or descending numerical or alphabetical order

You must then add permissions for this file to be readable by the hxeadm user in the container. Change permissions with:

sudo chmod 600 /data/<directory_name>/<file_name>.json
sudo chown 12000:79 /data/<directory_name>/<file_name>.json

Be sure to do this with each json file you use for your Docker containers.

Make a note of the path to the json file. You will need this to load the SAP HANA, express edition container.

Load the SAP HANA, express edition container


Docker container

For your first SAP HANA, express edition container, you will need to run the system with the following command and ports:

sudo docker run -p 39013:39013 -p 39015:39015 -p 39041-39045:39041-39045 -p 1128-1129:1128-1129 -p 59013-59014:59013-59014  -p 39030-39033:39030-39033 -p 51000-51060:51000-51060  -p 53075:53075  \
-h hxehost.local.sap \
-v /data/<directory_name>:/hana/mounts \
--ulimit nofile=1048576:1048576 \
--sysctl kernel.shmmax=1073741824 \
--sysctl net.ipv4.ip_local_port_range='60000 65535' \
--sysctl kernel.shmmni=524288 \
--sysctl kernel.shmall=8388608 \
--name <container_name> \
store/saplabs/hanaexpressxsa:<tag> \
--agree-to-sap-license \
--passwords-url <file://<path_to_json_file> OR http/https://<url_to_json_file>> \
--proxy-host <proxy_hostname> \
--proxy-port <proxy_port> \
--no-proxy <no_proxy>

Note: For Linux kernel versions earlier than 4, omit the net.ipv4.ip_local_port_range option.

Note: If you placed the password file in /data/<directory_name>/<file_name>.json, substitute file://<path_to_json_file> with file:///hana/mounts/<file_name>.json.

Note: Check if the password file /hana/mounts/<file_name>.json was deleted after the SAP HANA, express edition container starts. If not, you can manually delete it.

Note: Ignore --proxy-host, --proxy-port, --no-proxy if you do not have a proxy server.

This process will take several minutes. The prompt will ready Startup finished once the container has been successfully loaded. This container starts in detached mode so you will need to open another command prompt to continue.

Connect to the SAP HANA, express edition docker container


Connect to the docker container by using the following command:

sudo docker exec -it <container_name> bash

Test the Container

When you are logged into the SAP HANA, express edition container, you can test your installation by entering the following:

whoami

You should be logged in as hxeadm, the default SAP HANA, express edition user.

You can also enter the following:

HDB info

And you should see the following services running:

  • hdbnameserver
  • hdbcompileserver
  • hdbdiserver
  • hdbwebdispatcher

Log into the database

You can log into the system database with the following command:

hdbsql -i 90 -d <system_database> -u SYSTEM -p <password>

You can log into your tenant database with the following command:

hdbsql -i 90 -d <tenant_database> -u SYSTEM -p <password>

Connect via JDBC driver

To connect to your system database via JDBC driver, use the following:

jdbc:sap://<ip_address>:39013/databaseName=<database_name>

For your tenant database, use the following:

jdbc:sap://<ip_address>:39015/databaseName=<tenant_name>

Test webide

In the docker container, log in to XSA services:

xs-admin-login

When prompted for the XSA_ADMIN password, enter the master password you created during installation.

After you have logged in, view the list of XSA applications. Enter:

xs apps

Note: When you run the xs apps command for the first time, it may take 1-2 minutes for the system to return the list of XSA applications.

Check that the application webide shows STARTED in the list of XSA applications, and has 1/1 instances. (If the list shows 0/1 in the instance column, the application is not started.)

Note: Normally it only takes a few minutes for XSA services to start. However. depending on your machine, it can take over 30 minutes for XSA services to begin. If the service doesn't show STARTED and doesn't show 1/1 instances, keep waiting until the service is enabled.

Make a note of the URL for webide.

Note: The command xs apps | grep webide returns the webide row only.

Test your Web IDE connection. Enter the URL for Web IDE in a web browser.

Example: https://hxehost:53075⁠

Log on to Web IDE using the XSA_DEV user and the password you made during installation.

If you are prompted to change your password, follow the instructions.

Additional information


Update your Docker image

Set the root password and login.

docker exec -it -u root <container_name> bash
passswd

Check the update utility. It can be found in the <sid>adm/bin directory. Use HXECheckUpdate_linux.bin. Run this to check for, and download, the latest files. Follow the prompts to download the new files. By default, they will be downloaded to /usr/sap/<sid>/home/Downloads. The downloaded files will be hxe.tgz and hxexsa.tgz.

Extract the contents of the packages.

Example:

tar -zxf <downloaded_path>/hxe.tgz
tar -zxf <downloaded_path>/hxexsa.tgz

Navigate to the directory where you extracted the packages:

cd <extract_path>/HANA_EXPRESS_20/

Note: If the update you are applying includes the Applications package, increase your allocated memory by 3GB and run ./hxe_gc.sh. Follow the prompts and then continue with the procedure.

As the root user, run the upgrade script to update the server:

sudo ./hxe_upgrade.sh

Follow the prompts to complete the server update.

Check the container status

sudo docker ps -a

Docker run usage

docker run  store/saplabs/hanaexpressxsa:<tag> -h
usage: [options]

--dont-check-consistency           Skip consistency check between mount points
--dont-check-mount-points          Skip check for allowed mount points
--dont-check-version               Skip compatibility check of current and last HANA version
--dont-check-system                Skip check for incompatible /proc/sys values
--dont-exit-on-error               Halt script on error to allow root cause analysis
                                   (MUST NOT be used in production)
--license-url <url>                URL for a license file (json)
                                   Format: {"landscape-id":"<8-4-4-4-12 GUID>", "license":"<license>"}
--passwords-url <url>              URL for a password file (json). Format:
                                       {"master_password":"<pwd>"}
                                   or
                                       {"system_user_password":"<pwd>","default_tenant_system_user_password":"<pwd>"}
--proxy-host                       Proxy host name
--proxy-host                       Proxy port number
--no-proxy                         Comma separated list of hosts/domains that do not need proxy

--agree-to-sap-license             Indicates you agree to the SAP Developer Center Software Developer License Agreement.

Client Drivers


If you want to download clients to connect to your SAP HANA, express edition installation from another device, you can download client drivers. First you will need to download the SAP HANA, express edition download manager by registering online at the SAP HANA, express edition registration page⁠.

For more information about downloading and installing clients for SAP HANA, express edition, see the Install the SAP HANA, express edition clients⁠ group tutorials.

SAP HANA Studio


SAP HANA Studio is available as a plugin for Eclipse. To install the plugin, visit the tutorial How to download and install the HANA Eclipse plugin⁠. Note, there are specific instructions for connecting Docker installations.

End User License Agreement


You can find the SAP End User License Agreement at https://www.sap.com/docs/download/cmp/2016/06/sap-hana-express-dev-agmt-and-exhibit.pdf⁠.

You can find this information as a tutorial⁠ at sap.com.

Tag summary

Content type

Image

Digest

sha256:1f241e6cc…

Size

36.2 GB

Last updated

10 months ago

docker pull saplabs/hanaexpressxsa