Prepare your environment

To prepare your Oracle SOA Suite in Kubernetes environment, complete the following steps:

  1. Set up your Kubernetes cluster

  2. Install Helm

  3. Get dependent images

  4. Set up the code repository to deploy Oracle SOA Suite domains

  5. Obtain the Oracle SOA Suite Docker image

  6. Install the WebLogic Kubernetes operator

  7. 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

  8. Create an Oracle SOA Suite domain

Set up your Kubernetes cluster

If you need help setting up a Kubernetes environment, check the cheat sheet.

Install Helm

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.

Get dependent images

Obtain dependent images and add them to your local registry.

  1. For first time users, to pull an image from the Oracle Container Registry, navigate to https://container-registry.oracle.com and log in using the Oracle Single Sign-On (SSO) authentication service. If you do not already have an SSO account, you can create an Oracle Account here.

    Use the web interface to accept the Oracle Standard Terms and Restrictions for the Oracle software images that you intend to deploy. Your acceptance of these terms are stored in a database that links the software images to your Oracle Single Sign-On login credentials.

    Log in to the Oracle Container Registry (container-registry.oracle.com) from your Docker client:

    $ docker login container-registry.oracle.com
    
  2. Pull the operator image:

    $ docker pull ghcr.io/oracle/weblogic-kubernetes-operator:3.2.1
    $ docker tag ghcr.io/oracle/weblogic-kubernetes-operator:3.2.1  oracle/weblogic-kubernetes-operator:3.2.1
    

Set up the code repository to deploy Oracle SOA Suite domains

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.

  1. Create a working directory to set up the source code:

    $ mkdir $HOME/soa_21.2.2
    $ cd $HOME/soa_21.2.2
    
  2. Download the WebLogic Kubernetes Operator source code and Oracle SOA Suite Kubernetes deployment scripts from the SOA repository. Required artifacts are available at OracleSOASuite/kubernetes.

    $ git clone https://github.com/oracle/fmw-kubernetes.git --branch release/21.2.2
    $ export WORKDIR=$HOME/soa_21.2.2/OracleSOASuite/kubernetes
    

Obtain the Oracle SOA Suite Docker image

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.

  1. Download patch 32794257 from My Oracle Support (MOS).

  2. Unzip the downloaded patch zip file.

  3. Load the image archive using the docker load command.

    For example:

    $ docker load < soasuite-12.2.1.4.0-8-ol7-210512.1700.tar
    Loaded image: oracle/soasuite:12.2.1.4.0-8-ol7-210512.1700
    $
    
  4. Run the docker inspect command to verify that the downloaded image is the latest released image. The value of label com.oracle.weblogic.imagetool.buildid must match to 32a1cc91-961d-4ce9-9d57-9f2eaff7bbea.

    For example:

    $ docker inspect --format='{{ index .Config.Labels "com.oracle.weblogic.imagetool.buildid" }}'  oracle/soasuite:12.2.1.4.0-8-ol7-210512.1700
     32a1cc91-961d-4ce9-9d57-9f2eaff7bbea
    $
    
    

If you want to build and use an Oracle SOA Suite Docker image with any additional bundle patch or interim patches that 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 as soasuite:12.2.1.4 using the docker tag command. If you want to use a different name for the image, make sure to update the new image tag name in the create-domain-inputs.yaml file and also in other instances where the soasuite:12.2.1.4 image name is used.

Install the WebLogic Kubernetes operator

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}
$ helm install weblogic-kubernetes-operator charts/weblogic-operator  --namespace opns  --set image=oracle/weblogic-kubernetes-operator:3.2.1 --set serviceAccount=op-sa --set "domainNamespaces={}" --set "javaLoggingLevel=FINE" --wait

Prepare the environment for Oracle SOA Suite domains

Create a namespace for an Oracle SOA Suite domain

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 charts/weblogic-operator         

Create a persistent storage for an Oracle SOA Suite domain

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}/create-weblogic-domain-pv-pvc/. Sample configuration parameter values for an Oracle SOA Suite domain are:

    • baseName: domain
    • domainUID: soainfra
    • namespace: soans
    • weblogicDomainStorageType: HOST_PATH
    • weblogicDomainStoragePath: /scratch/k8s_dir/SOA
  • Ensure that the path for the weblogicDomainStoragePath property exists and have the ownership for 1000:0. If not, you need to create it as follows:

    $ sudo mkdir /scratch/k8s_dir/SOA
    $ sudo chown -R 1000:0 /scratch/k8s_dir/SOA
    
  • Run the create-pv-pvc.sh script:

    $ cd ${WORKDIR}/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 a Kubernetes secret with domain credentials

Create the Kubernetes secrets username and password of the administrative account in the same Kubernetes namespace as the domain:

  $ cd ${WORKDIR}/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:

Click here to see the sample secret description.

Create a Kubernetes secret with the RCU credentials

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}/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:

Click here to see the sample secret description.

Configure access to your database

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.

Run the Repository Creation Utility to set up your database schemas

Create schemas

To create the database schemas for Oracle SOA Suite, run the create-rcu-schema.sh script.

For example:

$ cd ${WORKDIR}/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> -c <customVariables>  [-h]
  -s RCU Schema Prefix (required)
  -t RCU Schema Type (optional)
  	(supported values: osb,soa,soaosb)
  -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: soasuite: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)
  -c Comma-separated custom variables in the format variablename=value. (optional).
        (default: none)
  -h Help

$ ./create-rcu-schema.sh \
  -s SOA1 \
  -t soaosb \
  -d oracle-db.default.svc.cluster.local:1521/devpdb.k8s \
  -i soasuite:12.2.1.4 \
  -n default \
  -q Oradoc_db1 \
  -r Oradoc_db1 \
  -c SOA_PROFILE_TYPE=SMALL,HEALTHCARE_INTEGRATION=NO

For Oracle SOA Suite domains, the create-rcu-schema.sh script supports:

  • domain types: soa, osb, and soaosb. You must specify one of these using the -t flag.
  • For Oracle SOA Suite you must specify the Oracle SOA schema profile type using the -c flag. For example, -c SOA_PROFILE_TYPE=SMALL. Supported values for SOA_PROFILE_TYPE 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.

Drop schemas

If you want to drop a schema, you can use the drop-rcu-schema.sh script.

For example:

$ cd ${WORKDIR}/create-rcu-schema

$ ./drop-rcu-schema.sh -h
usage: ./drop-rcu-schema.sh  -s <schemaPrefix> -d <dburl> -n <namespace> -q <sysPassword> -r <schemaPassword> -c <customVariables> [-h]
  -s RCU Schema Prefix (required)
  -t RCU Schema Type (optional)
        (supported values: osb,soa,soaosb)
  -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)
  -c Comma-separated custom variables in the format variablename=value. (optional).
        (default: none)
  -h Help

$ ./drop-rcu-schema.sh \
  -s SOA1 \
  -t soaosb \
  -d oracle-db.default.svc.cluster.local:1521/devpdb.k8s \
  -n default \
  -q Oradoc_db1 \
  -r Oradoc_db1 \
  -c SOA_PROFILE_TYPE=SMALL,HEALTHCARE_INTEGRATION=NO

For Oracle SOA Suite domains, the drop-rcu-schema.sh script supports:

  • Domain types: soa, osb, and soaosb. You must specify one of these using the -t flag.
  • For Oracle SOA Suite, you must specify the Oracle SOA schema profile type using the -c flag. For example, -c SOA_PROFILE_TYPE=SMALL. Supported values for SOA_PROFILE_TYPE are SMALL, MED, and LARGE.

Create an Oracle SOA Suite domain

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.