![Running Oracle SOA Suite on Docker - Part 5: Interactively Creating Repository (RCU) and Domain](https://promatis.com/at/wp-content/uploads/sites/9/2023/03/autorenprofil_jmichler.jpg)
Running Oracle SOA Suite on Docker - Part 5: Interactively Creating Repository (RCU) and Domain
![johannes-michler Johannes Michler PROMATIS Horus Oracle](https://promatis.com/wp-content/uploads/2022/07/johannes-michler.png)
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. The second post then described how - using OCI and Oracle Linux - a host to run docker containers can be setup up within minutes. After that in the third post we covered provisioning an Oracle Database instance to hold the meta data of Oracle SOA Suite.
In the 4th episode we've covered how we can quickly create a metadata repository, configure and then start a SOA Suite environment in a headless mode.
In this 5th episode I'll demonstrate an alternative and show how the graphical RCU and config utility can be used within docker.
In upcoming episodes we will cover patching and more advanced deployment options.
Getting X-Forwarding into docker
While it is possible to run both the repository creation utility (rcu) as well as the utility to create the SOA Suite Weblogic domain in a headless mode it is (for a single environment) often easier to use the graphical UI to perform those operations. To start the utilities within a docker container on some remote host we can leverage X-Forwarding to have the UI shown on our local laptop. I prefer to use the X11 server that comes bundled into https://mobaxterm.mobatek.net/. First download that piece of software, start it and configure X11 e.g. as follows:
Basic X11 configuration of MobaXterm
After this double check that the server is running; eventually also open the windows firewall ports to allow connections to those ports (especially 6000):
MobaXterm with running X11 server
With those preparations performed connect to the docker host first and try to set the display as follows:
export DISPLAY=10.13.13.2:0.0 xterm
This should open a xterm window. If you don't have xterm installed, you can try xclock as an alternative for testing. If that is working, we can actually start the rcu.
Creating the SOA Suite docker container
Next we create the SOA Suite docker container especially used for rcu:
docker volume create soa1_userproject docker run --rm -it --name soa_initiate --network soanet1 -v soa1_userprojects:/u01/oracle/user_projects -h soa1 container-registry.oracle.com/middleware/soasuite_cpu:12.2.1.4-jdk8-ol7-240117 /bin/sh
Since rcu needs some additional packages to start in interactive mode we run (in a separate shell session):
docker exec -it --user root soa_initiate /bin/sh yum install -y libXext libXrender libXtst exit
After this preparation we can start the actual rcu script:
export DISPLAY=10.13.13.2:0.0 oracle_common/bin/rcu
This should bring up a dialog as follows:
rcu started from within a docker image displayed on a remote X11 host
Step through the schema creation and selected the database created in the previous blog post as the target:
Connecting to the Oracle Database Free 23ai instance running in a separate docker container
The remaining steps can be executed as if installing SOA Suite locally; you can refer to the official documentation for more details: https://docs.oracle.com/en/middleware/fusion-middleware/12.2.1.4/rcuug/index.html
Creating the SOA Suite FMW Domain
After having prepared the database the second step that requires X11 forwarding (or works easier with it) is the domain creation. Continue in the same shell session with the DISPLAY variable configured:
oracle_common/common/bin/config.sh
The configuration is performed in the usual way and should end with something like:
Successfully completed FMW domain creation
Start SOA Suite interactively for the first time
After those preparation steps we can exit from the shell session to the soa_initiate container used for rcu and config UIs. This will remove the associated docker container, however everything relevant is stored in the persistent soa1_userprojects docker volume. Thus, we can easily start SOA Suite Admin Server in a new (final) container soa1:
docker run --rm -it --name soa1 --network soanet1 -v soa1_userprojects:/u01/oracle/user_projects -h soa1 -p 7001:7001 -p 7003:7003 container-registry.oracle.com/middleware/soasuite_cpu:12.2.1.4-jdk8-ol7-240117 user_projects/domains/base_domain/startWebLogic.sh
This will make the ports 7001 (for the admin server) and the port 7003 (for the soa_server) exposed on the docker host. After the Adminserver is started you can start the soa_server1 as follows:
docker exec -it soa1 user_projects/domains/base_domain/bin/startManagedWebLogic.sh soa_server1
You should now be able to access the SOA Suite environment through a browser. It is also possible to use the pre-built scripts we've seen in the previous episode to start Admin- and managed server as follows (technically you may would even need the ADMIN_PASSWORD once). This will also give you proper Health-Checking:
docker run -d --rm -e DOMAIN_NAME=base_domain -e DOMAIN_ROOT=/u01/oracle/user_projects/domains --name soaadmin --network soanet1 -v soa1_userprojects:/u01/oracle/user_projects -p 7001:7001 container-registry.oracle.com/middleware/soasuite_cpu:12.2.1.4-jdk8-ol7-240117 /bin/sh -c "/u01/oracle/container-scripts/startAS.sh; sleep infinity" docker run -d --rm -e MANAGED_SERVER_CONTAINER=true -e MANAGEDSERVER_PORT=7003 -e DOMAIN_NAME=base_domain -e DOMAIN_ROOT=/u01/oracle/user_projects/domains -e MANAGED_SERVER=soa_server1 -e ADMIN_PASSWORD=Promatis1 -e ADMIN_HOST=soaadmin -e ADMIN_PORT=7001 --name soamanaged1 --network soanet1 -v soa1_userprojects:/u01/oracle/user_projects -p 7003:7003 container-registry.oracle.com/middleware/soasuite_cpu:12.2.1.4-jdk8-ol7-240117 "/u01/oracle/container-scripts/startMS.sh"
Summary
By using X Forwarding it is possible to create the metadata repository as well as configure the domain for Oracle SOA Suite interactively and with all flexibility. In an upcoming blog post we'll cover how the docker image can get patched as well as which other options are available to create a SOA Suite environment in OCI.