Saturday, September 16, 2023

Azure JBoss EAP On App Service

Over the past couple of months I have had the opportunity to check out the Microsoft Azure JBoss EAP On App Service, and I wanted to share my thoughts on this service.  If you have not previously heard of it, you can think of it as a cloud application service which enables one to deploy Jakarta EE applications in various formats, and host them on Azure.  The Azure App Service contains a plethora of options, from allowing one to deploy a single JAR, to providing the ability to deploy containers, to the ability of deploying single WAR files. 

To get started with the service, you can go to the Azure Portal and create a free account.  There are a number of different services that are available for free to get started and take it for a spin.  If you are interested in using the platform for development and production, you will need to subscribe to a paid plan.  If you wish to get started on a learning path, then there are some great articles available to check out, but here I will show you what I did in order to deploy a simple Jakarta EE application to the cloud using this service.  There are also some excellent examples on Github, including the Jakarta EE Azure example by Reza Rahman.  Let's go quickly through some of my experiences while working through the Jakarta EE Azure example.  

The database configuration when following through the Jakarta EE Azure example was very easy.  I was able to create a hosted PostgreSQL database on Azure almost instantly.  Following along with the example, I also configured the database security to enable access to the Azure services.  Without the step-by-step of a tutorial, some of this configuration may have been a bit complex, as Azure offers a large variety of options for configuration of the services.  

Next, I created a web application using JBoss EAP.  This again provided many options, but many are fairly straight forward if you are familiar with Java web applications.  I chose Java 11 as my runtime stack and JBoss EAP 7 as the web server.  At this point, I was in a position to install an application in WAR file format to the JBoss EAP server.

Following along with the tutorial, one should install the Azure CLI to their machine in order to deploy a local application.  However, I did not want to install anything locally to my machine.  So instead of performing the local CLI installation,  I used the cloud based CLI that is hosted on Azure.  Using this cloud CLI, I was able to clone one of my personal Github repositories, modify it, build, and deploy it to JBoss EAP 7.  This was very nice...having the ability to perform a complete build and deployment in the web browser.  

A very nice feature is the ability to create resource groups that can be used to group application resources together.  This feature allows one to group databases, web applications, and other services together in order to better manage all of the resources that are required for an application.

Overall, Azure JBoss EAP on App Service is a useful tool and is fairly easy to use.  The downside is that the hosting can be quite costly if not using a free package, but I believe that may change at some point in the near future.  Unfortunately, I was unable to dig much deeper because I left my services running for a couple of weeks and used up my credits.  However, I am happy with my experience in the Microsoft Azure Portal with JBoss EAP 7, and I greatly appreciate the opportunity to look at the service.  I look forward to the opportunity to continue my journey with these resources, hopefully free as a developer for testing purposes, in the future.



Sunday, September 10, 2023

Review: OpenJDK Migration for Dummies

Have you been thinking of moving away from the Oracle JDK to OpenJDK?  The book "OpenJDK Migration for Dummies", written by Simon Ritter of Azul, provides direction for those who are looking to make the move.  In many cases, organizations develop Java applications to work on a specific version of the JDK.  Oftentimes, as long as the application continues running without issue, organizations wouild not upgrade the JDK.  As we well know, with all software, as time goes on, the JDK which is in use can age and become out-of-date, exposing security vulnerabilities.  Moreover, if the JDK in use is aging, then there likely have been many enhancements in more recently released JDKs which could provide performance benefits for the deployed application(s).  

We are at a time where older releases of the JDK such as JDK 8 are no longer being supported by Oracle unless commercial support is being paid.  If an organization needs to maintain the use of JDK 8, then it may make sense for the organization to purchase a support agreement.  In other cases, the organization may be able to move to another JDK that will work with their application.  There are many different options available today.  One of those options is OpenJDK, which is freely available for use.  There are a number of organizations that have taken OpenJDK and added features or enhancements, and typically offer a paid support for enhanced protection or even for access to premium features.  

This book nicely covers the arduous process of learning about the different licensing options when using the Oracle JDK, and what the OpenJDK has to offer.  The book makes it easy to understand so that readers to not need to delve into long white papers to read about them.  The book also covers the different points that need to be reviewed while preparing to make a migration to OpenJDK, including making an inventory of all JDK versions are in use within your organization.  There are several key processes outlined in the book that must not be overlooked while performing a migration, such as looking at each of the "optional" features of the JDK that are in-use within your organization to ensure that they are available in the OpenJDK release of your choice.  For instance, JavaFX may not be incorporated within all OpenJDK releases and may be an additional package to incorporate into your migration.

Since the book is written by Simon who works with Azul, he does cover some of the benefits of the Azul Platform Core JDK.  There are many to cover, and the book offers a high level overview of some of the most important features.  It also covers the question of why commercial support may be something of value to your organization.  What if you still need to run JDK 8 in order to make your application work?  In such a case, it makes sense to pay for commercial support.  How about if your organization is looking to have first hand support?  That is another solid reason to purchase commercial support.  The list goes on.

The book "OpenJDK Migration for Dummies" is a great read for anyone looking to migrate to the OpenJDK.  It is a nice and quick read, landing in at under 80 pages, and it covers the process from start to finish.