New Oracle WebLogic 14.1.1 on Oracle Kubernetes Engine
Published on: Author: Michel Schildmeijer Category: OracleAt the end of March, Oracle Product Director Will Lyons announced the long expected release of Oracle WebLogic 14.1.1. I won't go into detail about every nice, new feature. You can find all the details about this release here and on my blog.
Rather, I wanted to test if this version was ready to run on a Kubernetes platform. In this case, the obvious choice was the Oracle Kubernetes Engine (OKE), although RedHat OpenShift and Microsoft Azure Kubernetes Service are also good options.
Ingredients for running WebLogic 14.1.1 domain
To build this new version, my toolset consisted of the following components:
- An Oracle Kubernetes Engine Cluster (already created)
- A client to run this cluster
- The Oracle WebLogic 14.1.1 package
- Oracle WebLogic docker files
- Podman, Buildah, Skopeo. For this blog, I only used Podman. I will use the other tools later.
- The WebLogic Kubernetes Operator 2.5
- Helm
- Oracle Container Registry (OCIR)
- Some GitHub repo's with build scripts: here and here
WebLogic 14 docker image
To build my private image and push it to my private registry, I first need to build my local image.

There is a shell script provided, but let's look into the dockerfiles. I chose the generic file and the downloaded WebLogic package.

Using the shell script, I build my docker image. I did have to change the docker into the podman command in the script:
# ################## # # BUILDING THE IMAGE # # ################## # echo "Building image '$IMAGE_NAME' ..." # BUILD THE IMAGE (replace all environment variables) BUILD_START=$(date '+%s') podman build --force-rm=$NOCACHE --no-cache=$NOCACHE $PROXY_SETTINGS -t $IMAGE_NAME -f Dockerfile.$DISTRIBUTION . || { echo "There was an error building the image." exit 1 } BUILD_END=$(date '+%s') BUILD_ELAPSED=`expr $BUILD_END - $BUILD_START`
Run the script:
./buildDockerImage.sh -v 14.1.1.0 -g
After the build is done, I used podman to inspect the image:

Push to OCIR
I wanted to have this image in my OCI container registry, so I set up a push to OCIR. But first, you need to set up an auth token in your OCI:
- Go to User Settings

Under resource, you can find how to generate.

- Be aware to save the passphrase, because you won’t see it anymore
- Use the passphrase to login and use double quotes!
podman login fra.ocir.io Username: frce4kd4ndqf/oracleidentitycloudservice/mschildmeijer@qualogy.com Password:******** Login Succeeded!
podman images

I tagged my WebLogic 14 container image for pushing:
podman tag oracle/weblogic:14.1.1.0-generic fra.ocir.io/frce4kd4ndqf/oracle/weblogic:14.1.1.0-generic podman push fra.ocir.io/frce4kd4ndqf/oracle/weblogic:14.1.1.0-generic
The result:

WebLogic 14 on Kubernetes
To install WebLogic on Kubernetes, the following actions need to be done:
1. Configure Helm for installing the WebLogic Kubernetes Operator 2.5 and pushing it to my OCIR. I used the Helm 2 version, OKE v3 is also supported
cat << EOF | kubectl apply -f - > apiVersion: rbac.authorization.k8s.io/v1 > kind: ClusterRoleBinding > metadata: > name: helm-user-cluster-admin-role > roleRef: > apiGroup: rbac.authorization.k8s.io > kind: ClusterRole > name: cluster-admin > subjects: > - kind: ServiceAccount > name: default > namespace: kube-system > EOF
2. Get the Helm client and configure it with:
helm init

3. Pull the WebLogic Kunernetes Operator Image
podman pull oracle/weblogic-kubernetes-operator:2.5.0

4. Tag and push it to OCIR
podman tag oracle/weblogic-kubernetes-operator:2.5.0 fra.ocir.io/frce4kd4ndqf/oracle/weblogic-kubernetes-operator:2.5.0 podman push fra.ocir.io/frce4kd4ndqf/oracle/weblogic-kubernetes-operator:2.5.0
5. Add the GitHub repo to Helm
helm repo add weblogic-operator https://oracle.github.io/weblogic-kubernetes-operator/cha rt
helm repo list

s
helm install weblogic-operator/weblogic-operator --name weblogic-operator

etc.
helm status weblogic-operator
gives you the current status of your deployment.
WebLogic Domain
With the provided scripts from GitHub, a lot is taken care of. However, be aware of some extra actions:
- Creation of NFS on your OKE nodes; there is no solid instruction in the Oracle GitHub docs
- Permissions to execute stuff within your containers
- Adjust parameters in the yamls to suit your own needs
NFS on OKE
If you want to make use of persistent volumes on OKE, you need to create an NFS share. You can find a good instruction here. However, you do need to set up console connections for your nodes. Don’t worry, this is pretty easy. Click on all your compute instances; you can find the link under resources.

This gives you the detailed command on how to connect, however: I got a log-in prompt, and for the standard OPC user there is no password known. You can find how to reset your OPC user here. After this, you can log in.
Once logged in you can setup NFS
WebLogic Domain provisioning
Now, after doing all of the above, it's time to provision your WebLogic domain. You can find them in the cloned repository in: weblogic-kubernetes-operator/kubernetes/samples/scripts
Domain on Persistent Volume
First, I created a persistent volume and claimed to store WebLogic Artefacts out, using the yaml files:
# The version of this inputs file. Do not modify. version: create-weblogic-sample-domain-pv-pvc-inputs-v1 # The base name of the pv and pvc baseName: weblogic-fourteen # Unique ID identifying a domain. # If left empty, the generated pv can be shared by multiple domains # This ID must not contain an underscope ("_"), and must be lowercase and unique across all domains in a Kubernetes cluster. domainUID: # Name of the namespace for the persistent volume claim namespace: default # Persistent volume type for the persistent storage. # The value must be 'HOST_PATH' or 'NFS'. # If using 'NFS', weblogicDomainStorageNFSServer must be specified. weblogicDomainStorageType: HOST_PATH # The server name or ip address of the NFS server to use for the persistent storage. # The following line must be uncomment and customized if weblogicDomainStorateType is NFS: #weblogicDomainStorageNFSServer: 10.0.10.2 # Physical path of the persistent storage. # When weblogicDomainStorageType is set to HOST_PATH, this value should be set the to path to the # domain storage on the Kubernetes host. # When weblogicDomainStorageType is set to NFS, then weblogicDomainStorageNFSServer should be set # to the IP address or name of the DNS server, and this value should be set to the exported path # on that server. # Note that the path where the domain is mounted in the WebLogic containers is not affected by this # setting, that is determined when you create your domain. # The following line must be uncomment and customized: weblogicDomainStoragePath: /scratch # Reclaim policy of the persistent storage # The valid values are: 'Retain', 'Delete', and 'Recycle' weblogicDomainStorageReclaimPolicy: Retain # Total storage allocated to the persistent storage. weblogicDomainStorageSize: 10Gi
./create-pv-pvc.sh -i create-pv-pvc-inputs.yaml -o pvc -e
Which creates the pv and pvc yaml files, plus the objects in your K8S cluster.

Now, create the jobs which are going to be used by the operator. You will find the necessary scripts to create the AdminServer and Managed Server Pods in create-weblogic-domain/domain-home-on-pv directory. You can also amend them for your own needs.
I changed the name of the domain and the location of my WebLogic image:

First you need to create 2 secrets:
- For pulling the image:

- WebLogic credentials, script can be found in
- create the domain job:

After this the pods we're created, however they remained in status Init:Error.
kubectl logs <pod> didn't give much information. A way to figure out why the pods were failing, is to do this:
kubectl get pods kubectl describe po < name of the pod>
Look at the part of the Container ID that is in init status:

kubectl logs <pod-name> -c <init-containerid>
There, I found that the NFS share was not writable for the scripts to build up the domain. To resolve this, I changed the values in the create-domain-job-template.yaml. The spec / initContainer had value 0, which I changed in the opc userid (1000).

After doing this, my WebLogic domain was successfully created!

Leftovers
This proves that WebLogic 14.1.1 runs equal to the 12 versions. I also proved that Podman can be used instead of the docker-cli. The commands are more or less the same.
Now, this is an empty domain, so I had a few leftovers:
- Deploying applications
- Using Istio with JMS
- Use GraalVM instead of Oracle Java
- Deploy polyglot applications
- Configure ELK
- Configure Prometheus and Grafana