Antony Reynolds' Blog

Building an FMW Cluster using Docker (Part I Introduction)

Antony Reynolds
Senior Director Integration Strategy

Click here for a Google Docs version of this document that doesn't suffer from the Oracle blog formatting problems


Oracle Fusion Middleware Deployments Using Docker Swarm Part I


This is the first in a series of blogs that describe how to build a Fusion Middleware (FMW) Cluster that runs as a number of Docker images that run in docker containers.  These containers are coordinated using Docker Swarm and can be deployed to a single host machine or multiple hosts.  This simplifies the task of building FMW clusters and also makes it easier to scale them in and out (adding or subtracting host machines) as well as up and down (using bigger or smaller host machines).

This blog uses Oracle Service Bus as an FMW product but the principles are applicable to other FMW products.

In this entry we will explain the concepts of using Docker Swarm 1.12 to create a Fusion Middleware Cluster.  We will explain how to set up a minimal Linux machine to run a docker engine and prepare it to start building out a Fusion Middleware Cluster running on Swarm.  In future entries we will cover creating a database docker image that we will use to support Fusion Middleware.  Other entries will explain how to create a docker image to run Fusion Middleware and create a cluster in swarm mode by defining swarm services for the database, WebLogic Admin Server and WebLogic managed servers.


  1. Create FMW Cluster 12.2 that runs on Docker Swarm 1.12
  2. User Swarm to support scaling in/out of the FMW cluster.


FMW deployments can be complex to setup and configure.  The Enterprise Deployment Guide for SOA Suite 12.2.1 has a lots of steps to follow within its 382 pages.  This is taken care of for you when you subscribe to FMW on the cloud, such as Oracle SOA Cloud Service.  However many companies still run their FMW deployments in on premise systems and are not yet ready to move to the Oracle Cloud Machine, which provides a private cloud environment that looks just like the public cloud.

Docker provides a lightweight container in which to run software.  Multiple docker images can be coordinated by Docker Swarm to form a cluster.  Each image runs in a docker container which virtualizes the resources used by the image, making it possible for multiple images to execute on a single machines or for images to to be distributed across multiple machines.  In either case Swarm helps to manage the cluster of machines.

There are a number of blog entries that explain how to use FMW with docker but most of them only use the developer install, which can run in a single docker container.  A more normal FMW installation has a separate database and multiple managed servers.  There a few blog entries that describe using this, but they use old versions of docker and there are now better ways of implementing this.  We use the latest versions of docker and swarm to show to create FMW clusters running on docker swarm in a configuration that is production ready.

Over this and the next few blog entries I have partnered with my colleague Shuxuan Nie to describe how to run a highly FMW deployment on top of Docker.  We have used Oracle Service Bus as an example FMW deployment but the principles can be applied to any FMW deployment.


Shuxuan ‘Judy’ Nie029.JPG

Holding a masters degree in computer science from Beijing University of Aeronautics and Astronautics Shuxuan Nie is a senior principal devops engineer working on Oracle's forthcoming Adaptive Intelligence Applications Cloud Service (AIA).  Prior to joining Oracle, Shuxuan worked as a systems architect at Australian based Oracle partner Rubicon Red.  There she specialized in helping customers build highly available FMW environments on both physical hardware and VMs.  She also contributed to Rubicon Reds Myst platform provisioning and continuous delivery tool.  In her current position she works with Oracle Container Cloud Service (which provides docker in the cloud) to provide deployment environments for the AIA cloud service.

Antony ReynoldsIMG_7082.JPG

A graduate of Bristol University Antony Reynolds is a Product Strategy Director in Oracle’sIntegration Products group where he works with Oracle Integration Cloud Service (ICS).  In addition to working with ICS he also helps customers upgrade to the latest SOA Suite releases, working closely with some of the largest users of SOA Suite in the world.  A blogger and author of several books on Oracle SOA Suite Antony was attracted to Docker by its lightweight container model and power of abstraction.


FMW and WebLogic rely on a database and an Admin Server.  This leads us to require the following Docker containers to implement FMW on Docker.  Each docker container runs a docker image.  The beauty of Docker is that these containers can be deployed together on a single machine or distributed across multiple machines without any changes to their configuration.

Docker Containers for FMW Cluster

We could deploy all the containers on a single machine as shown below.

Docker Containers Running FMW on a Single Powerful Machine

Alternatively we can distribute them across several machines.

Docker Containers Running FMW on Multiple Machines

Of course we could choose a combination of the two.

Docker Containers Running FMW on Multiple Machines, some Running Multiple Containers

Note that from the docker containers perspective each thinks it is running in its own physical machine, although it is actually running in a docker container on a physical or virtual machines and may be sharing that machine with other running docker containers.

Initially we deployed all the containers on a single machine, once we had that working then we deployed our contains to multiple machines.

Docker & Swarm for FMW People

We are used to running FMW on multiple virtual machines.  This is used extensively on Oracle Exalogic for example, as well as the large number of customers who run FMW on Oracle Virtual Machine (OVM) or Dell’s VMWare.  The problem with VMs is that each virtual machine has a whole operating system that is running on top of the VM hypervisor.  This includes the kernel and file system which makes a VM a relatively heavyweight container.

In contrast to a Virtual Machine a Docker Container just abstracts the CPU, memory, network and file system of the underlying operating system.  It does not run a separate kernel, instead deferring most of the execution to the underlying machine,m physical or virtual.  This results in a lighter weight container that still has the benefits of isolation and abstraction that a VM provides.  This is why people are excited about using docker containers to host services, particularly micro services, that would be too expensive to dedicate a VM to.

A docker image is a specific set of binaries and configuration that is targeted to run inside a docker container.  This could be an Oracle database, a WebLogic managed server or a WebLogic admin server.

So let's translate FMW / WebLogic deployment terms onto docker concepts.  Note that this is a conceptual mapping, but is not an exact equivalent.

FMW Concept

Docker Concept



Docker Engine

Docker engine can run multiple docker containers on a single host.


Swarm Cluster

Docker swarm clusters can be used to run multiple instances of an image, providing a great platform to run an FMW cluster on top of.

Node Manager

Swarm Manager

Manages the swarm cluster and decides on which docker engine to run a particular container.  Note that this function is split between Weblogic Console and Node Manager in WebLogic.

Binaries and Domain Configuration

Docker Image

A docker image represents a set of code and associated configuration packaged up for execution in a docker container.

Server instance

Docker Container

A running image instance, parameters can be used to customize the instance, so that the same image can be used to run an Admin server or a Managed Server.

Managed WebLogic Server in a Cluster

Swarm Service

A swarm service is a generic service.  A WebLogic Admin Server would be a Swarm Service with a single instance.  A Managed Server would be a Swarm Service that allowed multiple instances.

Note that although FMW allows multiple servers to be targeted at a single machine, docker achieves this through two level, a docker container runs a single server, but a docker engine can run multiple containers..  This is not as limiting as it sounds because a docker container is much lighter than a VM and so it is easy to run multiple docker containers on a docker engine running on a single VM or physical machine with minimal overhead on top of the requirements of the WebLogic server.

FMW for Docker People

Oracle Fusion Middleware is the name for Oracle’s middleware products.  These are powerful proprietary middleware products that are used by customers throughout the world to; run applications and portals, integrate systems, provide business analytics and secure their environments, amongst other things.

Although many of these products are available in free developer editions they still require acknowledgement of the Oracle license and as such cannot be distributed as part of a docker image.  These products can also be large, often requiring several gigabytes of download before being installed.  These factors when combined have led Oracle and others to provide dockerfiles to create docker images that install and configure Oracle products into provided base images.  The software to be installed must be provided separately from the dockerfiles.  The created docker images can then stored in a company specific docker repository.  These docker images can then be used in the same way as any other docker image.  This is the approach that will be followed in this document.

Base VM Image

We built on a headless and minimum rpm installed Oracle Linux 7 VM that has a download footprint of only 1GB.  The instructions provided are applicable to other OL 7 and RHEL 7 environments.  With minimal changes the same instructions should also apply to other Linux releases such as Ubuntu.  The image is configured and set up with a docker environment.

The VM is used as our base platform to run docker.

Downloading VM

Because of licensing restrictions we are unable to provide a VM for download.  However if you are an Oracle employee then please contact us and we will point you at a downloadable image.

Image Pre-Requisites

If you don’t use the provided image then the following is needed of an OL 7 image.

  • As root run yum util to enable UEKR4 and addons in yum repo

yum -y install yum-utils

yum-config-manager --enable ol7_addons

yum-config-manager --enable ol7_UEKR4

yum-config-manager --disable ol7_UEKR3_latest

  • Install 4.x kernel and reboot the system, selecting the UEK R4 kernel if this is not the default boot kernel

yum update

systemctl reboot

  • Install minimum required packages

yum install wget unzip net-tools

  • Provide btrfs file system as storage driver used by docker instead of default device mapper.  We will refer to the root of the btrfs file system as /var/lib/docker
  • Use yum to install btrfs-progs package

root@docker-base ~]# yum install btrfs-progs

  • Create btrfs file system on the device, such as /dev/sdb in this example.

root@docker-base ~]# mkfs.btrfs /dev/sdb

  • Display UUID of the device via blkid command

[root@docker-base ~]# blkid /dev/sdb

/dev/sdb: UUID="fe6bf7a2-34fc-4800-af2b-da19d2d8db6d" UUID_SUB="e955087d-80b5-4051-bb28-ed71edb9cea4" TYPE="btrfs"

  • Create the config file /etc/systemd/system/var-lib-docker.mount with below content, replace your UUID value:


Description = Docker Image Store


What = UUID=<Your UUID Value>

Where = /var/lib/docker

Type = btrfs


WantedBy = multi-user.target

  • The above file defines systemd users to mount the file system on /var/lib/docker, need to create this folder if this is the fresh installation

[root@docker-base ~]# mkdir /var/lib/docker

  • Enable var-lib-docker.mount target and mount the file system

[root@docker-base ~]# systemctl enable var-lib-docker.mount

[root@docker-base ~]# systemctl start var-lib-docker.mount

  • Create the  /etc/systemd/system/docker.service.d/var-lib-docker-mount.conf to tell systemd to mount the /var/lib/docker file system by using the var-lib-docker.mount target before starting the docker service




  • Set the SELinux mode to permissive or disable SELinux. In this demo, we disable SELinux in /etc/selinux/config.  We do this to avoid having to configure selinux policies to run docker.  Your Linux security team may require you to set up an appropriate policy.

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

#     enforcing - SELinux security policy is enforced.

#     permissive - SELinux prints warnings instead of enforcing.

#     disabled - No SELinux policy is loaded.


# SELINUXTYPE= can take one of three two values:

#     targeted - Targeted processes are protected,

#     minimum - Modification of targeted policy. Only selected processes are protected.

#     mls - Multi Level Security protection.


                The above change requires to reboot the system

[root@docker-base ~]# systemctl reboot

  • Install docker engine, in our demo we install latest version 1.12

[root@docker-base ~]# yum install docker-engine

  • Start docker service and set to auto start

[root@docker-base ~]# systemctl start docker

[root@docker-base ~]# systemctl enable docker

  • Check docker running status

[root@docker-base ~]# systemctl status docker

● docker.service - Docker Application Container Engine

   Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)

  Drop-In: /etc/systemd/system/docker.service.d

           └─docker-network.conf, docker-sysconfig.conf, http-proxy.conf, var-lib-docker-mount.conf

   Active: active (running) since Sun 2017-01-08 12:16:38 PST; 52min ago

     Docs: https://docs.docker.com

 Main PID: 871 (dockerd)

   Memory: 64.7M

   CGroup: /system.slice/docker.service

           ├─ 871 dockerd --selinux-enabled

           └─1020 docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --shim docker-containerd-shim --metrics-interval=0...

  • Display docker information, you can verify the version and btrfs storage driver

[root@docker-base ~]# docker info

Containers: 0

 Running: 0

 Paused: 0

 Stopped: 0

Images: 0

Server Version: 1.12.2

Storage Driver: btrfs

 Build Version: Btrfs v3.19.1

 Library Version: 101

Logging Driver: json-file

Cgroup Driver: cgroupfs


 Volume: local

 Network: null host bridge overlay

Swarm: inactive

Runtimes: runc

Default Runtime: runc

Security Options: seccomp

Kernel Version: 4.1.12-61.1.24.el7uek.x86_64

Operating System: Oracle Linux Server 7.3

OSType: linux

Architecture: x86_64

CPUs: 1

Total Memory: 4.133 GiB

Name: docker-base.us.oracle.com


Docker Root Dir: /var/lib/docker

Debug Mode (client): false

Debug Mode (server): false

Registry: https://index.docker.io/v1/

Insecure Registries:

  • Create oracle user
  • useradd oracle
  • Add oracle user to docker group
  • usermod -a -G docker oracle


In this entry we have introduced the concept of using Docker Swarm 1.12 to create a Fusion Middleware Cluster.  We have explained how to set up a minimal Linux machine to run a docker engine and prepared it to start building out a Fusion Middleware Cluster running on Swarm.  In our next entry we will cover creating a database docker image that we will use in later entries to support Fusion Middleware.  Later entries will explain how to install Fusion Middleware and create a cluster in swarm mode by defining swarm services for the database, WebLogic Admin Server and WebLogic managed servers.

Join the discussion

Comments ( 3 )
  • Marc de Brouwer Monday, January 16, 2017

    This is great stuff. I love Docker, and I think deploying enterprise software platforms on it is a great on-premise option (besides PaaS).

    Only remaining issue for me is Oracle's support position for FMW products on Docker. I have read about WebLogic certification, but that does not automatically certify the whole FMW family I think. Is there any progress on getting the other FMW products certified on Docker?

  • Devendra Jain Wednesday, August 16, 2017
    Could you please point us the docker image with multi host clustered env as We are trying the same.
  • Steffen Rumpf Thursday, September 28, 2017
    That's excatly what I would've asked when I read this article: What about Docker support for FMW?
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.