Install TDM Portal for Docker

From  4.7, TDM Portal functionality is available as a collection of Docker images. This functionality requires you to use the Docker software, available for Linux. For more information on the use of Docker, see https://docs.docker.com/.
tdm49
From 
Test Data Manager
 4.7, TDM Portal functionality is available as a collection of Docker images. This functionality requires you to use the Docker software, available for Linux. For more information on the use of Docker, see https://docs.docker.com/.
Docker is also available for Windows. For this implementation, we recommend the use of the 
Docker Toolbox
. For more information, see https://docs.docker.com/toolbox/toolbox_install_windows/.
Before you install TDM Portal (or any TDM components), it is necessary to install the 
gtrep
 repository (i.e. to create the database and 
gtrep
 user). For more information, see Install the Repository.
From 
Test Data Manager
 4.8, the first time you run TDM Portal in Docker, it creates the necessary tables in your 
gtrep
 repository (or upgrades these tables to the same version as TDM Portal, if they already exist).
After you upgrade 
gtrep
, you must also upgrade other product components for them to work with the repository.
Some functionality is not yet available in TDM Portal in Docker. For a full list of features that are not available, see Features not available in TDM Portal in Docker.
 
Required Elements
To use TDM Portal in Docker, you need a minimum of 3 active elements:
  • TDM Portal Docker container (docker-compose.yml 
    starts this container)
  • (
    docker-compose.yml
     starts this container) 
  • Oracle database
    TDM Portal uses the 
    gtrep
     repository for its internal operation. TDM Portal in Docker only supports Oracle databases for this repository. 
    If you cannot make an Oracle database available to your Docker network, you can Create an Oracle database container. This requires you to build the image with Oracle's Offical Docker container, and is an Advanced feature.
Optional containers
In addition, the following containers are available:
  • Use this container to:
    • Encrypt a password.
    • Generate a JWT shared secret.
    • Create a 
      gtrep
       user on your Oracle gtrep database.
    • Create sample databases on your Oracle database, from the sample databases supplied with CA TDM.
  • Use instances of this container to allow you to execute Actions from TDM Portal in Docker (one Action per container).
  • You can use these containers to mask data.
    You can also use these containers to mask data independently of TDM Portal, including masking jobs sent from a Windows installation of 
    Test Data Manager
    .
    • Message Bus Server container
      The TDM Portal service (in Windows or Docker) sends masking jobs (split into tasks) to this container, which then distributes these tasks to masking engine containers.
      Use the file 
      docker-compose-messaging.yml
       to start this container.
    • Masking engine container
      This container performs masking tasks with the Fast Data Masker engine.
      Use the file 
      docker-compose-masking.yml
       to start instances of this container.
      Use the 
      --scale
       flag to create multiple instances of this container. For more information, see Scalable masking with Docker.
This diagram shows how these containers interact with each other:
multiple actions
multiple actions
How to use Docker containers
Download Docker images
TDM Portal Docker images, and other files with which you can build your own Docker images, are available from Support. Docker images are built on Ubuntu 16.04 and Java 8u202.
For more information, see File Packages available.
Start a Docker network with docker-compose files
To start the containers necessary to use TDM Portal in Docker, we recommend that you use the 
docker-compose up
 command on a docker-compose.yml file, or multiple docker-compose.yml files. This .yml file starts each container from a Docker image, as a service on the same Docker network.
For more information on the docker-compose files available and how to use them, see Docker-compose files.
You can start all containers from a Docker image individually with the 
docker run
 command, however we recommend the use of docker-compose files. Use of the docker run command is for Advanced users.
(Optional) Build your own Docker images
We recommend that you create Docker containers from the pre-built Docker images available. However, you can build your own Docker images from TDM source files and Dockerfiles. This method is more complex than the use of pre-built images, and is for Advanced users.
For more information, see Build your own Docker images.
Add Docker containers to your Docker network with the 'docker run' command
It is only necessary to start the  while you need them, and the containers should stopped when no longer in use. They are not included in any docker-compose.yml files.
Ensure that the 
--network
 flag for any containers you run with docker run, matches the 
network
 value for your Docker network.
If you choose to use the TDM Portal Oracle database container, it is necessary to build and run this separately. This container is not included in any docker-compose.yml files.
Configuration of Docker containers
Docker creates containers from the images that you supply as entries under the 
services
 section of your docker-compose.yml file (see Docker-compose files for the sample files available). To configure these containers, define environment variables under the 
environment
 section for each container within the docker-compose.yml file, or with the -e flag in a
docker run
command.
You cannot change these environment variables while a container is active. If you make changes to variables in a docker-compose.yml file, the changes do not take effect until the next time you execute the file with the 
docker-compose up
 command.
Example:
 
This section of a docker-compose.yml file starts a TDM Portal container (as the service 
tdmweb
) on the Docker network. It defines the environment variables 
GTREP_HOST
GTREP_SERVICE_NAME
GTREP_PASSWORD
 and 
ORIENTDB_PASSWORD
:
services:
...
tdmweb
:
image:
tdm.packages.ca.com/tdm/tdmweb:<version>
hostname:
tdmweb
environment:
- 'GTREP_HOST=
database
'
- 'GTREP_SERVICE_NAME=
orcl
'
- 'GTREP_PASSWORD=
Gridt00ls
'
- 'ORIENTDB_PASSWORD=
{cry}tHpzgrvNhtVu6uHGNd9EdlAuwMR30OL0sAXhBWdgM3Md
'
...
State Persistence in Volumes
All Docker containers can be stateless - their state can persist in the external volumes you specify under a container's 
volumes
 section. If you do not specify any external volumes for a container, the container stores this data internally and it is not accessible from outside of the container.
If you do not specify external volumes for a container, and you then use a new version of the container (i.e after a patch or upgrade), the data from your first container is not available in this new container.
The use of external volumes to persist the state of a container has the following advantages:
  • You do not lose your data when you upgrade your version of 
    Test Data Manager
    .
  • You can expose JDBC drivers to your Docker network. For information on JDBC drivers you might need, see Notes on Implementation with Specific Data Sources.
  • You can expose your log files, so that they are accessible from outside of your Docker network.