NOTE:

For demonstration purposes only, not for use in production. 

Refer the following documentation for detailed information:

https://oracle.github.io/weblogic-kubernetes-operator/


 

Step 1:

 

Install latest version of Maven and JDK 21:

Example:

 

sudo tar xvf <>

 

 

sudo tar xvc <>

 

Step 2:

 

Set JAVA_HOME and MAVEN_HOME:

Example:

export JAVA_HOME=/home/opc/jdk-21.0.1

 

export MAVEN_HOME=/home/opc/apache-maven-3.9.5

 

PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH

 

Step 3:

 

Set proxy:

Example:

export HTTP_PROXY=http://www-proxy-xxxx.xx.xxxxx.com:80

 

export HTTPS_PROXY=http://www-proxy-xxxx.xx.xxxxx.com:80

 

export NO_PROXY=localhost,127.0.0.1,10.xx.xx.xxx,10.xx.xx.xxx,10.xx.xx.xxx

 

NOTE:

Add the IP address of all nodes in k8s cluster at the end of no-proxy as shown above.

 

Step 4:

 

Clone WKO repo:

Example:

git clone https://github.com/oracle/weblogic-kubernetes-operator.git

 

Step 5: (Optional)

 

You can customize WKO as needed at this stage.

Example: 

In this example I will build WKO on OL8 instead of the default OL9:

unzip and cd to weblogic-kubernetes-operator directory and make the following changes to DockerFile

* Change “FROM ghcr.io/oracle/oraclelinux:9-slim AS jre-build” to “FROM ghcr.io/oracle/oraclelinux:8-slim AS jre-build”

* Change “FROM ghcr.io/oracle/oraclelinux:9-slim” to “FROM ghcr.io/oracle/oraclelinux:8-slim”

* Set Proxy:

Add proxy below the line that starts with: RUN set -eux; \

Example:

    export http_proxy=”http://www-proxy.xx.xxxxx.xxx:80″; \

    export https_proxy=”http://www-proxy.xx.xxxxx.xxx:80″; \

dockerfile

 

Step 6:

 

Maven Install

Example:

cd <WKO Cloned location>

 

mvn clean install

If you get a warning only while testing then you can skip Maven test using the following command:

mvn -Dmaven.test.skip=true -Dskip.unit.tests=true clean install

 

OR 

 

mvn -DskipTests -Dskip.unit.tests=true install

 

Step 7:

 

After running maven install successfully, you can build the WKO image using the following command:

Example:

docker build -t ‘weblogic-kubernetes-operator:4.1.6’ .

 

docker images

 

OR 

 

podman build -t ‘weblogic-kubernetes-operator:4.1.6’ .

 

podman images

 

<Additional Info>

I was using a very old version of VirtualBox for my tests and when I used the production release of WKO image from https://github.com/oracle/weblogic-kubernetes-operator (which is built on OL9) I saw the following error:

kubectl logs -n sample-weblogic-operator-ns weblogic-operator-bf77-67
Fatal glibc error: CPU does not support x86-64-v2

To overcome this I had to build a WKO image by modifying the DockerFile and forcing it to use OL8 instead of OL9.

You can pull this custom image from my repo:

docker pull ghcr.io/thelearnloop/exploringkubernetes/weblogic-kubernetes-operator:4.1.6