IPS/pkg(5) crash-course for GlassFish v3 community package developers – Part 1
April 6, 2009 Comments Off on IPS/pkg(5) crash-course for GlassFish v3 community package developers – Part 1
This is the first of a series of entries for people interested in producing packages for GlassFish v3 and hosting them on a live repository. Part 2 describing the Hibernate package is here. Part 3 discussing different strategies for building different packages is there.
GlassFish v3 (starting with the “Prelude” release from last Fall) uses IPS, aka pkg(5), to manage the various bits and pieces (modules or packages) of the application server. IPS stands for Image Packaging System and comes from the OpenSolaris land and gives GlassFish v3 a graphical (
bin/updatetool) and CLI (
bin/pkg) tools to manage packages, those that come with GlassFish and the ones available from IPS repositories. The new web admin console also integrates an IPS client. These tools let you browse, install, update, and remove packages very similar to Synaptic/apt, Eclipse, or NetBeans (note that this is different from the technology used for the update center in GlassFish v2). This “Getting Started” is a great intro to using the Update Center.
If you’re interested in IPS, there’s a bunch of resources around IPS and this IPS primer by Kohsuke is one such good resource for a pragmatic view and tools such as
makepkgs, and recommandations for testing packages and moving them around. This current blog entry focuses on the GlassFish perspective and in particular for people interested in creating they’re own packages to add features or applications to GlassFish. In the case of GlassFish v3 Prelude, existing packages are listed directly on the various repositories:
% bin/pkg authority” lists registered repositories while “
% bin/updatetool” provides an equivalent but graphical view.
There are potentially really different sorts of packages that can be installed via IPS and the GlassFish Update Center: frameworks, Java EE applications, standalone applications, and GlassFish extensions. Future blogs will go into each of those but, in a nutshell, it’s all about laying out files on disk and adding some extra metadata to the package itself (name, license, etc…).
IPS is also used throughout the middleware organization at Sun to deliver its software and updatecenter2.java.net is the project that defines a portable (not just OpenSolaris) environment and tools to make this happen. In particular, you will most likely need a pre-installed Toolkit Image specific to the platform used for producing the packages (IPS is written in Python and this toolkit contains the
pkg binary, a minimal Python 1.4 runtime, and a number of Java APIs).
The first thing you probably need to know is that glassfish-repo.java.net is the place to start to avoid having to understand the intricacies of IPS. This is where you will be asked to provide :
• your artifacts (the actual files or a Maven dependency expressed in
• license and readme files
• a simple python file containing additional meta-data: version, description, dependencies, and more
build.xml ANT script laying out the bits in a staging area