EDUCAÇÃO E TECNOLOGIA

SAP ABAP Platform 1909, Developer Edition: Day 1 Experience and Tips and Tricks

Like many of you reading this, my plans for this afternoon got blown of the water thanks the wonderful news of the new SAP ABAP Platform 1909, Developer Edition release. To read all about the announcement of this new offering for SAP developers please read Julie Plummer‘s blog post here: SAP ABAP Platform 1909, Developer Edition: AVAILABLE NOW | SAP Blogs

In this blog post I want to share with you my experiences installing the new ABAP developer edition on my Windows laptop. I run Docker on WSL2 and some of my experience will be specific to that environment.  For other parts I’ll share some general tips and commands that I found helpful along the way.

ABAP%20Dev%20Edition%20System%20Components

ABAP Dev Edition Software Components

On the subject of Docker and WSL2; if you aren’t familiar with WSL2 – the Windows Subsystem for Linux – I’ve written a few blog post in the past on the topic. This one in particular talks about installing HANA directly in WSL2 but it also gives a nice primer to the WSL2 topic in general: Installing SAP HANA, express edition into WSL2 (Windows Subsystem for Linux) | SAP Blogs

Sizing

First of all for all installation instructions I’d suggest going right to the Setup Instructions available on the Docker Hub page: ABAP Platform, Developer Edition Free Plan Details (docker.com)

Read through it end to end before you start the process to save yourself some headaches.

Unlike downloading an installer and running through the setup process on your local machine, you will be pulling down a complete and finished system image and then starting that up on your machine. It’s much like trading around a Virtual Machine image and then starting on a different host machine; except here we will use Docker as the “Virtual Machine” infrastructure and Docker Hub will be the place to download the content from.

I mentioned WSL2 before.  For Docker on Windows you have the choice of different engines to power it. WSL2 is a recent addition but allows you to use the more tightly OS integrated approach to manage the virtual machines that power Docker behind the scenes.

Now where this becomes important is in the sizing step. The setup instructions say the following:

Before your start, please make sure you have assigned enough disk space to your Docker set up. The image has around 23GB of size when compressed and 62GB after decompressing. It would be frustrating to lose plenty of time downloading the image to only find out docker does not have enough disk space to unpack the image.

To be able to successfully run the system, it’s necessary to assign at least 16GB RAM to Docker Desktop.

But if you are running Docker with WSL2 you might be initially confused because there are no sizing options. This is perfectly normal as WSL2 will auto-size both the disk and memory/CPU up to nearly the limits of what is available in the host OS. To read more about Docker and WSL2 here is a good reference: Docker Desktop WSL 2 backend | Docker Documentation

This certainly simplifies any Docker specific sizing. It does mean that you still need to ensure that your host Windows file system has enough free space to give to Docker. Beyond that, you don’t have to worry about CPU or Memory sizing.

This does mean that although the system requirements state 16Gb of memory, if your host OS has more; in Docker with WSL2 its going to give it to HANA and the ABAP system running in the Docker Image. At one point my system was giving 48Gb to Docker container OS. You can see this in Task Manager of the host Windows OS as the dynamic memory for Docker will all be allocated via a process call Vmmem.

Memory%20Utilization

Memory Utilization

Likewise the dynamic resource allocation has no problem putting load across all of my CPU cores either:

CPU%20Usage

CPU Usage

If I shell into the running Docker container I can see that the Linux OS within Docker shows a maximum of about 52 Gb of memory.  So Windows is reserving about 12 of my total 64 Gb automatically for the continued smooth host OS operations as well.

Memory%20Within%20the%20Container

Memory Within the Container

But the real beauty of this approach is that once they system “calmed down” after the initial startup phase it released a lot of the memory back to the host OS. The Linux environment within the Docker container still thinks it has 52Gb of memory, but the Vmmem process has shrunk down to 10.5 Gb.

Of course your actual numbers and the scaling is going to vary based upon your available hardware.  However if you are new to Docker and have the choice to run WSL2, I’d strongly recommend it. There is little to no configuration or sizing needed up front and the host OS is able to dynamically allocate (and reclaim/swap) resources to keep both the virtual and host environments running as well as possible.

Installation

The one major tip I’d have for you during the installation itself is read the whole section of the documentation first.  And don’t just cut and past the Run / Other command from the documentation.  I did that and then quickly hit the insufficient system limits configuration error.  It seems like anyone running on Mac or Windows is going to need to add the -skip-limits-check to the run command. I also learned later that you are probably going to want to put the -agree-to-sap-license switch on the run command. Otherwise you are always going to have to start the container in interactive mode to accept the agreement. I really want to later be able to run the server without keeping a docker command window open so I opted to put this into the run command. So here was the run command I ultimately ended up using:

docker run --stop-timeout 3600 -i --name a4h -h vhcala4hci -p 3200:3200 -p 3300:3300 -p 8443:8443 -p 30213:30213 -p 30215:30215 -p 50000:50000 -p 50001:50001 -p 50013:50013 -p 50014:50014 store/saplabs/abaptrial:1909 -skip-limits-check -agree-to-sap-license

I’m a bit of a control freak, so I like to know exactly what is happening during the startup process. So while the Docker run command is running in one terminal I open a second and shell’d into the Docker container where I can view the OS level processes.

Start%20Up%20Process

Start Up Process

This I believe is a critical tool for operating the Developer Edition.  Being able to execute a shell within the container is very much like using SSH or Telnet to connect to a remote server.  The command to open a shell to your ABAP dev edition is:

docker exec -it a4h /bin/bash

Once you have shell access within the container there are all kinds of things you can do to troubleshoot or even just look around for your own education.

For example if you switch to the ABAP instance owner user (a4hadm) you can run the command dpmon – which is similar to the work process overview SAPGUI transaction but from the command line.

su - a4hadm
dpmon 0

dpmon%20work%20process%20table

dpmon work process table

There are similar things you can do to check the status of the HANA database as well. For example:

su - hdbadm
./HDB info

HDB%20info

HDB info

Closing

To close out today’s post, let’s discuss shutting down the system. Keeping with my theme of liking control over things; I don’t really like just stopping the Docker container.  Even with the extended timeout the documentation suggested, it just feels like pressing the power button on the server.

Personally I like to manually shut down the ABAP and HANA layers myself before I kill the container.  For this I use the same above approach to shell into the Container.

Then I issue the following command to stop the ABAP application server layer:

su - a4hadm
/usr/sap/hostctrl/exe/sapcontrol -nr 0 -function StopSystem

Return to the root user via the “exit” command. Then switch again to the HANA user and use this command to stop the HANA database.

su - hdbadm
./HDB stop

I can also do a “top” from the shell to make sure everything is really stopped.  Now when I issue the “docker stop” command it should respond much faster and I sleep better at night knowing that the SAP software is safely and completely stopped before stopping the container.

If all of this talk of shell and these command line utilities has you intrigued; might I also suggest trying out the VSCode Remote Explorer extension. You can choose Containers and then will be shown a list of all running Docker Containers.  You can connect directly to it in a separate VSCode window and access the Shell and File System within the Docker container.

VSCode%20Remove%20Explorer

VSCode Remove Explorer

Or maybe you are thinking, I just want to write some ABAP code.  That’s fine as well and once you have the Docker container running – have at it. All that I’ve detailed here is really just additional background and exploration information for those that want to poke around behind the scenes.

The most important thing to do is just to get started.  We have a great new ABAP playground for education and exploration and I can’t way to see what everyone does with it.  I see that Uwe Fetzer has already been busy on day one of this new developer edition as well: Using multi model capabilities of SAP HANA in the new ABAP 1909 Developer Edition – Part I – Document Store | SAP Blogs and Using multi model capabilities of SAP HANA in the new ABAP 1909 Developer Edition – Part II – Spatial functions | SAP Blogs