Case study of how Compuware leveraged the p2 framework to create an end to end remote provisioning solution for one of our product offering. We'll also show how we solved the common problem of configuration management with the help of p2.
p2 is a provisioning framework that covers broad use cases. Adopting p2 in a product is not just about including a feature in your product: chances are that if you want to use it inside one of your product you will have to build some customized components on top of p2 to make it fit your requirements.
Attending this talk, the audience will learn what are the caveats and quick wins of building software on top of the p2 framework. If you envision to use p2 in your next product, you'd better take some notes!
Through code samples and a demo, we'll show you concrete examples of how to:
* leverage p2 to provision a remote runtime (using JMS)
* add custom p2 touchpoint actions to run your migrations
* deal with p2 metarequirements in your IDE
* create a business model on top of the standard p2 Installable Units
* create a custom UI for your provisioning business model
Ensuring Technical Readiness For Copilot in Microsoft 365
Provisioning & Migration with p2: Case study - The Good, the Bad and the Ugly
1. Provisioning & Migration with p2:
Case study - The Good, the Bad
and the Ugly
Christian Bourgeois
@bourgeois_c
EclipseCon 2012
2. Some Context on Previous Product Version
• Based on Eclipse 3.4
• Too much time to deliver a simple update
• Migration would leave system in
inconsistent state
2
3. ow can we update a software component
and migrate it’s configuration data while
having a stable system in case of failure?
3
8. igrations… How to integrate them with p2?
public abstract class org.eclipse.equinox.p2.engine.spi.ProvisioningAction {
…
public abstract IStatus execute(Map<String, Object> parameters);
public abstract IStatus undo(Map<String, Object> parameters);
…
}
8
9. Remote Provisioning
Client Server
Create Plan
Uninstall
Create Plan
Execute Plan Save
timestamp
Install
Create Plan
Execute Plan Migrate
timestamp
Execute Plan
9
10. p2 Touchpoint Actions
instructions.configure=markStarted(started:true);
instructions.configure=copy(source:a, target:b,overwrite:true);
instructions.configure=setProgramProperty(propName:key, propValue:value);
instructions.configure=addJvmArg(jvmArg:-XX:+UnlockDiagnosticVMOptions);
They are executed in the “builder”!
10
11. Custom p2 Touchpoint Actions
instructions.configure=…adaptors.p2.engine.touchpoint.migrate();
instructions.unconfigure=…adaptors.p2.engine.touchpoint.saveConfigurations();
• Executes business logic
• Must have knowledge of their runtime
11