Master Data Management (MDM)

Adding a custom CBA to MDM container using scripts

By CHITRA ANANTHANARAYANAN posted Sat March 14, 2020 12:58 PM

In this article, let us see how we can add a custom CBAs to a deployed MDM docker container from the host machine using scripts.

Custom docker-compose file for MDM
In this sample, we have an MDM container that has been configured to use a remote database and WMQ.   A docker image has been created from this container, by committing and pushing this container into the local docker registry. The image is then used in a custom docker-compose file. 

Custom Docker Compose YAML
The mdm-custom.yml is a docker-compose file that has a container corresponding to the custom image mdmosfp10:v2 

Note that the commands demonstrated can also be used with the containers provided with the mdm-deployed.yaml file.

Bringing up the docker-compose yml file
We have to bring up the containers in the docker compose file by using the docker-compose up command.

docker-compose up
Scripts to add CBAs to MDM operational server
Meanwhile let us have a look into the scripts that will help us in adding custom CBAs.  Download and extract the files to a folder.  This compressed file has four files namely, and   
Add CBA Scripts
In the sample above, we noticed two CBAs that will be added as extension to MDM EBA.

Check Application Server Status
Before executing the script to add the custom CBA to the EBA, we need to ensure that the WebSphere Application Server in the docker container is running.  This can be checked by viewing the logs corresponding to the container.  An alternative is to login to the container and execute ./ from $WAS_PROFILE_DIR/bin
Check Server Status

We can then execute the shell script  On the host machine with has the MDM docker container, the scripts, and have to be placed in the same folder.  Any custom CBAs that have to be deployed also have to be placed in the same folder.  The script that has to be executed takes in two parameters, the MDM Instance Id and the WAS admin password.  In case you are using the mdm_container from mdm-deployed.yaml, the MDM Instance Id is E001 and the WAS admin password is mdmadmin. 

Script Execution
The script copies the CBAs to $WAS_PROFILE_HOME/CustomCBA in the container and copies the files and to $WAS_PROFILE_DIR/bin.  It then executes at $WAS_PROFILE_DIR/bin

In case you provided a different container name corresponding the MDM image, you can pass in the container name as the third parameter.  

Check the extensions in WAS Admin Console
You can confirm whether the CBA is added and whether it is added as an Extension to the CBA from the WAS Admin Console.  The WAS Admin Console is accessible at port 9043 of the host machine.
WAS Internal Bundle Repository

WAS Extensions for Composition Unit
This container can then be committed and pushed to a docker registry for use in other environments including container orchestration platforms like Kubernetes and OpenShift.



Tue June 02, 2020 01:24 PM

Hi Ian,
Our plan is to use a single MDM image with all other customizations to it, and adding the CBAs to the container when it starts up.  So the scripts in this article have to go to <WAS_PROFILE_DIR>/bin and have to be invoked by the container startup script (COMMAND), such that the CBAs function once the container is started.
I agree that even with this approach (along with SQL execution), there is a possibility that MDM services may not be available, however, the duration will be very short, upto few minutes.  We are planning to use Rolling Updates so that the Services are available.
Thank you.

Fri April 10, 2020 06:25 AM

presume when you need to deploy a new version of the CBA(s), you need to create a new container and add this to the registry?

how does this affect a production environment? presume this would be done over a planned maintenance window since it probably also involves SQL updates to the database....

basically, does docker help with the CBA architecture of MDM customisation, or hinder it? or make effectively no difference compared to standard deployment architecture?