Skip to Content
Technical Articles

HANA Express Edition Installation from Docker Hub

Docker Containers subject has been rolling around for quite some time now. Even it has gained much more interest with SAP R&D team for reducing the hardware cost, resource consumption, easy maintenance, etc…  There has been many blogs and research already rolling out on this subject integrating SAP with Docker containers.

For a many months now, even SAP LABS people are constantly working on and releasing SAP HANA Express edition Docker image ready edition to use in Docker Hub, using which we can directly try SAP HANA Express Edition for free up to 32GB RAM usage. There are two images provided, one with SAP HANA Express Edition DB only image and other with SAP HANA Express Edition + XS Applications.

Therefore, in this blog I am going to explain how to install SAP HANA Express Edition + XS Application Docker image with systematic instructions.

Step-up Instructions from Docker Hub is already available from the below Link.

SAP HANA, express edition (database and application services)

System Requirements

Memory: 24GB Minimum (I am using 32GB)
CPU: 4 Minimum (I am using 8 CPU)
HDD: 80GB (I am using 200GB)
Host OS: Any OS which can run Docker engine (I am using Ubuntu Server 20.04 LTS)
Docker engine version 19.0+

Instructions

  1. We need to prepare Docker engine and the Host compatible to run HANA Express edition, so first need to add overlay storage driver with ext4 or xfs file system as backend. Create or edit the file /etc/docker/daemon.json and add/modify the below lines. Note:-Please do not use “devicemapper” as storage driver it is no longer supported.
    {
    "storage-driver": "overlay2"
    }

    Then Restart Docker service to make the changes effective.

    #>systemctl restart docker.service
  2. Add required kernel parameters on the host machine to support HANA database container by adding the below entries to /etc/sysctl.conf file. Once added run “/sbin/sysctl -p” command to make the changes effective.
    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

  3. Make sure you have added the host entry to /etc/hosts file for the hostname of HANA container host.
    #>sh -c 'echo <hxehost_IP_address>    hxehost >> /etc/hosts'​
  4. Next Login to your Docker Hub account to pull HANA Express edition container image.
    #>sudo docker login​

  5. tup Password for HANA express Edition. We can create our own password for HANA and applications Login by creating a master password file. For that create a a json file which contains password. In our case i have used /data/haexp directory and created a json file with name maspasswd.json. We can even specify a single master password or individual password for system and tenant DB. The password must comply with the rules like at least 8 character in length, 1 upper case, 1 lower case and 1 number letter must be present. Also make sure the permission for the file is modified as below.
    {
    "master_password" : "<password>"
    }
    
    or for multiple password
    
    {
    "system_user_password" : "<password>",
    "default_tenant_system_user_password" : "<second_password>"
    }​

  6. We are ready now to launch HANA Express container. To pull the image and get the container running we can use the below command.
    Note:- In the Docker Hub Documentation it has mentioned to keep kernel.shmmni=524288. However, this value is not accepted by container so had to keep a value lower where i have used kernel.shmmni=4096. Here we are not using proxy server for internet connection so those command lines are not included. For more detail please refer link SAP HANA, express edition (database and application services)

    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 \
    -v /data/haexp:/hana/mounts \
    --ulimit nofile=1048576:1048576 \
    --sysctl kernel.shmmax=1073741824 \
    --sysctl net.ipv4.ip_local_port_range='60000 65535' \
    --sysctl kernel.shmmni=4096 \
    --sysctl kernel.shmall=8388608 \
    --name hxecont \
    store/saplabs/hanaexpressxsa:2.00.045.00.20200121.1 \
    --agree-to-sap-license \
    --passwords-url file:///hana/mounts/maspasswd.json​

  7. Once we get the message as ‘Startup finished!’ message, it indicates that the container image build and instance creation is complete. We can now start using the HANA Database. First of open a new SSH session of the same host leaving the start-up screen as is. Moreover, we can login to Docker instance using the below command, then try checking HDB info to check the DB & application run status.
    #>docker exec -it <container_name> bash​

  8. Further, we can test the XSA login from command prompt, also use the browser navigation for login, and check XSA cockpit, HANA Admin cockpit, HANA cockpit, Web IDE etc… Make sure you add host entry of the Docker engine host from where you are trying to login via Web browser.

 

  XSA Cockpit

     

 

HANA Admin Cockpit

HANA Cockpit

 

HANA License Info

 

Web IDE (https://hxehost:53075)

 

conclusion

For grace full shutdown of HANA DB, either issue HDB stop from the Docker login or just kill the running Docker page for the HANA container, it will automatically perform a soft stop of HDB database.

hxeadm@hxehost:/usr/sap/HXE/HDB90>HDB stop
hxeadm@hxehost:/usr/sap/HXE/HDB90>exit

Next time you want to continue, using HANA database just start the container with “docker start -i <container name>”, HANA database and applications get started automatically.

#>docker start -i hxecont

…and check in HANA logs if there is any start-up issue.

 

!!! Kudos !!! Enjoy !!!

 

Working on containers topic with HANA database, stay tuned for more interesting blogs.

–Giridharan

2 Comments
You must be Logged on to comment or reply to a post.