Recently I have been asked to explore ways to create Docker Containers for Oracle Documaker Enterprise Edition (ODEE). Having experience in implementing ODEE for two big banks in a complex architecture, my immediate response was why not? Many customers have asked if Oracle provides Docker containers to use directly to their environment, so that node installation and scaling can be cost-effective and efficient.

Before getting into more details, I wanted to know what a Docker Container is, and what it is not. If you've read this far, you likely know that Docker helps developers to package application into containers, and that said containers can be completely isolated so that resources running in one container will not have visibility into resources in another container. You might jump to the conclusion that a Docker Container is like a virtual machine. It is similar, but it is important to understand that a Docker container does not contain a discrete operating system, like a virtual machine. A virtual machine has a guest operating system that shares the host machine's resource, but is a discrete installation and does not share the host's operating system. A Docker Container uses the host OS in addition to the resources.

Moving on, let us concentrate on ODEE and creating Docker Containers for ODEE. Please note that in this blog post I am not creating a Docker "image" for ODEE . Instead, I use Oracle Enterprise Linux (OEL) Docker distribution to create a Docker container, and copy ODEE home directory from a preinstalled ODEE instance on the host machine. Stay tuned for another post in which I detail the creation of a Docker image for ODEE. 

ODEE Architecture and selecting the Docker Images

Documaker Enterprise Edition has three tiers:

  1. Presentation tier – hosted in WebLogic, where web applications and web services are deployed. Also hosts JMS services.
  2. Processing tier – back end that runs Docfactory and Docupresentment services
  3. Database tier – the backing database

 

Rather than create a monolithic container, I decided to modularize and obtain a Docker image for each tier from the Oracle container registry. Here is the list of Docker images I downloaded:

  1. Oracle Fusion Middleware Infrastructure 12.2.1.4
  2. Oracle Database 19c
  3. Oracle Enterprise Linux 7.9

It is important to read the documentation for pulling and creating each container, which is available in the corresponding pages at the registry. As the first step, in order to pull the images to our local host, I need to log in to Oracle Container registry from Docker client :

docker login container-registry.oracle.com

If you are behind any proxy or a firewall, set the proxy environment parameters correctly :

export http_proxy=<proxy server>:<port>

export https_proxy=$http_proxy

export ftp_proxy=$http_proxy

Now I pull the required images :

docker pull container-registry.oracle.com/database/enterprise:19.3.0.0

docker pull container-registry.oracle.com/middleware/fmw-infrastructure:12.2.1.4

docker pull container-registry.oracle.com/os/oraclelinux:7.9

Setup Docker Network

As the next step, I need to create a Docker network so that all the containers can communicate with each other without referring a static IP address. For this exercise, I am installing all containers on a single 32GB machine, so I need only to create a bridge network:

docker network create -d bridge InfraNET

Set up Docker container for Database

To prepare the containers for ODEE, first I need to set up the Oracle Database. Oracle has made this very simple. Just run the command:

docker run -d --name documakerDB -p 1521:1521 -p 5500:5500 -e ORACLE_SID=ORASID -e ORACLE_PDB=ORAPDB -e ORACLE_PWD=<DB Password> --network=InfraNET container-registry.oracle.com/database/enterprise

You might have noticed that the DB we create is already attached to network we created. From this point onwards, I will just refer the Database by its container name from other containers which I am creating on next couple of steps. For detailed documentation on how to setup the DB docker container, please visit Database Repositories

Set up WebLogic (FMW Infrastructure)

Here, I create a WebLogic domain with AdminServer and a managed server. Before executing the Docker "run" command, I need to create environment property files so that Docker will refer to them while creating domain and running RCU.

  1. Create file domain_security.properties

    username=weblogic
    password=<weblogic password>
    db_user=sys
    db_pass=<DB Password which was given in the DB creation step)
    db_schema=<DB Schema which was given in the DB creation step)

  2. Create file domain.properties

    DOMAIN_NAME=documaker_domain
    ADMIN_LISTEN_PORT=7001
    ADMIN_NAME=weblogic
    ADMIN_HOST=InfraAdminContainer
    ADMINISTRATION_PORT_ENABLED=false
    ADMINISTRATION_PORT=9002
    MANAGEDSERVER_PORT=8001
    MANAGED_NAME=infraServer1
    RCUPREFIX=INFRA01
    PRODUCTION_MODE=dev
    CONNECTION_STRING= documakerDB:1521/ORAPDB
    DOMAIN_HOST_VOLUME=/u01/oracle/user_domain

Now run the command:

docker run -d -p 7001:7001 -p 7002:7002 --name documakerwls --network=InfraNET -v /scratch/docker_fmw_infra/properties:/u01/oracle/properties -v /u01/oracle/user_domain:/u01/oracle/user_projects/domains ${ENV_ARG} --env-file /scratch/docker_fmw_infra/properties/domain.properties container-registry.oracle.com/middleware/fmw-infrastructure:12.2.1.4

Note: to enable the administration port, you may an additional step of importing the ssl certificates. For more detailed configured of FMW Configuration for Docker please visit – Middleware Repositories.

Setup Docker Container for ODEE

Finally, it is time to set up the the last container for ODEE iteself. There are 3 possible approaches:

  1. Create a docker image from OEL, which will install the ODEE while running the container
  2. Run a OEL docker container and install ODEE as the next steps
  3. Run a OEL docker container and copy ODEE files which is preinstalled on host

I will explore the easiest option: copy a pre-installed ODEE home directory from host. 

  1. Install ODEE on the host. Make sure the provided parameters are correct while installing ODEE. Note that WebLogic host will be the container name provided for FMW Infrastructure Docker container and the database name will be the container name given to DB container.
  2. Run the OEL Docker image.

docker run -it --name documakerbox -v /u01/oracle/odee_1264/:/scratch/oracle/odee_1264/ oraclelinux:7.9 bash

  1. Install the required libraries (since the docker is 64-bit and the Documaker core runs on 32-bit architecture, additional libraries are required).
yum install libstdc++.i686
yum install libstdc++-devel.i686
yum install libaio
yum install libaio.i686
yum install compat-libstdc++-33.i686 libstdc++.so.5.i686 -y
yum install glibc.i686
  1. Copy the files (make sure that you have given the appropriate permissions to copy the folder)

cp -R /scratch/oracle/odee_1264/ .

Post installation steps

I have mounted the host volumes to all the containers. Copy DB scripts (/u01/oracle/odee_1264/documaker/database/oracle11g/) to DB mount and WebLogic scripts (/u01/oracle/odee_1264/documaker/j2ee/weblogic/oracle11g/) to weblogic mount.

  1. DB Scripts
    • Run SQLPlus in the database container: 

      docker exec -ti oracle19c sqlplus sys/<DB password>@//localhost:1521/ORAPDB as sysdba

    • Execute dmkr_admin.sql and dmkr_asline.sql by giving the absolute path in the SQL prompt.
  2. WebLogic scripts
    • Open a shell in the WebLogic container:

      docker exec -ti documakerwls bash

    • Since I have already created the domain while running the FMW image, I can comment out all the lines except wlst.sh wls_create_domain.py in the file wls_create_domain.sh.
    • If you don’t want multiple managed servers, you can create a single server and deploy all the application to that server by changing the wls_create_domain.py script. I have deployed all the application and other resources to AdminServer.

wls_create_domain.py

  • ​​​​If you are creating a new server, you can spin off a new container from this with this command:

docker run -d -p 9801:8001 --network=InfraNET -v /scratch/docker_fmw_infra/properties:/u01/oracle/properties {ENV_ARG} --volumes-from documakerwls --name ${managedname} container-registry.oracle.com/middleware/fmw-infrastructure:12.2.1.4 startManagedServer.sh

Note: apply the bundle Patch 33313802: ADF BUNDLE PATCH 12.2.1.4.210903. If you are getting the below error :

ADFSHARE-00120: Error encountered while creating the MDS Session. Application state will be reset. Please logout and log back in if problem persists.

You may require OPatch 13.9.4.2.7 for this. You can get it from :

Patch 28186730: OPATCH 13.9.4.2.7 FOR EM 13.4, 13.5 AND FMW/WLS 12.2.1.3.0, 12.2.1.4.0 AND 14.1.1.0.0

       3. Deploy the MRL on the ODEE container. Open a shell as the oracle user:

docker exec -it –user oracle documakerbox bash

  • Make sure that the .bindings and tnsnames.ora files have the correct db names and other parameters
  • Login to Documaker administrator and make sure that the queue configuration is correct
  • Run deploysamplemrl.sh
  • Start docfactory
  • Start docupresentment

Wrap-Up

That's it! Now I have a containerized ODEE installation that can be easily stopped/started/scaled. Stay tuned for a future post in which I explore different containerization options.

Useful commands

  1. List all docker images

docker images

  1. To get the ip address of the docker-

docker inspect --format '{{.NetworkSettings.IPAddress}}' <docker container name>

  1. Get the docker log files

 docker logs <docker container name>

  1. To see all the containers

docker container ls –all

  1. To see the working containers

docker container ls

  1. Add a container to network

docker network connect <network name> <container name>

  1. To start a container

docker container start <container name>

 

References

  1. https://container-registry.oracle.com/
  2. https://www.docker.com/