Marriage of Convenience: IzPack Initial Install + pkg(5)

What do you get when you marry an easy-to-use, but powerful initial install application framework with the add-on and update management capabilities of the Image Packaging System?

Julien Ponge, one of the main developers of IzPack, a cross-platform open source installation framework, has successfully integrated a pre-release distribution of GlassFish V3 Prelude with IzPack.  This would be news in and of itself, but what is really cool is that since V3 is now packaged using the Image Packaging System technology (aka pkg(5) in techie terms), Julien has demonstrated an end-to-end install management solution for layered applications.  The IzPack-based installer handles initial installation and overall removal of the application while the use of pkg(5) enables ongoing update and add-on management of the installation.

In just a couple of hours, Julien was able to modify an earlier GlassFish V2-based installer to take in a pre-release zip archive of the V3 Prelude distribution that is packaged using pkg(5).  The resulting experimental distribution demonstrates the ease by which initial installation frameworks can incorporate pkg(5)-based, pre-installed images.

The real kicker is that Julien didn't have to become an expert in pkg(5) to marry IzPack with the V3 pkg(5)-based archive.  Apart from including the archive in his IzPack-wrapped distribution, Julien made use of a simple pkg(5) Java bootstrap interface to complete some optional initialization of the pkg(5)-based installation image.

You can try out the results of this experiment:

Download the Distribution

What's in the distribution?

The core of this distribution is a zip archive of a GlassFish v3 Prelude release build.  Beginning with V3, the GlassFish project is producing pkg(5) enabled zip archives by default.  What this means is that all of the GlassFish components that are included in the zip archive are pre-installed in the form of pkg(5) packages.  The resulting archive represents a pkg(5) user image.  Once the archive is expanded on a user's system, pkg(5)-enabled tooling can be used to manage updates and add-ons for all of the content included in the image.

The GF V3 archive is portable in the sense that all of the GlassFish components are cross-platform and none of the platform-specific pkg(5) tooling (e.g. Python) is included in the archive.  Upon initial installation of the archive, the pkg(5) Java Bootstrap facility can be used to dynamically carryout the installation of the basic pkg(1) and Update Tool GUI clients.  

IzPack plays a complementary role to pkg(5) in that IzPack hands the initial installation and the eventual uninstallation of the pkg(5) user image.  The pkg(5)-enabled tooling handles all of the package updates and add-ons that occur after initial installation and before the complete removal of the user image.

Julien took a GlassFish V2 IzPack-based installer, replaced the non-pkg(5) V2 archive with the pkg(5)-based V3 archive and modified the installer to trigger execution of the pkg(5) Java Bootstrap facility near the end of installation.

Browse Julien's GlassFish V3 Installer Source

What does the initial install experience look like?

Here's a series of screen shots showing what the initial install experience looks like.  Keep in mind that this is just an experimental distribution: Julien knows that there are limitations that can be easily addressed with some modest investment.

The installation location represents where the GlassFish V3 archive will be expanded. This location will be the root path of the pkg(5) image. 

All that's happening in the next step is the unpacking of the GlassFish V3 zip archive.  Since the V3 components were pre-installed as pkg(5) packages at the factory, there's no individual package installations required at this stage. i.e. All the IzPack installer is doing is expanding the archive of the user image.

There are two functions being carried out in the following step:

1) The pkg(5) Java Bootstrap facility is invoked via the install application.  This action uses a Java API for pkg(5) to download and install the following components:

  • Python-based pkg(1) CLI client API
  • native minimized Python runtime
  • Python-based Update Tool GUI
  • native wxPython/wxWidgets dependency 

2) The GlassFish domain is started.

If you're creating a platform-specific download, then your installation program doesn't need to perform the first step because you would have pre-installed the pkg(5) package and, optionally, the Update Tool GUI and its companion desktop notifier in the platform-specific image at the factory.

The following step doesn't seem to work yet on non-Windows platforms, but the intent is to populate your desktop with shortcuts to GlassFish tools.

As installation finishes, the installer launches a web browser to display the web administrative interface of GlassFish.

Since the GlassFish V3 Prelude administrative console has been enhanced to use the pkg(5) Java API, users have the option to manage their installation image via this tool.  Installed packages, available updates and add-ons are all visible via this interface.

As a result of installing GlassFish and installing the Update Tool GUI and its companion desktop notifier through the pkg(5) Java Bootstrap facility, the notifier senses that newer versions of the V3 packages are available and displays a notification window on my desktop:

Clicking on this window launches the Update Tool GUI and enables me to review and apply those updates. 

A couple of notes worth highlighting:

1) No More Download from Scratch: Each time the GlassFish project delivers a new build and publishes it to their development repository, the desktop notifier will make me aware of the updates.  I don't have to go back to the download site and install an entirely new copy of the initial distribution.  Additionally, as the development team adds new packages, I'll see those via both the Update Tool GUI and the built-in Update Tool feature of the V3 web administrative interface.

2) Notification Applies to Multiple Applications:  When I install other copies of GlassFish or other applications packaged using pkg(5), the desktop notifier will automatically detect the presence of updates for all of these application installation images and display a desktop notification window whenever updates are available.  For example, once the WebSynergy enterprise portal offering is released in pkg(5)-enabled form and I install it, I will also be notified of any updates that are available to my installations of that application.

Here's a view of the filesystem directory structure of the installed application image.  Remember, this layout is in the form of a pkg(5) User Image.  All this means is that there is a control directory named .org.opensolaris,pkg/ at the root of the installation image and that much of the other content within the image was pre-installed at the factory in the form of pkg(5) packages.  (The OpenSolaris reference only represents the community in which the core pkg(5) technology is developed; there's nothing OpenSolaris-specific about this installation of GlassFish).   The V3 archive Julien integrated had the pkg(5) control directory and much of the other content already in place when he downloaded it from the GlassFish development project.

The pkg(5) Java Bootstrap facility was used by Julien's install application to dynamically install the content under the pkg/ and updatetool/ directories in the installation.

The Uninstaller/ directory contains the IzPack-based code to enable a user to completely remove the installation image.


Post a Comment:
  • HTML Syntax: NOT allowed

News for projects adopting the multi-platform port of the Image Packaging System - aka pkg(5)


« July 2016