IPS/pkg(5) crash-course for GlassFish v3 community package developers - Part 1

This blog has moved to alexismp.wordpress.com
Follow the link for the most up-to-date version of this blog entry.

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:
pkg.glassfish.org/v3prelude/dev/
pkg.glassfish.org/v3prelude/contrib/
pkg.sun.com/glassfish/v3prelude/contrib/
"% 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.dev.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.dev.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 pom.xml)
• license and readme files
• a simple python file containing additional meta-data: version, description, dependencies, and more
• a build.xml ANT script laying out the bits in a staging area

My next entry in this series walks through the existing "hibernate" package available in source format on glassfish-repo and already live in the contrib GlassFish v3 Prelude repository.

Comments:

Post a Comment:
Comments are closed for this entry.
About

This blog has moved

Alexis Moussine-Pouchkine's Weblog

GlassFish - Stay Connected

Search

Archives
« avril 2014
lun.mar.mer.jeu.ven.sam.dim.
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today
Blogroll

No bookmarks in folder

News

No bookmarks in folder