Discussion:
TDI on Container
(too old to reply)
t***@gmail.com
2018-06-25 10:54:20 UTC
Permalink
Hi

I am planning to deploy the TDI on container, if any of your worked on this, please share some documents or any available link.

Thanks in advance.
s***@gmail.com
2018-06-26 13:19:27 UTC
Permalink
Post by t***@gmail.com
Hi
I am planning to deploy the TDI on container, if any of your worked on this, please share some documents or any available link.
Thanks in advance.
Below is partially from some work I did years ago combined with some off the top of my head. I haven't tested everything I write here but it should at least give you a good start.

1. Using your TDI installation directory create a Dockerfile where you build a docker image using ibmcom/ibmjava. It's important to use ibmjava since it contains ibm specific lib/ext jars that you won't find in other java docker images.

This example assumes "tdi" is a tdi installation directory (and "/tdi" is the target directory in the docker container.

Be sure to clean logfiles and other runtime stuff to avoid polluting the image with old stuff.

You should also tweak the solution.properties file in the directory to enable/disable any ports or services depending on your need (e.g. api.remote.on=false if you won't be using remote RMI into the container).


Sample docker file:

FROM ibmcom/ibmjava
COPY tdi /tdi
WORKDIR /tdi
CMD java -classpath /tdi/IDILoader.jar -Dlog4j.configuration=file:etc/log4j.properties com.ibm.di.loader.ServerLauncher -d

2. Build the image - replace <image name> with whatever you like

$ docker build -t <image name> .


2. If you have your config files in the configs directory you should be able to run the container asis or by tweaking the CMD command line params.


3. You can also take advantage of volumes to link local directories to container directories as in:

$ docker run -v ./configs:/tdi/config <image name>

Then you can swap out the configs directory in the container to run different tdi solutions.

Also if you are going to use any remote services in TDI from the outside you
need to provide the port mapping. e.g.

$ docker run -v ./configs:/tdi/config -p 1099:1099 <image name>

Cheers

Loading...