Customizing the containerized deployment (Fix Pack 3 and later)

Product Master images can be customized with custom tabs and extensions.

Fix Pack 3 and later

Most of the customization requires additional JAR files and JSP files, with modification to the data_entry_properties.xml, flow-config.xml, and the common.properties configuration files. Product Master application runs with user default UID 5000 and group 0. Ensure that you use appropriate user while customizing the docker images. Following is the automation process to place the custom JAR files in the $TOP folder or configure additional dependencies by using the jars-custom.txt file. The JAR files get added to the Product Master class path.

+-- top-jars
+-- custom-jars  
+-- Dockerfile
+-- public_html
¦   +-- user
+-- user-scripts
top-jars
Copy the jar files to this directory. These jars are added in the $TOP folder.
custom-jars
Copy the jar files to this folder if you want to add them through the jars-custom file.
user-scripts
Pre-configuration or Post-configuration (Any processing before or after the configureEnv.sh file) through pre-config.sh or post-config.sh scripts. For any processing that happens after the installation but before starting the service, copy the script to this folder.
public_html/user
Any other files that need to be copied into image.
Sample Dockerfile to update the Admin UI image
FROM ipm-admin-ubi8:12.0.x
USER root
RUN mkdir -p /home/default/user-scripts; \
mkdir -p /home/default/custom-jars; \
mkdir -p /home/default/files
COPY user-scripts/*.sh /home/default/user-scripts/
COPY custom-jars/*.jar /home/default/custom-jars/
COPY etc/default/flow-config.xml /home/default/files/
COPY etc/default/data_entry_properties.xml /home/default/files/
COPY public_html/user/* /home/default/files/
RUN chmod 755 /home/default/user-scripts/*.sh; \
chown 5000.0 /home/default/ -R;
USER 5000
WORKDIR /home/default
ENTRYPOINT ["./cmd.sh"]

Additional configuration is required, for custom tabs and entry preview functions that involve interaction between the UI elements in the Admin UI and the Persona-based UIs. You can perform the configuration by using the post-config.sh script. When the container is initialized, the post-config.sh script runs and updates the configuration. In the following example, an entry preview script is configured to open a new results window.

Sample Dockerfile
FROM ipm-restapi-ubi8:12.0.x
USER root
RUN mkdir -p /home/default/user-scripts; \
mkdir -p /home/default/custom-jars; \
mkdir -p /home/default/files
COPY user-scripts/*.sh /home/default/user-scripts/
COPY custom-jars/*.jar /home/default/custom-jars/
COPY etc/default/flow-config.xml /home/default/files/
COPY etc/default/data_entry_properties.xml /home/default/files/
COPY public_html/user/* /home/default/files/
RUN chmod 755 /home/default/user-scripts/*.sh; \
chown 5000.0 /home/default/ -R;
USER 5000
WORKDIR /home/default
ENTRYPOINT ["./cmd.sh"]
Sample post-config.sh script
#!/bin/sh
echo "Starting post-config.sh script....."
cp -f /home/default/files/flow-config.xml /opt/MDM/etc/default/
cp -f /home/default/files/data_entry_properties.xml /opt/MDM/etc/default/
cp -f /home/default/files/CustomAction.jsp /opt/MDM/public_html/user/CustomAction.jsp
cp -f /home/default/files/SamplePage.jsp /opt/MDM/public_html/user/SamplePage.jsp
cp -f /home/default/files/systemTab.css /opt/MDM/public_html/user/systemTab.css
sed -i "s/^xframe_header_option=.*/xframe_header_option=ALLOWALL/g" /opt/MDM/etc/default/common.properties
To display the results, perform the following additional configuration:
  • Setting the value of the xframe_header_option=ALLOWALL for both the ipm-admin and the ipm-restapi containers in the common.properties property.
  • Initializing the ipm-persona container by configuring the Admin UI port by using the MDM_APP_SVR_PORT argument.
Similarly, the pre-config.sh file can be used to customize application. The script runs before the configureEnv.sh file runs when the container is initialized. In the following example, Angular-based entry preview, custom tool, and custom tab scripts are added. Configuration for custom REST APIs can be added similarly in the ipm-restapi-ubi8:12.0.x image.
Sample Dockerfile
FROM ipm-personaui-ubi8:12.0.x
USER root
RUN mkdir -p /home/default/user-scripts; \
mkdir -p /home/default/custom-jars; \
mkdir -p /home/default/files;\
mkdir -p /home/default/files/personaCustomTabsLibrary.chunk;\
mkdir -p /home/default/files/classes/
COPY user-scripts/*.sh /home/default/user-scripts/
COPY angular-custom-code/*.json /home/default/files/
COPY angular-custom-code/*.js /home/default/files/personaCustomTabsLibrary.chunk/
COPY rest-custom-code/*.class /home/default/files/classes/
RUN chmod 755 /home/default/user-scripts/*.sh; \
chown 5000.0 /home/default/ -R;
USER 5000
WORKDIR /home/default
ENTRYPOINT ["./cmd.sh"]
Sample pre-config.sh script
#!/bin/sh
echo "Starting pre-config.sh script....."
cp -ar /home/default/files/redirectBusinessUI.js /opt/MDM/public_html/user/redirectBusinessUI.js
cp -ar /home/default/files/preview-script.json /opt/MDM/mdmui/custom/ui/json/preview-script.json
cp -ar /home/default/files/persona-custom-tabs.json /opt/MDM/mdmui/custom/ui/json/persona-custom-tabs.json
cp -ar /home/default/files/persona-custom-tools.json /opt/MDM/mdmui/custom/ui/json/persona-custom-tools.json
cp -ar /home/default/files/personaCustomTabsLibrary.chunk/personaCustomTabsLibrary.bundle.js /opt/MDM/mdmui/custom/ui/js/personaCustomTabsLibrary.bundle.js
cp -ar /home/default/files/personaCustomTabsLibrary.chunk/personaCustomToolsLibrary.bundle.js /opt/MDM/mdmui/custom/ui/js/personaCustomToolsLibrary.bundle.js
cp -ar /home/default/files/personaCustomTabsLibrary.chunk/previewScriptLibrary.bundle.js /opt/MDM/mdmui/custom/ui/js/previewScriptLibrary.bundle.js
cp -ar /home/default/files/classes /opt/MDM/mdmui/custom/api/