Use the Scripts to Create the JRF Domain

To create the JRF domain, use the sample script create-domain.sh provided by WebLogic Kubernetes Operator. This script takes the create-domain-inputs.yaml file as the input.

Here is a sample of the create-domain-inputs.yaml file for your reference:
# Copyright (c) 2023, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
 
# The version of this inputs file.  Do not modify.
version: create-weblogic-domain-inputs-v1
 
# Port number for admin server
adminPort: 7001
 
# Name of the Admin Server
adminServerName: <domain_name>-adminserver
 
# Unique ID identifying a domain.
# This ID must not contain an underscore ("_"), and must be lowercase and unique across all domains in a Kubernetes cluster.
domainUID: <domain_name>
 
# Home of the WebLogic domain
# If not specified, the value is derived from the domainUID as /shared/domains/<domainUID>
domainHome: /u01/shared/weblogic-domains/<domain_name>
 
# Determines which OracleFMWInfrastructure Servers the operator will start up
# Legal values are "Never", "IfNeeded", or "AdminOnly"
serverStartPolicy: IfNeeded
 
# Cluster name
clusterName: cluster-1
 
# Number of managed servers to generate for the domain
configuredManagedServerCount: 5
 
# Number of managed servers to initially start for the domain
initialManagedServerReplicas: 2
 
# Base string used to generate managed server names
managedServerNameBase: <domain_name>-managedserver
 
# Port number for each managed server
managedServerPort: 8001
 
# WebLogic Server image.
# The operator requires WebLogic Server 12.2.1.3.0 with patch 29135930 applied or 12.2.1.4.0.
# The existing WebLogic Server image, `container-registry.oracle.com/middleware/fmw-infrastructure:12.2.1.3`,
# has all the necessary patches applied.
#
# **NOTE**:
# This sample uses General Availability (GA) images. GA images are suitable for demonstration and
# development purposes only where the environments are not available from the public Internet;
# they are not acceptable for production use. In production, you should always use CPU (patched)
# images from OCR or create your images using the WebLogic Image Tool.
# Please refer to the `OCR` and `Manage FMW infrastructure domains` pages in the WebLogic
# Kubernetes Operator documentation for details.
image: container-registry.oracle.com/middleware/fmw-infrastructure:12.2.1.4
 
# Image pull policy
# Legal values are "IfNotPresent", "Always", or "Never"
imagePullPolicy: IfNotPresent
 
# Name of the Kubernetes secret to access the container registry to pull the WebLogic Server image
# The presence of the secret will be validated when this parameter is enabled.
#imagePullSecretName:
 
# Boolean indicating if production mode is enabled for the domain
productionModeEnabled: true
 
# Name of the Kubernetes secret for the Admin Server's username and password
# The name must be lowercase.
# If not specified, the value is derived from the domainUID as <domainUID>-weblogic-credentials
weblogicCredentialsSecretName: <domain_name>-weblogic-credentials
 
# Whether to include server .out to the pod's stdout.
# The default is true.
includeServerOutInPodLog: true
 
# The in-pod location for domain log, server logs, server out, Node Manager log, introspector out, and
# HTTP access log files. If not specified, the value is derived from the domainUID as
# /shared/logs/<domainUID>.
logHome: /u01/shared/logs/<domain_name>
 
# Set this value to 'false' to have HTTP access log files written to the directory
# configured in the WebLogic domain home.
# The default is 'true', which means HTTP access log files will be written to
# the logHome directory.
httpAccessLogInLogHome: true
 
# Port for the T3Channel of the NetworkAccessPoint
t3ChannelPort: 30012
 
# Public address for T3Channel of the NetworkAccessPoint.  This value should be set to the
# kubernetes server address, which you can get by running "kubectl cluster-info".  If this
# value is not set to that address, WLST will not be able to connect from outside the
# kubernetes cluster.
#t3PublicAddress:
 
# Boolean to indicate if the channel should be exposed as a service
exposeAdminT3Channel: false
 
# NodePort to expose for the admin server
adminNodePort: 30701
 
# Boolean to indicate if the adminNodePort will be exposed
exposeAdminNodePort: false
 
# Name of the domain namespace
namespace: <domain_name>-ns
 
#Java Option for WebLogic Server
javaOptions: -Dweblogic.StdoutDebugEnabled=false
 
# Name of the persistent volume claim
# If not specified, the value is derived from the domainUID as <domainUID>-weblogic-sample-pvc
persistentVolumeClaimName: <domain_name>-oke-pvc
 
# Mount path of the domain persistent volume.
domainPVMountPath: /u01/shared
 
# Mount path where the create domain scripts are located inside a pod
#
# The `create-domain.sh` script creates a Kubernetes job to run the script (specified in the
# `createDomainScriptName` property) in a Kubernetes pod to create a WebLogic home. Files
# in the `createDomainFilesDir` directory are mounted to this location in the pod, so that
# a Kubernetes pod can use the scripts and supporting files to create a domain home.
createDomainScriptsMountPath: /u01/weblogic
 
# Script that the create domain script uses to create a WebLogic domain
#
# The `create-domain.sh` script creates a Kubernetes job to run this script to create a
# domain home. The script is located in the in-pod directory that is specified in the
# `createDomainScriptsMountPath` property.
#
# If you need to provide your own scripts to create the domain home, instead of using the
# built-it scripts, you must use this property to set the name of the script that you want
# the create domain job to run.
createDomainScriptName: create-domain-job.sh
 
# Directory on the host machine to locate all the files to create a WebLogic domain
# It contains the script that is specified in the `createDomainScriptName` property.
#
# By default, this directory is set to the relative path `wlst`, and the create script will
# use the built-in WLST offline scripts in the `wlst` directory to create the WebLogic domain.
# It can also be set to the relative path `wdt`, and then the built-in WDT scripts will be
# used instead.
#
# An absolute path is also supported to point to an arbitrary directory in the file system.
#
# The built-in scripts can be replaced by the user-provided scripts or model files as long
# as those files are in the specified directory. Files in this directory are put into a
# Kubernetes config map, which in turn is mounted to the `createDomainScriptsMountPath`,
# so that the Kubernetes pod can use the scripts and supporting files to create a domain home.
createDomainFilesDir: wlst
 
# Resource request for each server pod (Memory and CPU). This is minimum amount of compute
# resources required for each server pod. Edit value(s) below as per pod sizing requirements.
# These are optional.
# Please refer to the kubernetes documentation on Managing Compute
# Resources for Containers for details.
serverPodMemoryRequest: "1280Mi"
serverPodCpuRequest: "500m"
 
# Uncomment and edit value(s) below to specify the maximum amount of compute resources allowed
# for each server pod.
# These are optional.
# Please refer to the kubernetes documentation on Managing Compute
# Resources for Containers for details.
# serverPodMemoryLimit: "2Gi"
# serverPodCpuLimit: "1000m"
 
#
# RCU configuration details
#
# The schema prefix to use in the database, for example `SOA1`.  You may want to make this
# the same as the domainUID in order to simplify matching domains to their RCU schemas.
rcuSchemaPrefix: <rcuSchemaPrefix>
 
# The database URL
rcuDatabaseURL: <rcuDatabaseURL> 
 
# The kubernetes secret containing the database credentials
rcuCredentialsSecret: <domain_name>-rcu-access
 
# FMW Infrastructure Domain Type. Legal values are JRF or RestrictedJRF
fmwDomainType: JRF

Note:

For rcuSchemaPrefix, use the same value that you used to run the create-rcu-schema.sh script for creating the RCU schema.
You should make a copy of the create-domain-inputs.yaml file, and then run the create-domain.sh by pointing it to this file and an output directory, as shown in the following command:
scripts/create-fmw-infrastructure-domain/domain-home-on-pv/create-domain.sh -i create-domain-inputs.yaml -o output
The script will complete the following tasks:
  • Create a directory for the generated Kubernetes YAML files for this domain if it does not already exist. The path name is /<path to output-directory>/weblogic-domains/<domainUID>. If the directory already exists, ensure that you remove its contents before using this script.
  • Create a Kubernetes job that will start up a utility WebLogic Server container and run offline WLST scripts or WebLogic Deploy Tooling (WDT) scripts, to create the domain on the shared storage.
After the Kubernetes job is complete, use the domain.yaml file to create the Kubernetes resource using the kubectl apply command, as shown in the following example:
kubectl apply -f <outputdir>/weblogic-domains/<domain_name>/domain.yaml