Tag Archives: ganymede

Equinox p2: Large Scale Deployment

Last year’s Eclipse release (Ganymede) came with a new provisioning platform called p2. For years, Eclipse has been shipped along with a component called the “Update Manager”, which allowed users to easily update their Eclipse installations. Nevertheless, year after year, and especially when Eclipse 3.0 came out, it has become much more than just an IDE: it is now a software platform, built on top of Equinox (the reference implementation of the OSGi specification).

Thus, deployment needs are not limited to installing and updating only plug-ins anymore. People building software on top of Eclipse need to be able to deliver an installer for their product, which may come with a license manager which needs provisioning too, they need to have their own UI for the updating process, … and p2 answers to virtually all these needs.

p2: a provisioning platform…

To be able to provision virtually everything, the main strength of p2 is to have no a priori knowledge of the way Eclipse plug-ins or even Java applications must be handled. It’s indeed a very light framework to describe the parts that are to be installed (the Installable Units), and how they depend on each other. p2 comes with some basic instructions about how an OSGi bundle or an Eclipse product should be installed, but nothing else.

It’s up to the software vendor who wants to deliver, let’s say, a Windows executable program (which may require adding keys to the registry, or icons on the desktop, for instance) together with its Eclipse RCP application, to write the code (in fact, a p2 plug-in!) to explain p2 how this particular Installable Unit should be handled when provisioned in a given system.

… and, the next deployment standard?

Of course, although p2 is still a very young project, and may not seem mature enough for industrial usage. It is still not 100% reliable yet and lacks tooling, but the quality of this very first release is still pretty high. Since it was released, p2 has started gathering a community which is leveraging p2 in other domains than just the Eclipse project itself. Software companies like Cloudsmith, EclipseSource and Anyware Technologies are already developing tools on top of p2 ; and IBM, among others, is working hard to improve the p2 core and design a clear API.

The massive adoption of OSGi in many different areas (Eclipse runtime technologies like Equinox itself or RAP, applications servers like Websphere or Glassfish, etc.) will definitely make p2 the smartest way to deploy not only Eclipse-based applications, but any sort of scalable application as well. Indeed, when high availability is an important requirement (in other words — almost always), then you need to be able to dynamically install new modules into the running system, update existing ones, sometimes even do this remotely.

Since there is currently no real sustainable alternative for industrial deployments – did you ever try to use Java Web Start for more than just a very simple Swing or RCP application? – p2 will probably come up as a de facto provisioning technology standard.

Update sites Eclipse

Parce que j’en ai marre de galérer à chaque fois que je veux retrouver les URLs des entrepôts p2 d’Eclipse 3.4, ou des builds d’intégration de la 3.5, les voici…

Update Site Update Site URL
Integration builds toward 3.5 http://download.eclipse.org/eclipse/updates/3.5-I-builds
Nightly builds toward 3.5 http://download.eclipse.org/eclipse/updates/3.5-N-builds
3.5 milestones http://download.eclipse.org/eclipse/updates/3.5milestones
Maintenance builds toward 3.4.x http://download.eclipse.org/eclipse/updates/3.4.x
3.4.x releases http://download.eclipse.org/eclipse/updates/3.4
3.5.x releases http://download.eclipse.org/eclipse/updates/3.5

Attention, ces entrepôts ne sont pas ceux de Ganymede et de Galileo, ils contiennent simplement le SDK Eclipse !

Mirroring p2

MiroirUne des fonctionnalités apportées par p2 est de pouvoir facilement créer des miroirs d’entrepôts de métadonnées et d’artefacts.

J’essaierai de préciser dans les jours à venir quelques notions clés de p2 comme celles-ci ; mais en attendant, vous pouvez d’ores et déjà —coucou David !— réaliser un miroir de l’entrepôt Ganymede, et le partager avec vos collègues !
D’ailleurs, cela me fait penser qu’il faudrait que je vérifie si celui que j’ai fait à Anyware est bien d’équerre… 🙂

Le miroir de l’entrepôt d’artéfacts (i.e. les binaires des plug-ins et des features) se réalise de la façon suivante :

[sourcecode language=’java’]./eclipse -nosplash
-application org.eclipse.equinox.p2.artifact.repository.mirrorApplication
-source http://download.eclipse.org/releases/ganymede
-destination file:/home/benjamin/miroirArtefactsGanymede[/sourcecode]

Même principe pour celui de métadonnées (basiquement, ce sont les descriptions des dépendances entre chaque élément de l’entrepôt)

[sourcecode language=’java’]./eclipse -nosplash
-application org.eclipse.equinox.p2.metadata.repository.mirrorApplication
-source http://download.eclipse.org/releases/ganymede
-destination file:/home/benjamin/miroirMetadonneesGanymede[/sourcecode]

Nota : Il n’est à l’heure actuelle pas possible de descendre dans le même dossier local les deux entrepôts, mais vous pouvez tout à faire la manip’ manuellement. Il suffit de recopier le fichier content.xml de l’entrepôt de métadonnées à côté du fichier artifacts.xml de celui d’artéfacts, et le tour sera joué !

Nota2 : Attention, le mirroring des artéfacts est très long (plusieurs heures). En effet, on demande bien à ne répliquer qu’un et un seul miroir, et on ne peut donc pas bénéficier du téléchargement simultanés de plusieurs artéfacts depuis plusieurs miroirs (parfois très rapides) comme cela peut se faire dans l’utilisation habituelle de p2…