To prepare your Oracle SOA Suite in Kubernetes environment, complete the following steps:
Set up the code repository to deploy Oracle SOA Suite domains
Prepare the environment for Oracle SOA Suite domains
a. Create a namespace for an Oracle SOA Suite domain
b. Create a persistent storage for an Oracle SOA Suite domain
c. Create a Kubernetes secret with domain credentials
d. Create a Kubernetes secret with the RCU credentials
e. Configure access to your database
f. Run the Repository Creation Utility to set up your database schemas
If you need help setting up a Kubernetes environment, check the cheat sheet.
The operator uses Helm to create and deploy the necessary resources and then run the operator in a Kubernetes cluster. For Helm installation and usage information, see here.
Obtain dependent images and add them to your local registry.
If you don’t already have one, obtain a Docker store account, log in to the Docker store and accept the license agreement for the WebLogic Server image.
Log in to the Docker store from your Docker client:
$ docker login
Pull the operator image:
$ docker pull ghcr.io/oracle/weblogic-kubernetes-operator:3.0.1
$ docker tag ghcr.io/oracle/weblogic-kubernetes-operator:3.0.1 oracle/weblogic-kubernetes-operator:3.0.1
Oracle SOA Suite domain deployment on Kubernetes leverages the WebLogic Kubernetes operator infrastructure. To deploy an Oracle SOA Suite domain, you must set up the deployment scripts.
Create a working directory to set up the source code:
$ export WORKDIR=$HOME/soa_20.4.2
$ mkdir ${WORKDIR}
Download the supported version of the WebLogic Kubernetes operator source code from the operator github project. Currently the supported operator version is 3.0.1:
$ git clone https://github.com/oracle/weblogic-kubernetes-operator.git --branch release/3.0.1
Download the Oracle SOA Suite Kubernetes deployment scripts from the SOA repository and copy them to the WebLogic Kubernetes operator samples location:
$ git clone https://github.com/oracle/fmw-kubernetes.git --branch release/20.4.2
$ mv -f ${WORKDIR}/weblogic-kubernetes-operator/kubernetes/samples/scripts/create-soa-domain ${WORKDIR}/weblogic-kubernetes-operator/kubernetes/samples/scripts/create-soa-domain_backup
$ cp -rf ${WORKDIR}/fmw-kubernetes/OracleSOASuite/kubernetes/create-soa-domain ${WORKDIR}/weblogic-kubernetes-operator/kubernetes/samples/scripts/
$ mv -f ${WORKDIR}/weblogic-kubernetes-operator/kubernetes/samples/scripts/common ${WORKDIR}/weblogic-kubernetes-operator/kubernetes/samples/scripts/common_backup
$ cp -rf ${WORKDIR}/fmw-kubernetes/OracleSOASuite/kubernetes/common ${WORKDIR}/weblogic-kubernetes-operator/kubernetes/samples/scripts/
$ mv -f ${WORKDIR}/weblogic-kubernetes-operator/kubernetes/samples/scripts/create-rcu-schema ${WORKDIR}/weblogic-kubernetes-operator/kubernetes/samples/scripts/create-rcu-schema_backup
$ cp -rf ${WORKDIR}/fmw-kubernetes/OracleSOASuite/kubernetes/create-rcu-schema ${WORKDIR}/weblogic-kubernetes-operator/kubernetes/samples/scripts/
$ mv -f ${WORKDIR}/weblogic-kubernetes-operator/kubernetes/samples/charts/ingress-per-domain ${WORKDIR}/weblogic-kubernetes-operator/kubernetes/samples/charts/ingress-per-domain_backup
$ cp -rf ${WORKDIR}/fmw-kubernetes/OracleSOASuite/kubernetes/ingress-per-domain ${WORKDIR}/weblogic-kubernetes-operator/kubernetes/samples/charts/
$ cp -rf ${WORKDIR}/fmw-kubernetes/OracleSOASuite/kubernetes/imagetool-scripts ${WORKDIR}/weblogic-kubernetes-operator/kubernetes/samples/scripts/
$ cp -rf ${WORKDIR}/fmw-kubernetes/OracleSOASuite/kubernetes/charts ${WORKDIR}/weblogic-kubernetes-operator/kubernetes/samples/scripts/
You can now use the deployment scripts from ${WORKDIR}/weblogic-kubernetes-operator/kubernetes/samples/scripts/
to set up the Oracle SOA Suite domains.
The Oracle SOA Suite image with latest bundle patch and required interim patches can be obtained from My Oracle Support (MOS). This is the only image supported for production deployments. Follow the below steps to download the Oracle SOA Suite image from My Oracle Support.
Download the patch 32215749 from My Oracle Support (MOS).
Unzip the downloaded patch zip file.
Load the image archive using docker load
command:
For example:
$ docker load < soasuite.12214.2042.tar
Loaded image: soasuite:12.2.1.4-20.4.2
$
If you want to build and use an Oracle SOA Suite Docker image with any additional bundle patch or interim patches those are not part of the image obtained from My Oracle Support, then follow these steps to create the image.
Note: The default Oracle SOA Suite image name used for Oracle SOA Suite domains deployment is
soasuite:12.2.1.4
. The image obtained must be tagged assoasuite:12.2.1.4
using thedocker tag
command. If you want to use a different name for the image, make sure to update the new image tag name in thecreate-domain-inputs.yaml
file and also in other instances where thesoasuite:12.2.1.4
image name is used.
The WebLogic Kubernetes operator supports the deployment of Oracle SOA Suite domains in the Kubernetes environment. Follow the steps in this document to install the operator.
Note: Optionally, you can execute these steps to send the contents of the operator’s logs to Elasticsearch.
In the following example commands to install the WebLogic Kubernetes operator, opns
is the namespace and op-sa
is the service account created for the operator:
$ kubectl create namespace opns
$ kubectl create serviceaccount -n opns op-sa
$ cd ${WORKDIR}/weblogic-kubernetes-operator
$ helm install weblogic-kubernetes-operator kubernetes/charts/weblogic-operator --namespace opns --set image=oracle/weblogic-kubernetes-operator:3.0.1 --set serviceAccount=op-sa --set "domainNamespaces={}" --set "javaLoggingLevel=FINE" --wait
Create a Kubernetes namespace (for example, soans
) for the domain unless you intend to use the default namespace. Use the new namespace in the remaining steps in this section.
For details, see Prepare to run a domain.
$ kubectl create namespace soans
$ helm upgrade --reuse-values --namespace opns --set "domainNamespaces={soans}" --wait weblogic-kubernetes-operator kubernetes/charts/weblogic-operator
In the Kubernetes namespace you created, create the PV and PVC for the domain by running the create-pv-pvc.sh script. Follow the instructions for using the script to create a dedicated PV and PVC for the Oracle SOA Suite domain.
Review the configuration parameters for PV creation here. Based on your requirements, update the values in the create-pv-pvc-inputs.yaml
file located at ${WORKDIR}/weblogic-kubernetes-operator/kubernetes/samples/scripts/create-weblogic-domain-pv-pvc/
. Sample configuration parameter values for an Oracle SOA Suite domain are:
baseName
: domaindomainUID
: soainfranamespace
: soansweblogicDomainStorageType
: HOST_PATHweblogicDomainStoragePath
: /scratch/k8s_dir/SOAEnsure that the path for the weblogicDomainStoragePath
property exists (if not, you need to create it),
has full access permissions, and that the folder is empty.
Run the create-pv-pvc.sh
script:
$ cd ${WORKDIR}/weblogic-kubernetes-operator/kubernetes/samples/scripts/create-weblogic-domain-pv-pvc
$ ./create-pv-pvc.sh -i create-pv-pvc-inputs.yaml -o output_soainfra
The create-pv-pvc.sh
script will create a subdirectory pv-pvcs
under the given /path/to/output-directory
directory and creates two YAML configuration files for PV and PVC. Apply these two YAML files to create the PV and PVC Kubernetes resources using the kubectl create -f
command:
$ kubectl create -f output_soainfra/pv-pvcs/soainfra-domain-pv.yaml
$ kubectl create -f output_soainfra/pv-pvcs/soainfra-domain-pvc.yaml
Create the Kubernetes secrets username
and password
of the administrative account in the same Kubernetes namespace as the domain:
$ cd ${WORKDIR}/weblogic-kubernetes-operator/kubernetes/samples/scripts/create-weblogic-domain-credentials
$ ./create-weblogic-credentials.sh -u weblogic -p Welcome1 -n soans -d soainfra -s soainfra-domain-credentials
For more details, see this document.
You can check the secret with the kubectl get secret
command.
For example:
You also need to create a Kubernetes secret containing the credentials for the database schemas. When you create your domain, it will obtain the RCU credentials from this secret.
Use the provided sample script to create the secret:
$ cd ${WORKDIR}/weblogic-kubernetes-operator/kubernetes/samples/scripts/create-rcu-credentials
$ ./create-rcu-credentials.sh \
-u SOA1 \
-p Oradoc_db1 \
-a sys \
-q Oradoc_db1 \
-d soainfra \
-n soans \
-s soainfra-rcu-credentials
The parameter values are:
-u
username for schema owner (regular user), required.
-p
password for schema owner (regular user), required.
-a
username for SYSDBA user, required.
-q
password for SYSDBA user, required.
-d
domainUID. Example: soainfra
-n
namespace. Example: soans
-s
secretName. Example: soainfra-rcu-credentials
You can confirm the secret was created as expected with the kubectl get secret
command.
For example:
Oracle SOA Suite domains require a database with the necessary schemas installed in them. The Repository Creation Utility (RCU) allows you to create those schemas. You must set up the database before you create your domain. There are no additional requirements added by running Oracle SOA Suite in Kubernetes; the same existing requirements apply.
For production deployments, you must set up and use the standalone (non-container) based database running outside of Kubernetes.
Before creating a domain, you will need to set up the necessary schemas in your database.
To create the database schemas for Oracle SOA Suite, run the create-rcu-schema.sh
script.
For example:
$ cd ${WORKDIR}/weblogic-kubernetes-operator/kubernetes/samples/scripts/create-rcu-schema
$ ./create-rcu-schema.sh -h
usage: ./create-rcu-schema.sh -s <schemaPrefix> -t <schemaType> -d <dburl> -i <image> -u <imagePullPolicy> -p <docker-store> -n <namespace> -q <sysPassword> -r <schemaPassword> -o <rcuOutputDir> -l <schemaProfileType> [-h]
-s RCU Schema Prefix (required)
-t RCU Schema Type (optional)
(supported values: fmw(default), soa, osb, soaosb, soaess, soaessosb)
-d RCU Oracle Database URL (optional)
(default: oracle-db.default.svc.cluster.local:1521/devpdb.k8s)
-p FMW Infrastructure ImagePullSecret (optional)
(default: none)
-i FMW Infrastructure Image (optional)
(default: container-registry.oracle.com/middleware/fmw-infrastructure:12.2.1.4)
-u FMW Infrastructure ImagePullPolicy (optional)
(default: IfNotPresent)
-n Namespace for RCU pod (optional)
(default: default)
-q password for database SYSDBA user. (optional)
(default: Oradoc_db1)
-r password for all schema owner (regular user). (optional)
(default: Oradoc_db1)
-o Output directory for the generated YAML file. (optional)
(default: rcuoutput)
-l Profile type for SOA RCU schema creation (optional).
(supported values: SMALL(default), MED, LARGE)
-h Help
$ ./create-rcu-schema.sh \
-s SOA1 \
-t soaessosb \
-d oracle-db.default.svc.cluster.local:1521/devpdb.k8s \
-i soasuite:12.2.1.4 \
-n default \
-q Oradoc_db1 \
-r Oradoc_db1
For Oracle SOA Suite domains, the create-rcu-schema.sh
script supports:
soa
, osb
, soaosb
, soaess
, and soaessosb
.
You must specify one of these using the -t
flag.-l
flag. Supported values are SMALL
, MED
, and LARGE
.Note: To use the
LARGE
schema profile type, make sure that the partitioning feature is enabled in the Oracle Database.
Make sure that you maintain the association between the database schemas and the matching domain just like you did in a non-Kubernetes environment. There is no specific functionality provided to help with this.
If you want to drop a schema, you can use the drop-rcu-schema.sh
script.
For example:
$ cd ${WORKDIR}/weblogic-kubernetes-operator/kubernetes/samples/scripts/create-rcu-schema
$ ./drop-rcu-schema.sh -h
usage: ./drop-rcu-schema.sh -s <schemaPrefix> -d <dburl> -n <namespace> -q <sysPassword> -r <schemaPassword> -l <schemaProfileType> [-h]
-s RCU Schema Prefix (required)
-t RCU Schema Type (optional)
(supported values: fmw(default), soa, osb, soaosb, soaess, soaessosb)
-d Oracle Database URL (optional)
(default: oracle-db.default.svc.cluster.local:1521/devpdb.k8s)
-n Namespace where RCU pod is deployed (optional)
(default: default)
-q password for database SYSDBA user. (optional)
(default: Oradoc_db1)
-r password for all schema owner (regular user). (optional)
(default: Oradoc_db1)
-l Profile type for SOA RCU schema deletion (optional).
(supported values: SMALL(default), MED, LARGE)
-h Help
$
$ ./drop-rcu-schema.sh \
-s SOA1 \
-t soaessosb \
-d oracle-db.default.svc.cluster.local:1521/devpdb.k8s \
-n default \
-q Oradoc_db1 \
-r Oradoc_db1
For Oracle SOA Suite domains, the drop-rcu-schema.sh
script supports:
soa
, osb
, soaosb
, soaess
, and soaessosb
.
You must specify one of these using the -t
flag.-l
flag. Supported values are SMALL
, MED
, and LARGE
.Now that you have your Docker images and you have created your RCU schemas, you are ready to create your domain. To continue, follow the instructions in Create Oracle SOA Suite domains.