Running Oracle SOA Suite on Docker - Part 2: Installing a docker host

Running Oracle SOA Suite on Docker - Part 2: Installing a docker host

Johannes Michler PROMATIS Horus Oracle


Executive Vice President – Head of Platforms & Development

 

Operating - installing and maintaining Oracle Fusion Middleware, especially Oracle SOA Suite 12.2.1.4 is quite some work. Not only does installation itself consist of a number of steps, but each quarterly critical patch update also requires applying a number of patches and especially in simple, single server environments quite some downtime.

This blog post series will cover how to run Oracle Fusion Middleware especially Oracle SOA Suite on docker. The first post covered the high-level steps of manual installation, Docker and Kubernetes options and has pointers to the relevant Oracle certification documentation.

This second post will then describe how using OCI and Oracle Linux a host to run docker containers can be setup up within minutes.

In upcoming posts I will then cover provisioning an Oracle Database instance to hold the meta data of Oracle SOA Suite. In the 4th episode I will look into provisioning and configuring SOA Suite itself. While I will first show those steps in a minimalistic way, to wrap up, the final episodes will cover patching and more advanced deployment options.

Runtime environment - here Oracle Cloud Infrastructure (OCI)

While there are options to running containers in OCI in a managed fashion, e.g. using the Oracle Container Engine for Kubernetes or Oracle Container Instances, the most flexible and often cheapest option to run docker on OCI is by leveraging Virtual Machines. For the purpose of this blog, I've created a new virtual machine in a public network subnet (so it is directly accessible through the internet) as follows:

Creation of a docker-test virtual machine with Oracle Linux 8

In general, "bursting" (so over-subscribing) is a helpful feature to reduce costs; however keep in mind that this is not a good idea when using software that is licensed "by processor core":

Flexible selection of an appropriate compute shape

Installation of docker

After creating the virtual machine ssh into the newly created instance and install docker as follows. If you increased the boot volume size grow the file system appropriately:

ssh opc@193.1.2.3sudo dnf upgradesudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.reposudo dnf install docker-ce --nobestsudo systemctl enable docker.servicesudo systemctl start docker.servicegrowpart /dev/sda 3sudo lvextend -l +100%FREE /dev/ocivolume/rootxfs_growfs /df -h / -- should show 88gbsudo reboot
# For UI start of config tools later:dnf install xauth xterm

After having installed docker itself you can perform a quick test e.g. as follows:

docker run hello-world

This should download and start the hello-world docker container similar to the following screenshot:


First start of the hello-world container

    Summary

    As shown creating a docker host e.g. on OCI is straightforward. In the next section of the blog, we'll see how we can run an Oracle Database on this Docker host.

    Exposing NULL values and Booleans in JSON/REST with Oracle SOA Suite

    Exposing NULL values and Booleans in JSON/REST with Oracle SOA Suite

    Johannes Michler PROMATIS Horus Oracle


    Executive Vice President – Head of Platforms & Development

    Recently we had a couple of projects where we needed to expose data extracted from an Oracle Database through a simple SQL query as a REST service producing JSON. Let’s have a look at how it is possible to control the JSON produced in such a scenario.

    Implementation

    The composite is very, very trivial:


    Composite in SOA Suite

    It just maps two URL query parameters to the WHERE condition of the SQL query:


    REST Service Configuration

    When the service is invoked, unfortunately, the JSON returned is not really “optimal”:

    {
    "XxisBlanketMatkoV" : [ {
    "lineId" : 278000,
    "shipSiteAddress1" : "PROMATIS software GmbH",
    "shipSiteAddress2" : "Pforzheimer Str. 160",
    "shipSiteAddress3" : {
    "@nil" : "true"
    },
    "shipSiteAddress4" : {
    "@nil" : "true"
    },
    "shipSiteCountry" : "DE",
    "shipSitePlz" : "76275",
    "bulkFlag" : "N"
    } ]
    }

    Issues with initial version

    This is ugly for two reasons:

    • One usually does not describe NULL values in JSON like that. It would be better to either “omit” the element “shipSiteAddress3” or have them set to “shipSiteAddress3”: null.
    • bulkFlag is a boolean, it would be better to have this as “bulkFlag” : false.

    Of course, there is an obvious solution to this: Just add a mediator or even a BPEL process and do an XSLT transformation from the data from the Database Adapter to an explicit schema, and one can map Y/N to true/false over an xsl:if and is additionally able to e.g. omit the NULL elements based on xsl:if.

    However, this is “one more thing” to maintain, and if the base SELECT changes, this transformation has to be adapted as well.

    Producing better “null” values

    Obviously, SOA Suite first extracts the data from the database column SHIP_SITE_ADDRESS4 (which in NULL) to an xml representation of

    <shipSiteAddress3 xsi:nil=”true”/> and then translates that attribute into a json child “@nil”=true.

    Luckily in the meantime, SOA Suite got a patch 31926382 (which is part of SOA Bundle Patch 12.2.1.4.221122). With that patch, according to 2764402.1, one is able to modify the XSD that defines the XML elements that in the end are converted to JSON as follows:


    Modified XML Schema

    just add:

    xmlns:nxsd="http://xmlns.oracle.com/pcbpel/nxsd" nxsd:version="JSON" nxsd:encoding="UTF-8" nxsd:isNillableSupported="true"

    and the @nil will be converted to “proper” null values.

    true and false

    Unfortunately, pure (Oracle) SQL does not support boolean data types in the database so far. This also makes it a bit difficult to produce true/false when fetching data through the JCA Database adapter of SOA Suite. I managed to fix this by doing the following:

    1. Returning 0 for false and 1 for true in the SQL field of “bulk_flag,
    2. modifying the or-mappings.xml to:
    <attribute-mapping xsi:type="direct-mapping"
    <attribute-name>bulkFlag</attribute-name>
    <field table="XXIS_BLANKET_MATKO_V" name="BULK_FLAG" xsi:type="column"/>
    <attribute-classification>java.lang.Boolean</attribute-classification>
    </attribute-mapping>>

    (Thus changing it from java.lang.Decimal to java.lang.Boolean.)

    Summary: Prettier JSON

    By implementing these two tiny changes:

    • Add nxsd:isNillableSupported=”true” to schema,
    • modify the or-mappings.xml to have <attribute-classification>java.lang.Boolean</attribute-classification> to

    The REST service gives us:

    {
    "XxisBlanketMatkoV" : [ {
    "lineId" : 278000,
    "shipSiteAddress1" : "PROMATIS software GmbH",
    "shipSiteAddress2" : "Pforzheimer Str. 160",
    "shipSiteAddress3" :null,
    "shipSiteAddress4" : null,
    "shipSiteCountry" : "DE",
    "shipSitePlz" : "76275",
    "bulkFlag" : false
    } ]
    }

    Which is way better JSON ?

    SOA Suite 12.2.1.4 on Oracle Cloud Infrastructure (OCI)

    SOA Suite 12.2.1.4 on Oracle Cloud Infrastructure (OCI)

    Johannes Michler PROMATIS Horus Oracle


    Senior Vice President – Head of Platforms & Development

    Recently we have seen a lot of our customers implementing Oracle SOA Suite on Oracle Cloud Infrastructure - some upgrading from earlier releases of the SOA Suite, others doing a new implementation of an integration platform based on SOA Suite. This blog will have a look at typical customer situations and how we brought them onto a new SOA integration platform on OCI from a high level perspective.

    There is also a recent Oracle Video describing SOA on OCI.

    New SOA Suite Customer

    The situation we saw with this customer was as follows:

    The customer had previously implemented hundreds of 1:1 integrations between their On Premise (in various, globally distributed data centers) and Cloud Applications and was searching for an integration platform around an Enterprise Service Bus. The basic idea is to define Canonical Business Objects that can then be exchanged between the different systems more easily than connecting everything individually.

    The customer had neither Oracle Database licenses (for the SOA Suite Metadata repository) nor Oracle SOA Suite licenses. Using Oracle Integration Cloud (OIC) was not (yet) an option, mainly due to complex Event Hub patterns.

    Given the above prerequisites, the customer had three options to license Oracle SOA Suite:

    In consultation with the Oracle SOA Suite product management (many thanks to their great help during this evaluation and the subsequent project), the customer decided to subscribe to the SOA Suite on OCI Marketplace. Although this was very early after Oracle published the images, we faced no major issues and this approach was:

    • much cheaper than buying On Premise SOA and Database licenses to run them in an On Premise or Cloud Data center and
    • brought us a more up to date and longer supported version (12.2.1.4) than we would have gotten with SOACS

    Customer doing a SOA Suite Lift And Shift

    The situation for this customer was different from the previous one:

    The Customer has been using SOA Suite for 10+ years to implement all integrations around their central ERP System "Oracle E-Business Suite 12.1.3". They were initially 10g customers who had upgraded to 12.1.3 and then last year to 12.2.1.3. Their hardware and operating system (SUSE Linux 11) were both running out of support. SOA Suite Release 12.1.3 itself will soon also run out of support. The customer runs their E-Business Dev- and Test Environments on OCI and plans to move EBS PROD as well.

    Given the above, the customer had evaluated the following options in more detail:

    • Buy new "On Premise" hardware and do a new 12.2.1.4 installation of SOA Suite there
    • Do a "custom" installation of both SOA Suite 12.2.1.4 and a Database 19c for the Metadata Repository on OCI
    • Use the SOA Suite on OCI marketplace image in the Bring Your Own License (BYOL) fashion: https://cloudmarketplace.oracle.com/marketplace/en_US/listing/74792101

    Together with the customer, we finally decided to do a "custom" installation of SOA Suite on OCI. Basically the reasons were:

    • With the marketplace images it is not possible to use a custom installed Oracle Database as the metadata repository. However, using DBaaS for OCI also in the BYOL model is significantly more expensive than using just OCI Compute (and e.g. the 19.7 database marketplace image)
    • On Premises, we had two SOA environments installed on a single machine due to a limited number of SOA Suite licenses. This gave us more flexibility/performance than having two separate machines. This setup is not (yet) supported by the marketplace image
    • The marketplace image has a lot of pre-configured setup (e.g. B2B) that did not fit our needs / previous setup

    Summary

    For both customers running SOA Suite on OCI, it helped them to create state-of-the-art integration architectures using SOA Suite on OCI. So far, all instances have performed in a very stable manner at considerably lower costs than if the customers had run Oracle SOA Suite in an On Premises data center.