Containerized MDM provides us a number of advantages including cost and resource saving.¬† When deployed on container orchestration platforms, we can leverage high availability, auto scaling and auto healing and security as well.
In this sample we bring up deployed MDM v126.96.36.199.¬† Deployed MDM has 4 containers – MDM operational server deployed on WAS Base v 188.8.131.52, MDM database on DB2 v11.4, MDM Client applications which has client applications including Batch Processor, Kafka server and Jetty Server, and MDM UI container that has the MDM user interfaces.
A docker container should have the application and all its dependencies to function.¬† The container for MDM operational server has the WAS Base, a WAS Base Profile with MDM deployed on it and the database libraries required to connect to DB2.
Extract the zip file containing docker-compose files
The compressed file downloaded from Passport Advantage (mentioned in the Pre-requisites) has the docker-compose.yml files and a script to execute them.¬† ¬†Extract the compressed file to a folder in your box.¬† Linux and Ubuntu based operating systems are supported.
Invoke script Configure_MDM_Docker
The Configure_MDM_Docker will be available along with the extracted yml files.¬† Execute this file, accept the Licence, and bring up the docker containers corresponding to your requirement.¬†¬†
1. Execute the Configure_MDM_Docker by invoking
at the directory in which the docker-compose yaml files are present.¬† A User Interface comes up.
2. Click Continue at the License Agreement, for the system to display the License
3. Select the language in which the license has to be displayed and click OK
4. Click OK after reading the License.
5. Select Cancel at the Language selection that is displayed.
6. Select Accept at the License Agreement.
7. The list of MDM docker-compose applications are displayed.¬† Provide the option with which you want to proceed.¬† In this example, the value 8 was provided as input here.
8. A docker network and volumes will be created, docker images will be downloaded as required and the docker containers will be created and started.¬† Please notice that the docker-compose yaml used is displayed during the execution.
Logging into the MDM docker container
The docker containers can be listed using¬†
docker container ls
You can login to a docker container, for example mdm-container using
docker exec -it mdm_container bash
You can execute commands within the container similar to how it can be done in a physical machine.
The ports in the docker container are mapped to ports on the¬†host machine in which the containers are deployed.¬† So, it is possible to access the WAS Admin Console at https://<MACHINE_NAME>:9043/ibm/console¬† ¬†User Interfaces can be also be accessed from the host machine using port 39043.¬† For example: https://<MACHINE_NAME>:39443/inspector¬† Please use port 443 to access the MDM AE SE User Interface.¬† Please check the container ports and the corresponding host machine ports in the docker-compose.yml file.¬† They are available under each service in the ports section in format <HOST_MACHINE_PORT>:<CONTAINER_PORT>
In the MDM Container (mdm_container), MDM is installed at /opt/IBM/MDM and the WAS Base Profile is available at /opt/IBM/WebSphere/AppServer/profiles/AppSrv01.¬† The username and password for the WAS Admin User and MDM Admin User are mdmadmin/mdmadmin
In the DB2 Container (db2_container) switch to user db2inst1 (password: db2inst1) and connect to database MDMDB and perform¬†required¬†database related operations.¬† The database schema used is DB2INST1
Note: The database is SSL enabled and the certificate has been added to the WAS NodeDefaultTrustStore (/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/config/cells/WASHOSTCell01/nodes/WASHOSTNode01/trust.p12) which has the default password WebAS
A sample IVT invocation is displayed here:
Bringing down docker containers
You can bring down all containers that were brought up using a docker-compose.yml file using
docker-compose down -f <FILE_NAME> down -v
This will remove the docker containers, volumes and network created by the docker-compose file mentioned.
A container can be brought down using
docker stop <CONTAINER_NAME>
docker rm <CONTAINER_NAME>
Volumes and networks that are not used can be removed using
docker volume prune
docker network prune
Explore the docker-compose yaml used
Let us have an overview on the mdm-deployed.yml file used to bring up the above containers.¬† This file contains details on four services, namely the MDM Database with tables and gold data in it and a WAS Base Profile that has MDM Applications deployed in it, Client Apps container holding client applications including Batch Processor, Kafka Processor, Elastic Server, Jetty Server and Samples and the MDM User Interfaces container that has the MDM User Interfaces including Business Administration UI, Inspector, Web Reports, Enterprise Viewer and MDM AE SE User Interface.
For each service details including docker image name, port mapping between host and container, container name, host name, environment variables, networks, aliases and volumes are provided.¬†
The MDM database image has the value of flag privileged set to true as it is required to start the DB2 service.¬†
The MDM Applications container mentions that it is dependent on the container that has the MDM database.¬† It uses the hostname DB2HOST to access the MDM database container.
The ClientApps container has the hostname CLIENTAPPSHOST and exposes ports used by the client applications at the host machine.
The MDM User Interface Application with hostname WEBHOST exposes a different set of ports from the MDM operational server.
The containers become part of the network by name mdmnetwork.¬† Each container is assigned a static IP address.
Volumes are used to save the data from the container to the host.¬† It is also used to share certain key files between containers (Example: volume db2).¬† When docker-compose up is invoked, you will be able to see the volumes being created.¬† You can then check the directory /var/lib/docker/volumes in the host to check the volumes created and then go through the contents in each volume.