Register Login

SAP ASE on Docker Containers

Updated May 18, 2018

How to run SAP ASE on Docker Containers?

How should you run SAP ASE in Docker Containers?

  • SAP ASE can be installed run in a Docker Container if a machine is licensed to run SAP ASE.
  • When installed, SAP ASE Developer Edition and Express Edition will deploy their own licenses and will run without any further action.

What should you do to run other SAP ASE editions?

An unserved license file for the machine should be generated where the container will run

Inside the container the host's network stack should be used

To the installer, the license file should be specified (or make the license file available subsequently to the container)

E.g.

1. The SAP ASE installer should be downloaded and should be extracted to the /download/sap directory, for example.
2. If required, an unserved license file for the machine should be generated and should be downloaded to the same directory as the installer.
3. A container running bash from should be created, for example, a Red Hat Enterprise Linux base image, and to make them visible from within the container the directory containing the SAP ASE installer and license file should be mounted

  • {host}> sudo docker run --net="host" -v /download/sap:/download/sap:ro -v /tmp:/tmp -v /usr/bin/tar:/usr/bin/tar -i -t --name=ASE rhel /bin/bash

4. Any required packages to the container should be added and any OS configuration required by SAP ASE should be performed.
5. ASE in the container should be installed and configured

  • {container}> /download/sap/ebf24591/setup.bin -i console
  • Once this is completed you have SAP ASE running in a Docker Container.

6. To exit from the container bash shell, CTRL-p CTRL-q should be typed by leaving the running container and later the container bash shell should be re-entered.

  • {container}> ^p^q
  • {host}> sudo docker attach ASE {container}>

How to create Docker Images containing SAP ASE?

To know whether you are allowed to create a Docker image containing SAP ASE and how the image can be used, the license agreement should be checked. By committing the Docker Container to a named image and then running new containers based on that image, this can be achieved if permitted.

E.g.

Tag its version, e.g. 16.0 SP02 PL02 after saving (commit) the container into an image, e.g. sapase.

  • {host}> sudo docker commit ASE sapase
  • {host}> sudo docker tag sapase sapase:16.0.02.02

Note all containers will try to the same network ports if the containers are created from this image. So, you will need to specify different ports, in order to run multiple containers concurrently.

  • {host}> sudo docker rm ASE
  • {host}> sudo docker run --net="host" -i -t --name=ASE sapase:16.0.02.02 /bin/bash
  • {container}> . /opt/sap/SYBASE.sh
  • {container}> startserver -f /opt/sap/ASE-16_0/install/RUN_ASE
  • {container}> ^p ^q # {i.e. CTRL-p CTRL-q}
  • {host}>

You can remove, and create a new ASE container from the sapase:16.0.02.02 image once you have finished with the existing ASE container. The new ASE container will have the same state that the original ASE container had at the time the commit was performed in step 1 above and it will look like a freshly installed container. Note that all databases and any other files that have been created will be destroyed while removing a container.

Using the same image to run multiple containers you need to:

A distinct container name (if a container name is desired) should be specified

For each SAP server in the interfaces file, a distinct network ports should be specified, e.g. for the SAP ASE (presuming it was named ASE when configured in 5. above) port 5022 should be used.

  • {host}> printf "ASE master tcp ether localhost 5022" > /usr/sap/interfaces_ASE_5022
  • {host}> sudo docker run --net="host" -i -t -v /usr/sap/interfaces_ASE_5022:/opt/sap/interfaces --name=ASE_5022 sapase:16.0.02.02 /bin/bash
  • {container}> . /opt/sap/SYBASE.sh
  • {container}> startserver -f /opt/sap/ASE-16_0/install/RUN_ASE
  • {container}> ^p ^q # {i.e. CTRL-p CTRL-q}
  • {host}>

Note that for Backup Server, XP Server, and any other servers that were configured, interfaces file entries would be required.


×