SlideShare uma empresa Scribd logo
1 de 17
Provisioning & Migration with p2:
Case study - The Good, the Bad
and the Ugly
Christian Bourgeois
@bourgeois_c


                       EclipseCon 2012
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
ow can we update a software component
    and migrate it’s configuration data while
    having a stable system in case of failure?



3
Demonstration




4
Provisioning UI




    import org.eclipse.equinox.internal.p2.ui.ProvUI;
    import org.eclipse.equinox.internal.p2.ui.ProvUIProvisioningListener;
    import org.eclipse.equinox.internal.p2.ui.dialogs.AddRepositoryDialog;
    import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent;




5
Business Model
    Artifacts Layout

    • server.feature         • client.feature
        •   info.feature        •   info.feature
        •   server.bundle       •   client.bundle
        •   common.bundle       •   common.bundle
        •   config.feature      •   client.bundle.nls




6
Business Model
    info.feature – p2.inf


    properties.1.name = bsm.adaptor
    properties.1.value = true
    properties.2.name = adaptor.name
    properties.2.value = ZExampleAdaptor
    properties.3.name = client.feature.name
    properties.3.value = zzz.compuware.example.adaptor.client.feature
    properties.4.name = server.feature.name
    properties.4.value = zzz.compuware.example.adaptor.server.feature
    properties.5.name = adaptor.id
    properties.5.value = ZExampleAdaptor
    properties.6.name = adaptor.version
    properties.6.value = 1.0.0
    properties.7.name = company.id
    properties.7.value = CPWR
    properties.8.name = domains.ids
    properties.8.value = APM


7
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
Remote Provisioning
        Client                     Server
      Create Plan
                       Uninstall

                                   Create Plan

                                   Execute Plan   Save
                     timestamp
                       Install

                                   Create Plan

                                   Execute Plan   Migrate
                     timestamp

      Execute Plan


9
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
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
public IStatus execute(Map<String, Object> parameters) {
       boolean isServer = RuntimeInfo.isServer();
       if (!isServer) {
          return Status.OK_STATUS;
       }
       …
       IInstallableUnit infoInstallableUnit = this.getInfoInstallableUnit(iu, repositoryManager, progressMonitor);
       String adaptorID = this.getAdaptorID(infoInstallableUnit);
       Version adaptorVersion = this.getAdaptorVersion(infoInstallableUnit);
       MigrationManager manager = this.getMigrationManager();
       MigrationStatus migrationStatus = manager.migrate(adaptorID, adaptorVersion);
       IStatus status = EclipseStatusFactory.createStatus(migrationStatus);
       return status;
     }

     public IStatus undo(Map<String, Object> parameters) {
       …
       MigrationManager manager = this.getMigrationManager();
       manager.revert(adaptorID, adaptorVersion);
     }




12
k… But now I get a “No action found”
 message?




13
p2 Meta-Requirements

 • Provisions the meta-requirements in the
   builder
 com.compuware.vantage.vsm.adaptors.p2.engine.touchpoint.feature
 provides.0.namespace=com.compuware.vantage.vsm.adaptors.p2
 provides.0.name=touchpoints
 provides.0.version=1.1

com.compuware.vantage.vsm.adaptors.p2.prerequisite.feature
 metaRequirements.0.namespace=com.compuware.vantage.vsm.adaptors.p2
 metaRequirements.0.name=touchpoints
 metaRequirements.0.range=1.1

14
p2 Meta-Requirements
 Beware!
 • Tycho Bugzilla 351487
     • tycho-p2-director-plugin ignores meta-
       requirements
 • *.target in IDE




15
Conclusion

 • p2 is easy to use (when you know the basics)
 • p2 API is becoming more high level
 • Must be aware of the “tricks” and pitfalls




16
Christian Bourgeois
@bourgeois_c



      Feedback is always appreciated

Mais conteúdo relacionado

Mais procurados

React state management with Redux and MobX
React state management with Redux and MobXReact state management with Redux and MobX
React state management with Redux and MobXDarko Kukovec
 
Using ReactJS in AngularJS
Using ReactJS in AngularJSUsing ReactJS in AngularJS
Using ReactJS in AngularJSBoris Dinkevich
 
Service worker: discover the next web game changer
Service worker: discover the next web game changerService worker: discover the next web game changer
Service worker: discover the next web game changerSandro Paganotti
 
Angular2 & ngrx/store: Game of States
Angular2 & ngrx/store: Game of StatesAngular2 & ngrx/store: Game of States
Angular2 & ngrx/store: Game of StatesOren Farhi
 
Introduction to ReactJS and Redux
Introduction to ReactJS and ReduxIntroduction to ReactJS and Redux
Introduction to ReactJS and ReduxBoris Dinkevich
 
JS Chicago Meetup 2/23/16 - Redux & Routes
JS Chicago Meetup 2/23/16 - Redux & RoutesJS Chicago Meetup 2/23/16 - Redux & Routes
JS Chicago Meetup 2/23/16 - Redux & RoutesNick Dreckshage
 
Designing applications with Redux
Designing applications with ReduxDesigning applications with Redux
Designing applications with ReduxFernando Daciuk
 
Making react part of something greater
Making react part of something greaterMaking react part of something greater
Making react part of something greaterDarko Kukovec
 
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?Srijan Technologies
 
React + Redux. Best practices
React + Redux.  Best practicesReact + Redux.  Best practices
React + Redux. Best practicesClickky
 
Workshop 26: React Native - The Native Side
Workshop 26: React Native - The Native SideWorkshop 26: React Native - The Native Side
Workshop 26: React Native - The Native SideVisual Engineering
 
Automation in angular js
Automation in angular jsAutomation in angular js
Automation in angular jsMarcin Wosinek
 
Switch to React.js from AngularJS developer
Switch to React.js from AngularJS developerSwitch to React.js from AngularJS developer
Switch to React.js from AngularJS developerEugene Zharkov
 
Angular promises and http
Angular promises and httpAngular promises and http
Angular promises and httpAlexe Bogdan
 

Mais procurados (20)

React state management with Redux and MobX
React state management with Redux and MobXReact state management with Redux and MobX
React state management with Redux and MobX
 
Django Celery
Django Celery Django Celery
Django Celery
 
Using ReactJS in AngularJS
Using ReactJS in AngularJSUsing ReactJS in AngularJS
Using ReactJS in AngularJS
 
Celery
CeleryCelery
Celery
 
Service worker: discover the next web game changer
Service worker: discover the next web game changerService worker: discover the next web game changer
Service worker: discover the next web game changer
 
Angular2 & ngrx/store: Game of States
Angular2 & ngrx/store: Game of StatesAngular2 & ngrx/store: Game of States
Angular2 & ngrx/store: Game of States
 
Introduction to ReactJS and Redux
Introduction to ReactJS and ReduxIntroduction to ReactJS and Redux
Introduction to ReactJS and Redux
 
JS Chicago Meetup 2/23/16 - Redux & Routes
JS Chicago Meetup 2/23/16 - Redux & RoutesJS Chicago Meetup 2/23/16 - Redux & Routes
JS Chicago Meetup 2/23/16 - Redux & Routes
 
Designing applications with Redux
Designing applications with ReduxDesigning applications with Redux
Designing applications with Redux
 
Workmanager PPTX
Workmanager PPTXWorkmanager PPTX
Workmanager PPTX
 
Making react part of something greater
Making react part of something greaterMaking react part of something greater
Making react part of something greater
 
React & Redux
React & ReduxReact & Redux
React & Redux
 
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
[Srijan Wednesday Webinar] Rails 5: What's in It for Me?
 
React & Redux
React & ReduxReact & Redux
React & Redux
 
React + Redux. Best practices
React + Redux.  Best practicesReact + Redux.  Best practices
React + Redux. Best practices
 
Workshop 26: React Native - The Native Side
Workshop 26: React Native - The Native SideWorkshop 26: React Native - The Native Side
Workshop 26: React Native - The Native Side
 
Automation in angular js
Automation in angular jsAutomation in angular js
Automation in angular js
 
Switch to React.js from AngularJS developer
Switch to React.js from AngularJS developerSwitch to React.js from AngularJS developer
Switch to React.js from AngularJS developer
 
Angular promises and http
Angular promises and httpAngular promises and http
Angular promises and http
 
Using redux
Using reduxUsing redux
Using redux
 

Semelhante a Provisioning & Migration with p2: Case study - The Good, the Bad and the Ugly

Construire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleConstruire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleThierry Wasylczenko
 
Stepbystepguideforbuidlingsimplestrutsapp 090702025438-phpapp02
Stepbystepguideforbuidlingsimplestrutsapp 090702025438-phpapp02Stepbystepguideforbuidlingsimplestrutsapp 090702025438-phpapp02
Stepbystepguideforbuidlingsimplestrutsapp 090702025438-phpapp02Rati Manandhar
 
Project Description Of Incident Management System Developed by PRS (CRIS) , N...
Project Description Of Incident Management System Developed by PRS (CRIS) , N...Project Description Of Incident Management System Developed by PRS (CRIS) , N...
Project Description Of Incident Management System Developed by PRS (CRIS) , N...varunsunny21
 
[NDC 2019] Functions 2.0: Enterprise-Grade Serverless
[NDC 2019] Functions 2.0: Enterprise-Grade Serverless[NDC 2019] Functions 2.0: Enterprise-Grade Serverless
[NDC 2019] Functions 2.0: Enterprise-Grade ServerlessKatyShimizu
 
[NDC 2019] Enterprise-Grade Serverless
[NDC 2019] Enterprise-Grade Serverless[NDC 2019] Enterprise-Grade Serverless
[NDC 2019] Enterprise-Grade ServerlessKatyShimizu
 
Testing your application on Google App Engine
Testing your application on Google App EngineTesting your application on Google App Engine
Testing your application on Google App EngineInphina Technologies
 
Testing Your Application On Google App Engine
Testing Your Application On Google App EngineTesting Your Application On Google App Engine
Testing Your Application On Google App EngineIndicThreads
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesLindsay Holmwood
 
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdfdokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdfAppster1
 
dokumen.tips_rediscovering-spring-with-spring-boot1.pdf
dokumen.tips_rediscovering-spring-with-spring-boot1.pdfdokumen.tips_rediscovering-spring-with-spring-boot1.pdf
dokumen.tips_rediscovering-spring-with-spring-boot1.pdfAppster1
 
Spring Cloud Function — Going Serverless
Spring Cloud Function — Going ServerlessSpring Cloud Function — Going Serverless
Spring Cloud Function — Going ServerlessGlobalLogic Ukraine
 
Vertx - Reactive & Distributed
Vertx - Reactive & DistributedVertx - Reactive & Distributed
Vertx - Reactive & DistributedOrkhan Gasimov
 
Ember.js - A JavaScript framework for creating ambitious web applications
Ember.js - A JavaScript framework for creating ambitious web applications  Ember.js - A JavaScript framework for creating ambitious web applications
Ember.js - A JavaScript framework for creating ambitious web applications Juliana Lucena
 
Architecting your GWT applications with GWT-Platform - Lesson 02
Architecting your GWT applications with GWT-Platform - Lesson 02Architecting your GWT applications with GWT-Platform - Lesson 02
Architecting your GWT applications with GWT-Platform - Lesson 02rhemsolutions
 
React & The Art of Managing Complexity
React &  The Art of Managing ComplexityReact &  The Art of Managing Complexity
React & The Art of Managing ComplexityRyan Anklam
 
Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)Gunith Devasurendra
 
Spring and Cloud Foundry; a Marriage Made in Heaven
Spring and Cloud Foundry; a Marriage Made in HeavenSpring and Cloud Foundry; a Marriage Made in Heaven
Spring and Cloud Foundry; a Marriage Made in HeavenJoshua Long
 
Angular 2 Migration - JHipster Meetup 6
Angular 2 Migration - JHipster Meetup 6Angular 2 Migration - JHipster Meetup 6
Angular 2 Migration - JHipster Meetup 6William Marques
 
Symfony2 - from the trenches
Symfony2 - from the trenchesSymfony2 - from the trenches
Symfony2 - from the trenchesLukas Smith
 

Semelhante a Provisioning & Migration with p2: Case study - The Good, the Bad and the Ugly (20)

Construire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleConstruire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradle
 
Stepbystepguideforbuidlingsimplestrutsapp 090702025438-phpapp02
Stepbystepguideforbuidlingsimplestrutsapp 090702025438-phpapp02Stepbystepguideforbuidlingsimplestrutsapp 090702025438-phpapp02
Stepbystepguideforbuidlingsimplestrutsapp 090702025438-phpapp02
 
Project Description Of Incident Management System Developed by PRS (CRIS) , N...
Project Description Of Incident Management System Developed by PRS (CRIS) , N...Project Description Of Incident Management System Developed by PRS (CRIS) , N...
Project Description Of Incident Management System Developed by PRS (CRIS) , N...
 
[NDC 2019] Functions 2.0: Enterprise-Grade Serverless
[NDC 2019] Functions 2.0: Enterprise-Grade Serverless[NDC 2019] Functions 2.0: Enterprise-Grade Serverless
[NDC 2019] Functions 2.0: Enterprise-Grade Serverless
 
[NDC 2019] Enterprise-Grade Serverless
[NDC 2019] Enterprise-Grade Serverless[NDC 2019] Enterprise-Grade Serverless
[NDC 2019] Enterprise-Grade Serverless
 
Android workshop
Android workshopAndroid workshop
Android workshop
 
Testing your application on Google App Engine
Testing your application on Google App EngineTesting your application on Google App Engine
Testing your application on Google App Engine
 
Testing Your Application On Google App Engine
Testing Your Application On Google App EngineTesting Your Application On Google App Engine
Testing Your Application On Google App Engine
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
 
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdfdokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
dokumen.tips_rediscovering-spring-with-spring-boot1 (1).pdf
 
dokumen.tips_rediscovering-spring-with-spring-boot1.pdf
dokumen.tips_rediscovering-spring-with-spring-boot1.pdfdokumen.tips_rediscovering-spring-with-spring-boot1.pdf
dokumen.tips_rediscovering-spring-with-spring-boot1.pdf
 
Spring Cloud Function — Going Serverless
Spring Cloud Function — Going ServerlessSpring Cloud Function — Going Serverless
Spring Cloud Function — Going Serverless
 
Vertx - Reactive & Distributed
Vertx - Reactive & DistributedVertx - Reactive & Distributed
Vertx - Reactive & Distributed
 
Ember.js - A JavaScript framework for creating ambitious web applications
Ember.js - A JavaScript framework for creating ambitious web applications  Ember.js - A JavaScript framework for creating ambitious web applications
Ember.js - A JavaScript framework for creating ambitious web applications
 
Architecting your GWT applications with GWT-Platform - Lesson 02
Architecting your GWT applications with GWT-Platform - Lesson 02Architecting your GWT applications with GWT-Platform - Lesson 02
Architecting your GWT applications with GWT-Platform - Lesson 02
 
React & The Art of Managing Complexity
React &  The Art of Managing ComplexityReact &  The Art of Managing Complexity
React & The Art of Managing Complexity
 
Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)Rediscovering Spring with Spring Boot(1)
Rediscovering Spring with Spring Boot(1)
 
Spring and Cloud Foundry; a Marriage Made in Heaven
Spring and Cloud Foundry; a Marriage Made in HeavenSpring and Cloud Foundry; a Marriage Made in Heaven
Spring and Cloud Foundry; a Marriage Made in Heaven
 
Angular 2 Migration - JHipster Meetup 6
Angular 2 Migration - JHipster Meetup 6Angular 2 Migration - JHipster Meetup 6
Angular 2 Migration - JHipster Meetup 6
 
Symfony2 - from the trenches
Symfony2 - from the trenchesSymfony2 - from the trenches
Symfony2 - from the trenches
 

Último

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 

Último (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
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
  • 5. Provisioning UI import org.eclipse.equinox.internal.p2.ui.ProvUI; import org.eclipse.equinox.internal.p2.ui.ProvUIProvisioningListener; import org.eclipse.equinox.internal.p2.ui.dialogs.AddRepositoryDialog; import org.eclipse.equinox.internal.provisional.p2.repository.RepositoryEvent; 5
  • 6. Business Model Artifacts Layout • server.feature • client.feature • info.feature • info.feature • server.bundle • client.bundle • common.bundle • common.bundle • config.feature • client.bundle.nls 6
  • 7. Business Model info.feature – p2.inf properties.1.name = bsm.adaptor properties.1.value = true properties.2.name = adaptor.name properties.2.value = ZExampleAdaptor properties.3.name = client.feature.name properties.3.value = zzz.compuware.example.adaptor.client.feature properties.4.name = server.feature.name properties.4.value = zzz.compuware.example.adaptor.server.feature properties.5.name = adaptor.id properties.5.value = ZExampleAdaptor properties.6.name = adaptor.version properties.6.value = 1.0.0 properties.7.name = company.id properties.7.value = CPWR properties.8.name = domains.ids properties.8.value = APM 7
  • 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
  • 12. public IStatus execute(Map<String, Object> parameters) { boolean isServer = RuntimeInfo.isServer(); if (!isServer) { return Status.OK_STATUS; } … IInstallableUnit infoInstallableUnit = this.getInfoInstallableUnit(iu, repositoryManager, progressMonitor); String adaptorID = this.getAdaptorID(infoInstallableUnit); Version adaptorVersion = this.getAdaptorVersion(infoInstallableUnit); MigrationManager manager = this.getMigrationManager(); MigrationStatus migrationStatus = manager.migrate(adaptorID, adaptorVersion); IStatus status = EclipseStatusFactory.createStatus(migrationStatus); return status; } public IStatus undo(Map<String, Object> parameters) { … MigrationManager manager = this.getMigrationManager(); manager.revert(adaptorID, adaptorVersion); } 12
  • 13. k… But now I get a “No action found” message? 13
  • 14. p2 Meta-Requirements • Provisions the meta-requirements in the builder com.compuware.vantage.vsm.adaptors.p2.engine.touchpoint.feature provides.0.namespace=com.compuware.vantage.vsm.adaptors.p2 provides.0.name=touchpoints provides.0.version=1.1 com.compuware.vantage.vsm.adaptors.p2.prerequisite.feature metaRequirements.0.namespace=com.compuware.vantage.vsm.adaptors.p2 metaRequirements.0.name=touchpoints metaRequirements.0.range=1.1 14
  • 15. p2 Meta-Requirements Beware! • Tycho Bugzilla 351487 • tycho-p2-director-plugin ignores meta- requirements • *.target in IDE 15
  • 16. Conclusion • p2 is easy to use (when you know the basics) • p2 API is becoming more high level • Must be aware of the “tricks” and pitfalls 16
  • 17. Christian Bourgeois @bourgeois_c Feedback is always appreciated