Upgrading to GlassFish

But why Upgrade ?
Asssuming that as a developer, one would like to try the latest and well, the greatest... If you have been using SJSAS 8 , its highly recommended that you Upgrade to GlassFish . If you want, you could download the source code and play around with it. File a bug , ask for support on forums , submit a patch in short contribute ...
The Upgrade Tool is a utility that comes with the GlassFish that allows you to transfer your configuration , applications and credentials from your existing SJSAS 8 installation to the GlassFish installation you have.

What do you mean by Upgrade ?
In the context of the application server upgrade is specific to two contexts. One, is the upgrade of bits i.e. you actually install the binaries for the higher version of the Application Server that you would want to use. Two , is the transfer of configuration and applications to this higher version that you have installed. The latter is what we are focussing on. In a sense upgrade = upgrade of bits + transfer of configuration.
Having said this, we could upgrade to a higher version of the Application Server either by installing the bits in the same location or in a different location. The former in upgrade parlance is In-Place Upgrade and the latter Side-by-Side Upgrade . A blessing here is that the binaries and the configuration are separate in the GlassFish and SJSAS 8 . What this means is that you could upgrade the binaries without affecting the configuration.

What does Upgrade do for me ?
Before I go on about configuration and binaries let me clarify what that means in real world terms. Configuration of GlassFish is what is specified under the domain root i.e. {glassfish-install}/domains in the default install. One could change the defaault domain path , but that is a subject for yet another blog. Binaries are libraries, jars,scripts that are installed under {glassfish-install}/lib or {glassfish-install}/bin or {glassfish-install}/config .
Given that upgrade happens from one version of the Application Server to another , I will call the version from which we upgrade as the source server and the version to which we upgrade as the target server .

Upgrade in this context or more specifically Upgrade Tool would focus on the configuration i.e. {glassfish-install}/domains in the default install. The Upgrade process involves the following steps :
1. Interviewing the user for source and target configuration. It would be the same in case of In-Place Upgrade
2. Interviewing the user for admin credentials and whether the user wants to transfer key-cert pairs from the keystores. The latter is particularly useful if you have added key-cert pairs.
3. Upon validation of the inputs, the domains that need to be upgraded are enlisted and if needed they are created on the target server.
4. For each domain that is being upgraded , the configuration in the domain.xml is transferred. Mind you, that not all configuration is transferred.Why ? Well, thats another topic for another day. The key-cert pairs are transferred if the user has chosen the option to do so. The applications that are deployed are transferred to the target server and user defined realms are also transferred.
5. All this is logged and stored in a log , in the target server's domains path that is being processed.

How do I ?
GlassFish has a bundled utility named asupgrade that is available at {glassfish-install-dir}/bin . This utility has both the CLI option as well as GUI wizard. I would suggest that you refer to the Upgrade Tool Manual , for details on the CLI and GUI options. Here are a few screenshots that walk you through an upgrade process that upgrades from SJSAS 8 to GlassFish. The source setup has a web application and a custom certificate deployed.

This screenshot displays the first screen of the GUI based wizard, wherein the user is interviewed about admin credentials and about the source and target configuration location .

This screenshot is of the screen wherein the user enters the keystore passwords for each domain that is being upgraded. This screen is displayed only if the user has chosen the "Transfer Certificates" option.

A screenshot of the Upgrade Log that is displayed in a window from the wizard. Note that the log displays config that has not been transferred and the certificates that are being transferred.

How safe is Upgrade ?
It has been tested and tried. It works! You would not have to reinstall your Application Server again. Besides, the Upgrade Tool backs up your old configuration in a backup directory created under the domains directory . If the Upgrade Process fails, then the Tool restores the configuration back.

Finally, a reality check, a tool is a tool and just that. There might just be a few things that you might have to do it by yourself.

Provide your feedback at : feedback_at_glassfish.dev.java.net

Tags : , , ,


Post a Comment:
Comments are closed for this entry.



« April 2014