title | description | author | ms.author | ms.topic | ms.date | ms.custom | recommendations |
---|---|---|---|---|---|---|---|
Migrate WildFly applications to WildFly on Azure Kubernetes Service |
This guide describes what you should be aware of when you want to migrate an existing WildFly application to run on WildFly in an Azure Kubernetes Service container. |
KarlErickson |
manriem |
conceptual |
3/16/2020 |
devx-track-java, devx-track-azurecli, migration-java, devx-track-extended-java |
false |
This guide describes what you should be aware of when you want to migrate an existing WildFly application to run on WildFly in an Azure Kubernetes Service container.
Note
This article provides general advice only. Neither Microsoft nor Red Hat offers support for WildFly, but the WildFly community can offer assistance. For information on offers jointly supported by Red Hat and Microsoft, see Red Hat JBoss EAP on Azure.
To ensure a successful migration, before you start, complete the assessment and inventory steps described in the following sections.
[!INCLUDE inventory-server-capacity-aks]
Check all properties and configuration files on the production server(s) for any secrets and passwords. Be sure to check jboss-web.xml in your WARs. Configuration files that contain passwords or credentials may also be found inside your application.
Consider storing those secrets in Azure KeyVault. For more information, see Azure Key Vault basic concepts.
[!INCLUDE inventory-all-certificates]
[!INCLUDE validate-that-the-supported-java-version-works-correctly-wildfly]
Inventory all JNDI resources. Some, such as JMS message brokers, may require migration or reconfiguration.
If your application relies on session replication, you'll have to change your application to remove this dependency.
Inspect the file WEB-INF/jboss-web.xml and/or WEB-INF/web.xml.
If your application uses any databases, you need to capture the following information:
- What is the datasource name?
- What is the connection pool configuration?
- Where can I find the JDBC driver JAR file?
For more information, see DataSource Configuration in the WildFly documentation.
Any usage of the file system on the application server will require reconfiguration or, in rare cases, architectural changes. File system may be used by WildFly modules or by your application code. You may identify some or all of the scenarios described in the following sections.
[!INCLUDE static-content]
[!INCLUDE dynamic-or-internal-content-aks]
[!INCLUDE determine-whether-your-application-relies-on-scheduled-jobs]
[!INCLUDE determine-whether-a-connection-to-on-premises-is-needed]
[!INCLUDE determine-whether-jms-queues-or-topics-are-in-use]
[!INCLUDE determine-whether-your-application-uses-entity-beans]
[!INCLUDE determine-whether-the-java-ee-application-client-feature-is-in-use-aks]
[!INCLUDE determine-whether-your-application-contains-os-specific-code]
[!INCLUDE determine-whether-ejb-timers-are-in-use]
If your application uses JCA connectors, you'll have to validate the JCA connector can be used on WildFly. If the JCA implementation is tied to WildFly, you'll have to refactor your application to remove that dependency. If it can be used, then you'll need to add the JARs to the server classpath and put the necessary configuration files in the correct location in the WildFly server directories for it to be available.
[!INCLUDE determine-whether-jaas-is-in-use]
[!INCLUDE determine-whether-your-application-uses-a-resource-adapter]
[!INCLUDE determine-whether-your-application-is-composed-of-multiple-wars]
If your application is packaged as an EAR file, be sure to examine the application.xml file and capture the configuration.
Note
If you want to be able to scale each of your web applications independently for better use of your AKS resources you should break up the EAR into separate web applications.
[!INCLUDE identify-all-outside-processes-and-daemons-running-on-the-production-servers]
[!INCLUDE perform-in-place-testing]
[!INCLUDE provision-azure-container-registry-and-azure-kubernetes-service]
[!INCLUDE create-a-docker-image-for-wildfly]
[!INCLUDE build-and-push-the-docker-image-to-azure-container-registry]
[!INCLUDE provision-a-public-ip-address]
[!INCLUDE deploy-to-aks]
If your application requires non-volatile storage, configure one or more Persistent Volumes.
[!INCLUDE migrate-scheduled-jobs-aks]
Now that you have migrated your application to Azure Kubernetes Service, you should verify that it works as you expect. After you've done that, we have some recommendations for you that can make your application more cloud-native.
[!INCLUDE recommendations-wildfly-on-aks]