diff --git a/OracleSOASuite/dockerfiles/14.1.2.0/Containerfile b/OracleSOASuite/dockerfiles/14.1.2.0/Containerfile new file mode 100644 index 0000000000..6380c15dd4 --- /dev/null +++ b/OracleSOASuite/dockerfiles/14.1.2.0/Containerfile @@ -0,0 +1,143 @@ +# +# Copyright (c) 2025, Oracle and/or its affiliates. +# +# Licensed under the Universal Permissive License v 1.0 as shown at +# https://oss.oracle.com/licenses/upl +# +# ORACLE CONTAINERFILES PROJECT +# -------------------------- +# This is the Containerfile for Oracle SOA Suite +# +# REQUIRED FILES TO BUILD THIS IMAGE +# ---------------------------------- +# See soasuite.download file in the install directory +# Also see soapatches.download file in the patches directory +# +# Pull base image +# --------------- +FROM oracle/fmw-infrastructure:14.1.2.0.0 as builder + +# +# Environment variables required for this build (do NOT change) +# ------------------------------------------------------------- +USER root +ENV FMW_JAR1=fmw_14.1.2.0.0_soa.jar \ + FMW_JAR2=fmw_14.1.2.0.0_osb.jar \ + FMW_JAR3=fmw_14.1.2.0.0_b2bhealthcare.jar \ + OPATCH_PATCH_DIR="${OPATCH_PATCH_DIR:-/u01/opatch_patch}" + +# +# Copy installers and patches for install +# ------------------------------------------- +COPY $FMW_JAR1 $FMW_JAR2 $FMW_JAR3 /u01/ +RUN mkdir /u01/patches ${OPATCH_PATCH_DIR} && \ + chown oracle:root -R /u01 +COPY patches/* /u01/patches/ +COPY opatch_patch/* ${OPATCH_PATCH_DIR}/ +COPY container-scripts/* /u01/oracle/container-scripts/ + +WORKDIR /u01 +RUN chmod 755 ./*.jar && \ + chmod +xr /u01/oracle/container-scripts/*.* + +WORKDIR /u01/oracle +# +# Copy files and packages for install +# ----------------------------------- +USER oracle +COPY install/* /u01/ + +WORKDIR /u01 +RUN "$JAVA_HOME/bin/java" -jar "$FMW_JAR1" -silent -responseFile /u01/soasuite.response -invPtrLoc /u01/oraInst.loc -jreLoc "$JAVA_HOME" -ignoreSysPrereqs -force -novalidation ORACLE_HOME="$ORACLE_HOME" && \ + "$JAVA_HOME/bin/java" -jar "$FMW_JAR2" -silent -responseFile /u01/osb.response -invPtrLoc /u01/oraInst.loc -jreLoc "$JAVA_HOME" -ignoreSysPrereqs -force -novalidation ORACLE_HOME="$ORACLE_HOME" INSTALL_TYPE="Service Bus" && \ + "$JAVA_HOME/bin/java" -jar "$FMW_JAR3" -silent -responseFile /u01/b2b.response -invPtrLoc /u01/oraInst.loc -jreLoc "$JAVA_HOME" -ignoreSysPrereqs -force -novalidation ORACLE_HOME="$ORACLE_HOME" INSTALL_TYPE="B2B" && \ + rm -fr /u01/*.jar /u01/*.response + +# +# Apply OPatch patch +# ------------------ +# + +WORKDIR ${OPATCH_PATCH_DIR} +RUN opatchzip=`ls ${OPATCH_PATCH_DIR}/p*.zip 2>/dev/null`; \ + if [ ! -z "$opatchzip" ]; then \ + echo "Applying the below OPatch patch present in ${OPATCH_PATCH_DIR} directory."; \ + ls p*.zip; \ + echo ""; \ + echo "Extracting patch: ${opatchzip}"; \ + $JAVA_HOME/bin/jar xf ${opatchzip} ; \ + if ! $JAVA_HOME/bin/java -jar ${OPATCH_PATCH_DIR}/6880880/opatch_generic.jar -silent oracle_home=$ORACLE_HOME; then \ + echo "Applying patch to opatch Failed" ; \ + exit 1 ; \ + fi; \ + rm -rf ${OPATCH_PATCH_DIR}; \ + echo "OPatch patch applied successfully."; \ + #$ORACLE_HOME/OPatch/opatch version; \ + fi + +# +# Apply SOA Patches +# ----------------- + +WORKDIR /u01/patches +RUN export OPATCH_NO_FUSER=TRUE && patchzips=`ls /u01/patches/p*.zip 2>/dev/null`; \ + if [ ! -z "$patchzips" ]; then \ + echo "Below patches present in patches directory. Applying these patches:"; \ + ls p*.zip; \ + echo ""; \ + for filename in `ls p*.zip`; do echo "Extracting patch: ${filename}"; $JAVA_HOME/bin/jar xf ${filename}; done; \ + rm -f /u01/patches/p*.zip; \ + $ORACLE_HOME/OPatch/opatch napply -silent -oh $ORACLE_HOME -jre $JAVA_HOME -invPtrLoc /u01/oraInst.loc -phBaseDir /u01/patches; \ + $ORACLE_HOME/OPatch/opatch util cleanup -silent; \ + rm -rf /u01/patches/* /u01/oracle/cfgtoollogs/opatch/*; \ + echo "Patches applied in SOA oracle home are:"; \ + $ORACLE_HOME/OPatch/opatch lspatches; \ + # cd $ORACLE_HOME/OPatch; \ + # $ORACLE_HOME/OPatch/opatch lspatches; \ + else \ + echo "No patches present in patches directory. Skipping patch application."; \ + fi && \ + # Extract XEngine tar gz if present + if [ -d "${ORACLE_HOME}/soa/soa/thirdparty/edifecs" ] && [ -f "$ORACLE_HOME/soa/soa/thirdparty/edifecs/XEngine_8_4_1_23.tar.gz" ]; then \ + tar -zxvf "$ORACLE_HOME/soa/soa/thirdparty/edifecs/XEngine_8_4_1_23.tar.gz" \ + -C "$ORACLE_HOME/soa/soa/thirdparty/edifecs"; \ + else \ + echo "No XEngine_8_4_1_23.tar.gz present in ${ORACLE_HOME}/soa/soa/thirdparty/edifecs directory. Skipping untar."; \ + fi && \ + # zip as few log files grow larger when patches are installed. + if ls /u01/oracle/cfgtoollogs/opatch/*.log; then \ + gzip /u01/oracle/cfgtoollogs/opatch/*.log; \ + fi + +WORKDIR /u01/oracle +# +# Rebuild from base image +# ----------------------- + +FROM oracle/fmw-infrastructure:14.1.2.0.0 + +# +# Label +# ---------- +LABEL "provider"="Oracle" + +# +# Install the required packages +# ----------------------------- +USER root +ENV PATH=$PATH:/u01/oracle/container-scripts:/u01/oracle/oracle_common/modules/thirdparty/org.apache.ant/apache-ant/bin +RUN microdnf install -y hostname && \ + microdnf clean all + +COPY --from=builder --chown=oracle:root /u01 /u01 + +# +# Define default command to start bash. +# +USER oracle +HEALTHCHECK --start-period=5m --interval=1m CMD curl -k -s --fail `$HEALTH_SCRIPT_FILE` || exit 1 +WORKDIR $ORACLE_HOME +CMD ["/u01/oracle/container-scripts/createDomainAndStart.sh"] + + + diff --git a/OracleSOASuite/dockerfiles/14.1.2.0/README.md b/OracleSOASuite/dockerfiles/14.1.2.0/README.md new file mode 100644 index 0000000000..9a866f9a00 --- /dev/null +++ b/OracleSOASuite/dockerfiles/14.1.2.0/README.md @@ -0,0 +1,324 @@ +# Running Oracle SOA Suite in containers + +Sample configurations to facilitate installation, configuration, and environment setup for Podman users. This project includes quick start `Containerfiles` for Oracle SOA 14.1.2.0 based on Oracle Linux 8, Oracle JDK 17, and Oracle Fusion Middleware Infrastructure 14.1.2.0. + +**IMPORTANT**: We provide Containerfiles as samples to build SOA images but this is _NOT_ a recommended practice. We recommend obtaining patched SOA Suite images; patched images have the latest security patches. For more information, see [Obtaining, Creating, and Updating Oracle Fusion Middleware Images with Patches](). + +The samples in this repository are for development purposes only. We recommend for production to use alternative methods, we suggest obtaining base SOA Suite images from the [Oracle Container Registry](). + +Refer [SOA Suite Image build using WebLogic Image Tool]() to create custom images and refer [Oracle SOA Suite Domains on Kubernetes]() to deploy and manage SOA Suite domains using open source Weblogic Kubernetes Operator. + +The sample files in this repository are for development purposes, customers and users are welcome to use them as starters, and customize, tweak, or create from scratch, new scripts and Containerfiles. + + +At the end of this configuration there will be at least two running containers: +1. (Optional) Oracle Database container (only when RCU schema is created in a database running in a container) +2. Oracle WebLogic Server Administration Server container +3. Two Oracle WebLogic Server Managed Server containers (Oracle SOA Server or Oracle Service Bus Server) + +This documentation provides the steps for a Single node scenario where all the containers are created on a single node. + +To create the Podman network and run containers, follow these steps: + + 1. [Create a network](#1-create-a-network) + 2. [Mount a host directory as a data volume](#2-mount-a-host-directory-as-a-data-volume) + 3. [Create the database](#3-create-the-database) + 4. [Obtain the SOA 14.1.2.0 container image](#4-obtain-the-soa-14120-container-image) + 5. [Create a container for the Administration Server](#5-create-a-container-for-the-administration-server) + 6. [Create SOA Managed Server containers](#6-create-soa-managed-server-containers) + 7. [Create Oracle Service Bus Managed Server containers](#7-create-oracle-service-bus-managed-server-containers) + 8. [Access the Consoles](#8-access-the-consoles) + 9. [Clean up the environment](#9-clean-up-the-environment) + +## 1. Create a network + +The containers will be connected using a Podman user-defined network. + +### Create a user-defined network + +In this configuration, the creation of a user-defined network will enable the communication between the containers just using container names. For this setup we will use a user-defined network using bridge driver. + +Create a user-defined network using the bridge driver: +`$ podman network create -d bridge ` + +For example: +`$ podman network create -d bridge SOANet` + +## 2. Mount a host directory as a data volume + +Data volumes are designed to persist data, independent of the container’s lifecycle. Podman automatically creates volumes when you specify a volume name with the -v option, without the need to predefine directories on the host. +In this project, the volumes will be used to store Database data files and WebLogic Server domain files. These volumes will be automatically created and managed by Podman. The names of the volumes are specified in the podman run commands. + +`$ podman -d --name soadb -v soadb_vol:/opt/oracle/oradata` + +The default storage location for Podman volumes is determined by Podman’s storage configuration. +To identify the location of a volume, run: + +`$ podman volume inspect ` + +The Mountpoint entry should point to the location of the volume in the host. + +Podman creates volumes with default permissions. Ensure that the container’s oracle user has the necessary read/write/execute permissions on the auto-created volume. This may require setting proper permissions or ownership using a post-creation script, depending on your environment. + +`$ sudo chmod -R 777 $HOME/.local/shared/containers/storage/volumes/soadb_vol` + +To determine if a user already exists on your node system with uid:gid of 1000, run: + +`$ getent passwd 1000` + +If this command returns a username (which is the first field), you can skip the following `useradd` command. If not, create the `oracle` user manually: + +`$ useradd -u 1000 -g 0 oracle` + +## 3. Create the database + +You need to have a running database container or a database running on any machine. The database connection details are required for creating SOA-specific RCU schemas while configuring the SOA domain. While using a 19.3.0.0 CDB/PDB DB, ensure a PDB is used to load the schemas. RCU loading on a CDB is not supported. + +The Oracle database server container requires custom configuration parameters for starting up the container. These custom configuration parameters correspond to the datasource parameters in the SOA image to connect to the database running in the container. + +To run the database container to host the RCU schemas: + +1. Add the following parameters to a `db.env.txt` file: + ``` bash + ORACLE_SID=soadb + ORACLE_PDB=soapdb + ORACLE_PWD=Oradoc_db1 + ENABLE_ARCHIVELOG=true + ``` +1. Enter the following command: + ``` bash + `$ podman run -d --name soadb --network=SOANet -p 1521:1521 -p 5500:5500 -v soadb_vol:/opt/oracle/oradata --env-file ./db.env.txt container-registry.oracle.com/database/enterprise:19.3.0.0` + ``` +1. Verify that the database is running and healthy. The `STATUS` field should show `healthy` in the output of `podman ps`. + +## 4. Obtain the SOA 14.1.2.0 container image + +You can either build the SOA image with the `Containerfile` provided or use the already available Oracle SOA Suite (14.1.2.0) image in the [Oracle Container Registry](https://container-registry.oracle.com/ords/ocr/ba/middleware/soasuite). + +## 5. Create a container for the Administration Server + +Start a container to launch the Administration Server from the image created using the steps above. The environment variables used to configure the domain are defined in `adminserver.env.list`. Replace in `adminserver.env.list` the values for the Database and WebLogic Server passwords. + +Create an environment file `adminserver.env.list`: +``` bash +CONNECTION_STRING=:/ +RCUPREFIX= +DB_PASSWORD= +DB_SCHEMA_PASSWORD= +ADMIN_PASSWORD= +DOMAIN_NAME=soainfra +DOMAIN_TYPE= +ADMIN_HOST= +ADMIN_PORT= +PERSISTENCE_STORE= +``` +>IMPORTANT: `DOMAIN_TYPE` must be carefully chosen and specified depending on the use case. It can't be changed once you proceed. +For Oracle SOA Suite domains, the supported domain types are `soa`, `osb` and `soaosb`. +- soa : Deploys a SOA Domain with Enterprise Scheduler (ESS) +- osb : Deploys an OSB Domain (Oracle Service Bus) +- soaosb : Deploys a Domain with SOA, OSB and Enterprise Scheduler (ESS) + +For example: +``` bash +CONNECTION_STRING=soadb:1521/soapdb +RCUPREFIX=SOA1 +DB_PASSWORD=Oradoc_db1 +DB_SCHEMA_PASSWORD=Oradoc_db1 +ADMIN_PASSWORD=welcome1 +DOMAIN_NAME=soainfra +DOMAIN_TYPE=soa +ADMIN_HOST= +ADMIN_PORT=7001 +PERSISTENCE_STORE=jdbc +``` +If `PERSISTENCE_STORE` is not specified, the default value is `jdbc`. When `PERSISTENCE_STORE=jdbc`, a JDBC persistence store will be configured for all servers for TLOG + SOAJMS/UMSJMS servers. If `PERSISTENCE_STORE=file`, file-based persistence stores will be used instead. + + +To start a Podman container with a SOA domain and the WebLogic Server Administration Server, use the `podman run` command and pass the `adminserver.env.list` file. + +For example: +``` bash +`$ podman run -it --name soaas --network=SOANet -p 7001:7001 -v soadomain_vol:/u01/oracle/user_projects --env-file ./adminserver.env.list container-registry.oracle.com/middleware/soasuite:14.1.2.0-17-ol8-241205` +``` +The options `-it` in the above command runs the container in interactive mode and you will be able to see the commands running in the container. This includes the command for RCU creation, domain creation, and configuration, followed by starting the Administration Server. + +> IMPORTANT: You need to wait until all the above commands are run before you can access the Administration Server Web Console. The following lines highlight when the Administration Server is ready to be used: +``` bash +INFO: Admin server is running + +INFO: Admin server running, ready to start Managed Server +``` +These lines indicate that the Administration Server started successfully with the name `soaas`. Mapping container port `7001` to node port `7001` enables access to the WebLogic Server node outside of the local node. Connecting to the `SOANet` network enables access to the DB container by its name (`soadb`). + +To view the Administration Server logs, enter the following command: +``` bash +`$ podman logs -f \` +``` +## 6. Create SOA Managed Server containers + +> **Note**: These steps are required only for the `soa` and `soaosb` domain type. + +You can start containers to launch the SOA Managed Servers from the image created. + +Create an environment variables file specific to each Managed Server in the cluster in the SOA domain. For example, `soaserver1.env.list` and `soaserver2.env.list` for a SOA cluster: +``` bash +MANAGED_SERVER= +DOMAIN_NAME=soainfra +ADMIN_HOST= +ADMIN_PORT= +ADMIN_PASSWORD= +MANAGED_SERVER_CONTAINER=true +MANAGEDSERVER_PORT= +``` + +>IMPORTANT: In the Managed Servers environment variables file +> - `MANAGED_SERVER` value must be `soa_server1` or `soa_server2` for the `soa` and `soaosb` domain type. +> - `MANAGEDSERVER_PORT` must be `7003` for `soa_server1` or `7005` for `soa_server2`. +> - `ADMIN_PORT` must match the **node** port mapping the Administration Server container port `7001`. + +Example for `soaserver1.env.list`: +``` bash +MANAGED_SERVER=soa_server1 +DOMAIN_NAME=soainfra +ADMIN_HOST= +ADMIN_PORT=7001 +ADMIN_PASSWORD=welcome1 +MANAGED_SERVER_CONTAINER=true +MANAGEDSERVER_PORT=7003 +``` + +Example for `soaserver2.env.list`: +``` bash +MANAGED_SERVER=soa_server2 +DOMAIN_NAME=soainfra +ADMIN_HOST= +ADMIN_PORT=7001 +ADMIN_PASSWORD=welcome1 +MANAGED_SERVER_CONTAINER=true +MANAGEDSERVER_PORT=7005 +``` +To start a Podman container for the SOA server (for `soa_server1`), you can use the `podman run` command passing `soaserver1.env.list` with port `7003`. + +For example: +``` bash +`$ podman run -it --name soams1 --network=SOANet -p 7003:7003 -v soadomain_vol:/u01/oracle/user_projects --env-file ./soaserver1.env.list container-registry.oracle.com/middleware/soasuite:14.1.2.0-17-ol8-241205 "/u01/oracle/container-scripts/startMS.sh"` +``` +Similarly, to start a second Podman container for the SOA server (for `soa_server2`), you can use the `podman run` command passing `soaserver2.env.list` with port `7005`. + +For example: +``` bash +`$ podman run -it --name soams2 --network=SOANet -p 7005:7005 -v soadomain_vol:/u01/oracle/user_projects --env-file ./soaserver2.env.list container-registry.oracle.com/middleware/soasuite:14.1.2.0-17-ol8-241205 "/u01/oracle/container-scripts/startMS.sh"` +``` + +> **Note**: Using `-v` reuses the volume created by the Administration Server container. + + +The following lines indicate when the SOA Managed Server is ready to be used: +``` bash +INFO: Managed Server is running + +INFO: Managed Server has been started +``` +Once the Managed Server container is created, you can view the server logs: + +`$ podman logs -f \` + +## 7. Create Oracle Service Bus Managed Server containers + +> **Note**: These steps are required only for the `osb` and `soaosb` domain type. + +You can start containers to launch the Oracle Service Bus Managed Servers from the image created. + +Create an environment variables file specific to each Managed Server in the cluster in the SOA domain. For example, `osbserver1.env.list` and `osbserver2.env.list` for an Oracle Service Bus cluster: +``` bash +MANAGED_SERVER= +DOMAIN_NAME=soainfra +ADMIN_HOST= +ADMIN_PORT= +ADMIN_PASSWORD= +MANAGED_SERVER_CONTAINER=true +MANAGEDSERVER_PORT= +``` + +>IMPORTANT: In the Managed Servers environment variables file +> - `MANAGED_SERVER` value must be `osb_server1` or `osb_server2` for the `osb` and `soaosb` domain type. +> - `MANAGEDSERVER_PORT` must be `8002` for `osb_server1` or `8004` for `osb_server2`. +> - `ADMIN_PORT` must match the **node** port mapping the Administration Server container port `7001`. + +Example for `osbserver1.env.list`: +``` bash +MANAGED_SERVER=osb_server1 +DOMAIN_NAME=soainfra +ADMIN_HOST= +ADMIN_PORT=7001 +ADMIN_PASSWORD=welcome1 +MANAGED_SERVER_CONTAINER=true +MANAGEDSERVER_PORT=8002 +``` +Example for `osbserver2.env.list`: +```bash +MANAGED_SERVER=osb_server2 +DOMAIN_NAME=soainfra +ADMIN_HOST= +ADMIN_PORT=7001 +ADMIN_PASSWORD=welcome1 +MANAGED_SERVER_CONTAINER=true +MANAGEDSERVER_PORT=8004 +``` + +To start a Podman container for the Oracle Service Bus server (for `osb_server1`), you can use the `podman run` command passing `osbserver1.env.list`. + +For example: +``` bash +`$ podman run -it --name osbms1 --network=SOANet -p 8002:8002 -v soadomain_vol:/u01/oracle/user_projects --env-file ./osbserver1.env.list container-registry.oracle.com/middleware/soasuite:14.1.2.0-17-ol8-241205 "/u01/oracle/container-scripts/startMS.sh"` +``` +Similarly, to start a second Podman container for the Oracle Service Bus server (for `osb_server2`), you can use the `podman run` command passing `osbserver2.env.list`. + +For example: +``` bash +`$ podman run -it --name osbms1 --network=SOANet -p 8004:8004 -v soadomain_vol:/u01/oracle/user_projects --env-file ./osbserver2.env.list container-registry.oracle.com/middleware/soasuite:14.1.2.0-17-ol8-241205 "/u01/oracle/container-scripts/startMS.sh"` +``` +The following lines indicate when the Oracle Service Bus Managed Server is ready to be used: +``` bash +INFO: Managed Server is running + +INFO: Managed Server has been started +``` + +Once the Managed Server container is created, you can view the server logs: +``` bash +`$ podman logs -f \` +``` + +## 8. Access the Consoles +Now you can access the following Consoles: + +* EM Console at http://\:7001/em with weblogic/welcome1 credentials. +* SOA infra Console at http://\:7003/soa-infra with weblogic/welcome1 credentials. +* SOA infra Console at http://\:7005/soa-infra with weblogic/welcome1 credentials. +* Service Bus Console at http://\:7001/servicebus with weblogic/welcome1 credentials. + + +> **Note**: `hostname` is the FQDN of the host name where the container is running. Do not use 'localhost' for `ADMIN_HOST`. Use the actual FQDN name of the host as `ADMIN_HOST`.
+In a multinode scenario, you cannot access the `SOA Composer` and `BPM Worklist` application URLs from the `soa-infra` application page. + +## 9. Clean up the environment + +1. Stop and remove all running containers from the node where the container is running: + ``` bash + `$ podman stop \` + + `$ podman rm \` + ``` + where containers are `soadb`, `soaas`, `soams1`, `soams2`, `osbms1` and `osbms2`. + +2. Clear the data volume: + ``` bash + `$ podman volume rm soadb_vol` + + `$ podman volume rm soadomain_vol` + ``` +3. Remove the Podman network: + ``` bash + `$ podman network rm SOANet` + ``` diff --git a/OracleSOASuite/dockerfiles/14.1.2.0/container-scripts/build.xml b/OracleSOASuite/dockerfiles/14.1.2.0/container-scripts/build.xml new file mode 100755 index 0000000000..d56cce20aa --- /dev/null +++ b/OracleSOASuite/dockerfiles/14.1.2.0/container-scripts/build.xml @@ -0,0 +1,100 @@ + + + + +DOMAIN HOME:${DOMAIN_HOME} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/OracleSOASuite/dockerfiles/14.1.2.0/container-scripts/createDomain.py b/OracleSOASuite/dockerfiles/14.1.2.0/container-scripts/createDomain.py new file mode 100755 index 0000000000..018b55eff5 --- /dev/null +++ b/OracleSOASuite/dockerfiles/14.1.2.0/container-scripts/createDomain.py @@ -0,0 +1,879 @@ +# +# +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. +# +# Licensed under the Universal Permissive License v 1.0 as shown at +# https://oss.oracle.com/licenses/upl +# + +import os +import sys + +import com.oracle.cie.domain.script.jython.WLSTException as WLSTException + +class SOA12214Provisioner: + + jrfDone = 0; + + MACHINES = { + 'machine1' : { + 'NMType': 'SSL', + 'ListenAddress': 'localhost', + 'ListenPort': 5658 + } + } + + SOA_CLUSTERS = { + 'soa_cluster' : {} + } + + OSB_CLUSTERS = { + 'osb_cluster' : {} + } + + SERVERS = { + 'AdminServer' : { + 'ListenAddress': '', + 'ListenPort': 7001, + 'Machine': 'machine1' + } + + } + + SOA_SERVERS = { + 'soa_server1' : { + 'ListenAddress': '', + 'ListenPort': 7003, + 'Machine': 'machine1', + 'Cluster': 'soa_cluster' + }, + 'soa_server2' : { + 'ListenAddress': '', + 'ListenPort': 7005, + 'Machine': 'machine1', + 'Cluster': 'soa_cluster' + } + } + + OSB_SERVERS = { + 'osb_server1' : { + 'ListenAddress': '', + 'ListenPort': 8002, + 'Machine': 'machine1', + 'Cluster': 'osb_cluster' + }, + 'osb_server2' : { + 'ListenAddress': '', + 'ListenPort': 8004, + 'Machine': 'machine1', + 'Cluster': 'osb_cluster' + } + } + + + JRF_12214_TEMPLATES = { + 'baseTemplate' : '@@ORACLE_HOME@@/wlserver/common/templates/wls/wls.jar', + 'extensionTemplates' : [ + '@@ORACLE_HOME@@/oracle_common/common/templates/wls/oracle.jrf_template.jar', + '@@ORACLE_HOME@@/oracle_common/common/templates/wls/oracle.jrf.ws.async_template.jar', + '@@ORACLE_HOME@@/oracle_common/common/templates/wls/oracle.wsmpm_template.jar', + '@@ORACLE_HOME@@/oracle_common/common/templates/wls/oracle.ums_template.jar', + '@@ORACLE_HOME@@/em/common/templates/wls/oracle.em_wls_template.jar' + ], + 'serverGroupsToTarget' : [ 'JRF-MAN-SVR', 'WSMPM-MAN-SVR' ] + } + + SOA_12214_TEMPLATES = { + 'extensionTemplates' : [ + '@@ORACLE_HOME@@/soa/common/templates/wls/oracle.soa.refconfig_template.jar', + '@@ORACLE_HOME@@/oracle_common/common/templates/wls/oracle.ess.basic_template.jar', + '@@ORACLE_HOME@@/em/common/templates/wls/oracle.em_ess_template.jar' + ], + 'serverGroupsToTarget' : [ 'SOA-MGD-SVRS', 'ESS-MGD-SVRS' ] + } + + SOA_B2B_12214_TEMPLATES = { + 'extensionTemplates' : [ + '@@ORACLE_HOME@@/soa/common/templates/wls/oracle.soa.refconfig_template.jar', + '@@ORACLE_HOME@@/oracle_common/common/templates/wls/oracle.ess.basic_template.jar', + '@@ORACLE_HOME@@/em/common/templates/wls/oracle.em_ess_template.jar', + '@@ORACLE_HOME@@/soa/common/templates/wls/oracle.soa.b2b.refconfig_template.jar' + ], + 'serverGroupsToTarget' : [ 'SOA-MGD-SVRS', 'ESS-MGD-SVRS' ] + } + + OSB_12214_TEMPLATES = { + 'extensionTemplates' : [ + '@@ORACLE_HOME@@/osb/common/templates/wls/oracle.osb.refconfig_template.jar' + ], + 'serverGroupsToTarget' : [ 'OSB-MGD-SVRS-ONLY' ] + } + + JMSServersList = ['SOAJMSServer','UMSJMSServer'] + + def __init__(self, oracleHome, javaHome, domainParentDir): + self.oracleHome = self.validateDirectory(oracleHome) + self.javaHome = self.validateDirectory(javaHome) + self.domainParentDir = self.validateDirectory(domainParentDir, create=True) + return + + def configureXADataSources(self): + cd('/JDBCSystemResources/SOADataSource/JdbcResource/SOADataSource') + cd('JDBCDriverParams/NO_NAME_0') + set('DriverName', 'oracle.jdbc.xa.client.OracleXADataSource') + cd('/JDBCSystemResources/EDNDataSource/JdbcResource/EDNDataSource') + cd('JDBCDriverParams/NO_NAME_0') + set('DriverName', 'oracle.jdbc.xa.client.OracleXADataSource') + cd('/JDBCSystemResources/OraSDPMDataSource/JdbcResource/OraSDPMDataSource') + cd('JDBCDriverParams/NO_NAME_0') + set('DriverName', 'oracle.jdbc.xa.client.OracleXADataSource') + return + + def configureXADataSourcesForOSB(self): + cd('/JDBCSystemResources/SOADataSource/JdbcResource/SOADataSource') + cd('JDBCDriverParams/NO_NAME_0') + set('DriverName', 'oracle.jdbc.xa.client.OracleXADataSource') + cd('/JDBCSystemResources/OraSDPMDataSource/JdbcResource/OraSDPMDataSource') + cd('JDBCDriverParams/NO_NAME_0') + set('DriverName', 'oracle.jdbc.xa.client.OracleXADataSource') + return + + def createDomain(self, name, user, password, db, dbPrefix, dbPassword, domainType): + domainHome = self.createBaseDomain(name, user, password, domainType) + + if domainType == "soa" or domainType == "soaosb": + self.extendSoaDomain(domainHome, db, dbPrefix, dbPassword) + + if domainType == "soab2b" or domainType == "soaosbb2b": + self.extendSoaB2BDomain(domainHome, db, dbPrefix, dbPassword) + + if domainType == "osb" or domainType == "soaosb" or domainType == "soaosbb2b": + self.extendOsbDomain(domainHome, db, dbPrefix, dbPassword, domainType) + + if persistentStore == 'jdbc': + self.configureTlogJDBCStore(domainHome, domainType) + self.reConfigureJMSStore(domainHome, domainType) + else: + print 'persistentStore = '+persistentStore+'...skipping JDBC reconfig' + + def configureTlogJDBCStore(self, domainHome, domainType): + readDomain(domainHome) + print 'START Configuring TLog JDBC Persistent Store' + try: + ## Get the schema information for 'WLSSchemaDataSource' + schemaPrefix = self.getDSSchemaPrefix ('WLSSchemaDataSource') + serverList = ['AdminServer'] + if domainType == "soa" or domainType == "soaosb" or domainType == "soab2b" or domainType == "soaosbb2b": + serverList.extend(list(self.SOA_SERVERS.keys())) + if domainType == "osb" or domainType == "soaosb" or domainType == "soaosbb2b": + serverList.extend(list(self.OSB_SERVERS.keys())) + print serverList + for server in serverList: + self.setTlogJDBCStoreAttributes(server, schemaPrefix) + except: + raise + updateDomain() + closeDomain() + + def setTlogJDBCStoreAttributes(self, server, schemaPrefix): + print 'UPDATE TLog JDBC Persistent Store properties for server '+server + try: + cd ('/') + cd ('/Servers/'+server) + try : + tlog = get('TransactionLogJDBCStore') + print 'tlog = '+ str(tlog) + if (tlog != None and tlog.getDataSource() != None and tlog.isEnabled()) : + print ' tlo ',tlog , ' DS ' , tlog.getDataSource(), ' enabled ' , tlog.isEnabled() + return false + except Exception, detail: + print 'Ignoring, Failed to xheck if TLog JDBC Store exists ['+server+']', detail + + ## Create TransactionLog JDBC Store + print 'Creating TLOG JDBC store ...' + create(server,'TransactionLogJDBCStore') + + cd ('TransactionLogJDBCStore/'+server) + set('DataSource','WLSSchemaDataSource') + + print 'Using TLogs WLStore prefixName '+schemaPrefix+'.TLOG_'+server.upper()+'_' + set('PrefixName',schemaPrefix+'.TLOG_'+server.upper()+'_') + set('Enabled','true') + return true + + except Exception, detail: + print 'Failed to configure TLog JDBC Persistent Store for ['+server+']', detail + raise Exception ('Exception setting SOA Tlog JDBC Store Attributes') + + def reConfigureJMSStore(self, domainHome, domainType): + readDomain(domainHome) + print 'Read Domain: %s' % domainHome + configUpdated = false + serverList = [] + if domainType == "soa" or domainType == "soaosb" or domainType == "soab2b" or domainType == "soaosbb2b": + serverList.extend(list(self.SOA_SERVERS.keys())) + if domainType == "osb" or domainType == "soaosb" or domainType == "soaosbb2b": + serverList.extend(list(self.OSB_SERVERS.keys())) + print serverList + dataSource = self.getDSMBean('WLSSchemaDataSource') + if dataSource == None: + print 'WLSSchemaDataSource not exists in this domain, skipping' + closeDomain() + return + schemaPrefix = self.getDSSchemaPrefix ('WLSSchemaDataSource') + cmd = cd('/') + jmsServers = cmo.getJMSServers() + print jmsServers + for jmsServer in jmsServers: + jmsServerName = jmsServer.getName() + jmsFlag = self.isConfigurableJMSServer(jmsServerName) + if (jmsFlag == true): + cd('/JMSServer/'+jmsServerName) + jmsServerTargetName = ls('/JMSServer/'+jmsServerName,returnMap='true',returnType='a')['Target'] + print '[JMSServer]: ' + str(jmsServerName)+ ' : [TargetServer]: ' + str(jmsServerTargetName) + if jmsServerTargetName == None or len(jmsServerTargetName) < 1: + print 'WARNING !!! : Not expected but CONTINUE processing ... skipping ['+str(jmsServerName)+\ + '] as it is not targetted '+str(jmsServerTargetName) + continue + flag = self.checkServerInCluster(jmsServerTargetName, serverList) + if (flag == true): + configUpdated = configUpdated | self.configureJMSJDBCStore (jmsServerTargetName, jmsServerName, schemaPrefix, dataSource) + else: + print 'WARNING !!! : Not expected but CONTINUE processing, Target '+\ + str(jmsServerTargetName)+' is not part of configured Servers ['+\ + str(serverList)+'] can not be configured to use JDBC Persistent Store' + continue + else: + print 'CONTINUE processing ... ['+jmsServerName+\ + '] will not be configured to use JDBC Persistent Store' + continue + print 'clean UnUsedSOAStores from Domain : '+ domainHome + configUpdated= configUpdated | self.cleanunUsedSOAStores() + if configUpdated: + print 'Updating Domain : ',domainHome + updateDomain() + else: + print 'No Updates Closing Domain with out update ',domainHome + closeDomain() + print 'COMPLETED jms jdbc store config ' + + def configureJMSJDBCStore(self, jmsServerTargetName, jmsServerName, schemaPrefix, dataSource): + configUpdated = false + jmsJdbcStoreName = self.getJMSJDBCStore(jmsServerName,jmsServerTargetName, schemaPrefix, dataSource) + if(jmsJdbcStoreName == None): + print 'INFO: Skipping '+str(jmsServerName)+' already configured .' + return false + else: + cmo = cd('/JMSServer/'+jmsServerName) + oldPersistence = cmo.getPersistentStore().getName() + jdbcStoreBean = self.getJDBCStore(jmsJdbcStoreName) + print 'INFO: oldPersistence '+str(oldPersistence)+' jmsJdbcStoreName '+jmsJdbcStoreName+' jdbcStoreBean name '+str(jdbcStoreBean.getName()) + configUpdated = true + if(jmsJdbcStoreName != oldPersistence): + try: + cmo.setPersistentStore(jdbcStoreBean) + configUpdated = true + except Exception, detail: + dumpStack() + print 'setPersistentStore failed for jmsServerName '+str(jmsServerName), detail , " !!!!!! If the exception above says 'com.oracle.cie.domain.ValidateException: The property value is duplicated'; means you did not apply CIE fix of bug 22175233 " + raise + if(self.isDeletableJDBCStore(oldPersistence) == Boolean(true)): + delete(oldPersistence,'JDBCStore') + print 'INFO: Deleted JDBCStore '+oldPersistence + elif(self.isDeletableFileStore(oldPersistence) == Boolean(true)) : + delete(oldPersistence,'FileStore') + print 'INFO: Deleted FileStore '+oldPersistence + else: + print 'INFO: '+oldPersistence+' not deleted; it may be still in use' + else: + print 'INFO: Skipping '+str(jmsServerName)+' aready configured .' + print 'END Configuring JDBC Persistent Store for ['+jmsServerName+'] configUpdated '+str(Boolean(configUpdated)) + return configUpdated + + def getJMSJDBCStore(self, jmsServerName,jmsServerTargetName, schemaPrefix, dataSource): + try: + cd('/JMSServers/'+jmsServerName) + originalStore = None + if (get('PersistentStore') != None): + originalStore = get('PersistentStore').getName() + else: + print 'WARNING!!! No PersistentStore for : ' +str(jmsServerName) +" jmsServerTargetName "+str(jmsServerTargetName)+ ' Skipping ' + return None + print 'Parsing PersistentStore: ' +str(originalStore) +" jmsServerTargetName "+str(jmsServerTargetName) + words = {'File':'JDBC', 'file':'JDBC', 'FILE':'JDBC'} + jStore = self.replace_all (originalStore, words) + if 'JDBC' in jStore: + print 'INFO: File Store name substituted with JDBC ... '+str(jStore) + else: + jStore = jmsServerName.replace ('Server','JDBC') + print 'INFO: Server name substituted with JDBC ... '+str(jStore) + cd('/') + store = self.getJDBCStore(jStore) + if (store == None): + self.createJMSJDBCStore(jStore, jmsServerName, jmsServerTargetName, schemaPrefix, dataSource) + else: + print 'INFO: jdbcStore ' , store.getTargets() , ' Expected ', jmsServerTargetName + self.targetJMSJDBCStore(jStore, jmsServerName, jmsServerTargetName, schemaPrefix, dataSource) + cd('/') + cd('/JDBCStore/'+jStore) + storetarget = ls('/JDBCStore/'+jStore,returnMap='true',returnType='a')['Target'] + matchingTargets = Boolean(storetarget == jmsServerTargetName) + # This should not happen, fail if it does + if( not matchingTargets) : + raise Exception ('Target for JMS Server and store doesnt match storetarget : '+\ + str(storetarget) +' jmsServerTargetName '+str(jmsServerTargetName)) + except Exception, detail: + print 'ERROR while processing SOA JMS JDBC Persistent Store for '+str(jmsServerName) , detail + raise + + return jStore + + def getJDBCStore(self, jStore): + try: + cd('/') + print 'INFO: Checking JDBC stores' + jdbcStores = cmo.getJDBCStores() + for jdbcStore in jdbcStores: + if jdbcStore.getName() == jStore: + return jdbcStore + except: + raise Exception ('Exception on getting JDBC store for '+str(jStore)) + print 'INFO: Did not find store for '+str(jStore) + + def createJMSJDBCStore(self, jStore, jmsServerName, jmsServerTargetName, schemaPrefix, dataSource): + ## Create the JDBC Store + print 'INFO: Creating JDBC Store: ' + jStore +' for '+jmsServerName + jmsTarget = self.getTargetMbean(jmsServerTargetName) + cd('/') + create(jStore,'JDBCStore') + prefixName = jStore.replace ('JDBCStore','') + prefixName = prefixName.replace ('Server','') + prefixName = prefixName.replace('_auto_', '') + cd('/JDBCStore/'+jStore) + cmo.setDataSource(dataSource) + print 'INFO: Created Store '+jStore+' Using JMS WLStore prefixName :'+schemaPrefix+'.'+prefixName+'_' + cmo.setPrefixName(schemaPrefix+'.'+prefixName+'_') + jmsTargets = jarray.array([jmsTarget], Class.forName("weblogic.management.configuration.TargetMBean")) + cmo.setTargets(jmsTargets) + + def targetJMSJDBCStore(self, jStore, jmsServerName, jmsServerTargetName, schemaPrefix, dataSource): + print 'INFO: Creating JDBC Store: ' + jStore +' for '+jmsServerName + jmsTarget = self.getTargetMbean(jmsServerTargetName) + cd('/') + cd('/JDBCStore/'+jStore) + + jmsTargets = jarray.array([jmsTarget], Class.forName("weblogic.management.configuration.TargetMBean")) + print 'INFO: current Target ',cmo.getTargets(),' Expected Target ', jmsTarget + cmo.setTargets(jmsTargets) + print 'INFO: JDBC Store '+jStore+' Targetted to :',jmsTarget + + def isDeletableJDBCStore (self, storeName): + for item in cmo.getJDBCStores(): + if storeName == item.getName(): + for jms in cmo.getJMSServers(): + if (jms.getPersistentStore() != None and str(jms.getPersistentStore().getName()) == str(storeName) ): + return Boolean('false'); + return Boolean('true'); + return Boolean('false'); + + def isDeletableFileStore (self, storeName): + for item in cmo.getFileStores(): + if storeName == item.getName(): + for jms in cmo.getJMSServers(): + if (jms.getPersistentStore() != None and str(jms.getPersistentStore().getName()) == str(storeName) ): + return Boolean('false'); + return Boolean('true'); + return Boolean('false'); + + def cleanunUsedSOAStores (self): + cd('/') + ## list of eligible SOA JMS Store to cleanup, if they are not in use + soacleanJDBCStoresList = [] #['AGJMSJDBCStore','PS6SOAJMSJDBCStore','BPMJMSJDBCStore'] + soacleanFileStoresList = ['SOAJMSFileStore'] + configUpdated = false + for fileStore in cmo.getFileStores(): + for soaStore in soacleanFileStoresList: + if fileStore.getName().find(soaStore) != -1: + if (self.isDeletableFileStore(fileStore.getName()) == Boolean(true)) : + delete(fileStore.getName(),'FileStore') + print 'INFO: Deleted FileStore '+fileStore.getName() + configUpdated = true + + for jdbcStore in cmo.getJDBCStores(): + for soaStore in soacleanJDBCStoresList: + if jdbcStore.getName().find(soaStore) != -1: + if (self.isDeletableJDBCStore(jdbcStore.getName()) == Boolean(true)) : + delete(jdbcStore.getName(),'JDBCStore') + print 'INFO: Deleted JDBCStore '+jdbcStore.getName() + configUpdated = true + + print 'END cleanunUsedSOAStores configUpdated '+str(Boolean(configUpdated)) + return configUpdated + + def getTargetMbean (self, targetName): + cd('/') + migratableTargets = cmo.getMigratableTargets(); + for item in migratableTargets: + if item.getName() == targetName: + print 'INFO: migratableTarget match for '+targetName+' ' +str(item) + return item + for item in cmo.getServers(): + if item.getName() == targetName : + print 'INFO: Server match for '+targetName+' ' +str(item) + return item + print 'INFO: No Matching target for '+targetName + + def replace_all(self, text, words): + for i,j in words.iteritems(): + text = text.replace(i, j) + return text + + def checkServerInCluster(self, serverName, serverList): + if serverName == None or len(serverName) < 1: + print 'INFO: Server Target not valid. '+str(serverName) + return false + + for item in serverList: + if serverName.find(item) != -1: + return true + return false + + def isConfigurableJMSServer(self, jmsServerName): + canBeConfigured = false + ## CHECK whether JMS Server can be configured to use JDBC Persistent Store + for item in self.JMSServersList: + if jmsServerName.find(item) != -1: + ## MATCH - 'jmsServerName' can be configured to use JDBC Persistent Store + canBeConfigured = true + break + return canBeConfigured + + def getDSSchemaPrefix (self, jdbcDS): + try: + cd ('/') + dSName = jdbcDS + while (dSName != "") : + print 'INFO: dSName =>'+dSName + cd ('/JDBCSystemResources/'+dSName+'/JdbcResource/'+dSName+'/JDBCDataSourceParams/NO_NAME_0') + dSList = get('DataSourceList') + if(dSList == None) : + cd ('/JDBCSystemResources/'+dSName+'/JdbcResource/'+dSName+'/JDBCDriverParams/NO_NAME_0/Properties/NO_NAME_0/Property/user') + schemaPrefix = cmo.getValue () + print 'INFO: schemaPrefix '+schemaPrefix + dSName = "" + break; + else : + print 'INFO: multi-data source detected ...' + print 'INFO: dSList =>'+dSList + dSName = dSList.split(',')[0] + except: + raise Exception ('Exception on getting data source Schema info for '+jdbcDS) + return schemaPrefix + + def getDSMBean(self, jdbcDS): + try: + cd ('/JDBCSystemResources/'+jdbcDS) + return cmo + except: + raise Exception ('Exception on getting data source') + return + + def createBaseDomain(self, name, user, password, domainType): + baseTemplate = self.replaceTokens(self.JRF_12214_TEMPLATES['baseTemplate']) + + readTemplate(baseTemplate) + setOption('DomainName', name) + setOption('JavaHome', self.javaHome) + setOption('ServerStartMode', 'prod') + set('Name', domainName) + cd('/Security/' + domainName + '/User/weblogic') + set('Name', user) + set('Password', password) + + + print 'INFO: Creating Node Managers...' + for machine in self.MACHINES: + cd('/') + create(machine, 'Machine') + cd('Machine/' + machine) + create(machine, 'NodeManager') + cd('NodeManager/' + machine) + for param in self.MACHINES[machine]: + set(param, self.MACHINES[machine][param]) + + print 'INFO: Creating Admin server...' + + for server in self.SERVERS: + cd('/') + if server == 'AdminServer': + cd('Server/' + server) + for param in self.SERVERS[server]: + set(param, self.SERVERS[server][param]) + continue + create(server, 'Server') + cd('Server/' + server) + for param in self.SERVERS[server]: + set(param, self.SERVERS[server][param]) + + if domainType == "soa" or domainType == "soaosb" or domainType == "soab2b" or domainType == "soaosbb2b": + + print 'INFO: Creating SOA cluster...' + for cluster in self.SOA_CLUSTERS: + cd('/') + create(cluster, 'Cluster') + cd('Cluster/' + cluster) + for param in self.SOA_CLUSTERS[cluster]: + set(param, self.SOA_CLUSTERS[cluster][param]) + for server in self.SOA_SERVERS: + cd('/') + create(server, 'Server') + cd('Server/' + server) + for param in self.SOA_SERVERS[server]: + set(param, self.SOA_SERVERS[server][param]) + + print 'INFO: SOA Servers created.....' + + if domainType == 'osb' or domainType == "soaosb" or domainType == "soaosbb2b": + + print 'INFO: Creating OSB cluster...' + for cluster in self.OSB_CLUSTERS: + cd('/') + create(cluster, 'Cluster') + cd('Cluster/' + cluster) + for param in self.OSB_CLUSTERS[cluster]: + set(param, self.OSB_CLUSTERS[cluster][param]) + + for server in self.OSB_SERVERS: + cd('/') + create(server, 'Server') + cd('Server/' + server) + for param in self.OSB_SERVERS[server]: + set(param, self.OSB_SERVERS[server][param]) + + print 'INFO: OSB Servers created.....' + + + + setOption('OverwriteDomain', 'true') + domainHome = self.domainParentDir + '/' + name + + print 'INFO: Writing base domain...' + writeDomain(domainHome) + closeTemplate() + print 'INFO: Base domain created at ' + domainHome + return domainHome + + + def readAndApplyJRFTemplates(self, domainHome): + print 'INFO: Extending domain at ' + domainHome + readDomain(domainHome) + setOption('AppDir', self.domainParentDir + '/applications') + + if self.jrfDone == 1: + print 'INFO: JRF templates already applied ' + return + + print 'INFO: Applying JRF templates...' + for extensionTemplate in self.JRF_12214_TEMPLATES['extensionTemplates']: + addTemplate(self.replaceTokens(extensionTemplate)) + + self.jrfDone = 1 + return + + def applySOATemplates(self): + print 'INFO: Applying SOA templates...' + for extensionTemplate in self.SOA_12214_TEMPLATES['extensionTemplates']: + addTemplate(self.replaceTokens(extensionTemplate)) + return + + def applySOAB2BTemplates(self): + print 'INFO: Applying SOA B2B templates...' + for extensionTemplate in self.SOA_B2B_12214_TEMPLATES['extensionTemplates']: + addTemplate(self.replaceTokens(extensionTemplate)) + return + + def applyOSBTemplates(self): + print 'INFO: Applying OSB templates...' + for extensionTemplate in self.OSB_12214_TEMPLATES['extensionTemplates']: + addTemplate(self.replaceTokens(extensionTemplate)) + return + + def configureJDBCTemplates(self,db,dbPrefix,dbPassword): + print 'INFO: Configuring the Service Table DataSource...' + fmwDb = 'jdbc:oracle:thin:@' + db + cd('/JDBCSystemResource/LocalSvcTblDataSource/JdbcResource/LocalSvcTblDataSource') + cd('JDBCDriverParams/NO_NAME_0') + set('DriverName', 'oracle.jdbc.OracleDriver') + set('URL', fmwDb) + set('PasswordEncrypted', dbPassword) + + stbUser = dbPrefix + '_STB' + cd('Properties/NO_NAME_0/Property/user') + set('Value', stbUser) + + print 'INFO: Getting Database Defaults...' + getDatabaseDefaults() + return + + def targetSOAServers(self,serverGroupsToTarget): + for server in self.SOA_SERVERS: + if not server == 'AdminServer': + setServerGroups(server, serverGroupsToTarget) + print "INFO: Set CoherenceClusterSystemResource to defaultCoherenceCluster for server:" + server + cd('/Servers/' + server) + set('CoherenceClusterSystemResource', 'defaultCoherenceCluster') + return + + def targetSOACluster(self): + for cluster in self.SOA_CLUSTERS: + print "INFO: Set CoherenceClusterSystemResource to defaultCoherenceCluster for cluster:" + cluster + cd('/Cluster/' + cluster) + set('CoherenceClusterSystemResource', 'defaultCoherenceCluster') + return + + def targetOSBServers(self,serverGroupsToTarget): + for server in self.OSB_SERVERS: + if not server == 'AdminServer': + setServerGroups(server, serverGroupsToTarget) + print "INFO: Set CoherenceClusterSystemResource to defaultCoherenceCluster for server:" + server + cd('/Servers/' + server) + set('CoherenceClusterSystemResource', 'defaultCoherenceCluster') + return + + def targetOSBCluster(self): + for cluster in self.OSB_CLUSTERS: + print "INFO: Set CoherenceClusterSystemResource to defaultCoherenceCluster for cluster:" + cluster + cd('/Cluster/' + cluster) + set('CoherenceClusterSystemResource', 'defaultCoherenceCluster') + return + + def extendSoaDomain(self, domainHome, db, dbPrefix, dbPassword): + self.readAndApplyJRFTemplates(domainHome) + self.applySOATemplates() + + print 'INFO: Extension Templates added' + + print 'INFO: deleting ess_server1' + cd('/') + delete('ess_server1', 'Server') + print 'INFO: ess_server1 deleted' + + if 'soa_server1' not in self.SOA_SERVERS: + print 'INFO: deleting soa_server1' + cd('/') + delete('soa_server1','Server') + print 'INFO: deleted soa_server1' + + self.configureJDBCTemplates(db,dbPrefix,dbPassword) + self.configureXADataSources() + + print 'INFO: Targeting Server Groups...' + serverGroupsToTarget = list(self.JRF_12214_TEMPLATES['serverGroupsToTarget']) + serverGroupsToTarget.extend(self.SOA_12214_TEMPLATES['serverGroupsToTarget']) + + cd('/') + self.targetSOAServers(serverGroupsToTarget) + + cd('/') + self.targetSOACluster() + + print "INFO: Set WLS clusters as target of defaultCoherenceCluster:[" + ",".join(self.SOA_CLUSTERS) + "]" + + cd('/CoherenceClusterSystemResource/defaultCoherenceCluster') + set('Target', ",".join(self.SOA_CLUSTERS)) + print 'INFO: Preparing to update domain...' + updateDomain() + print 'INFO: Domain updated successfully' + closeDomain() + return + + def extendSoaB2BDomain(self, domainHome, db, dbPrefix, dbPassword): + self.readAndApplyJRFTemplates(domainHome) + self.applySOAB2BTemplates() + + print 'INFO: Extension Templates added' + + print 'INFO: deleting ess_server1' + cd('/') + delete('ess_server1', 'Server') + print 'INFO: ess_server1 deleted' + + if 'soa_server1' not in self.SOA_SERVERS: + print 'INFO: deleting soa_server1' + cd('/') + delete('soa_server1','Server') + print 'INFO: deleted soa_server1' + + self.configureJDBCTemplates(db,dbPrefix,dbPassword) + self.configureXADataSources() + + print 'INFO: Targeting Server Groups...' + serverGroupsToTarget = list(self.JRF_12214_TEMPLATES['serverGroupsToTarget']) + serverGroupsToTarget.extend(self.SOA_B2B_12214_TEMPLATES['serverGroupsToTarget']) + + cd('/') + self.targetSOAServers(serverGroupsToTarget) + + cd('/') + self.targetSOACluster() + + print "INFO: Set WLS clusters as target of defaultCoherenceCluster:[" + ",".join(self.SOA_CLUSTERS) + "]" + + cd('/CoherenceClusterSystemResource/defaultCoherenceCluster') + set('Target', ",".join(self.SOA_CLUSTERS)) + print 'INFO: Preparing to update domain...' + updateDomain() + print 'INFO: Domain updated successfully' + closeDomain() + return + + def extendOsbDomain(self, domainHome, db, dbPrefix, dbPassword, domainType): + self.readAndApplyJRFTemplates(domainHome) + self.applyOSBTemplates() + + print 'INFO: Extension Templates added' + + if 'osb_server1' not in self.OSB_SERVERS: + print 'INFO: deleting osb_server1' + cd('/') + delete('osb_server1','Server') + print 'INFO: deleted osb_server1' + + self.configureJDBCTemplates(db,dbPrefix,dbPassword) + self.configureXADataSourcesForOSB() + + print 'INFO: Targeting Server Groups...' + serverGroupsToTarget = list(self.JRF_12214_TEMPLATES['serverGroupsToTarget']) + serverGroupsToTarget.extend(self.OSB_12214_TEMPLATES['serverGroupsToTarget']) + + cd('/') + self.targetOSBServers(serverGroupsToTarget) + + cd('/') + self.targetOSBCluster() + + print "INFO: Set WLS clusters as target of defaultCoherenceCluster:[" + ",".join(self.OSB_CLUSTERS) + "]" + + cd('/CoherenceClusterSystemResource/defaultCoherenceCluster') + set('Target', ",".join(self.OSB_CLUSTERS)) + + print 'INFO: Preparing to update domain...' + updateDomain() + print 'INFO: Domain updated successfully' + closeDomain() + return + + + ########################################################################### + # Helper Methods # + ########################################################################### + + def validateDirectory(self, dirName, create=False): + directory = os.path.realpath(dirName) + if not os.path.exists(directory): + if create: + os.makedirs(directory) + else: + message = 'Directory ' + directory + ' does not exist' + raise WLSTException(message) + elif not os.path.isdir(directory): + message = 'Directory ' + directory + ' is not a directory' + raise WLSTException(message) + return self.fixupPath(directory) + + + def fixupPath(self, path): + result = path + if path is not None: + result = path.replace('\\', '/') + return result + + + def replaceTokens(self, path): + result = path + if path is not None: + result = path.replace('@@ORACLE_HOME@@', oracleHome) + return result + +############################# +# Entry point to the script # +############################# + +def usage(): + print sys.argv[0] + ' -oh -jh -parent [-name ] ' + \ + '[-user ] [-password ] ' + \ + '-rcuDb [-rcuPrefix ] [-rcuSchemaPwd ] ' + \ + '-domainType -persistentStore ' + sys.exit(0) + + +print "createDomain.py called with the following inputs:" +for index, arg in enumerate(sys.argv): + print "INFO: sys.argv[" + str(index) + "] = " + str(sys.argv[index]) + +if len(sys.argv) < 6: + usage() + +#oracleHome will be passed by command line parameter -oh. +oracleHome = None +#javaHome will be passed by command line parameter -jh. +javaHome = None +#domainParentDir will be passed by command line parameter -parent. +domainParentDir = None +#domainName is hard-coded to soa_domain. You can change to other name of your choice. Command line parameter -name. +domainName = 'soa_domain' +#domainUser is hard-coded to weblogic. You can change to other name of your choice. Command line paramter -user. +domainUser = 'weblogic' +#domainPassword is hard-coded to welcome1. You can change to other password of your choice. Command line parameter -password. +domainPassword = 'welcome1' +#rcuDb will be passed by command line parameter -rcuDb. +rcuDb = None +#change rcuSchemaPrefix to your soainfra schema prefix. Command line parameter -rcuPrefix. +rcuSchemaPrefix = 'DEV12' +#change rcuSchemaPassword to your soainfra schema password. Command line parameter -rcuSchemaPwd. +rcuSchemaPassword = 'welcome1' +persistentStore = 'jdbc' + +i = 1 +while i < len(sys.argv): + if sys.argv[i] == '-oh': + oracleHome = sys.argv[i + 1] + i += 2 + elif sys.argv[i] == '-jh': + javaHome = sys.argv[i + 1] + i += 2 + elif sys.argv[i] == '-parent': + domainParentDir = sys.argv[i + 1] + i += 2 + elif sys.argv[i] == '-name': + domainName = sys.argv[i + 1] + i += 2 + elif sys.argv[i] == '-user': + domainUser = sys.argv[i + 1] + i += 2 + elif sys.argv[i] == '-password': + domainPassword = sys.argv[i + 1] + i += 2 + elif sys.argv[i] == '-rcuDb': + rcuDb = sys.argv[i + 1] + i += 2 + elif sys.argv[i] == '-rcuPrefix': + rcuSchemaPrefix = sys.argv[i + 1] + i += 2 + elif sys.argv[i] == '-rcuSchemaPwd': + rcuSchemaPassword = sys.argv[i + 1] + i += 2 + elif sys.argv[i] == '-domainType': + domainType = sys.argv[i + 1] + i += 2 + elif sys.argv[i] == '-persistentStore': + persistentStore = sys.argv[i + 1] + i += 2 + else: + print 'INFO: Unexpected argument switch at position ' + str(i) + ': ' + str(sys.argv[i]) + usage() + sys.exit(1) + + +provisioner = SOA12214Provisioner(oracleHome, javaHome, domainParentDir) +provisioner.createDomain(domainName, domainUser, domainPassword, rcuDb, rcuSchemaPrefix, rcuSchemaPassword, domainType) diff --git a/OracleSOASuite/dockerfiles/14.1.2.0/container-scripts/createDomainAndStart.sh b/OracleSOASuite/dockerfiles/14.1.2.0/container-scripts/createDomainAndStart.sh new file mode 100755 index 0000000000..811ae31a82 --- /dev/null +++ b/OracleSOASuite/dockerfiles/14.1.2.0/container-scripts/createDomainAndStart.sh @@ -0,0 +1,247 @@ +#!/bin/bash +# +# +# Copyright (c) 2014, 2025, Oracle and/or its affiliates. +# +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl +# + +export DOMAIN_NAME=${DOMAIN_NAME:-soainfra} +export DOMAIN_ROOT=${DOMAIN_ROOT:-/u01/oracle/user_projects/domains} +export DOMAIN_HOME=${DOMAIN_ROOT}/${DOMAIN_NAME} + +#================================================== +function _int() { + echo "INFO: Stopping container." + echo "INFO: SIGINT received, shutting down Admin Server!" + /u01/oracle/user_projects/domains/base_domain/bin/stopWebLogic.sh + exit; +} + +#================================================== +function _term() { + echo "INFO: Stopping container." + echo "INFO: SIGTERM received, shutting down Admin Server!" + /u01/oracle/user_projects/domains/base_domain/bin/stopWebLogic.sh + exit; +} + + +#================================================== +function rand_pwd(){ + while true; do + s=$(cat /dev/urandom | tr -dc "A-Za-z0-9" | fold -w 8 | head -n 1) + if [[ ${#s} -ge 8 && "$s" = *[A-Z]* && "$s" = *[a-z]* && "$s" = *[0-9]* ]] + then + break + else + echo "INFO: Password does not Match the criteria, re-generating..." >&2 + fi + done + echo "${s}" +} + +#================================================== +setupRCU() { + dbType=`echo ${CONNECTION_STRING} | cut -d "/" -f2` + scrName=/u01/oracle/oracle_common/common/sql/iau/scripts/creAuditTabs.sql + + if [ ! -s "${scrName}.orig" ]; then + echo "INFO: Copying RCU backup file" + cp ${scrName} ${scrName}.orig + fi + + if [ "${dbType}" = "XE" ] || [ "${dbType}" = "xe" ]; then + echo "INFO: Setting RCU for XE" + sed -e "s/^@@prepareAuditView.sql/-- @@prepareAuditView.sql/g" ${scrName}.orig > ${scrName} + else + echo "INFO: Setting RCU for ORCL" + cp ${scrName}.orig ${scrName} + fi +} + +#================================================== +updateListenAddress() { + mkdir -p ${DOMAIN_HOME}/logs + + thehost=`hostname -I` + export thehost + echo "INFO: Updating the listen address - ${thehost}" + cmd="/u01/oracle/oracle_common/common/bin/wlst.sh -skipWLSModuleScanning /u01/oracle/container-scripts/updListenAddress.py $vol_name ${thehost} AdminServer" + echo ${cmd} + ${cmd} > ${DOMAIN_HOME}/logs/aslisten.log 2>&1 +} + +#================================================== +#== MAIN starts here... +#================================================== +trap _int SIGINT +trap _term SIGTERM + +echo "INFO: CONNECTION_STRING = ${CONNECTION_STRING:?"Please set CONNECTION_STRING"}" +echo "INFO: RCUPREFIX = ${RCUPREFIX:?"Please set RCUPREFIX"}" + +if [ -z ${DB_PASSWORD} ] +then + echo "" + echo "FATAL: DB System password is empty. Exiting..." + exit 1 +fi; + +if [ -z ${ADMIN_PASSWORD} ] +then + # Auto generate Oracle WebLogic Server admin password + ADMIN_PASSWORD=$(rand_pwd) + echo "" + echo "INFO: Oracle WebLogic Server Password Auto Generated :" + echo " 'weblogic' admin password: $ADMIN_PASSWORD" + echo "" +fi; + +if [ -z ${DB_SCHEMA_PASSWORD} ] +then + # Auto generate Oracle Database Schema password + temp_pwd=$(rand_pwd) + #Password should not start with a number for database + f_str=$(echo "$temp_pwd" | cut -c1 | tr '0-9' 'A-Z') + s_str=`echo $temp_pwd|cut -c2-` + DB_SCHEMA_PASSWORD=${f_str}${s_str} + echo "" + echo "INFO: Database Schema password Auto Generated :" + echo " Database schema password: $DB_SCHEMA_PASSWORD" + echo "" +fi + +export jdbc_url="jdbc:oracle:thin:@"$CONNECTION_STRING +export vol_name=u01 + +echo -e $DB_PASSWORD"\n"$DB_SCHEMA_PASSWORD > /tmp/pwd.txt + +CTR_DIR=/$vol_name/oracle/user_projects/container/${DOMAIN_NAME} + +# +# Creating schemas needed for sample domain #### +#=============================================== +# +RUN_RCU="true" +CONFIGURE_DOMAIN="true" + +if [ -d $CTR_DIR ] +then + # First load the Env Data from the env file... + if [ -e $CTR_DIR/contenv.sh ] + then + . $CTR_DIR/contenv.sh + #reset the JDBC URL + export jdbc_url="jdbc:oracle:thin:@"$CONNECTION_STRING + fi +else + mkdir -p $CTR_DIR +fi + +if [ -e $CTR_DIR/RCU.$RCUPREFIX.suc ] +then + #RCU has already been executed successfully, no need to rerun + RUN_RCU="false" + echo "INFO: SOA RCU has already been loaded. Skipping..." +fi + +if [ "$RUN_RCU" = "true" ] +then + setupRCU + # Run the RCU.. it hasnt been loaded before. If it has + # then drop the prefix and restart. New Domain creation + # scenario + echo "INFO: Dropping Schema $RCUPREFIX..." + /$vol_name/oracle/oracle_common/bin/rcu -silent -dropRepository -databaseType ORACLE -connectString $CONNECTION_STRING -dbUser sys -dbRole sysdba -selectDependentsForComponents true -schemaPrefix $RCUPREFIX -component OPSS -component STB -component SOAINFRA -component ESS -f < /tmp/pwd.txt + + echo "INFO: Creating Schema $RCUPREFIX..." + /$vol_name/oracle/oracle_common/bin/rcu -silent -createRepository -databaseType ORACLE -connectString $CONNECTION_STRING -dbUser sys -dbRole sysdba -useSamePasswordForAllSchemaUsers true -selectDependentsForComponents true -variables SOA_PROFILE_TYPE=SMALL,HEALTHCARE_INTEGRATION=NO -schemaPrefix $RCUPREFIX -component OPSS -component STB -component SOAINFRA -component ESS -f < /tmp/pwd.txt + retval=$? + + if [ $retval -ne 0 ]; + then + echo "ERROR: RCU Loading Failed. Check the RCU logs" + exit + else + # Write the rcu suc file... + touch $CTR_DIR/RCU.$RCUPREFIX.suc + + # Write the env file.. such that the passwords etc.. will be saved and we will + # be able to restart from the RCU + cat > $CTR_DIR/contenv.sh <> $CTR_DIR/SOA.DOMAINCFG.suc + + cat > $CTR_DIR/contenv.sh < $DOMAIN_HOME/servers/AdminServer/security/boot.properties +echo "password="$ADMIN_PASSWORD >> $DOMAIN_HOME/servers/AdminServer/security/boot.properties + +# +# Setting env variables +#======================= +echo ". $DOMAIN_HOME/bin/setDomainEnv.sh" >> /u01/oracle/.bashrc +echo "export PATH=$PATH:/u01/oracle/common/bin:$DOMAIN_HOME/bin" >> /u01/oracle/.bashrc + +# Now we start the Admin server in this container... +/u01/oracle/container-scripts/startAS.sh + +sleep infinity diff --git a/OracleSOASuite/dockerfiles/14.1.2.0/container-scripts/get_healthcheck_url.sh b/OracleSOASuite/dockerfiles/14.1.2.0/container-scripts/get_healthcheck_url.sh new file mode 100755 index 0000000000..6ed5779b98 --- /dev/null +++ b/OracleSOASuite/dockerfiles/14.1.2.0/container-scripts/get_healthcheck_url.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# +#Copyright (c) 2020, 2025, Oracle and/or its affiliates. +# +#Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. + +if [ "$MANAGED_SERVER_CONTAINER" = "true" ] ; then + echo "http://$(hostname -i):${MANAGEDSERVER_PORT}/weblogic/ready" ; +else + echo "http://$(hostname -i):7001/weblogic/ready" ; +fi + + diff --git a/OracleSOASuite/dockerfiles/14.1.2.0/container-scripts/soaExtFun.sh b/OracleSOASuite/dockerfiles/14.1.2.0/container-scripts/soaExtFun.sh new file mode 100755 index 0000000000..cb3d984e92 --- /dev/null +++ b/OracleSOASuite/dockerfiles/14.1.2.0/container-scripts/soaExtFun.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# +# Copyright (c) 2025, Oracle and/or its affiliates. +# +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl +# +# Author: jagmohan.s.bisht@oracle.com +# + +# Script to handle ext jars for SOA + + if [ ! -d "$DOMAIN_HOME/soa/oracle.soa.ext_11.1.1" ]; then + + echo "$DOMAIN_HOME/soa/oracle.soa.ext_11.1.1 does not exist... creating it now..." + + mkdir -p $DOMAIN_HOME/soa/oracle.soa.ext_11.1.1 + + else + + echo "$DOMAIN_HOME/soa/oracle.soa.ext_11.1.1 exists... copying files" + + echo "source = $DOMAIN_HOME/soa/oracle.soa.ext_11.1.1/" + + echo "dest = $ORACLE_HOME/soa/soa/modules/oracle.soa.ext_11.1.1" + + cp -r $DOMAIN_HOME/soa/oracle.soa.ext_11.1.1/* $ORACLE_HOME/soa/soa/modules/oracle.soa.ext_11.1.1/ + + fi + diff --git a/OracleSOASuite/dockerfiles/14.1.2.0/container-scripts/startAS.sh b/OracleSOASuite/dockerfiles/14.1.2.0/container-scripts/startAS.sh new file mode 100755 index 0000000000..33a8636435 --- /dev/null +++ b/OracleSOASuite/dockerfiles/14.1.2.0/container-scripts/startAS.sh @@ -0,0 +1,59 @@ +#!/bin/sh +# +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. +# +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl +# +# Author: nevin.cleetus@oracle.com +# +# +#************************************************************************* +# script is used to start a WebLogic Admin server. +#************************************************************************* +export DOMAIN_HOME=$DOMAIN_ROOT/$DOMAIN_NAME + +# Start Admin server +LOGDIR=${DOMAIN_HOME}/logs +LOGFILE=${LOGDIR}/as.log +STSFILE=${LOGDIR}/as.status +mkdir -p ${LOGDIR} +rm -f ${LOGFILE} ${STSFILE} + +#calling soa extension function script +/u01/oracle/container-scripts/soaExtFun.sh + +echo "INFO: Starting the Admin Server..." +echo "INFO: Logs = ${LOGFILE}" +$DOMAIN_HOME/bin/startWebLogic.sh > ${LOGFILE} 2>&1 & + +statusfile=/tmp/notifyfifo.$$ +rm -f "${statusfile}" +mkfifo "${statusfile}" || exit 1 +{ + # run tail in the background so that the shell can kill tail when notified + # that grep has exited + tail -f ${LOGFILE} & + + # remember tail's PID + tailpid=$! + + # wait for notification that grep has exited + read templine <${statusfile} + echo ${templine} + + # grep has exited, time to go + kill "${tailpid}" +} | { + grep -m 1 " " + + # notify the first pipeline stage that grep is done + echo "RUNNING" > ${STSFILE} + echo "INFO: Admin server is running" + echo > ${statusfile} +} + +# clean up +rm -f "${statusfile}" +if [ -f ${STSFILE} ]; then + echo "INFO: Admin server running, ready to start managed server" +fi diff --git a/OracleSOASuite/dockerfiles/14.1.2.0/container-scripts/startMS.sh b/OracleSOASuite/dockerfiles/14.1.2.0/container-scripts/startMS.sh new file mode 100755 index 0000000000..ad1da90a0e --- /dev/null +++ b/OracleSOASuite/dockerfiles/14.1.2.0/container-scripts/startMS.sh @@ -0,0 +1,108 @@ +#!/bin/bash +# +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. +# +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl +# + +# Author:nevin.cleetus@oracle.com + +export DOMAIN_NAME=${DOMAIN_NAME:-soainfra} +export DOMAIN_ROOT=${DOMAIN_ROOT:-/u01/oracle/user_projects/domains} +export DOMAIN_HOME=${DOMAIN_ROOT}/${DOMAIN_NAME} + +#================================================================= +function _int() { + echo "INFO: Stopping container." + echo "INFO: SIGINT received, shutting down Managed Server!" + $DOMAIN_HOME/bin/stopManagedWebLogic.sh ${MANAGED_SERVER} "http://"${ADMIN_HOST}:${ADMIN_PORT} + exit; +} + +#================================================================= +function _term() { + echo "INFO: Stopping container." + echo "INFO: SIGTERM received, shutting down Managed Server!" + $DOMAIN_HOME/bin/stopManagedWebLogic.sh ${MANAGED_SERVER} "http://"${ADMIN_HOST}:${ADMIN_PORT} + exit; +} + + +#calling soa extension function script +/u01/oracle/container-scripts/soaExtFun.sh + + +#================================================================= +#== MAIN Starts here... +#================================================================= +trap _int SIGINT +trap _term SIGTERM + +export vol_name=u01 + +if [[ "$MANAGED_SERVER" =~ "soa" ]] +then + grepPat="SOA Platform is running and accepting requests" +elif [[ "$MANAGED_SERVER" =~ "osb" ]] +then + grepPat=" " +else + echo "ERROR: Invalid domain type. Cannot start the servers" + exit +fi + +LOGDIR=${DOMAIN_HOME}/logs/${MANAGED_SERVER} +LOGFILE=${LOGDIR}/ms.log +mkdir -p ${LOGDIR} + +thehost=`hostname -I` +export thehost +echo "INFO: Updating the listen address - ${thehost}" +/u01/oracle/oracle_common/common/bin/wlst.sh -skipWLSModuleScanning /u01/oracle/container-scripts/updListenAddress.py $vol_name $thehost ${MANAGED_SERVER} > ${LOGDIR}/mslisten.log 2>&1 + +# Set boot.properties +# +# Password less Managed Server starting +#====================================== +if [ ! -z "${ADMIN_PASSWORD}" ]; then + echo "INFO: creating boot.properties for ${MANAGED_SERVER}" + mkdir -p $DOMAIN_HOME/servers/${MANAGED_SERVER}/security/ + echo "username=weblogic" > $DOMAIN_HOME/servers/${MANAGED_SERVER}/security/boot.properties + echo "password="$ADMIN_PASSWORD >> $DOMAIN_HOME/servers/${MANAGED_SERVER}/security/boot.properties +fi + +# Start SOA server +echo "INFO: Starting the managed server ${MANAGED_SERVER}" +$DOMAIN_HOME/bin/startManagedWebLogic.sh ${MANAGED_SERVER} "http://"${ADMIN_HOST}:${ADMIN_PORT} > ${LOGFILE} 2>&1 & +statusfile=/tmp/notifyfifo.$$ + +echo "INFO: Waiting for the Managed Server to accept requests..." +rm -f "${statusfile}" +mkfifo "${statusfile}" || exit 1 +{ + # run tail in the background so that the shell can kill tail when notified + # that grep has exited + tail -f ${LOGFILE} & + # remember tail's PID + tailpid=$! + # wait for notification that grep has exited + read templine <${statusfile} + echo ${templine} + # grep has exited, time to go + kill "${tailpid}" +} | { + grep -m 1 "${grepPat}" + # notify the first pipeline stage that grep is done + echo "RUNNING"> ${LOGDIR}/ms.status + echo "INFO: Managed Server is running" + echo >${statusfile} +} + +# clean up +rm -f "${statusfile}" +if [ -f ${LOGDIR}/ms.status ]; then + echo "INFO: Managed server has been started" +fi + +childPID=$! +wait $childPID diff --git a/OracleSOASuite/dockerfiles/14.1.2.0/container-scripts/updListenAddress.py b/OracleSOASuite/dockerfiles/14.1.2.0/container-scripts/updListenAddress.py new file mode 100755 index 0000000000..7c6215be6c --- /dev/null +++ b/OracleSOASuite/dockerfiles/14.1.2.0/container-scripts/updListenAddress.py @@ -0,0 +1,46 @@ +#!/usr/bin/python +# +# Copyright (c) 2019, 2025, Oracle and/or its affiliates. +# +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. +# +# Updates the listen address for managed server with the IP address of the host. +# ============================================== +# +import sys + +# +# Assigning values to variables +# ============================= +domain_name = os.environ.get("DOMAIN_NAME", "soainfra") +domain_root = os.environ.get("DOMAIN_ROOT", "/u01/oracle/user_projects/domains") + +# +# Reading db details and schema prefix passed from parent script +# ============================================================== +vol_name=sys.argv[1] +manserver_host=sys.argv[2] +server=sys.argv[3] + +# +# Setting domain path +# =================== +domain_path = domain_root + '/' + domain_name + +# +# Read domain for updates +# ======================= +readDomain(domain_path) + +# +# Set listen address +# ================== +cd('/') +cd('/Server/'+server) +cmo.setListenAddress(manserver_host) + +# Creating domain +# =============== +updateDomain() +closeDomain() +exit() diff --git a/OracleSOASuite/dockerfiles/14.1.2.0/install/b2b.response b/OracleSOASuite/dockerfiles/14.1.2.0/install/b2b.response new file mode 100644 index 0000000000..f202cb7c39 --- /dev/null +++ b/OracleSOASuite/dockerfiles/14.1.2.0/install/b2b.response @@ -0,0 +1,15 @@ +# LICENSE UPL 1.0 +# +# Copyright (c) 2025, Oracle and/or its affiliates. +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. + +[ENGINE] + +#DO NOT CHANGE THIS. +Response File Version=1.0.0.0.0 + +[GENERIC] +INSTALL_TYPE=B2B + +DECLINE_SECURITY_UPDATES=true +SECURITY_UPDATES_VIA_MYORACLESUPPORT=false diff --git a/OracleSOASuite/dockerfiles/14.1.2.0/install/oraInst.loc b/OracleSOASuite/dockerfiles/14.1.2.0/install/oraInst.loc new file mode 100644 index 0000000000..01f1964a55 --- /dev/null +++ b/OracleSOASuite/dockerfiles/14.1.2.0/install/oraInst.loc @@ -0,0 +1,2 @@ +inventory_loc=/u01/oracle/.inventory +inst_group=oracle diff --git a/OracleSOASuite/dockerfiles/14.1.2.0/install/osb.response b/OracleSOASuite/dockerfiles/14.1.2.0/install/osb.response new file mode 100644 index 0000000000..72929f71f4 --- /dev/null +++ b/OracleSOASuite/dockerfiles/14.1.2.0/install/osb.response @@ -0,0 +1,12 @@ +# +# Copyright (c) 2025, Oracle and/or its affiliates. +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. + +[ENGINE] +Response File Version=1.0.0.0.0 + +[GENERIC] +INSTALL_TYPE=Service Bus + +DECLINE_SECURITY_UPDATES=true +SECURITY_UPDATES_VIA_MYORACLESUPPORT=false diff --git a/OracleSOASuite/dockerfiles/14.1.2.0/install/soasuite.download b/OracleSOASuite/dockerfiles/14.1.2.0/install/soasuite.download new file mode 100644 index 0000000000..7eacb8545a --- /dev/null +++ b/OracleSOASuite/dockerfiles/14.1.2.0/install/soasuite.download @@ -0,0 +1,12 @@ +# +# Oracle SOA Suite for Oracle Middleware (SOA, OSB, B2B) +# OTN : http://www.oracle.com/technetwork/middleware/soasuite/overview +# Download : http://edelivery.oracle.com +# +# Oracle Fusion Middleware 14c (14.1.2.0.0) SOA Suite +# and Business Process Management +# Oracle Fusion Middleware 14c (14.1.2.0.0) Service Bus +# Oracle Fusion Middleware 14c (14.1.2.0.0) B2B and Healthcare +7c9fabb0752d91de4893aeb7a148c81b fmw_14.1.2.0.0_soa.jar +7e485dbab1c1f097c8826a652aad9da1 fmw_14.1.2.0.0_osb.jar +cac9d91e5b292359ecd08e37d2516805 fmw_14.1.2.0.0_b2bhealthcare.jar diff --git a/OracleSOASuite/dockerfiles/14.1.2.0/install/soasuite.response b/OracleSOASuite/dockerfiles/14.1.2.0/install/soasuite.response new file mode 100644 index 0000000000..be12398596 --- /dev/null +++ b/OracleSOASuite/dockerfiles/14.1.2.0/install/soasuite.response @@ -0,0 +1,16 @@ +# LICENSE UPL 1.0 +# +# Copyright (c) 2017, 2025, Oracle and/or its affiliates. +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. +[ENGINE] + +#DO NOT CHANGE THIS. +Response File Version=1.0.0.0.0 + +[GENERIC] +#INSTALL_TYPE=JDeveloper with Business Process Management +#INSTALL_TYPE=Service Bus +INSTALL_TYPE=SOA Suite + +DECLINE_SECURITY_UPDATES=true +SECURITY_UPDATES_VIA_MYORACLESUPPORT=false diff --git a/OracleSOASuite/dockerfiles/14.1.2.0/opatch_patch/.gitignore b/OracleSOASuite/dockerfiles/14.1.2.0/opatch_patch/.gitignore new file mode 100644 index 0000000000..e69de29bb2 diff --git a/OracleSOASuite/dockerfiles/14.1.2.0/opatch_patch/opatch_patch.download b/OracleSOASuite/dockerfiles/14.1.2.0/opatch_patch/opatch_patch.download new file mode 100644 index 0000000000..e7614d3125 --- /dev/null +++ b/OracleSOASuite/dockerfiles/14.1.2.0/opatch_patch/opatch_patch.download @@ -0,0 +1,5 @@ +# +# Oracle patch installer (OPatch) +# Download patches from : https://support.oracle.com +# +# To build the image by including the OPatch patch, download and drop the OPatch patch zip file (for e.g. `p28186730_139424_Generic.zip`) into the `opatch_patch/` directory. diff --git a/OracleSOASuite/dockerfiles/14.1.2.0/patches/soapatches.download b/OracleSOASuite/dockerfiles/14.1.2.0/patches/soapatches.download new file mode 100644 index 0000000000..bd0d283a50 --- /dev/null +++ b/OracleSOASuite/dockerfiles/14.1.2.0/patches/soapatches.download @@ -0,0 +1,5 @@ +# +# Oracle SOA Suite for Oracle Middleware (FMW, SOA) +# Download patches from : https://support.oracle.com +# +# To build the SOA image with patches, you must download and drop the SOA 14.1.2.0.0 patch zip files into the patches directory. diff --git a/OracleSOASuite/dockerfiles/README.md b/OracleSOASuite/dockerfiles/README.md index 81a0cd9aba..a874014bc8 100644 --- a/OracleSOASuite/dockerfiles/README.md +++ b/OracleSOASuite/dockerfiles/README.md @@ -1,72 +1,151 @@ -SOA on Docker -============= +# SOA on Docker Sample Docker configurations to facilitate installation, configuration, and environment setup for Docker users. This project includes quick start dockerfiles for SOA 12.2.1.x based on Oracle Linux 7, Oracle JRE 8 (Server) and Oracle Fusion Middleware Infrastructure 12.2.1.x. +This project also includes a setup for SOA 14.1.2.0 image build based on Oracle Linux 8, Oracle JDK 17, and Oracle Fusion Middleware Infrastructure 14.1.2.0 with an option to use Podman CLI as an alternative to docker. -You will be able to build the SOA images based on the version which is required using the build scripts provided. +You will be able to build the SOA images based on the version which is required using the build scripts provided. ## SOA 12.2.1.x Docker image Creation and Running -To build a SOA image either you can start from building Oracle JDK and Oracle Fusion Middleware Infrastrucure image or use the already available Oracle Fusion Middleware Infrastructure image. The Fusion Middleware Infrastructure image is available in the [Oracle Container Registry](https://container-registry.oracle.com), and can be pulled from there. If you plan to use the Oracle Fusion Middleware Infrastructure image from the [Oracle Container Registry](https://container-registry.oracle.com), you can skip the next two steps and continue with "Building a Docker Image for SOA". +To build a SOA image either you can start from building Oracle JDK and Oracle Fusion Middleware Infrastrucure image or use the already available Oracle Fusion Middleware Infrastructure image. The Fusion Middleware Infrastructure image is available in the [Oracle Container Registry](https://container-registry.oracle.com), and can be pulled from there. +If you plan to use the Oracle Fusion Middleware Infrastructure image from the [Oracle Container Registry](https://container-registry.oracle.com), you can skip the next two steps and continue with "Building a Docker Image for SOA". >NOTE: If you download the Oracle Fusion Middleware Infrastructure image from the [Oracle Container Registry](https://container-registry.oracle.com) then you need to retag the image with appropriate version. e.g. for the 12.2.1.4 version, retag from `container-registry.oracle.com/middleware/fmw-infrastructure:12.2.1.4` to `oracle/fmw-infrastructure:12.2.1.4.0`. -``` -$ docker tag container-registry.oracle.com/middleware/fmw-infrastructure:12.2.1.4 oracle/fmw-infrastructure:12.2.1.4.0 +``` bash +`$ docker tag container-registry.oracle.com/middleware/fmw-infrastructure:12.2.1.4 oracle/fmw-infrastructure:12.2.1.4.0` ``` -## How to build the Oracle Java image +### How to build the Oracle Java image -Please refer [README.md](https://github.com/oracle/docker-images/blob/main/OracleJava/README.md) under docker/OracleJava for details on how to build Oracle Database image. +Please refer [README.md](https://github.com/oracle/docker-images/blob/main/OracleJava/README.md) under docker-images/OracleJava for details on how to build the Oracle Database image. -## Building Oracle Fusion Middleware Infrastructure Docker Install Image +### Building Oracle Fusion Middleware Infrastructure Docker Install image -Please refer [README.md](https://github.com/oracle/docker-images/blob/main/OracleFMWInfrastructure/README.md) under docker/OracleFMWInfrastructure for details on how to build Oracle Fusion Middleware Infrastructure image. +Please refer [README.md](https://github.com/oracle/docker-images/blob/main/OracleFMWInfrastructure/README.md) under docker-images/OracleFMWInfrastructure for details on how to build the Oracle Fusion Middleware Infrastructure image. -## Building Docker Image for SOA +### Building Docker Image for SOA ->IMPORTANT: To build the Oracle SOA image, you must first download the required version of the Oracle SOA Suite, Oracle Service Bus and Oracle B2B binaries. These binaries must be downloaded and copied into the folder with the same version for e.g. 12.2.1.4.0 binaries need to be dropped into `../OracleSOASuite/dockerfiles/12.2.1.4`. +>IMPORTANT: To build the Oracle SOA image, you must first download the required version of the Oracle SOA Suite, Oracle Service Bus and Oracle B2B binaries. These binaries must be downloaded and copied into the folder with the same version for e.g. 12.2.1.4.0 binaries need to be dropped into `../OracleSOASuite/dockerfiles/12.2.1.4`. -The binaries can be downloaded from the [Oracle Software Delivery Cloud](https://edelivery.oracle.com). Search for "Oracle SOA Suite" and download the version which is required, for e.g. 12.2.1.4.0 is available under `Oracle Fusion Middleware 12c (12.2.1.4.0) SOA Suite and Business Process Management` software. Also search for 'Oracle Service Bus' and 'Oracle B2B'. Download the `Oracle Fusion Middleware 12c (12.2.1.4.0) Service Bus` and `Oracle Fusion Middleware 12c (12.2.1.4.0) B2B and Healthcare` binaries respectively. +The binaries can be downloaded from the [Oracle Software Delivery Cloud](https://edelivery.oracle.com). Search for "Oracle SOA Suite" and download the version which is required, for e.g. 12.2.1.4.0 is available under `Oracle Fusion Middleware 12c (12.2.1.4.0) SOA Suite and Business Process Management` software. +Also search for 'Oracle Service Bus' and 'Oracle B2B'. Download the `Oracle Fusion Middleware 12c (12.2.1.4.0) Service Bus` and `Oracle Fusion Middleware 12c (12.2.1.4.0) B2B and Healthcare` binaries respectively. >NOTE: In this release, Oracle B2B is not supported to be configured, but the installer is required for completeness. -Extract the downloaded zip files and copy `fmw_12.2.1.4.0_soa.jar`, `fmw_12.2.1.4.0_osb.jar` and `fmw_12.2.1.4.0_b2bhealthcare.jar` files under `dockerfiles/12.2.1.4` for building Oracle SOA 12.2.1.4 image. +Extract the downloaded zip files and copy `fmw_12.2.1.4.0_soa.jar`, `fmw_12.2.1.4.0_osb.jar` and `fmw_12.2.1.4.0_b2bhealthcare.jar` files under `dockerfiles/12.2.1.4` for building Oracle SOA 12.2.1.4 image. -The Dockerfile `dockerfiles/12.2.1.4/Dockerfile` expects the Oracle SOA Suite installation binaries names as mentioned above. In case if the downloaded jar(s) names does not match with the above, make sure to rename them to match the same. Also, if the checksum of these binaries does not match with the default values mentioned in the `dockerfiles/12.2.1.4/install/soasuite.download` file, then use '-s' option in the image build command, to skip the checksum validation. +The Dockerfile `dockerfiles/12.2.1.4/Dockerfile` expects the Oracle SOA Suite installation binaries names as mentioned above. In case if the downloaded jar(s) names does not match with the above, make sure to rename them to match the same. +Also, if the checksum of these binaries does not match with the default values mentioned in the `dockerfiles/12.2.1.4/install/soasuite.download` file, then use '-s' option in the image build command, to skip the checksum validation. -To build the SOA image with patches, you need to download and drop the patch zip files (for e.g. `p29928100_122134_Generic.zip`) into the `patches/` folder under the version which is required, for e.g. for `12.2.1.4` the folder is `12.2.1.4/patches`. Similarly, to build the image by including the OPatch patch, download and drop the OPatch patch zip file (for e.g. `p28186730_139424_Generic.zip`) into the `opatch_patch/` folder. Then run the `buildDockerImage.sh` script as mentioned below: +To build the SOA image with patches, you need to download and drop the patch zip files (for e.g. `p29928100_122134_Generic.zip`) into the `patches/` folder under the version which is required, for e.g. for `12.2.1.4` the folder is `12.2.1.4/patches`. +Similarly, to build the image by including the OPatch patch, download and drop the OPatch patch zip file (for e.g. `p28186730_139424_Generic.zip`) into the `opatch_patch/` folder. Then run the `buildDockerImage.sh` script as mentioned below: Build the Oracle SOA 12.2.1.4 image using: -``` -$ sh buildDockerImage.sh -v 12.2.1.4 -``` +``` bash +`$ sh buildDockerImage.sh -v 12.2.1.4` Usage: buildDockerImage.sh -v [version] Builds a Docker Image for Oracle SOA Suite. +``` + +Verify you now have the image `oracle/soasuite:12.2.1.4` in place with + +`$ docker images | grep "soa"` + +If you are building the SOA image with patches, you can verify the patches applied with: + +`$ docker run oracle/soasuite:12.2.1.4 sh -c '$ORACLE_HOME/OPatch/opatch lspatches'` + -Verify you now have the image `oracle/soasuite:12.2.1.4` in place with +>IMPORTANT: The image created in above step will NOT have a domain pre-configured. But it has the scripts to create and configure a SOA domain. + +## SOA 14.1.2.0 Container image Creation and Running + +To build a SOA image either you can start from building Oracle JDK and Oracle Fusion Middleware Infrastrucure image or use the already available Oracle Fusion Middleware Infrastructure image. The Fusion Middleware Infrastructure image is available in the [Oracle Container Registry](https://container-registry.oracle.com), and can be pulled from there. +If you plan to use the Oracle Fusion Middleware Infrastructure image from the [Oracle Container Registry](https://container-registry.oracle.com), you can skip the next two steps and continue with "Building a Docker Image for SOA". +>NOTE: If you download the Oracle Fusion Middleware Infrastructure image from the [Oracle Container Registry](https://container-registry.oracle.com) then you need to retag the image with appropriate version. e.g. for the 14.1.2.0 version, retag from `container-registry.oracle.com/middleware/fmw-infrastructure:14.1.2.0` to `oracle/fmw-infrastructure:14.1.2.0.0`.
+Users can use Podman or Docker CLI to perform the build related Commands. The steps are provided using docker as well as podman for user reference. + +``` bash +`$ docker tag container-registry.oracle.com/middleware/fmw-infrastructure:14.1.2.0 oracle/fmw-infrastructure:14.1.2.0.0` ``` -$ docker images | grep "soa" + +``` bash +`$ podman tag container-registry.oracle.com/middleware/fmw-infrastructure:14.1.2.0 oracle/fmw-infrastructure:14.1.2.0.0` ``` +### How to build the Oracle Java Image + +Please refer [README.md](https://github.com/oracle/docker-images/blob/main/OracleJava/README.md) under docker-images/OracleJava for details on how to build Oracle Database image. + +### Building Oracle Fusion Middleware Infrastructure Docker Install Image + +Please refer [README.md](https://github.com/oracle/docker-images/blob/main/OracleFMWInfrastructure/README.md) under docker-images/OracleFMWInfrastructure for details on how to build Oracle Fusion Middleware Infrastructure image. + +### Building Container Image for SOA + +>IMPORTANT: To build the Oracle SOA image, you must first download the required version of the Oracle SOA Suite, Oracle Service Bus and Oracle B2B binaries. These binaries must be downloaded and copied into the folder with the same version for e.g. 14.1.2.0.0 binaries need to be dropped into `../OracleSOASuite/dockerfiles/14.1.2.0`. + +The binaries can be downloaded from the [Oracle Software Delivery Cloud](https://edelivery.oracle.com). Search for "Oracle SOA Suite" and download the version which is required, for e.g. 14.1.2.0.0 is available under `Oracle Fusion Middleware 14c (14.1.2.0.0) SOA Suite and Business Process Management` software. +Also search for 'Oracle Service Bus' and 'Oracle B2B'. Download the `Oracle Fusion Middleware 14c (14.1.2.0.0) Service Bus` and `Oracle Fusion Middleware 14c (14.1.2.0.0) B2B and Healthcare` binaries respectively. + +>NOTE: In this release, Oracle B2B is not supported to be configured, but the installer is required for completeness. + +Extract the downloaded zip files and copy `fmw_14.1.2.0.0_soa.jar`, `fmw_14.1.2.0.0_osb.jar` and `fmw_14.1.2.0.0_b2bhealthcare.jar` files under `dockerfiles/14.1.2.0` for building Oracle SOA 14.1.2.0 image. + +The Containerfile `dockerfiles/14.1.2.0/Containerfile` expects the Oracle SOA Suite installation binaries names as mentioned above. In case if the downloaded jar(s) names does not match with the above, make sure to rename them to match the same. +Also, if the checksum of these binaries does not match with the default values mentioned in the `dockerfiles/14.1.2.0/install/soasuite.download` file, then use '-s' option in the image build command, to skip the checksum validation. + +To build the SOA image with patches, you need to download and drop the patch zip files into the `patches/` folder under the version which is required, for e.g. for `14.1.2.0` the folder is `14.1.2.0/patches`. +Similarly, to build the image by including the OPatch patch, download and drop the OPatch patch zip file into the `opatch_patch/` folder. Then run the `buildDockerImage.sh` script as mentioned below: + +Build the Oracle SOA 14.1.2.0 image using: + +``` bash +$ sh buildDockerImage.sh -v 14.1.2.0 + + Usage: buildDockerImage.sh -v [version] + Parameters: + -h: view usage + -v: Release version to build. Required. + -s: Skip checksum verification + -p: Uses podman CLI to build the image. Option enabled only for 14.1.2.0 +``` + +For the podman users: + +`$ sh buildDockerImage.sh -v 14.1.2.0 -p` + +>Note: -p ensures podman CLI is used for the image build. + +Verify you now have the image `oracle/soasuite:14.1.2.0` in place with + +`$ docker images | grep "soa"` + +`$ podman images | grep "soa"` + If you are building the SOA image with patches, you can verify the patches applied with: +``` bash +`$ docker run oracle/soasuite:14.1.2.0 sh -c '$ORACLE_HOME/OPatch/opatch lspatches'` ``` -$ docker run oracle/soasuite:12.2.1.4 sh -c '$ORACLE_HOME/OPatch/opatch lspatches' + +``` bash +`$ podman run oracle/soasuite:14.1.2.0 sh -c '$ORACLE_HOME/OPatch/opatch lspatches'` ``` >IMPORTANT: The image created in above step will NOT have a domain pre-configured. But it has the scripts to create and configure a SOA domain. -# License +## License -To download and run SOA 12c Distribution regardless of inside or outside a Docker container, and regardless of the distribution, you must download the binaries from Oracle website and accept the license indicated at that page. +To download and run SOA 12c and 14c Distributions regardless of inside or outside a Docker container, and regardless of the distribution, you must download the binaries from Oracle website and accept the license indicated at that page. All scripts and files hosted in this project and GitHub docker-images/OracleDatabase repository required to build the Docker images are, unless otherwise noted, released under UPL 1.0 license. -# Copyright +## Copyright -Copyright (c) 2019, 2021, Oracle and/or its affiliates. +Copyright (c) 2019, 2025, Oracle and/or its affiliates. diff --git a/OracleSOASuite/dockerfiles/buildDockerImage.sh b/OracleSOASuite/dockerfiles/buildDockerImage.sh index 0ab3b55aeb..d83eeacc2b 100755 --- a/OracleSOASuite/dockerfiles/buildDockerImage.sh +++ b/OracleSOASuite/dockerfiles/buildDockerImage.sh @@ -1,9 +1,9 @@ #!/bin/bash # -# Script to build a Docker image for Oracle SOA suite. +# Script to build a Container image for Oracle SOA suite. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. # -# Copyright (c) 2016, 2021, Oracle and/or its affiliates. +# Copyright (c) 2016, 2025, Oracle and/or its affiliates. # # Licensed under the Universal Permissive License v 1.0 as shown at # https://oss.oracle.com/licenses/upl @@ -14,14 +14,15 @@ cat << EOF Usage: buildDockerImage.sh -v [version] -Builds a Docker Image for Oracle SOA/OSB +Builds a Container Image for Oracle SOA/OSB Parameters: -h: view usage -v: Release version to build. Required. -s: Skip checksum verification + -p: Uses podman CLI to build the image. Option enabled only for 14.1.2.0 LICENSE Universal Permissive License (UPL), Version 1.0 -Copyright (c) 2016-2017: Oracle and/or its affiliates. +Copyright (c) 2016-2025: Oracle and/or its affiliates. EOF exit $1 @@ -30,7 +31,6 @@ exit $1 #============================================================= checkFilePackages() { echo "INFO: Checking if required packages are present..." - jarList=`grep -v -e "^#.*" install/soasuite.download | awk '{print $2}'` for jar in ${jarList}; do if [ -s ${jar} ]; then @@ -58,7 +58,8 @@ checksumPackages() { echo "INFO: Checking if required packages are valid..." md5sum --quiet -c install/soasuite.download 2> /dev/null - if [ "$?" -ne 0 ]; then + rc=$? + if [ "$rc" -ne 0 ]; then cat < /dev/stdout < $IMAGE_NAME INFO: Build completed in $BUILD_ELAPSED seconds. EOF else - echo "ERROR: Oracle SOA Docker Image was NOT successfully created. Check the output and correct any reported problems with the docker build operation." + echo "ERROR: Oracle SOA Container Image was NOT successfully created. Check the output and correct any reported problems with the image build operation." fi