SAP HANA Express Edition on Windows 10 PC

SAP HANA Express Edition on Windows 10 PC

Hi everyone. Guess which news I read this morning?

No alt text provided for this image

Awesome. But what exactly does WSL2 mean? Well, it means this: "Windows Subsystem for Linux (WSL) 2 introduces a significant architectural change as it is a full Linux kernel built by Microsoft, allowing Linux containers to run natively without emulation. With Docker Desktop running on WSL 2, users can leverage Linux workspaces and avoid having to maintain both Linux and Windows build scripts. In addition, WSL 2 provides improvements to file system sharing, boot time, and allows access to some cool new features for Docker Desktop users."

What this means is that now Docker Desktop is able to run Linux containers on Windows natively without Hyper-V virtualisation (essentially, before Docker would spin up VM as the host for Linux containers). We could run HXE on Windows machine in a Docker container for some time now (via Hyper-V) but now we can run HXE on Windows machine without any bells and whistles (bells and whistles described in this post - https://www.dhirubhai.net/pulse/sap-hana-express-edition-docker-end-example-vadim-zaripov/) and also much leaner and faster from Docker Desktop perspective.

Check here how to activate WSL 2 on your Windows 10 machine: https://docs.microsoft.com/en-us/windows/wsl/install-win10

Tick the relevant box in Docker Desktop and let's jump right in!

No alt text provided for this image

I decided to try it out quickly on my home machine and, well, in 10 minutes I had a fully functional and running HXE, which is pretty cool.

Firstly I downloaded the newest Docker Desktop version from the Stable Channel here - https://hub.docker.com/editions/community/docker-ce-desktop-windows

Save, run, install.

No alt text provided for this image

Check that it's running fine via running hello-world container:

docker run hello-world
No alt text provided for this image

You would see the resource allocation parameters only if you aren't using the full WSL2 integration. Those parameters are for the DD Linux virtual machine. You still can go ahead and adjust params here as required for HXE, but that would mean you aren't using the WSL2 (HXE would still work though).

No alt text provided for this image

Next step is to visit https://store.docker.com/images/sap-hana-express-edition and copy the link to the latest version of the SAP HANA Express Edition image. Which happens to be 2.00.045.00.20200121.1 as of today.

Nex step - create an empty folder anywhere you like and place settings.json file there with the password for SYSTEMDB user:

No alt text provided for this image

Adjust hosts file to point to your local IP address:

No alt text provided for this image

Now run the following command in Console (make sure to adjust the folder name, location and the name of the container - HXE_DOCKER in my case):

docker run -p 39013:39013 -p 39017:39017 -p 39041-39045:39041-39045 -p 1128-1129:1128-1129 -p 59013-59014:59013-59014 -d -v E:\VMs\HANA_On_Windows:/hana/mounts --ulimit nofile=1048576:1048576 --sysctl kernel.shmmax=1073741824 --sysctl net.ipv4.ip_local_port_range='40000 60999' --sysctl kernel.shmmni=524288 --sysctl kernel.shmall=8388608 --name HXE_DOCKER store/saplabs/hanaexpress:2.00.045.00.20200121.1 --passwords-url file:///hana/mounts/settings.json --agree-to-sap-license

Now after the command has been issued you can open Docker Desktop and check up the logs waiting for the process to end:

No alt text provided for this image
No alt text provided for this image

You may (and will) get the following notifications, so just go ahead and confirm them:

No alt text provided for this image
No alt text provided for this image

After some time the process should successfully end:

No alt text provided for this image

Use "CLI" button to log into the container and issue commands directly:

No alt text provided for this image

That's pretty much it, log into the system the same way as it described in my original blog post:

No alt text provided for this image
No alt text provided for this image

P.S. Check out the Linux kernel used by Docker without WSL2:

No alt text provided for this image

And with WSL2 support:

No alt text provided for this image

Check the comments section below for SAP HXE XSA problems.

Can this be installed on 16 GB Windows 11 laptop?

回复
Nathaniel L.

Senior Cloud Engineer @ Acuity Brands | REST API, Azure, Nuget, AI, llama.cpp

3 年

The docker run command fails if I include this flag: --sysctl net.ipv4.ip_local_port_range If I remove the flag docker downloads the container and then throws this error: docker: Error response from daemon: OCI runtime create failed: container_linux.go:367: starting container process caused: process_linux.go:495: container init caused: write sysctl key kernel.shmmni: write /proc/sys/kernel/shmmni: invalid argument: unknown. Any ideas?

Sahaj Koroth

ABAP Developer at SAP Labs India | Ex-Accenture

4 年

Hi Vadim, I'm able to login to HDB in CLI, but still unable to add the system in eclipse. Getting the error ''The system cannot be reached. logon data cannot be used" It would be helpful if you could point me in the right direction to resolve this issue. Thanks a ton

回复
Raschke Dirk

SAP HANA / Postgresql DB Admin

4 年

Hi Vadim, I do have one more question. May be, you could help me one more again. :) I was able to change the xscontroller, but I'm not able to change the #hosts file (After the installation with docker-compose on Linux) this worked for me: hxeadm@hxehost:/hana/shared/HXE/global/hdb/custom/config> vi #xscontroller.ini this don't hxeadm@hxehost:/usr/sap/HXE/HDB90> cat /etc/hosts It would be helpful to know, if you're able to do it. Thanks a lot!

回复
Raschke Dirk

SAP HANA / Postgresql DB Admin

4 年

Hi Vadim, nice work helped me a lot. After yours was working for me I tried also "SAP HANA, express edition (database and application services)". But if I try it to start I run in an error with the file-max. ERROR: /proc/sys/fs/file-max has value 524288 (supported minimum is 20000000) . Any ideas how we can fix this for docker on windows? "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" BR Dirk

回复

要查看或添加评论,请登录

Vadim Zaripov的更多文章

社区洞察

其他会员也浏览了