Eclipse Yoxos Services Downloads Blogs About
Home > Blogs >

Posts Tagged ‘p2’

on Mar 6th, 2010p2 and Agile Software Development

One of the key aspects of Agile Software Development — or any iterative software development process — is keeping your customer in-the-loop. In order for customers to have a voice in the software development process they must continually consume your software, provide feedback, and witness the results of that feedback. In a small setting this might not be to hard. But when you mix in a variety of different configurations, distributed development teams, and distributed customers — delivering and updating software can become a challenge.

iterative p2 and Agile Software Development Not only do your customers need to acquire the proper configurations, and stay up-to-date as the software is developed, your development team must also be developing against the latest code base. Again, in small teams it might be practical to checkout the entire codebase from your SCM system, but does this scale to multi-million line systems?

The Equinox/p2 project provides a powerful provisioning platform that can be used to help deliver software in number of different forms. At EclipseCon this year, Kim Moir and I will be exploring how you can use p2 as a platform to help enable agile software development. While the tutorial will focus on how p2 can facilitate agile software development, the tutorial will also provide a good overview for anyone getting started with p2 and PDE/Build.

In particular, we will discuss how to:

  1. Create, publish and provision a variety of product configurations
  2. Enable automatic updates within your products
  3. Craft and manage target platforms

The hands on exercises will explore the new p2 API, PDE/Build and many of the headless p2 applications. The exercises will be based off the Hyperbola chat client from the new Eclipse RCP Book.  (We may even have a preview of the book on display at the tutorial).  If you are interested in how to streamline the deployment of your software, are looking for an update mechanism for RCP or OSGi based applications, or are just curious about p2, please feel free to attend our tutorial.

on Feb 26th, 2010Upgrade to Eclipse Galileo SR2

If you haven’t seen it in the Eclipse announcements: Galileo SR2 is available for download from eclipse.org. From this page you can download the new EPP packages that are based on Galileo SR2 (Service Release) and Eclipse 3.5.2.

Or, if you don’t want to download the full packages, you can start an upgrade – that’s what I did just a few minutes ago. I started with an older working copy of Eclipse (probably something from Galileo SR1) and started the upgrade process (‘Help’ > ‘Check for Update’).

It takes a while until p2 fetches all the required metadata from several repositories. The list includes the EPP package repository with the package definitions, the main Galileo repository and the Eclipse Platform repository. A few Okay-clicks later, p2 started to download the new content and asked me some more minutes later to restart Eclipse. Et voilà – after that restart I had a brand-new Eclipse with the latest version without downloading a new package.

on Feb 10th, 2010AP2 API

As I mentioned a while back, Eclipse Helios M5 was made available for Download. There are number of New and Noteworthy features, but one really big feature was omitted from the N&N. The Eclipse provisioning platform, p2, finally has API! Really, go take a look at the code… all those internal.provisional packages are now gone!  This was actually a huge milestone for the p2 team, and Pascal did a great job steering us towards the API.

api AP2 API

What does this mean to you? Well, if you are building anything on top of p2 you should grab M5 and see how the new API feels. We are going to be pushing hard to finalize the API for M6, so if there is anything missing, speak up now.

John Arthorne even started a Migration guide: http://wiki.eclipse.org/Equinox/p2/Helios_Migration_Guide

on Nov 29th, 2009OSGi and Equinox book available!

Over the past few days I have spoken to many different groups at the EclipseRT days, various democamps and some students in one of our Advanced RCP courses. Each time people have asked…

“when is the OSGi and Equinox book coming out?”

Most were hopeful, some were trying to get a rise out of me. Well, ask and ye shall receive!

I am very pleased to say that the full, pre-copy-edited content is available on Rough Cuts. There are a few minor differences between what is online and what will end up in print but that is mostly a bit of grammar and a few technical fixes. The early versions of all the code is available though there are a few known issues in the packaging that we are still working on.

I am really very happy with how the book has turned out.  The structure has lots of content for everyone.  Tutorials, deep-dives, reference material. As you can see by the table of contents below, we start with some history, context and concepts. Then there is a set of tutorial chapters where we build up an example fleet management application called Toast to have a funky embedded vehicle user interface with Google Earth integration, client0server connectivity as well as a back-end control center for managing the fleet.

Screen shot 2009 11 29 at 12.08.09 PM 300x224 OSGi and Equinox book available!

The Toast system from Chapter 14, the final tutorial chapter, has been donated to Eclipse as the Toast Examples project where is has been extended to have a RAP UI for the backend, EMF and EclipseLink for data management, ECF for infrastructure bits, etc etc.

The tutorial is followed by a number of deep-dives on key topics such as Declarative Services, the HTTP service, Remote Services (RFC119) and more.  Finally there are a set of reference chapters that go even deeper and look at the grotty issues of classloading, dynamic behavior and third party code libraries. It’s a good range of the popular OSGi concepts and services. Of course, there is always room for more in a 2nd edition! (can’t believe I said that…)

Part I:   Introduction
1              OSGi and Equinox
2              Concepts

Part II :  Tutorial
3              Tutorial Introduction
4              Hello Toast
5              Services
6              Dynamic Services
7              Client/Server Interaction
8             Testing
9              Packaging
10           Pluggable Services
11            Extensible User Interfaces
12            Dynamic Configuration
13            Web Portal
14            System Deployment with p2

Part III: Deep Dives
15            Declarative Services
16            Extensions
17            Logging
18           HTTP Support
19            Server Side
20           Release Engineering

Part IV: Reference
21            Dynamic Best Practices
22           Integrating Code Libraries
23           Advanced Topics
24           Declarative Services Reference

Now for finishing up the 2nd edition of the RCP book.  Chris and I are together this week and will be plugging away at the final tweaks before the copy-editing phase. The first 13 chapters of that book have gone to the copy editors and are available on Rough Cuts.

on Nov 23rd, 2009Simplifying the Equinox P2 User Interface

I’m not sure if people noticed this last week, but there’s been discussion of providing a simplified p2 ui by refactoring out the Mylyn discovery user interface and pushing it down the stack.

mylyndiscoveryui 246x300 Simplifying the Equinox P2 User Interface

Mik Kersten alluded to this in his blog entry last week, where having a simple discovery and install mechanism can help grow an ecosystem. I think this enhancement would alleviate a common problem RCP developers have when it comes to providing a simpler user interface for their users. p2 does a great job in offering you a set of APIs to do many things, but in most cases… the operations and user interface should be simple.

If you’re interested, please provide feedback on this bug.

on Oct 2nd, 2009Reverting Changes in an Eclipse Installation using p2

I was helping a colleague with some Eclipse install issues and was surprised he didn’t know about the ability to revert to a previous install configuration. Equinox p2 makes the revert process sane compared to the old Eclipse Update story. So everyone knows, to revert to a previous configuration of an Eclipse install, this is what you do…

First, open the About dialog and click the Installation Details button:

ih 300x193 Reverting Changes in an Eclipse Installation using p2

From the list, you can select a previous configuration and click the Revert button to go back in time:

ih2 300x281 Reverting Changes in an Eclipse Installation using p2

It’s that simple!

As a bonus in Eclipse 3.6, you’ll be able to compare two configurations to see differences via the Compare button:

ih3 300x281 Reverting Changes in an Eclipse Installation using p2

Once you do that, you should see a compare dialog with the changes:

ih4 300x183 Reverting Changes in an Eclipse Installation using p2

Hope this helps!

on Sep 21st, 2009Galileo SR1 EPP Packages – Preview

Only 4 days until the final Galileo SR1 bits are going to be released on Friday, time to write about some good news:

First of all, there is bug 281501 “64 bit Cocoa EPP packages should be available” which is currently the most wanted bug at Eclipse. I never thought that I would ever be the one who owns the bug with the highest number of votes, but finally it is solved and 64-bit Cocoa packages will be available with Galileo SR1. If you have a Mac and if you are able to run these packages, download one of the 20090920-1025 builds, test it and report on the above bug. I would be thankful for additional testing because I am lacking the possibility to test on this platform.

Another great achievement is the ability to upgrade the packages with the help of p2. This morning I tested to upgrade several Galileo packages to the new service release and it worked very well! Look at the About Dialog of the RCP package before the upgrade  – I started with a pristine download from eclipse.org/downloads:

rcp.about.before Galileo SR1 EPP Packages   Preview

Then I had to modify the URLs of the p2 repositories in Window > Preferences > Install/Update > Available Software Sites – see the screenshot below. Note that this step is only required until the final bits are released, because they are only available from a temporary location at the moment. After the release nobody has to change anything here, especially the EPP repository URL is only temporary for build 241.

galileo.sr1.p2repos1 Galileo SR1 EPP Packages   Preview

The last step is the update itself (Help > Check for Updates). This takes some time, but at the end I could restart my Eclipse RCP package and it started with the new Galileo SR1 version:

rcp.about.after1 Galileo SR1 EPP Packages   Preview

I am happy to see this working!

on Sep 9th, 2009EPP Wizard with Extended Proxy Support

Finally I’m happy to announce the long expected extension of the EPP Wizard for proxies. Now the EPP Wizard provides an extended P2 installer which allows you to edit the proxy-related settings. The extended P2 installer has a dialog where you can select a proxy and enter the credentials for it. This feature should be used in cases where the proxy needs full authentication (user name and password). For all other use cases, the P2 installer works fine. The new dialog looks very similar to the dialog “Edit Proxy Entry” on the “Network Connections” preference page of Eclipse. The proxy support is already contributed to the P2 installer with the following bug.

To use the new proxy functionality select the check box “use manual proxy settings”.

proxySettings EPP Wizard with Extended Proxy Support

Extended P2 Installer

Than the “Settings…” button is activated. Select this button to open the proxy dialog. On the dialog page you can select a proxy schema and enter all needed information for it.

proxyDialog EPP Wizard with Extended Proxy Support

Proxy Settings Dialog

If you encounter problems or have any ideas how to improve the functionality, please don’t be shy and send us suggestions through our feedback form on our download site.

on Sep 9th, 2009Reminder: Equinox p2 and RCP Webinar

Next Tuesday (September 15th), I’m going to be presenting a free webinar to introduce you to the Eclipse provisioning platform, p2, and how it can be leveraged in your own RCP applications.  If you are wondering what p2 is, or how to use it in your own custom RCP application, this webinar is for you!  In particular, we will be looking at how p2 can help you:

  • Deliver your bundles and features
  • Provide an update mechanism for your application
  • Provide a mechanism for users to control their environments (roll back, un-install, etc…)

This course is meant as an introduction to the p2 API.  We will be building on top of standard Eclipse examples so there are no prerequisites outside of basic RCP knowledge.  This webinar will make use of the Eclipse 3.5 (Galileo) API.

I only have an hour, so I will try my best to cover:

  • Make use of the p2 provisioning platform for software management
  • Integrate the creation of p2 repositories into your build system
  • Reuse the p2 user interface and existing work-flows
  • Customize the p2 user interface for your specific needs
  • Debug common pitfalls

Is there anything else people would like me to include if time permits?

The webinar will be free, however, you will need to sign up ahead of time to get a login.  Please see our registration page.

on Aug 20th, 2009Building Your Equinox OSGi Application Server – Part 3

In part 2 of this blog series, I described how to use Equinox p2 to install a new feature into a running Equinox application server. Rather than do this install at runtime via the OSGi console, many times it’s desirable to add bundles to an application server statically at build time rather than at runtime.  For example, this is usually the case when adding libraries for your web application to use. These libraries are sometimes created by others and sometimes created by you.

This post will go through a simple example of how to add your own bundles to your Equinox application at build time.

First, let’s return to the workspace that we setup as described in the first post in this series.  Here’s what the workspace should look like after completing steps 1-4 of the first post:

p311 1024x719 Building Your Equinox OSGi Application Server   Part 3

To add sets of bundles to the target application server, we create a new feature for grouping the bundles.  A feature project is created through the new project wizard via menu selections New Project->Other…->Plugin Development->Feature Project.  I’ve created a new empty feature called com.mycompany.myappserverfeature, but it can be called anything you like:

p32 1024x695 Building Your Equinox OSGi Application Server   Part 3

Then choose the Plug-ins (otherwise known as bundles) tab in the feature editor and you can add bundles to be included in your new feature.  The bundles that appear in the dialog when selecting Add… will include all the bundles in your workspace, as well as all bundles currently included in your target platform.  For a description of how to add to your target platform, and an explanation of what you can do with the target platform since Eclipse 3.5 please see the Improved Target Platform Management blog post.

I’ve also added some bundles in my target platform that support doing ECF remote services with the r-OSGi provider.   This enables support for remote OSGi services between application servers (i.e., having one server call a remote OSGi service exposed by another server).

p33 1024x695 Building Your Equinox OSGi Application Server   Part 3

After adding the bundles you wish to include, save the changes to your feature and then add your new feature to the equinox-milli.product. Features can be added to the equinox-milli.product on the Dependencies tab of the equinox-milli.product editor.

Here’s the Feature Selection dialog that appears when you select Add… on the Dependencies tab:

p34 Building Your Equinox OSGi Application Server   Part 3

And then you will see your com.mycompany.myappserverfeature listed as part of the equinox-milli.product:

p35 1024x695 Building Your Equinox OSGi Application Server   Part 3

Save the changes to the equinox-milli.product and then you can go to product editor Overview tab, select the Eclipse Product export wizard (in lower right of Overview tab) to display the export wizard dialog:

p36 Building Your Equinox OSGi Application Server   Part 3

You can now click Finish and do exactly the same things as described in steps 6, 7, 8, 9 in the original post to create a zip file (e.g., named myappserver.zip), rename it to myappserver.war and then hot deploy the new war file to your servlet container of choice to run it.

Once running, at the osgi> prompt you can convince yourself that the added bundles are now present in your application server by typing ss and looking for the bundles added by your feature in the resulting list:

p37 Building Your Equinox OSGi Application Server   Part 3

As you can see, these bundles are in place and ready to use from within your web applications!

© EclipseSource 2008 - 2011