Docker: Configuring an Oracle SOA and OSB domain — Long overdue :-)
It has been 8+ years since docker brought containers into the mainstream and so many changes that came with this revolutionary technology. From Dev to Production, it has changed the way application developments and deployments are done today. I won’t go into detail on how to set up Docker and my main focus is to deploy SOA/OSB domain using the Oracle Containers. I have googled and reviewed many other postings but they kinda lack the more typical setups of many domains configured today.
Docker has great documentation so I will try to keep my posts simple and concise and give those documentation links wherever applicable.
I will build an Oracle SOA/OSB domain version 12.2.1.3. The domain will consist of an AdminServer, osb_server1,2, and soa_server1,2 and each to its own docker instance. I will deploy the domain using docker-compose. This is using the docker-compose provided by Oracle but I added few changes.
Oracle GitHub → https://github.com/oracle/docker-images/tree/main/OracleSOASuite/samples
Working on uploading this project on Github so stay tuned on that….
Note: I am running this SOA/OSB domain on my laptop, so make sure you have at least 16GB of memory on your laptop or sandbox server.
Lets’s begin!
Set up env parameters
Here is the setenv.sh that will execute
executing it
Now that we are set, let's look at the docker-compose.yaml
I won’t go into details about what is docker-compose.yaml syntax as I am assuming that you have an understanding of docker-compose.
The docker-compose.yaml has 7 services.
- soadb →which builds a docker instance of the oracle db 12.2.0.1.
- soaas → which runs the rcu, build soaosb domain, and start the AdminServer.
- soams1 → build and start the soa_server1.
- soams2 → build and start the soa_server2.
- osbms1 → build and start the osb_server1.
- osbms2 → build and start the osb_server2
- Network
Container Database
As you can see, we are using container-registry.oracle.com to pull the Oracle DB images. If you already have downloaded it and tag it, then, just replace it with your image.
SOA ADMIN
One thing to note is that DOMAIN_TYPE. It can be configured as SOA, OSB, or combinations of soaosb, soaess, soamft. These are pre-configured.
In this case, I am setting it up as soaosb.
We are using Volume to have the domains persisted in the local file system.
SOA MS1
Notice that it depends on SOA AdminServer to be up and running.
SOA MS2
Notice that I am exposing an external port 8002 since 8001 is already bind to SOA MS1. Internal, the docker instance is using port 8001. The same will be for OSB_MS2
OSB MS1
OSB MS2
Network
This is not really necessary as docker-compose creates a binding network but I wanted to use a different network.
docker network ls
Execution Time
Start the Database first.
Start SOA DB
docker-compose up -d soadb
docker logs -f soadb → View the logs
Now that this oracle DB instance is started, we need to reset the password. This setPasswd.sh was provided by Oracle.
In the same directory where you have the setPasswd.sh, execute the following
docker cp setPasswd.sh soadb:/home/oracle; docker exec soadb /home/oracle/setPasswd.sh Welcome123#
Start the SOA AdminSever
docker-compose up -d soaas
docker logs -f soaas
I downloaded the java.security file and updated with the urandom and will upload it to the docker instance.
docker cp java.security soaas:/u01/jdk/jre/lib/security
Also, I am disabling the Derby Database since we don’t use it
docker exec soaas mv /u01/oracle/wlserver/common/derby/lib/derby.jar /u01/oracle/wlserver/common/derby/lib/derby.jar.old
This will be done to all the instances in the SOA/OSB domain.
Start the OSB Instances
docker-compose up -d osbms1; docker-compose up -d osbms2
docker logs -f osbms1 and docker logs -f osbms2 to view the logs or you can go volume dir and view the logs there.
Start the SOA Instances
docker-compose up -d soams1; docker-compose up -d soams2
Up and Running
you can see all the docker instances running.
Accessing the SOA and OSB Consoles