Posts

Showing posts from September, 2019

Reduce the size of customized MDM docker image using multi-stage builds

The MDM container has Installation Manager, WAS Base, a Profile, MDM and certain utilities such as DB drivers to connect to the database in it.   For the MDM container to function, it is sufficient if the WAS Base installation along with the profile and the database driver(s) are available in the container.  In addition, we can have the IVT folder under MDM to enable us to confirm that the product is functional.  Incase the Business Administration UI is part of the container, certain jars under a folder in MDM also need to be included.   We can reduce the size of the runtime image that can be used in container orchestration systems like Kubernetes and OpenShift, by creating a new image having only the required files and folders.  To achieve this, we can use Docker multi-stage builds. Below is a sample script: FROM <CUSTOMIZED_MDM_IMAGE> AS MDM FROM  us.icr.io/mdmaese/ubuntu-18.0.4-ossc ENV JAVA_HOME=/opt/IBM/WebSphere/A...

Creating MDM image from docker container to deploy on OpenShift ?

To create a docker image for MDM, that can be deployed on OpenShift or Kubernetes, we create a docker container by selecting MDM Installable docker compose option.  This container has WebSphere Application Server Base installed, a WAS Base Profile created and MDM extracted using Installation Manager.  We execute the Configure_MDM_Interactive.sh script in the /tmp folder to configure database and deploy MDM applications on the WAS Profile. The default user in this mdm_container is ws9admin.  The ws9admin user is the owner of all the files and folders under the WAS home directory.   Volumes are used in the docker compose file mdm-installable-remotedb.yml - the file that used to bring up the Installable MDM container.  When a directory within the docker container is mapped as a volume to a folder in the host machine, there is an issue noticed with the owner such folders, when the docker container is committed as an image and a new container is created fro...