Install Docker and Docker Compose
MDM uses Docker for containerization.¬† MDM docker images corresponding to applications, database, ISC and Workbench are available in installable and deployed formats in Passport Advantage.¬† Docker containers can be created using these images.
Docker Compose is used when multiple containers are involved to create the MDM instance.
Details on installing Docker and Docker Compose are available at https://docs.docker.com¬† We will have an overview on how to install them on RHEL here.
Issue the below commands to install Docker on RHEL
sudo yum install -y yum-utils \
sudo yum-config-manager \
sudo yum install docker-ce
sudo systemctl start docker
sudo docker run hello-world
Install Docker Compose:
Issue the below commands to install Docker Compose on RHEL.
sudo curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
Install WebSphere Application Server Base v220.127.116.11 on Host and create a Profile
We need to install the IBM Installation Manager, WebSphere Application Server Base Edition v18.104.22.168 and create a Profile in WAS.
1. Download installables related to IBM Installation Manager, WebSphere Application Server Base v9.0 WebSphere Application Server Base Fix Pack v22.214.171.124 and Java JDK v8 from Passport Advantage and extract them to separate folders, in this sample the above mentioned artifacts are extracted to folders /root/installables/IM, /root/installables/WAS/WAS9, /root/installables/WAS/FP, /root/installables/WAS/Java respectively.
2. The below commands enable you to install the Installation Manager at location /opt/IBM/InstallationManager and store the logs at /var/ibm/InstallationManager¬†
./installc -acceptLicense -accessRights nonAdmin -installationDirectory “/opt/IBM/InstallationManager” -dataLocation “/var/ibm/InstallationManager” -showProgress
3. Using the below command you can install WebSphere Application Server Base v126.96.36.199 and JDK v8 at /opt/IBM/WebSphere/AppServer location.¬† Please do not change the installation directory for WebSphere Application Server Base as we need to have it at the same location in which it is installed in the Docker image corresponding to MDM.
/opt/IBM/InstallationManager/eclipse/tools/imcl -showProgress -acceptLicense install com.ibm.websphere.BASE.v90_188.8.131.5280530_1827 com.ibm.java.jdk.v8 -repositories /root/installables/WAS/WAS9/repository.config,/root/installables/WAS/WASFP/repository.config,/root/installables/WAS/Java/repository.config -installationDirectory /opt/IBM/WebSphere/AppServer -preferences¬† com.ibm.cic.common.core.preferences.preserveDownloadedArtifacts=false
4. Add the <WAS_HOME>/bin folder to the PATH.
5. Set the Java SDK v8 as the SDK to be used with the Profiles created on the WAS instance.
managesdk.sh -setCommandDefault -sdkname 8.0_64
managesdk.sh -setNewProfileDefault -sdkname 8.0_64
6. The Docker image has the host name set to MDMHOST.¬† The WAS Profile in it is created with this Host Name.¬† Since the WAS Profile in this host should match the one in the Docker, add an entry to the /etc/hosts file indicating that the host has a name MDMHOST before creating the WAS Profile.
echo ‘127.0.0.1 MDMHOST’ >> /etc/hosts
7. Create the WAS Profile with the below command.¬† Provide the values for node name and cell name as WASHOSTNode01 and WASHOSTCell01 respectively in order to mimic the WAS Profile in the Docker image.
manageprofiles.sh -create -templatePath /opt/IBM/WebSphere/AppServer/profileTemplates/default -nodeName WASHOSTNode01 -cellName WASHOSTCell01 -hostName MDMHOST -enableAdminSecurity true -adminUserName <WAS_ADMIN_USER> -adminPassword¬†<WAS_ADMIN_PASSWORD>
8. Start the server, perform required security configurations and stop the server.¬†
NOTE: The server has to be in Stopped state when the command docker-compose up is issued.
Download the required images
Download the required MDM docker image and the yml files from Passport Advantage. The primary yml file that we will be using in this sample is mdm-installable-remote-was-profile.yml
This yml file lists installable MDM DB and installable MDM as Services.¬† The volume mapping
enables us to use the custom WAS Profile created and configured at the host.¬† Here, the first directory corresponds to the directory in the host and the second directory corresponds to the directory in the container.¬† When the container starts up, if the directory (mentioned in volumes) in the host has data in it, the corresponding directory in the container gets overwritten with the data from the host.¬† This way we can ensure that the custom security and others configurations that we have performed in the WAS Profile at the host gets reflected at the container.
You can alter the yml file based on your needs.¬† For example,
1. In case you want to use a custom database that is available On Premise (with or without MDM gold data), you could remove the service mdmdb2v11 and related details from this file.¬†
2. In case you want to use the Stewardship Center and leverage the Statistics collection through Kafka and make it point to a custom database, you could add services mdmisc (installable-mdmisc), kafka(deployed-kafka) and bpmdb(deployed-bpmdb) which are available in mdm-installable-remotedb-isc.yml to the list of services in this file.¬† In this case, you need to perform certain configurations related to BPM and ISC after completion of execution of the shell script Configure_MDM_Interactive.sh¬†
3. In case you want to install database on the same docker network, you can use the yml file as is.¬† When you want to add the the Stewardship Center and leverage the Statistics collection through Kafka and make it point to the database in the same docker network, you could add services mdmisc (deployed-mdmisc), kafka(deployed-kafka) and bpmdb(deployed-bpmdb) which are available in mdm-deployed-isc.yml to this file.
After downloading the required docker images, uploade each image to the docker repository using
docker load < <FILE>
Issue the below commands to list and confirm the presence of the docker images:
Accept License to use InfoSphere MDM v11.6 Feature Pack 7
The environment variable ACCEPT_LICENSE is present in the wasmdm service in the docker compose yml file.¬† The value of this variable has to be set to “YES” to get MDM up and running.¬†¬† Edit the docker-compose.yml file and set the value of enviroment variable ACCEPT_LICENSE to ‚ÄúYES‚ÄĚ before invoking docker compose
The MDM License files are available for perusal under <MDM_INSTALL_DIR>/MDMLicense folder in the MDM container.¬† You can also find it at /var/lib/docker/volumes/<FOLDER>_MDMLicense after the container starts up as it is declared as a volume.
Ensure that the custom WAS Profile created is in Stopped state before issuing the below command.
To bring up the docker network using the configuration mentioned in the yml file, issue the below command in the directory that holds the yml file:
COMPOSE_HTTP_TIMEOUT=200 docker-compose -f mdm-installable-remote-was-profile.yml up
Note that it is advised to set the value of COMPOSE_HTTP_TIMEOUT which is an environment variable corresponding to Docker Compose to 200.
When this command is executed, the network, volumes and container are created.¬† The WebSphere Application Server Profile directory (/opt/IBM/WebSphere/AppServer/profiles/AppSrv01) on the container gets overwritten with the contents from the corresponding directory on the host.¬† The server is started and other operations are performed based on the services mentioned in the mdm-installable-remote-was-profile.yml file.
Deploy MDM: Execute Configure_MDM_Interactive.sh from the /tmp directory in the container
The container created has MDM extracted under folder /opt/IBM/MDM.¬† The WAS Profile folder at /opt/IBM/WebSphere/AppServer/profiles/AppSrv01 is copied from the corresponding folder in the host.¬† MDM has to be deployed on the WAS Base Profile and a database.¬† This can be performed by executing the script Configure_MDM_Interactive.sh which is available in folder /tmp in the container.¬† The container gives you the flexibility to point to a remote database. In order to point to a custom database, provide value for the below prompt as n during execution of the script.
Are you using the provided Docker db2 container for this MDM instance? [Valid options: y,n]
When you plan to deploy on a remote database details on the database host, port, name, user, schema, password and tablespace names have to be provided as values to a script /tmp/Configure_MDM_Interactive.sh that enables MDM deployment¬† The container also provides options to select a specific industry type, trigger type, time zone, usage of Kafka for enabling Publisher and Functional Dashboard, usage of WMQ for messaging and the user interfaces to be deployed.¬† These values are also taken as inputs by the above mentioned script.
Steps to deploy MDM by executing the script /tmp/Configure_MDM_Interactive.sh are detailed below:
1. Use the below command to obtain details on the docker container corresponding to Installable MDM
docker container ls
2. Login to the container using:
docker exec -it <CONTAINER_NAME> /bin/bash
3. Go to folder /tmp and execute ./Configure_MDM_Interactive.sh
This script requests for values for the below mentioned properties and will then execute the target that deploys MDM.
- Application Language for MDM
- Code Tables Language(s) for MDM
- Industry Type
- Trigger Type
- Multi Time Zone Enablement
- Time Zone
- Usage of database that is in the docker network, details on whether the database already populated with MDM gold data, Database Host, Database Port, Database Name, Database User, Database Schema,¬†SSL enablement for database, if the database is SSL enabled, SSL version is obtained from the user are obtained when a remote database is selected
- Matching Engine to be used
- Tablespace names corresponding to temporary, small virtual tables, normal virtual tables, large virtual tables, XML & CLOB tables, indexes, PME tables and PME indexes
- Detail on whether the database is configured with CODEUNITS32
- Detail on Kafka enablement. If Kafka is selected for enablement, inputs related to Kafka and Zookeeper are obtained
Messaging type – WEM or WMQ When a user opts for WMQ details on WMQ Host, Port, Queue Name, Channel Name, User and Password are obtained as inputs
- Option to install Business Admin, Inspector, Enterprise Viewer and Web Reports User Interfaces
Note: Incase the WAS Administrator user and the MDM Administrator user are different, edit the mdm_install.properties file in /opt/IBM/MDM/properties folder and set the value for property user.was.admin.user to the MDM Administrator user and the values for properties user.was.user, user.was.user.ba, user.was.user.inspector and user.was.user.ev and user.was.user.wb to the WAS Administrator user.
Verify the instance
After completion of execution of the script, go to directory /opt/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps in the host machine.¬† You should be able to find the MDM applications here.¬† Similarly all other MDM related configuration will be available under the WAS_PROFILE_DIR in the host.
Login to the container and check the responses from the Installation Verification Test at locations /opt/IBM/MDM/IVT/testCases/xml/response and /opt/IBM/MDM/IVT/testCases/xml_virtual/response folders.
Incase you have opted to install user interfaces, you could login to them and ensure that they are working as executed.¬† The below links to the user interfaces after replacing <HOSTNAME> with the name of the machine in which the MDM image is containerized.
Sample Docker commands
The below commands may be required during the learning process:
docker container ls
docker exec -it <CONTAINER> /bin/bash
docker container stop <CONTAINER>
docker container rm <CONTAINER>
docker volume prune
docker network prune
docker rmi <IMAGE>
Use docker-compose down only when you do not want to use the MDM container any more as the docker-compose down command stops and removes the MDM container.
This command can be used as
docker-compose -f mdm-installable-remote-was-profile.yml down