democamp bucharest 2010 p2 ro

27
TM Freescale and the Freescale logo are trademarks or registered trademarks of Freescale Semiconductor, Inc. in the U.S. and other countries. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 1 Eclipse Democamp Bucuresti 2010 P2 Mecanismul de instalare/actualizare al aplicatiilor de tip Eclipse plugin/OSGi Pazargic Antonel Ernest

Upload: antonel-pazargic

Post on 16-Jul-2015

240 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Democamp Bucharest 2010   P2 Ro

TM

Freescale and the Freescale logo are trademarks or registered trademarks of Freescale Semiconductor, Inc. in the U.S. and other countries. All other product or

service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 1

Eclipse Democamp Bucuresti 2010

P2 – Mecanismul de instalare/actualizare al

aplicatiilor de tip Eclipse plugin/OSGi

Pazargic Antonel Ernest

Page 2: Democamp Bucharest 2010   P2 Ro

TMFreescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks

of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2009. 2

Prezentare generala

•Sistemul de “provisioning” P2 asigura

•actualizarea aplicatiilor OSGi si RCP

•un mecanism de instalare si management a “feature”-lor

•un mecanism pentru managementul diferitelor configuratii

•administrarea platformei “target”

Page 3: Democamp Bucharest 2010   P2 Ro

TMFreescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks

of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2009. 3

Scurt istoric

La versiunile anterioare ale mediului de dezvoltare Eclipse (3.2-

), cand acesta era pornit, directorul plug-ins era scanat si

functionalitatile erau descoperite

Daca o dependinta lipsea, toate modulele care dependeau de

ea nu se incarcau/porneau

Plugin-urile vechi poluau aplicatia

Nu se putea face actualizarea resurselor, licentelor, executabilelor

sau chiar a framework-ului

Page 4: Democamp Bucharest 2010   P2 Ro

TMFreescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks

of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2009. 4

Ce este p2?

•P2 este noul sistem de provisionare care inlocuieste sistemul vechi

“update manager”

•O interfata grafica noua, un “workflow” simplificat

•Administreaza platforma Eclipse, aplicatiile RCP si chiar mai

mult (exe, ini, module, “registry keys”)

•Utilizarea anumitor module de diferite produse Eclipse

•Un “installer”

•O platforma de provisionare pentru sistemele OSGi

•Administrarea instantelor “non-running”

•Administrarea nivelului de startare

•Administrarea dependintelor de tip “fine-grained”

Page 5: Democamp Bucharest 2010   P2 Ro

TMFreescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks

of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2009. 5

Ce ne permite p2?

•Aceasta platforma extensibila de provisionare pentru sistemele

modulare (OSGi) asigura

•instalarea

•cautarea pentru actualizare

•“rollback”

•Managementul dependintelor

•“Policy control”

•Interfata grafica sau in linie de comanda (“headless”)

Page 6: Democamp Bucharest 2010   P2 Ro

TMFreescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks

of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2009. 6

Ce nu este p2?

•Un sistem de creare (“build”)

•Sistemul “PDE/build” asigura sculele de generare a “repository”-

urilor p2 in procesul de contruire a modulelor

•A product – the eclipse community builds the product!

Page 7: Democamp Bucharest 2010   P2 Ro

TMFreescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks

of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2009. 7

Ce putem crea cu p2?

•Manager de add-on-uri pentru aplicatiile RCP

•Sisteme de instalare

•Sistem de administrare a configuratiei

•Aplicatii care se actualizeaza singure - “self update”

•Scenarii de tip instalare -> actualizare -> “rollback”

Page 8: Democamp Bucharest 2010   P2 Ro

TMFreescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks

of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2009. 8

P2 este mai mult decat un sistem de “module”

•P2 poate provisiona

•module

•executabile

•fisiere de configurare – de exemplu eclipse.ini si config.ini

•cod native

•De asemenea suporta “pool”-ul de module – mai multe instance

pot utiliza in comun module

Page 9: Democamp Bucharest 2010   P2 Ro

TMFreescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks

of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2009. 9

Terminologia P2

•Artefact este de fapt continutul ce urmeaza a fi instalat (octeti)

•Metadatele sunt formate din unitati de instare (IUs) care descriu

continutul care trebuie instalat. Ex.: id, ver, name, description,

provided capabilitie.

•Anatomia unei unitati de instalare (IU)

•Descrierea actualizarii

•Aceasta permite controlul asupra

•IU-ului care urmeaza sa fie actualizat

(ro.jtonic_1.0.0_v20100512)

•Noului IU (ro.jtonic_1.0.1_v20100628)

•Filtru de aplicabilitate

•permite sa se exprime daca un IU este aplicabil pentru un

anumit mediu “environment”

•Example: filtre specifice platformei, pentru fragmentele SWT

(x86, linux, gtk)

Page 10: Democamp Bucharest 2010   P2 Ro

TMFreescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks

of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2009. 10

Anatomia unei IU, cerinte / capabilitati

•Capabilitatile si cerintele sune mecanisme prin care o unitate de

instalare exprima ceea ce furnizeaza si de ceea ce are nevoie

•O capabilitate este compusa din:

•Namespace (string), name (string) and version

•O cerinta este compus dintr-un filtru:

•Namespace, name si version range (fitru implicit)

•Cerintele si capabilitatile exprimate de IU nu trebuie sa fie

obligatoriu in acelasi spatiu de nume - “namespace”

•Resurse – RPMs, exes, docs...

•Virtual

Page 11: Democamp Bucharest 2010   P2 Ro

TMFreescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks

of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2009. 11

Artefacte

•Octetii/continutul ce urmeza sa fie instalat

•Orice forma

•Arhive de tip java - jar (module, “feature”s...)

•Executabile binare

•Pachete RPM, MSI

•Definite, mentinute, incarcate si utilizate separat de metadate

Page 12: Democamp Bucharest 2010   P2 Ro

TMFreescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks

of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2009. 12

“Repositories”

•Definita de interfata IRepository

•Toate “repository”-urile au

•Identitate

•Versiune

•Descriere

•Pot fi interogate

•Permit incarcarea intarziata (”delayed”)

Page 13: Democamp Bucharest 2010   P2 Ro

TMFreescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks

of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2009. 13

“Repository” de metadate

•Este definita de interfata IMetadataRepository

•Adauga/elimina unitati de instalare

•Adauga referinte la alte “repos”

•Create de “factories”

•Sistem de “looked up” cu ajutorul serviciului

IMetadataRepositoryManager

Page 14: Democamp Bucharest 2010   P2 Ro

TMFreescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks

of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2009. 14

“Repository” de artefacte

•Definita de interfata IArtifactRepository

•Adauge/elimina descriptori

•Acceseza artefacte cu ajutorul descriptorilor

•Create de “factories”

•Sistem de “looked up” cu ajutorul serviciului IArtiactRepositoryManager

Page 15: Democamp Bucharest 2010   P2 Ro

TMFreescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks

of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2009. 15

Profil p2

•Un profil contine

•Proprietati care definesc mediul, precum os, ws, arch, locatia de

instalare, locatia pool-ului de module

•Lista de unitati de instalare

•Proprietatile asociate cu fiecare unitate de instalare

•Profilele sunt administrate de un registru de profile

Page 16: Democamp Bucharest 2010   P2 Ro

TMFreescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks

of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2009. 16

Schimbarea unui profil

•Un profil se creaza (in mod uzual) in faza initiala de instalare

•Este schimbat de operatiile de provizionare, folosind:

•Aplicatia director

•Interfata grafica specializata

•API-ul

Platforma Target

•Doua tipuri importante de artefacte constitui un sistem software

•Codul pe care il scriem

•Bibliotecile pe care le folosim (acestea sunt considerate “target”).

Este o practica buna sa cream platforma target bazata pe pachetul

Delta Pack

Page 17: Democamp Bucharest 2010   P2 Ro

TMFreescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks

of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2009. 17

Versionare

Major.minor.service.qualifier

•Major – “breaking API”

•Minor – API nou

•Service – fixare defecte

•Qualifier – SCM tag sau id de build

Page 18: Democamp Bucharest 2010   P2 Ro

TMFreescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks

of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2009. 18

P2 – Interfata grafica

•Se poate folosi API-ul p2 pentru crearea unei interfete grafice pentru

actualizare “de la zero”

•Se poate reutiliza interfata grafica existante

•Se poate personaliza interfata grafica existenta

Help -> Install New Software...

Page 19: Democamp Bucharest 2010   P2 Ro

TMFreescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks

of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2009. 19

P2 – Interfata grafica

Preferences -> Install/Update -> Available Software Sites

Page 20: Democamp Bucharest 2010   P2 Ro

TMFreescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks

of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2009. 20

Crearea si exportarea produsului

Exemplu

Crearea/exportarea/Instalarea unui “feature”

Exemplu

Categorii

Page 21: Democamp Bucharest 2010   P2 Ro

TMFreescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks

of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2009. 21

Aplicatia Director

•Invocarea operatiilor de provisionare in maniera “linia de comanda”

(headless)

•Instalare

•Dezinstalare

•Actualizare

Setarea “repository”urilor cu ajutorul fiserului p2.inf

Instructions.configure=\

addRepository=(type:0, location:

file${#58}/D:/fsl/exports/features/dcamp/p2);\

addRepository=(type:1, location:

file${#58}/D:/fsl/exports/features/dcamp/p2);\

Page 22: Democamp Bucharest 2010   P2 Ro

TMFreescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks

of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2009. 22

“Repository” de tip compozit

•Descrierea artefactelor si metadatelor in “repos” de tip copil

•compositeArtifacts.jar

•compositeContent.jar

•I20100501_1010/

•I20100508_0910/

•I20100515_1110/

•“Repository” copil - I20100501_1010

•artifacts.jar

•content.jar

•features/

•plugins/

Page 23: Democamp Bucharest 2010   P2 Ro

TMFreescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks

of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2009. 23

“Publisher”

•A fost integrat in PDE/build - Eclipse-3.5

•Feature-urile si modulele sunt “adunate” din sursa si publicate intr-un

“repository”

•Poate publica

•Feature-uri si module

•Produse

•Categorii

•“Update site”

•Activarea “publisher”-ului va create un “repository” pentru toate

platformele pentru care facem “build”

Page 24: Democamp Bucharest 2010   P2 Ro

TM

Freescale and the Freescale logo are trademarks or registered trademarks of Freescale Semiconductor, Inc. in the U.S. and other countries. All other product or

service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2008. 24

“New Entries”

EMC – Eclipse Marketplace Client

Page 25: Democamp Bucharest 2010   P2 Ro

TMFreescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks

of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2009. 25

“New Entries”

Discovery UI

•Poate fi folosita pentru crearea unei

prezentari “personalizate” a unui

repository p2.

•Mylyn foloseste acest mecanism

pentru usurarea instalarii conectorilor.

Eclipse b3

•Simplifica crearea si asamblarea

produselor software

•Motorul (engine) b3

•Agregatorul b3

Tycho (proposal) Crearea plugin-urilor Eclipse si a

modulelor OSGi cu sistemul Maven

Page 26: Democamp Bucharest 2010   P2 Ro

TMFreescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks

of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2009. 26

“New Entries”

Generice Java 5

API – nu mai sunt in provisional

Limbaj de interogare pentru p2 (http://wiki.eclipse.org/Query_Language_for_p2).

Repository-ul galileo contine 3866 unitati de instalare (IU)

Page 27: Democamp Bucharest 2010   P2 Ro

TMFreescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks

of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. © Freescale Semiconductor, Inc. 2009. 27

Referinte

Aplicatia p2 director

http://wiki.eclipse.org/Equinox_p2_director_application

Integrarea sistemului de “build” (PDE/build) cu p2

http://help.eclipse.org/galileo/index.jsp?nav=/4_2_2

Versionarea

http://wiki.eclipse.org/Version_Numbering

Agregatorul Eclipse b3

http://www.eclipse.org/modeling/emft/b3/

Tycho (proposal) – Crearea plugin-urilor Eclipse si a modulelor OSGi cu

sistemul Maven

http://www.eclipse.org/proposals/tycho/

OSGi – Sistemul dinamic de module - Java

http://www.osgi.org/

Equinox – Implementarea specificatiilor OSGi

http://www.eclipse.org/equinox/