Giter Site home page Giter Site logo

saptd's Introduction

TestDrive with "persistence"

This projects tries to provide an infrastructure for building docker image from SAP TestDrive appliance.

The input is un-rared Appliance content in the directory Appliance.

The outcome are 2 Docker images:

  • operating system (everything without /usr/sap, /sapmnt, /sybase)
  • SAP system (/usr/sap, /sapmnt, /sybase)

Steps

First you need to build the base OS image:

sudo docker build -t sap_td_os -f Dockerfile.os .

Then you create volumes:

sudo docker volume create sap_td_usrsap
sudo docker volume create sap_td_sapmnt
sudo docker volume create sap_td_sybase

Then you start a container where you can install TD:

sudo docker run -d -m 4g \
    -v Appliance:/opt/sap/td/appliance:ro \
    -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
    -v sap_td_usrsap:/usr/sap \
    -v sap_td_sapmnt:/sapmnt \
    -v sap_td_sybase:/sybase \
    --privileged \
    --hostname vhcalnplci \
    --name sap_td_os_installer \
    sap_td_os

When started you can proceed with the installation:

sudo docker exec -it ${image}_installer /usr/local/bin/test_drive_install \
         --password "P@\$\$w0rd" \
         --accept-SAP-developer-license

And after successful installation you commit the changes:

sudo docker commit sap_td_os_installer sap_td_os

Finally, you create a pure data image from the volumes:

sudo docker build -t sap_td_system -f Dockerfile.sap \
         -v /bin:/bin:ro \
         -v /usr/bin:/usr/bin:ro \
         -v /lib64:/lib64:ro \
         -v /usr/lib64:/usr/lib64:ro \
         -v /lib:/lib:ro \
         -v /usr/lib:/usr/lib:ro \
         -v sap_td_usrsap:/opt/sap/usr/sap:ro \
         -v sap_td_sapmnt:/opt/sap/sapmnt:ro \
         -v sap_td_sybase:/opt/sap/sybase:ro \
         .

Now you have 2 docker images:

  • sap_td_os
  • sap_td_system

You need to distribute both. This layout has the benefit that whenever you need to update OS you rebuild only the image sap_td_os.

Deployment is a bit tricky because you must not start a container from the image sap_td_system but you have to create its filesystem.

sudo docker create --name sap_td_system_data sap_td_system

And then you can use its volumes to start the OS container:

sudo docker run -d --
    -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
    -volumes-from sap_td_system_data \
    --privileged \
    --hostname vhcalnplci \
    --name myabap \
    sap_td_os

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.