Customizing the containerized deployment

SpecifiesProduct Master Kubernetes or Red Hat® OpenShift® deployment can be customized according to your requirement.

Fix Pack 7 and later
Following is the list of customizable pods,
  • productmaster-admin
  • productmaster-fts-indexer
  • productmaster-fts-pim
  • productmaster-gds
  • productmaster-ml
  • productmaster-personaui
  • productmaster-restapi
  • productmaster-sch
  • productmaster-wfl
With this release, for fresh installation, you do not need to create a custom image but can use default image for customization. During deployment process, fixed set of directories get created and you need to copy your modified (custom) files to the specific directories listed in the Pods and configuration files mapping table.
Important: You should not update Endpoints URL, ports,username, password, and context paths in the ConfigMaps and XML files.
  1. Configure custom files.
    Start the images to create following folders, script files, and template (creates backup files of latest changes, which can be used for reference) in the -/opt/MDM/public_html/customization folder inside pods.
    +-- config-files
    +-- top-jars
    +-- custom-jars  
    +-- user-scripts
    +-- ml-training
    +-- user-files
    +-- restapi
    	+-- jars
    	+-- classes
    +-- persona-ui
    Copy the required .template extension file, create a new file without .template extension, and then update the file as required. The changes get picked with the next deployment or upgrade. The customization folder is shared among the customizable pods. Any update to the folders on a pod becomes available to the remaining pods. Once the pods are up with new updated version, the deployment script copies the latest copy of the file from the original location as .template in the customization folder. You should compare your previous version file with new version .template file and if there is a change, update the file.
    Note: You can use kubectl or oc client for copying your files and taking backup.
    config-files
    Copy configurable files (XML). The application creates .template files for reference and you need to edit the files. For more information, see Pods and configuration files mapping table.
    Note: Do not change the log directory path in the log4j2.xml files.
    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.txt file.
    user-scripts
    There is a blank pre-config.sh and post-config.sh per customizable pod. Pre-configuration or post-configuration (Any processing before or after running the configureEnv.sh file) through the <service-name>_pre-config.sh and <service-name>_post-config.sh scripts. For any processing after the installation but before service starts, copy the script to this folder. If you want, you can use pre-config.sh and post-config.sh of a specific pod for further customization.
    ml-training
    Not currently used.
    user-files
    Copy all the admin service-related JS, JSP, CSS, and redirectBusinessUI.js files that need to be copied to the public_html/users folder.
    restapi
    jars - Copy custom jars.
    classes - Copy custom classes with the package structure.
    Example
    /opt/MDM/public_html/customization/restapi/classes/com/ibm/rs/custom/api/CustomController.class
    persona-ui
    Copy PNG, ICO, CSS, JSON (config.json and mdmce-roles.json), and chunk files.
    Table 1. Pods and configuration files mapping
    Pods File name Use name
    admin, pimcollector, gds, scheduler, workflow flow-config.xml flow-config.xml

    admin, pimcollector, gds, restapi, scheduler, workflow

    log_cbe.xml log_cbe.xml
    log_cbe_pattern.xml log_cbe_pattern.xml
    data_entry_properties.xml data_entry_properties.xml
    mdm-ehcache-config.xml mdm-ehcache-config.xml
    log4j2.xml admin_log4j2.xml
    history_subscriptions.xml history_subscriptions.xml
    admin_properties.xml admin_properties.xml
    docstore_mount.xml docstore_mount.xml
    admin server.xml admin_server.xml
    indexer log4j2.xml indexer_log4j2.xml
    pimcollector log4j2.xml pim_log4j2.xml
    ml machinelearning.ini machinelearning.ini
    restapi log4j2.xml rest_log4j2.xml
    mdm-rest-cache-config.xml mdm-rest-cache-config.xml
    server.xml restapi_server.xml
    personaui server.xml personaui_server.xml
  2. Update properties files.
    The values in the following properties files are updated through ConfigMaps for each customizable pod.
    File ConfigMap Add prefix to the key Applicable to services
    common.properties productmaster-custom-common common_ admin, pimcollector, gds, restapi,scheduler, workflow

    mdm-cache-config.properties

    productmaster-custom-mdmcacheconfig cacheconfig_

    dam.properties

    productmaster-custom-dam dam_ admin, restapi, scheduler, workflow

    damConfig.properties

    productmaster-custom-damconfig damconfig_ restapi

    restConfig.properties

    productmaster-custom-restconfig restconfig_
    application.properties productmaster-custom-applicationindexer appindexer_ indexer
    application.properties productmaster-custom-applicationpimcollector apppimcollector_ pimcollector

    You need to update the data section of the ConfigMap. The updated value from the ConfigMap takes effect after pods are deleted by setting the replica count to zero (CR file) and then reverting the replica count to original value.

    To access ConfigMaps, use the following command.
    Note: You can use kubectl or oc client for accessing ConfigMaps.
    oc get cm
    To edit a ConfigMap, use the following command:
    oc edit cm <ConfigMap name>
    Example
    oc edit cm productmaster-custom-common
    Example
    # Please edit the object below. Lines beginning with a '#' will be ignored,
    # and an empty file will abort the edit. If an error occurs while saving this file will be
    # reopened with the relevant failures.
    # Make sure prefixes need to be added before key based upon above table 
    # NOTE: Please add prefix- 'common_' before each key as given in table 
    # If key name is examplekey then key should be named as given below
    # common_examplekey: somevalue  
    apiVersion: v1
    data:
     common_blob.min.size: "50020"
      common_enable_referer_check: "false"
      common_enable_xframe_header: "true"
      common_xframe_header_option: ALLOWALL
    kind: ConfigMap
    metadata:
      creationTimestamp: "2022-10-07T06:27:52Z"
      name: productmaster-custom-common
      namespace: productmaster
      ownerReferences:
      - apiVersion: productmaster.ibm.com/v1
        kind: ProductMaster
        name: productmaster
        uid: a282bcb4-3ee3-4a74-a753-2d043186886d
      resourceVersion: "50158847"
      uid: 8ec2e8c5-705f-4c18-a224-642f401d4e37