Docker Containers for Oracle SOA Suite

In previous blog, we started with brief introduction of docker platform and also saw how to build images and run containers. In this blog, we will see how to setup an Oracle SOA Suite 12.2.1.3 environment with docker containers using Oracle official docker images. The README files available with official images have lot of information and one could easily create the docker images. So i just want to collate all this information here for quick reference.

I used Ubuntu 17.10 (artful) VM with docker version 17.12.1-ce in Windows 10 based laptop.

Installation:

Typical steps to be followed to install Oracle SOA Suite 12.2.1.3 in laptop:

  • Install JRE 8/JDK 8
  • Install the certified database.
  • Install Oracle SOA Suite/BPM Suite/OSB as per requirements.
  • Run RCU to create the required schemas
  • Configure the domain

In the world of docker the above steps translate to the following steps.

  • Build JRE 8 docker image
  • Build Oracle DB docker image
  • Build FMW infrastructure docker image
  • Build SOA Suite docker image
  • Start DB container
  • Start Admin Server container
  • Start Managed Server container

To start with, download official dockerfiles from https://github.com/oracle/docker-images and we use docker images related to OracleJava, OracleDatabase, OracleFMWInfrastructure and OracleSOASuite. Each of these folders have necessary scripts for installation but does not contain executables. Have all these folders copied into docker-images directory.

Build JRE 8 docker image:

  • Download server-jre-8u161-linux-x64.tar.gz  from link and copy into directory OracleJava/java-8.
  • Navigate to the above directory and run sh build.sh. We will observe the docker image oraclelinux:7-slim getting pulled from docker hub as the docker file contains instruction FROM oraclelinux:7-slim.
  • Once the build is complete we can see a new image available with tag oracle/serverjre:8.

  • Note that OracleJava folder also have docker files required to build JRE 9.

Build Oracle DB docker image:

  • Download files linuxamd64_12102_database_1of2.zip and linuxamd64_12102_database_2of2.zip from link and copy into directory OracleDatabase/dockerfiles/12.1.0.2. I had used 12.1.0.2 version though the latest is 12.2.0.1 because of smaller size.
  • Navigate to the directory OracleDatabase/dockerfiles and issue the following command. Option -v indicates the db version and the option -e represents Enterprise Edition.

                              sh buildDockerImage.sh -v 12.1.0.2 -e

  • Open OracleDatabase/dockerfiles/12.1.0.2/Dockerfile.ee to check the instructions that get executed during the image build. Observe oraclelinux:7-slim as the base image in this docker file.
  • Once the build is complete we can see a new image available with tag oracle/database:12.1.0.2-ee.

  • Note that OracleDatabase folder also have docker files required to build images based on versions 12.2.0.1 and 11.2.0.2 (XE).

Build FMWInfrastructure docker image:

  • Download file fmw_12.2.1.3.0_infrastructure_Disk1_1of1.zip from link and copy into directory OracleFMWInfrastructure/dockerfiles/12.2.1.3.
  • Navigate to the directory OracleFMWInfrastructure/dockerfiles and issue the following command. Option -v indicates the version.

                              sh buildDockerImage.sh -v 12.2.1.3

  • Open OracleFMWInfrastructure/dockerfiles/12.2.1.3/Dockerfile to check the instructions that get executed during the image build. Observe that oracle/serverjre:8 is the base image and this is the exact reason why we built jre image first.
  • Once the build is complete we can see a new image available with tag oracle/fmw-infrastructure:12.2.1.3.

  • Note that OracleFMWInfrastructure folder also have docker files required to build images based on versions 12.2.1.2.

Build SOA Suite docker image:

  • Download files fmw_12.2.1.3.0_soa.jar and fmw_12.2.1.3.0_osb.jar from link and copy into directory OracleSOASuite/dockerfiles/12.2.1.3. Note that these installers are not quick start installers.
  • Navigate to the directory OracleSOASuite/dockerfiles and issue the following command. Option -v indicates the version.

                            sh buildDockerImage.sh -v 12.2.1.3

  • Open OracleSOASuite/dockerfiles/12.2.1.3/Dockerfile to check the instructions that get executed during the image build. Observe that oracle/fmw-infrastructure:12.2.1.3 is the base image and this is the exact reason why we built that image first.
  • Once the build is complete we can see a new image available with tag localhost/oracle/soasuite:12.2.1.3.

  • Note that OracleSOASuite folder also have docker files required to build images based on versions 12.2.1.2.

By creating docker images for DB and SOA Suite, we are done with the installation and yet to configure DB instance, run RCU and configure SOA/OSB domain. Note that the image oracle/fmw-infrastructure has one pre-configured domain named base_domain.

We use docker-compose tool to create containers based on the above images. A sample yaml file docker-compose.yml is located in OracleSOASuite/samples directory.

Prerequisite:

  • Edit ../setenv.sh and set or modify the required env variables and do source ../setenv.sh. At minimum, we need to set DC_ORCL_SYSPWD, DC_ADMIN_PWD and DC_RCU_SCHPWD. Note that i had to set DC_HOSTNAME to ip address like 172.18.0.1 instead of hostname and localhost. Do this as first step before starting up any of the containers below.

Start DB container:

  • The docker-compose.yml file defines a service named soadb that can be used to create DB container. Modify this entry as below:

          soadb:
               image: oracle/database:12.1.0.2-ee
               ports:
                       – “${DC_ORCL_PORT}:1521”
                       – “${DC_ORCL_OEM_PORT}:5500”
               environment:
                      – ORACLE_SID=${DC_ORCL_SID}
                      – ORACLE_PDB=${DC_ORCL_PDB}
                      – ORACLE_PWD=${DC_ORCL_SYSPWD}
               container_name: soadb
               volumes:
                     – ${DC_ORCL_DBDATA}:/opt/oracle/oradata

  • Use command docker-compose up -d soadb to start the db container.

  • When DB container starts for first time, it configures the DB instance, TNS listener and creates some dummy password for SYS user. The logs can be seen using command docker logs -f soadb.

  • Execute docker exec <<container id>> /opt/oracle/setPassword.sh <<pwd>> to reset password for SYS user. Make sure that DB container is running before executing this command. The location of this script file can be derived from the instructions found in OracleDatabase/dockerfiles/12.1.0.2/Dockerfile.ee.
  • After the first time, to restart the container we can use either of the below commands. Make sure to run source ../setenv.sh always before using docker-compose commands.

docker-compose up -d soadb

docker start <<container id>>

  • Connect to db using command sqlplus sys/fusion@//172.18.0.1:1521/soadb as sysdba to make sure that DB is up and running.

  • Command docker stop can be used to stop the container.

Start Admin Server container:

  • docker-compose.yml file has soaas as one of the services which can be used to create the container. Use command docker-compose up -d soaas to start the admin server container.
  • When admin server container starts for first time, it runs RCU to create the required schemas by connecting to db container and also configures a new domain ,. The logs can be seen using command docker logs -f soaas.

  • After the first time, to restart the container we can use either of the below commands. Make sure to run source ../setenv.sh always before using docker-compose commands                 docker-compose up -d soaasdocker start <>
  • Verify you are able to access admin console using http://localhost:7001/console and observe that AdminServer is up and running. The password for admin console will be the value given for DC_ADMIN_PWD in setenv.sh.
  • In data sources, observe that prefix SOA01 is used for SOAINFRA, MDS and others which is the value given for DC_RCU_SOAPFX in setenv.sh.
  • Command docker stop can be used to stop the container.

Start Managed Server container:

Note that i had to use  minimum 6 GB RAM for my ubuntu VM to bring DB, Admin and managed server containers.

  • docker-compose.yml file has soams as one of the services which can be used to create the container. Use command docker-compose up -d soams to start the managed server container.

  • The logs generated in managed server container can be seen using command docker logs -f soams.

  • After the first time, to restart the container we can use either of the below commands. Make sure to run source ../setenv.sh always before using docker-compose commands

docker-compose up -d soams

docker start <<container id>>

  • Access admin console using http://localhost:7001/console and observe that soa_server1 is up and running and also we can see a soa_cluster configured.
  • Command docker stop can be used to stop the container.

Observations:

  • If we want to access the admin console from host OS, we need to configure the port forwarding rules for the VM as shown below.

  • When we are installing DB or SOA Suite in laptop the installation wizard guide us through the steps which makes life easier. But when when we want to use docker files to build images we need to come up with script for the installation and configuration. Typically developer may not have this much acquaintance with these kind of installation scripts and i feel admin help is required. I hope Oracle keep updating the their github repository with newer docker files and scripts whenever a new release is available.
  • I feel debugging containers is difficult and need to look more into this aspect. Initially, when i created VM i used 3 GB RAM  and with this RAM i was able to bring up DB and Admin server container. But when i starting managed server it got stuck and docker logs also did not help me to identify this issue. It was a complete guess by me and increased the RAM to 6 GB which made the things smoother.
  • The docker files uses yum tool which is not available in ubuntu that means, we may need to come up different docker files for different  linux distributions and for Windows OS.
  • The oracle official docker images for Java, DB and FMW Infrastrcture has oraclelinux as the base image. Does that mean oracle does not support in other linux distributions like ubuntu etc. I need to check on this and i welcome readers to let me know if anyone has information on this.

18 Responses to “Docker Containers for Oracle SOA Suite”


  1. 1 Sushil September 14, 2020 at 1:20 PM

    Hello,
    When i try to run the ‘docker-compose up -d soaas’ getting the below error.

    “/bin/bash: /u01/oracle/dockertools/createDomainAndStart.sh: No such file or directory”

    Kindly help.

    • 2 Alex January 12, 2021 at 3:17 PM

      I get exactly the same error

      “/bin/bash: /u01/oracle/dockertools/createDomainAndStart.sh: No such file or directory”

      when running
      docker-compose up -d soaas
      docker logs -f soaas
      and also
      docker-compose up -d soams
      docker logs -f soams

  2. 3 Anonymous September 14, 2020 at 12:26 PM

    Hello ,
    While running the ‘docker-compose up -d soaas’ getting the below error in the log.
    bin/bash: /u01/oracle/dockertools/createDomainAndStart.sh: No such file or directory

    Can you help.

  3. 4 surya September 18, 2019 at 11:04 AM

    please provide SOA dockers for Windows machines

    • 5 svgonugu September 18, 2019 at 9:39 PM

      Oracle SOA Suite docker images have Oracle Enterprise Linux as base image and that is the only supported. What do you mean by Windows machines? are you referring windows containers?

  4. 6 digididar April 25, 2019 at 4:44 PM

    When I execute this command:
    sqlplus sys/fusion@//172.17.0.1:1521/soadb as sysdba

    It will give me the following error:

    ERROR:
    ORA-01017: invalid username/password; logon denied
    So what am I doing wrong here? I have not given a username or password during the whole process.

    What am I doing wrong here? Can someone help please?

  5. 8 van Gogh April 25, 2019 at 4:42 PM

    upon executing this command:
    sqlplus sys/fusion@//172.17.0.1:1521/soadb as sysdba

    It gives me the following error:

    ERROR:
    ORA-01017: invalid username/password; logon denied
    So what am I doing wrong here? I have not given a username or password during the whole process.

    Can you help please? what am I doing wrong here?

  6. 10 swe1807 July 31, 2018 at 4:08 PM

    The command docker-compose up -d soadb gives the following error.

    ERROR: Get http://localhost/v2/: dial tcp [::1]:80: connect: connection refused

    Any leads for the same.

  7. 12 Anonymous June 9, 2018 at 7:00 AM

    Hi Siva,

    After you done all the steps, do you checked the Health of SOA managed server in Weblogic admin console or EM console? I came the same problem as Maarten Smeets metioned in his blog, as below:
    (http://javaoraclesoa.blogspot.com/search/label/soa%20suite%2012c).

    Do you also tried Oracle Service Bus in the same environment?

  8. 14 siddarth May 8, 2018 at 1:35 AM

    getting below error with command docker-compose up -d soadb

    ERROR: Get http://localhost/v2/: dial tcp [::]:80: getsockopt: connection refused

  9. 16 kris April 19, 2018 at 6:34 PM

    When I run docker-compose up -d soadb, I get the following error:

    Pulling soadb (localhost/oracle/database:12.1.0.2-ee)…
    ERROR: Get http://localhost/v2/: dial tcp 127.0.0.1:80: getsockopt: connection refused

    Any advice?

    • 17 Anonymous June 8, 2018 at 10:19 PM

      it better to modify the file ‘docker-images/OracleSOASuite/samples/docker-compose.yml’.

      Change

      soadb:
      image: ${DC_REGISTRY_DB}/oracle/database:12.2.0.1-ee

      To

      soadb:
      image: store/oracle/database-enterprise:12.2.0.1

      Or to

      soadb:
      image: store/oracle/database-enterprise:12.2.0.1container-registry.oracle.com/database/enterprise:12.2.0.1

      For more infor mation about pull oracle database image:

      https://store.docker.com/images/oracle-database-enterprise-edition
      https://container-registry.oracle.com/pls/apex/f?p=113:4:::NO:4:P4_REPOSITORY,AI_REPOSITORY,AI_REPOSITORY_NAME,P4_REPOSITORY_NAME,P4_EULA_ID,P4_BUSINESS_AREA_ID:9,9,Oracle%20Database%20Enterprise%20Edition,Oracle%20Database%20Enterprise%20Edition,1,0&cs=38OfhkPgLq6M5yTN591Cu8ByxwKE08P8rJrLmHiDdwK0TfMP2mgMPqt31rDT0e3C6V_7m_p_FVeR6VEPzeBNGvw

  10. 18 Kris April 19, 2018 at 6:12 PM

    When I try the docker-compose up -d soadb, I get the following error:

    Pulling soadb (localhost/oracle/database:12.1.0.2-ee)…
    ERROR: Get http://localhost/v2/: dial tcp 127.0.0.1:80: getsockopt: connection refused

    Do you have any advice?


Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.




Pages

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 379 other subscribers

Enter your email address to follow this blog and receive notifications of new posts by email.