Upgrade the WebLogic Kubernetes Operator

Upgrade the WebLogic Kubernetes Operator

Published on: Category: Oracle

In my blog series concerning WebLogic, containers, and Kubernetes, I would like to tell you about "old meets new". Although… in this instance, "old" is maybe an inappropriate term. Because I want to look at WebLogic's relation to traditional infrastructure, like servers and VMs, and to container orchestrator platforms such as Kubernetes and Oracle Container Clusters (OKE).

Operators

Kubernetes as a platform knows all about its pods, services, policies, persistent volumes and so on. But when requests for what to containerize became more demanding, it simply didn’t suffice. If you have to control a stateless web app in a lightweight container, Kubernetes handles it well. But an entire database or application server platform in a container is very different. Specific tasks and details regarding all kinds of configurations and operations can never be handled by Kubernetes, similar to a VM or server; they can't do that either.

Here, operators will be implemented.

Operators:

  • They extend the K8S API
  • Configure & manage more complex instances
  • They leverage more experience-based knowledge to Kubernetes

This schema represents the basic components of an operator’s work. An operator uses components such as:

  • The Operator Framework SDK
  • Custom Resource Definitions (CRD)—For adding custom objects as if they were Kubernetes objects
  • ConfigMaps—Configuration properties injected to pods
  • Additional built-in tools to manage, build, package and deploy an environment in Kubernetes


Operators are written for many OpenSource and commercial products. Oracle has one for Oracle WebLogic, which can do simpler WebLogic management in Kubernetes by managing an overall WebLogic environment through Kubernetes APIs, such as:

  • Load Balancer, Network
  • Ingress Controllers
  • Security
  • HA restart, upgrade, scaling
  • Persistent storage

It also ensures that WebLogic’s best practices regarding configuration and administration are followed.

This schema represents some of the WebLogic Kubernetes operators’ tasks for management.

Upgrading the WebLogic Operator

The WebLogic Operator source code is available on GitHub: click here. The operator images are pushed to the docker hub and Oracle's own container registry:
Docker Hub: click here
OCR: click here

On my cluster, I was running version 2.5.0, which I installed with Helm. As you may know, Helm is a package and release management tool for Kubernetes.

First of all, check the status of the current deployed operator:

  1. helm status weblogic-operator --namespace weblogic-operator-namespace

Check the deployed version in the namespace.

  1. helm list --namespace weblogic-operator-namespace

The newest version is 3.0.0-rc1 (released in May 2020), so let’s upgrade. In my custom-values.yaml, I map to the newest version from the container registry:

Note: this could also be from the docker hub.

Now, do the upgrade:

  1. helm upgrade --reuse-values --set "domainNamespaces={sample-domains-ns1}" --set "javaLoggingLevel=FINE" --wait weblogic-operator kubernetes/charts/weblogic-operator

Where kubernetes/charts/weblogic-operator is the location of my custom values

After pulling the image, the new version was installed:

And finally, I tested some lifecycle functions, such as restarting the domain:

  1. 1. kubectl patch domain soaosbdomain -n soa-ns --type='json' -p='[{"op": "replace", "path": "/spec/serverStartPolicy", "value": "NEVER" }]'
  2. 2. kubectl patch domain soaosbdomain -n soa-ns --type='json' -p='[{"op": "replace", "path": "/spec/serverStartPolicy", "value": "IF_NEEDED" }]'

Which triggers the domain to stop and start. I admit it's not a great test in a production live situation, but this was just a test for me.

I haven't tested any new features yet. That may come in a later stage.

Conclusion

Operators are evident in container landscapes these days, but they don’t make life less complex. However, they are necessary in a complex environment; as a WebLogic platform can be. Hope this blog helps you a bit further in your journey.

Michel Schildmeijer
About the author Michel Schildmeijer

Michel started his career as a medical officer in the Royal Dutch Airforce, with a focus on pharma. After the air force, he continued in pharma, followed by time working in clinical pharmacology. While there, he transitioned to IT by learning UNIX and MUMPS, and developed a system for managing patients’ medical records. As his career developed, his responsibility shifted from a deep technical perspective to a more visionary role. At the end of 2011, Michel authored a book on WebLogic Administration for beginners. He joined Qualogy in April 2012 where he expanded his repertoire significantly, serving a wide range of customers with his knowledge about Java Application Servers, Middleware and Application Integration. He also increased his multiple-industry knowledge in his role as Solutions or IT architect by working for customers in a range of sectors, including financials, telecom, public transportation and government organizations. In 2012, he received the IT Industry-recognized title of Oracle ACE for being an ambassador and community leader in his area of expertise. In 2019, this was enhanced to Oracle ACE Director. Michel is asked regularly to speak about technology and the impact of innovation at national and international conferences such as KubeCon, Oracle OpenWorld, Groundbreakers Developers Tours and others. He contributes actively to the OpenSource community and solutions regarding containerization, CI/CD and DevOps. In October 2021, Michel took an exciting step in his career by becoming Business Unit Manager for Qualogy Managed Services. While he still has a finger on the pulse in terms of technology, he is expanding his scope by combining his experience with the new insights gained in his new position. Read more via blog: https://bit.ly/3fAxrqf | Medium: https://mschildmeijer.medium.com/ | Books: Oracle Weblogic Server 11gR1 PS2: Administration Essentials: https://bit.ly/3IhALmf | Oracle WebLogic Server 12c: First Look1: https://bit.ly/31olbpj

More posts by Michel Schildmeijer
Comments
Reply