You need to perform extra configuration for Product Master docker images to work with an Oracle
Server.
Before you begin
- Download the appropriate client libraries for your Oracle Database from the Instant Client Downloads for Linux x86-64 (64-bit) website:
- instantclient-basic-linux.x64-x.x.x.x.x.zip
- instantclient-sqlplus-linux.x64-x.x.x.x.x.zip
- Note the name of folder that is created after you extract the package. The folder name is
required during docker image build process.
- Create a copy of the ipm-sch-orcl.tar.gz and then extract the
package. The package contains a sample Dockerfile that can be used to patch the
ipm-sch:12.0.0.<fp> image for the Oracle client
binaries.
- Copy the following JAR files to the respective locations and delete the placeholder
files.
| JAR file |
Location |
| ojdbc6.jar |
oraclejars/jdbc/lib |
| xmlparserv2.jar |
oraclejars/lib |
| xdb.jar |
oraclejars/rdbms/jlib |
Note: This topic assumes that the Oracle Database is configured with Product Master schema and a company is
provisioned.
Procedure
Proceed as follows to configure the Product Master for creating docker
images:
-
Set up a local HTTPD service for the Oracle Database client binaries. Following is a sample
Dockerfile to configure and run HTTPD service:
-
Using the sample Dockerfile, create a Dockerfile and a directory.
-
Build the docker image to configure HTTPD to port 80 using the following command:
-
Start the HTTPD container by using the following command:
docker container run -d -t -p 8080:80 --rm --name websvr -v
/mnt/dockervol1/install/:/usr/local/apache2/htdocs/ web
Where,
/mnt/dockervol1/install contains the Oracle
Database client binary files.
-
Copy the directories that you create in the preceding 3 and 4 steps of the
Before you begin section.
-
Build the docker images for each Product Master service. Following is a sample Dockerfile with emphasis on sections that required updates:
FROM <MDM-svc-base-image>:<TAG>
ARG ORCL_CLIENT_DIR_NAME
ENV MDM_ORACLE_CLIENT_DIR=${ORCL_CLIENT_DIR_NAME:-"instantclient_x_x"}
USER root
RUN mkdir -p /home/oracle; \
wget -O /opt/MDM/instantclient-basic-linux.x64-x.x.x.x.x.zip
http://<server-running-httpd-service>:<httpd-port>/instantclient-basiclinux.
x64-12.1.0.2.0.zip; \
unzip /opt/MDM/instantclient-basic-linux.x64-x.x.x.x.x.zip -d /home/oracle/; \
wget -O /opt/MDM/instantclient-sqlplus-linux.x64-x.x.x.x.x.zip
http://<server-running-httpd-service>:<httpd-port>/instantclient-sqlpluslinux.
x64-12.1.0.2.0.zip; \
unzip /opt/MDM/instantclient-sqlplus-linux.x64-x.x.x.x.x.zip -d /home/oracle/; \
mkdir -p /home/oracle/$MDM_ORACLE_CLIENT_DIR/network/admin; \
# Clean up unwanted files
rm -rf /opt/MDM/instantclient-basic-linux.x64-x.x.x.x.x.zip;\
rm -rf /opt/MDM/instantclient-sqlplus-linux.x64-x.x.x.x.x.zip
COPY ./tnsnames.ora /home/oracle/$MDM_ORACLE_CLIENT_DIR/network/admin
COPY ./oraclejars/ /home/oracle/$MDM_ORACLE_CLIENT_DIR/
RUN chown svcuser:svcgroup /opt/mdmlogs -R; \
chown svcuser:svcgroup /opt/MDM -R; \
chown svcuser:svcgroup /home/svcuser/ -R; \
chown svcuser:svcgroup /home/oracle -R
USER svcuser
WORKDIR /home/svcuser
ENTRYPOINT ["./cmd.sh"]
Where,
- <MDM-svc-base-image>:<TAG> - Specify the image name and tag to update
the image. To update the ipm-admin image specify
ipm-admin:12.0.0.<fp>.
- <server-running-httpd-service>:<httpd-port> and
<server-running-httpd-service>:<httpd-port> - Specify the IP of the server
and port details of the HTTPD service where you have copied the Oracle Database client
binaries.
svcuser
name is replaced by'was
if you are customizing ipm-admin-ubi7 or
ipm-persona-ubi7 image.
-
Run the following command to build the image:
docker build --build-arg<ORCL_CLIENT_DIR_NAME>=instantclient_x_x -t ipm-admin-orcl:11.6.0.<fp>
-
Repeat the preceding 5, 6, and 7
steps for each Product Master docker image.
-
Run the following command to start the Docker container:
docker container run -t -d --rm -e NODE_TYPE=PRIMARY -e DB_HOST=x.x.x.x
-e MDM_DB_TYPE=oracle -e MDM_DB_NAME=database2 -e DB_USER_NAME=dev -e DB_PASSWORD=dev -e DB_PORT=1521
-e MDM_APP_SVR_PORT=7707 -e MDM_APPSVR_MEMORY_FLAG="-Xmx2048m -Xms256m" -e MDM_EVENTPROCESSOR_MEMORY_FLAG="-Xmx128m -Xms48m"
-e MDM_QUEUEMANAGER_MEMORY_FLAG="-Xmx128m -Xms48m" -e MDM_ADMIN_MEMORY_FLAG="-Xmx128m -Xms48m" -e ENABLE_VENDOR=1
-e ENABLE_DAM=1 -e MONGODB_IP=x.x.x.x -e MONGODB_PORT=27017 -e ENABLE_FTS=1 -e ENABLE_ML=1 -e ML_HOST=x.x.x.x
-e ML_PORT=5000 -e MONGODB_DATABASE=mgdb -e MONGODB_USERNAME=mluser -e MONGODB_PASSWORD=mluser -p 7507:7507
-p 9060:9060 -p 9444:9444 --network=mdm-network --name=<container_name>-container -v /mnt/dockervol1/<log file location> x.x.x.x:5000/<container_name>:12.0.0<fp>
Where,
- - t means allocate a pseudo-TTY
- - d means run container in the background and print container ID
- - rm means automatically remove the container when it exits
- - e means set environment variables
- - p means publish a container’s port to the host
- --network means connect a container to the network
- <log file location> means the log file location that could be any of the
following depending upon the container:
- Admin UI -
mdmappsvr_logs:/opt/mdmlogs
- Persona-based UInewui_logs:/opt/IBM/WebSphere/AppServer/profiles/AppSrv01/logs
- Scheduler - mdmsch_logs:/opt/mdmlogs
- Workflow - mdmwfl_logs:/opt/mdmlogs
- pimcollector and indexer - mdmfts_logs:/opt/NEWUI/mdmui/logs
- Machine learning - mdmml_logs:/opt/NEWUI/mdmui/logs
To start the Docker containers with the
Free text search
feature enabled, set the value of the
ENABLE_FTS property as 1. Similarly, to
enable the DAM feature, set the value of the
ENABLE_DAM property as 1.
What to do next
You need to perform extra configuration for Product Master docker images to work with an Oracle Server. For
more information, see Customizing Elasticsearch and Hazelcast services.