For developers, installing a full blown local SOA Suite environment has never been a favorite (except for a select few). It is time consuming and requires you to download and run various installers after each other. If you want to start clean (and you haven’t taken precautions), it could be you have to start all over again.
There is a new and easy way to get a SOA Suite environment up and running without downloading any installers in only a couple of commands without depending on scripts provided by any party other than Oracle. The resulting environment is an Oracle Enterprise Edition database, an Admin Server and a Managed Server. All of them running in separate Docker containers with ports exposed to the host. The 3 containers can run together within an 8Gb RAM VM.
The documentation Oracle provides in its Container Registry for the SOA Suite images, should be used as base, but since you will encounter some errors if you follow it, you can use this blog post to help you solve them quickly.
A short history
QuickStart and different installers
During the 11g times, a developer, if he wanted to run a local environment, he needed to install a database (usually XE), WebLogic Server, SOA Infrastructure, run the Repository Creation Utility (RCU) and one or more of SOA, BPM, OSB. In 12c, the SOA Suite QuickStart was introduced. The QuickStart uses an Apache Derby database instead of the Oracle database and lacks features like ESS, split Admin Server / Managed Server, NodeManager and several other features, making this environment not really comparable to customer environments. If you wanted to install a standalone version, you still needed to go through all the manual steps or automate them yourself (with response files for the installers and WLST files for domain creation). As an alternative, during these times, Oracle has been so kind as to provide VirtualBox images (like this one or this one) with everything pre-installed. For more complex set-ups Edwin Biemond / Lucas Jellema have provided Vagrant files and blog posts to quickly create a 12c environment.
Docker
One of the benefits of running SOA Suite in Docker containers is that the software is isolatd in the container. You can quickly remove and recreate domains. Also, in general, Docker is more resource efficient compared to for example VMWare, VirtualBox or Oracle VM and the containers are easily shippable to other environments/machines.
Dockerfiles
Docker has become very popular and there have been several efforts to run SOA Suite in Docker containers. At first these efforts where by people who created their own Dockerfiles and used the installers and responsefiles to create images. Later Oracle provided their own Dockerfiles but you still needed the installers from edelivery.oracle.com and first build the images. The official Oracle provided Docker files can be found in GitHub here.
Container Registry
Oracle has introduced its Container Registry recently (the start of 2017). The Container Registry is a Docker Registry which contains prebuild images, thus just Dockerfiles. Oracle Database appeared, WebLogic and the SOA Infrastructure and now (May 2018) the complete SOA Suite.
How do you use this? You link your OTN account to the Container Registry. This needs to be done only once. Next you can accept the license agreement for the images you would like to use. The Container Registry contains a useful description with every image on how to use it and what can be configured. Keep in mind that since the Container Registry has recently been restructured, names of images have changed and not all manuals have been updated yet. That is also why you want to tag images so you can access them locally in a consistent way.
Download and run!
For SOA Suite, you need to accept the agreement for the Enterprise Edition database and SOA Suite. You don’t need the SOA Infrastructure; it is part of the SOA Suite image.
Login
docker login -u OTNusername -p OTNpassword container-registry.oracle.com
Pull, tag, create env files
Pulling the images can take a while… (can be hours on Wifi). The commands for pulling differ slightly from the examples given in the image documentation in the Container Registry because image names have recently changed. For consistent access, tag them.
Database
docker pull container-registry.oracle.com/database/enterprise:12.2.0.1 docker tag container-registry.oracle.com/database/enterprise:12.2.0.1 oracle/database:12.2.0.1-ee
The database requires a configuration file. The settings in this file are not correctly applied by the installation which is executed when a container is created from the image however. I’ve updated the configuration file to reflect what is actually created:
db.env.list ORACLE_SID=orclcdb ORACLE_PDB=orclpdb1 ORACLE_PWD=Oradoc_db1
SOA Suite
docker pull container-registry.oracle.com/middleware/soasuite:12.2.1.3 docker tag container-registry.oracle.com/middleware/soasuite:12.2.1.3 oracle/soa:12.2.1.3
The Admin Server also requires a configuration file:
adminserver.env.list CONNECTION_STRING=soadb:1521/ORCLPDB1.localdomain RCUPREFIX=SOA1 DB_PASSWORD=Oradoc_db1 DB_SCHEMA_PASSWORD=Welcome01 ADMIN_PASSWORD=Welcome01 MANAGED_SERVER=soa_server1 DOMAIN_TYPE=soa
As you can see, you can use the same database for multiple SOA schema’s since the RCU prefix is configurable.
The Managed Server also requires a configuration file:
soaserver.env.list MANAGED_SERVER=soa_server1 DOMAIN_TYPE=soa ADMIN_HOST=soaas ADMIN_PORT=7001
Make sure the Managed Server mentioned in the Admin Server configuration file matches the Managed Server in the Managed Server configuration file. The Admin Server installation creates a boot.properties for the Managed Server. If the server name does not match, the Managed Server will not boot.
Create local folders and network
Since you might not want to lose your domain or database files when you remove your container and start it again, you can create a location on your host machine where the domain will be created and the database can store its files. Make sure the user running the containers has userid/groupid 1000 for the below commands to allow the user access to the directories. Run the below commands as root. They differ slightly from the manual since errors will occur if SOAVolume/SOA does not exist.
mkdir -p /scratch/DockerVolume/SOAVolume/SOA chown 1000:1000 /scratch/DockerVolume/SOAVolume/ chmod -R 700 /scratch/DockerVolume/SOAVolume/
Create a network for the database and SOA servers:
docker network create -d bridge SOANet
Run
Start the database
You’ll first need the database. You can run it by:
#Start the database docker run --name soadb --network=SOANet -p 1521:1521 -p 5500:5500 -v /scratch/DockerVolume/SOAVolume/DB:/opt/oracle/oradata --env-file /software/db.env.list oracle/database:12.2.0.1-ee
This installs and starts the database. db.env.list, which is described above, should be in /software in this case.
SOA Suite
In the examples documented, it is indicated you can run the Admin Server and the Managed Server in separate containers. You can and they will startup. However, the Admin Server cannot manage the Managed Server and the WebLogic Console / EM don’t show the Managed Server status. The configuration in the Docker container uses a single machine with a single host-name and indicates both the Managed Server and Admin Server both run there. In order to fix this, I’ll suggest two easy workarounds.
Port forwarding. Admin Server and Managed Server in separate containers
You can create a port-forward from the Admin Server to the Managed Server. This allows the WebLogic Console / EM and Admin Server to access the Managed Server at ‘localhost’ within the Docker container on port 8001.
#This command starts an interactive shell which runs the Admin Server. Wait until it is up before continuing! docker run -i -t --name soaas --network=SOANet -p 7001:7001 -v /scratch/DockerVolume/SOAVolume/SOA:/u01/oracle/user_projects --env-file /software/adminserver.env.list oracle/soa:12.2.1.3
#This command starts an interactive shell which runs the Managed Server. docker run -i -t --name soams --network=SOANet -p 8001:8001 --volumes-from soaas --env-file /software/soaserver.env.list oracle/soa:12.2.1.3 "/u01/oracle/dockertools/startMS.sh"
#The below commands install and run socat to do the port mapping from Admin Server port 8001 to Managed Server port 8001 docker exec -u root soaas yum -y install socat docker exec -d -u root soaas "/usr/bin/socat" TCP4-LISTEN:8001,fork TCP4:soams:8001"
The container is very limited. It does not contain executables for ping, netstat, wget, ifconfig, iptables and several other common tools. socat seemed an easy solution (easier than iptables or SSH tunnels) to do port forwarding and it worked nicely.
Admin Server and Managed Server in a single container
An alternative is to run the both the Managed Server and the Admin Server in the same container. Here you start the Admin Server with both the configuration files so all environment variables are available. Once the Admin Server is started, the Managed Server can be started in a separate shell with docker exec.
#Start Admin Server docker run -i -t --name soaas --network=SOANet -p 7001:7001 -p 8001:8001 -v /scratch/DockerVolume/SOAVolume/SOA:/u01/oracle/user_projects --env-file /software/adminserver.env.list --env-file /software/soaserver.env.list oracle/soa:12.2.1.3
#Start Managed Server docker exec -it soaas "/u01/oracle/dockertools/startMS.sh"
Start the NodeManager
If you like (but you don’t have to), you can start the NodeManager in both set-ups like;
docker exec -d soaas "/u01/oracle/user_projects/domains/InfraDomain/bin/startNodeManager.sh"
The NodeManager runs on port 5658.
How does it look?
A normal SOA Suite environment.
Hi Maarten! Can we have dockerized SOA Suite in production? How does it impact licencing? Let say I have 8 containers for my SOA Suite cluster, how many licences do I need? How does it work for ephemeral containers though may not be a workable solution for SOA suite.
I’m no expert on licensing but the following might help in order to get an indication: ‘Support Information for Oracle WebLogic Server Running in Docker Containers (Doc ID 2017945.1)’. This seems to indicate SOA Suite in Docker containers is currently supported in development, test and production environments for 12.2.1.3. You can run SOA Suite in Kubernetes, however it is still in preview for early adopters. See here https://github.com/oracle/weblogic-kubernetes-operator/tree/master/kubernetes/samples/scripts/create-soa-domain. If you want to know more specifically how many licenses you would need, I think it is best to contact Oracle directly. Personally I think (this is an estimate, not based on actual experience at customers) that SOA Suite might be a bit heavy for running in containers and Kubernetes management of SOA Suite containers might be more challenging than beneficial. Just running in a Docker container (without Kubernetes) will provide you little benefit over running on bare metal.
Hi Maarten, i am working in Oracle AIA team , container registry having soasuite , but we need Foundation Pack on top of it , to run the AIA composites , for that we are created SCEApp.jar file to deploy on soasuite , but i am dono how to deploy that jar file on top of soa suite , please suggest , tones of thanks to you .
How can I open the db.env.list, adminserver.env.list and soaserver.env.list configuration files?
See here for the files: https://github.com/MaartenSmeets/provisioning/tree/master/ol7/software
My db.env.list:
ORACLE_SID=orclcdb
ORACLE_PDB=orclpdb1
ORACLE_PWD=Oradoc_db1
admin.env.list:
CONNECTION_STRING=172.18.0.2:1521/ORCL.localdomain
RCUPREFIX=SOA1
DB_PASSWORD=Oradoc_db1
DB_SCHEMA_PASSWORD=Oradoc_db1
ADMIN_PASSWORD=Oradoc_db1
MANAGED_SERVER=soa_server1
DOMAIN_TYPE=soa
soaserver.env.list:
MANAGED_SERVER=soa_server1
DOMAIN_TYPE=soa
ADMIN_HOST=soaas
ADMIN_PORT=7001
When I run this command “docker run -i -t –name soasuite –network=SOANet -p 7001:7001 –env-file c:\software\adminserver.env.list ora
cle/soa:12.2.1.3”, give me the following error:
ERROR – RCU-6090 Connection step validation failed.
CAUSE – RCU-6090 Skipping main operation: failed to connect to database because database details were missing or invalid.
ACTION – RCU-6090 Provide correct database details and try again.
Can you help me solve this error?
Hi Maarten Smeets, I wish you were well.
My name is John and I am trying to install oracle database and SOA in docker using this tutorial. The database is already there, but I can’t install SOA. Actually, I don’t know where to find the adminserver.env.list configuration file and soaserver.env.list. Could you help me with this?
To be fair, this explanation does not cover a lot of problems that I encountered on the way of trying to install this. I give up because there were to many errors during installing and running the docker containers.
Hi
I can see that even if we define a custom ORACLE_SID in the db.env.list still the database will be created with the default ORCLCDB. Is like the docker run ignores the db.env.list details.
On the other hand even if the default ORCLCDB SID details are used, from the SQLDeveloper I have an error pointing to wrong password so the db.env.list password is also not used when I create the container.
So, as a summary: how can we make sure that the db.env.list is not ignored when we create the container ?
Other than this db.env.list file issues, I can say that the article is very clear with all the steps needed: great article 😉
Hi,
I am getting the same error, any idea what is the fix for this below error???
Problem invoking WLST – Traceback (innermost last):
File “/u01/oracle/dockertools/createDomain.py”, line 482, in ?
File “/u01/oracle/dockertools/createDomain.py”, line 96, in __init__
File “/u01/oracle/dockertools/createDomain.py”, line 383, in validateDirectory
File “/u01/oracle/wlserver/common/wlst/modules/jython-modules.jar/Lib/javaos.py”, line 158, in makedirs
OSError: [Errno 0] couldn’t make directories: /u01/oracle/user_projects/domains
Hi, you may have installed “docker-snap”. Try uninstalling docker-snap and then try to install docker-ce. Follow these steps -> https://docs.docker.com/install/linux/docker-ce/ubuntu/
Maarteen,
i am getting source path error in macos, i have added source path in preferences/file sharing. can you please suggest..
docker run –name soadb –network=SOANet -p 1521:1521 -p 5500:5500 -v /scratch/DockerVolume/SOAVolume/DB:/opt/oracle/oradata –env-file db.env.list oracle/database:12.2.0.1-ee
docker: Error response from daemon: error while creating mount source path ‘/scratch/DockerVolume/SOAVolume/DB’: mkdir /scratch/DockerVolume/SOAVolume/DB: permission denied.
ERRO[0000] error waiting for container: context canceled
Hi, you may have installed “docker-snap”. Try uninstalling docker-snap and then try to install docker-ce. Follow these steps -> https://docs.docker.com/install/linux/docker-ce/ubuntu/
Hi,
I am getting the error as mkdir: cannot create directory ‘/u01/oracle/user_projects’ : Permission denied while creating the Admin server.
Problem invoking WLST – Traceback (innermost last):
File “/u01/oracle/dockertools/createDomain.py”, line 482, in ?
File “/u01/oracle/dockertools/createDomain.py”, line 96, in __init__
File “/u01/oracle/dockertools/createDomain.py”, line 383, in validateDirectory
File “/u01/oracle/wlserver/common/wlst/modules/jython-modules.jar/Lib/javaos.py”, line 158, in makedirs
OSError: [Errno 0] couldn’t make directories: /u01/oracle/user_projects/domains
Regards,
Ravi
Have you created the required directories on your host filesystem with correct permissions? It might help to also take a look at https://container-registry.oracle.com/pls/apex/f?p=113:4:114949214540320::NO:4:P4_REPOSITORY,AI_REPOSITORY,AI_REPOSITORY_NAME,P4_REPOSITORY_NAME,P4_EULA_ID,P4_BUSINESS_AREA_ID:252,252,Oracle%20SOA%20Suite,Oracle%20SOA%20Suite,1,0&cs=3QKjfGaVHRmPlj9-XDqgu05hZhLt9i1Wryni7lajaLgZo_n6K17Zs5QIb02z1o3PF6oIp-vbfXQRIO1FDPQURjQ
Hey Maarten, does this image have the binaries for creating an OSB managed server as well?
Yes it does. It has SOA, BPM and OSB. For more information see here: https://container-registry.oracle.com/pls/apex/f?p=113:4:114949214540320::NO:4:P4_REPOSITORY,AI_REPOSITORY,AI_REPOSITORY_NAME,P4_REPOSITORY_NAME,P4_EULA_ID,P4_BUSINESS_AREA_ID:252,252,Oracle%20SOA%20Suite,Oracle%20SOA%20Suite,1,0&cs=3QKjfGaVHRmPlj9-XDqgu05hZhLt9i1Wryni7lajaLgZo_n6K17Zs5QIb02z1o3PF6oIp-vbfXQRIO1FDPQURjQ (it’s a link to the soasuite Docker image in Oracle’s container registry)
I tried the above steps which you mentioned, and I am getting the error as mkdir: cannot create directory ‘/u01/oracle/user_projects’ : Permission denied while creating the Admin server.
Problem invoking WLST – Traceback (innermost last):
File “/u01/oracle/dockertools/createDomain.py”, line 482, in ?
File “/u01/oracle/dockertools/createDomain.py”, line 96, in __init__
File “/u01/oracle/dockertools/createDomain.py”, line 383, in validateDirectory
File “/u01/oracle/wlserver/common/wlst/modules/jython-modules.jar/Lib/javaos.py”, line 158, in makedirs
OSError: [Errno 0] couldn’t make directories: /u01/oracle/user_projects/domains
You have to uninstall “docker-snap” and install “docker-ce” -> google -> install docker-ce -> done
We are looking at having Oracle SOA Suite in a clustered fashion running on docker container in AWS.
However when we see the below note:
Support Information for Oracle WebLogic Server and Oracle Fusion Middleware Running in Docker Containers (Doc ID 2017945.1)
It mentions it not meant/supported for production usage. Hence i do not think we can go with this configuration except for a developers laptop.
Maarteen,
Once I login and I do docker pull
Login Succeeded
webadmin:soasuite maxm$ docker pull container-registry.oracle.com/database/enterprise:12.2.0.1
Error response from daemon: pull access denied for container-registry.oracle.com/database/enterprise, repository does not exist or may require ‘docker login’
webadmin:soasuite maxm$ docker pull container-registry.oracle.com/database/enterprise:12.2.0.1
Hi. You also have to go the website container-registry.oracle.com and accept the license for the product you want to use.
Hi Maarten, I tried the above steps which you mentioned, and I am getting the error as mkdir: cannot create directory ‘/u01/oracle/user_projects’ : Permission denied while creating the Admin server. I created the oracle user and created this folder manually and given all the permission but still getting the same error.
I have the same error, any idea ? thanks
Same error… Help
Hi Maarten, what Linux distro did you run the above Docker? Was it Oracle Linux?
I’ve used Oracle Linux 7.5 for this.
great article 🙂 thanks for writing this. I might try this in sometime.