Table of contents
1.
Introduction
2.
Pre-migration.
2.1.
Inventory capacity of a server
2.2.
Inventory all secrets
2.3.
Inventory of all certificates
2.4.
Inventory JNDI resources
2.5.
Identify the use of session replication
2.6.
Data sources for documents
2.7.
Check to see if WebLogic has been modified,
2.8.
Check to see if a connection to the on-premises is necessary.
2.9.
Check whether any JMS (Java Message Service) Queues or Topics are active.
2.10.
Check if you are utilizing your own unique Shared Java EE Libraries.
2.11.
Check to see if the WebLogic Scripting Tool is installed.
2.12.
Check to see if and how the file system is utilized.
2.12.1.
Read-only static content
2.12.2.
Static material that is published dynamically
2.12.3.
Internal or dynamic content
3.
Migration
3.1.
Provision of Azure Kubernetes Service and Azure Container Registry
3.2.
Make a WildFly Docker image
3.3.
KeyVault FlexVolume configuration.
3.4.
Configure JNDI resources
4.
Post-migration
5.
Frequently Asked Questions
5.1.
How can I go over to WildFly from JBoss?
5.2.
What is the purpose of WebLogic?
5.3.
What distinguishes JBoss and Wildfly from one another?
5.4.
What Is the Purpose of WildFly?
5.5.
Is WildFly a container?
6.
Conclusion
Last Updated: Mar 27, 2024

WebLogic to WildFly on AKS

Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

This article teaches you about WebLogic to WildFly on AKS. To migrate an existing WebLogic application to run on WildFly in an Azure Kubernetes Service container, there are a few things you should be aware of, as described in this tutorial. Let’s start WebLogic to WildFly on AKS

kubernetes

Pre-migration.

Before you begin for WebLogic to WildFly on AKS, complete the assessment and inventory activities outlined in the following sections to ensure a successful migration.

Inventory capacity of a server

Record the current production server's specifications (memory, CPU, disc), average and maximum request counts, and resource usage. No matter which migration route you take, you'll need this information. For instance, it can help determine the size of the VMs in your node pool, the amount of RAM the container will take, and the number of CPU shares it will require.

Inventory all secrets

There wasn't a clear definition of "secrets" before "configuration as a service" platforms like Azure Key Vault emerged. Instead, you had a confusing array of setup options that served as what we now refer to as "secrets." These secrets are spread throughout various configuration stores and configuration files on app servers like WebLogic Server. Search all properties and configuration files on the production server(s) for any secrets or passwords. Verify weblogic.xml in your WARs, please. Your program may also contain configuration files with passwords or other login information. See the fundamental ideas of Azure Key Vault for additional details.

ideas

Inventory of all certificates

used for public SSL endpoints should be documented. Run the following command to view all certificates on the production server(s):

keytool -list -v -Keystore <path to keystore>

Inventory JNDI resources

List all the JNDI resources. For instance, databases and other data sources may have a corresponding JNDI name that enables JPA to connect models of EntityManager to a specific database. See WebLogic Server Data Sources in the Oracle documentation for more details on JNDI resources and databases. Moving or reconfiguring other JNDI-related resources, including JMS message brokers, may be necessary. See Oracle WebLogic Server 12.2.1.4.0 for further details on JMS settings.

Identify the use of session replication

You have two choices if your application depends on session replication, whether it uses Oracle Coherence*Web or not:

  1. Rework your program, so that session management relies on a database.
     
  2. To externalize the session to Azure Redis Service, refactor your application. 

Data sources for documents

You must record the following data if your application uses any databases for WebLogic to WildFly on AKS:

  1. What's the name of the data source?
     
  2. What is the configuration of the connection pool?
     
  3. What location is the JDBC driver JAR file located?

Check to see if WebLogic has been modified,

if any of the following customizations have been made, and note the details.

  1. Have The startup scripts have they been modified? These scripts include startWebLogic, stopWebLogic, commEnv, and setDomainEnv.
     
  2. Do the JVM receive any particular parameters?
     
  3. Has the server classpath been updated with JARs?

Check to see if a connection to the on-premises is necessary.

You must set up one of Azure's connectivity services if your application requires access to any of your on-premises services. Choose an option for connecting an on-premises network to Azure for additional details. Alternatively, you'll need to refactor your application to use the open APIs that your on-premises resources offer.

Check whether any JMS (Java Message Service) Queues or Topics are active.

You must move JMS Queues, and Topics from your application to a JMS server hosted elsewhere. For JMS users, migrating to Azure Service Bus and the Advanced Message Queuing Protocol (AMQP) can be a terrific idea. Use JMS with Azure Service Bus and AMQP 1.0 for additional details.

If JMS persistent stores have been set up, you must record their settings and use them after the migration.

Check if you are utilizing your own unique Shared Java EE Libraries.

You have two choices if you use the Shared Java EE library feature:

  1. Remove any library dependencies from your application code by refactoring it, and add the functionality directly to your application.
     
  2. The libraries should be added to the server classpath.

Check to see if the WebLogic Scripting Tool is installed.

You must evaluate what the WebLogic Scripting Tool (WLST) is doing if you currently utilize it to carry out the deployment. Make sure that any (runtime) parameters of your application that WLST modifies as part of the deployment adhere to one of the following possibilities:

  1. The settings for the app are externalized as parameters.
     
  2. Your application contains the parameters already.
     
  3. When deploying, the arguments are used using the JBoss CLI.

You'll have more work to accomplish during migration if WLST does tasks beyond those listed above.

it's easy

Check to see if and how the file system is utilized.

Using the application server's file system necessitates configuration changes or, in rare circumstances, architecture changes. The code in your application or WebLogic shared modules may use the file system. Any or all of the scenarios listed in the following sections may seem familiar to you.

Read-only static content

You'll need a different place for static content if your application currently delivers it. You might want to think about adding Azure CDN for lightning-fast downloads worldwide and migrating static material to Azure Blob Storage. See Hosting Static Websites in Azure Storage and Quickstart for further details. Connect an Azure CDN account to an Azure storage account.

Static material that is published dynamically

Use Azure Blob Storage and Azure CDN as mentioned above, along with an Azure Function to handle uploads and CDN refreshes, if your application permits static content that is uploaded or produced by your application but is immutable after it has been created. Uploading and CDN-preloading static content with Azure Functions contains a sample implementation that you may utilize.

Internal or dynamic content

You can mount Azure Storage shares as persistent volumes for files that are often written to and read by your application (such as temporary data files) or static files that are only visible to your application. See Dynamically create and use a persistent volume with Azure Files in Azure Kubernetes Service for more information.

Pre-migration

Migration

Provision of Azure Kubernetes Service and Azure Container Registry

Create an Azure Kubernetes cluster with a Service Principal that has the Reader role on the registry by using the commands below. Make careful you select the right network model for the networking needs of your cluster.

az group create -g $resourceGroup -l eastus

az acr create -g $resourceGroup -n $acrName --sku Standard

az aks create -g $resourceGroup -n $aksName --attach-acr $acrName --network-plugin azure

Make a WildFly Docker image

You'll need the following prerequisites to generate a Dockerfile:

  1. A JDK was supported.
     
  2. installation of WildFly
     
  3. Your choices for the JVM runtime.
     
  4. a method of introducing environment variables (if applicable).
     

Then, if necessary, you can carry out the actions outlined in the following sections. For your Dockerfile and web application, you can utilize the WildFly Container Quickstart repository as a starting point.

  1. KeyVault FlexVolume configuration
     
  2. Establish data sources
     
  3. Configure JNDI resources 
     
  4. Review WildFly configuration
Make a WildFly Docker image

KeyVault FlexVolume configuration.

Make an Azure KeyVault, then fill it with all the required secrets. See Quickstart: for further details. You may add and remove secrets from Azure Key Vault using Azure CLI. Then set up a KeyVault FlexVolume so that pods can access those secrets.

Additionally, the startup script used to boot WildFly must be updated. Before running the server, this script needs to import the certificates into the WildFly Keystore.

Configure JNDI resources

You will typically use the following steps to configure each JNDI resource on WildFly:

  1. Copy the required JAR files into the Docker image after downloading them.
     
  2. Make a module.xml file for WildFly that references those JAR files.
     
  3. Create whatever settings that the particular JNDI resource requires.
     
  4. To register the JNDI resource during the Docker build, create a JBoss CLI script.
     
  5. Create a Dockerfile and add everything.
     
  6. In your deployment YAML, pass the appropriate environment variables.

Post-migration

You should make sure your application is operating as expected now that you have moved it to Azure Kubernetes Service. See the following suggestions to improve your application's cloud-nativeness after you've done that while changing WebLogic to WildFly on AKS.

Frequently Asked Questions

How can I go over to WildFly from JBoss?

You must change your application's code in the manner described below if it supports JBoss AOP. The server configuration file now has the standard EJB3 configurations that were made in the ejb3-interceptors-aop.xml file. This is the standalone/configuration/standalone for a standalone server.  I suppose WebLogic to WildFly on AKS is clear to you.

What is the purpose of WebLogic?

WebLogic is an application server operating in the middle layer between back-end databases, related applications, and browser-based thin clients. The interchange of requests from the client tier and responses from the back-end tier is mediated by WebLogic Server.  I suppose WebLogic to WildFly on AKS is clear to you.

What distinguishes JBoss and Wildfly from one another?

Just a commercial build of the Wildfly project, JBoss EAP. JBoss and Wildfly are very similar, especially in the source code. James Falkner, technical product manager for Red Hat Runtimes, stated that Wildfly is the upstream project on which JBoss EAP is based.

What Is the Purpose of WildFly?

WildFly offers a Java web application extension to the JVM with a comprehensive runtime environment connecting the database on one end and the web client on the other.

Is WildFly a container?

We have two WildFly container images on hand. One is a traditional container for runtimes compatible with Open Container Image (OCI), including Docker. The second variation uses the Source-to-Image (s2i) functionality of OpenShift to interact with the platform's build support.

Conclusion

This article has gone through WebLogic to WildFly on AKS. This article aims to walk you through the preparation and migration of a relatively clear and shared understanding of the migration concept by doing WebLogic to WildFly on AKS. Still have doubt? Then please comment.

You may also CheckOut our other article on Azure Virtual Machines.

If you find any problems, please comment. We will love to answer your questions.

Attempt our Online Mock Test Series on Coding Ninjas Studio now!

Ninja, have a great time learning.

Live masterclass