dynamic deployment with apache felix
DESCRIPTION
A talk about Apache ACE and how it can be used to dynamically deploy components to targets.TRANSCRIPT
Dynamic deployment with Apache Felix
Marcel Offermans
Friday, November 6, 2009
Friday, November 6, 2009
Marcel Offermans
• commi0er and PMC member at Apache Felix
• commi0er at Apache ACE
• so<ware architect at luminis technologies
Friday, November 6, 2009
Agenda
• The case for OSGi
• Dynamic Deployment with Apache ACE
• Demo, ACE in AcIon
• Wrapup
Friday, November 6, 2009
The case for OSGi
• Paint ApplicaIon
• wri0en in Java
• sold to customers
Friday, November 6, 2009
“Specials” that fork your code
Friday, November 6, 2009
ConCnuous builds taking a long Cme
Friday, November 6, 2009
Code reflects the architecture?
Friday, November 6, 2009
How hard is it to change something?
Friday, November 6, 2009
Re-‐use: copy/paste
Friday, November 6, 2009
Re-‐use: Object Oriented
Friday, November 6, 2009
Re-‐use: Component Based
Friday, November 6, 2009
ParCConing your applicaCon
• minimize dependencies
• consider rate of change
• minimize complexity
• maximize architected flexibility
• promote reuse
• improve testability
Friday, November 6, 2009
Designing with services
!"#$%
&'(%)
*+,(%')%-.,(%')%
/0#)1(($234
56)272'). 8)1903
2:;0%) #"%#6)
&<0,)
'%"0=46)
>)=9)%)%
28"=4?#0=302
6(44)%#(=54 )3)='
@(4 *3)='A(=54;%0B(=
4%0,<
@07(;'
C- 203)
A(..0=9
(,)= =)8
Friday, November 6, 2009
Designing with services
!"#$%
&'(%)
*+,(%')%-.,(%')%
/0#)1(($234
56)272'). 8)1903
2:;0%) #"%#6)
&<0,)
'%"0=46)
>)=9)%)%
28"=4?#0=302
6(44)%#(=54 )3)='
@(4 *3)='A(=54;%0B(=
4%0,<
@07(;'
C- 203)
A(..0=9
(,)= =)8
(24"D#0 (24"D6(4
2'(%)D/2 2'(%)D8)1903
(24"D)3)='2'(%)
607(;'
607(;'D4%0,<
2<0,)
2<0,)D2:;0%) 2<0,)D#"%#6) 2<0,)D'%"0=46)
/)6"+D#0 /)6"+D6(4 /)6"+D)3)='
28"=4D#0=302 28"=4D;" 28"=4D#.9D(,)= 28"=4D#.9D203) 28"=4D#.9D=)8
".,D234
".,(%')% )+,(%')%
%)=9)%)% #(..0=9
28"=4D#(='%(62
)+,DE(($ ".,D!"#$%
Friday, November 6, 2009
Designing with services
!"#$%
&'(%)
*+,(%')%-.,(%')%
/0#)1(($234
56)272'). 8)1903
2:;0%) #"%#6)
&<0,)
'%"0=46)
>)=9)%)%
28"=4?#0=302
6(44)%#(=54 )3)='
@(4 *3)='A(=54;%0B(=
4%0,<
@07(;'
C- 203)
A(..0=9
(,)= =)8
(24"D#0 (24"D6(4
2'(%)D/2 2'(%)D8)1903
(24"D)3)='2'(%)
607(;'
607(;'D4%0,<
2<0,)
2<0,)D2:;0%) 2<0,)D#"%#6) 2<0,)D'%"0=46)
/)6"+D#0 /)6"+D6(4 /)6"+D)3)='
28"=4D#0=302 28"=4D;" 28"=4D#.9D(,)= 28"=4D#.9D203) 28"=4D#.9D=)8
".,D234
".,(%')% )+,(%')%
%)=9)%)% #(..0=9
28"=4D#(='%(62
)+,DE(($ ".,D!"#$%
#(..0=92
0,"D"(
0,"D(24"
2<0,)2 )+,(%')%2
;"
#(=5409."= 6(4 )3)='56)2'(%) 8)1903
#(..0=9%)=9)%)%
9%08"=4
4%0,< 234
Friday, November 6, 2009
The Case for ACE
• Started in incubator on april 24th 2009
• So<ware distribuIon framework based on OSGi
• 7 commi0ers
• working codebase
• no release yet
• h0p://incubator.apache.org/ace/
Friday, November 6, 2009
Deployment
!"#$"%&%'()
!"#$"%&%'(*
!"#$"%&%'(!
!"#$%&'(
!"#$%&')
!"#$%&'*
!"#$%&'"()
Friday, November 6, 2009
last year!"#$"%&%'()
!"#$"%&%'(*
+,-.&'()
+,-.&'(!
last month!"#$"%&%'()
!"#$"%&%'(*
+,-.&'()
+,-.&'(*
+,-.&'(!
last week
!"#$"%&%'()
!"#$"%&%'(*
!"#$"%&%'(!
!"#$%&'(
!"#$%&')
!"#$%&'*
Keeping the history
now
!"#$"%&%'()
!"#$"%&%'(*
!"#$"%&%'(!
!"#$%&'(
!"#$%&')
!"#$%&'*
Friday, November 6, 2009
Why?
• Automate deployment
• Insight into who uses what
• History of each system
• Consistent development, tesIng, producIon
• Basis for several possible extensions
Friday, November 6, 2009
Topology
!"#$%!
!"#$%!
!"#$%!
&%!'(#)*#(+,-,(&,&$.
-%#+%#
/(0*(&%&!.#%*(-,!(#1
/2,%&!0"&"$%0%&!.
"$%&!
0"&"$%0%&!."$%&!
0"&"$%0%&!."$%&!
Friday, November 6, 2009
High level overview
!"#"$!"$%&'()$)*"("$+
!"#,-&("$+
.""!/)%0
Friday, November 6, 2009
Dependency Management
• Organizing components
• Mapping them to targets
Friday, November 6, 2009
Organizing components
• group components: makes them manageable
• two levels: group and license
• Analogy: IKEA catalog
• data is kept in “store repository”
!"#$%&'%(#)*"#$+
!"#$"%&%' ()*&%+&,-".$
Friday, November 6, 2009
Mapping them onto targets
• mapping licenses to targets
• someImes done by an external system
• data kept in “license repository”
!"#$%&$'($)*&"+*,-
!"#$%&$ '()*$+
Friday, November 6, 2009
User Interface
• user retrieves,
• modifies locally and
• stores data on server
Friday, November 6, 2009
Deployment
• list of targets
• list of versions per target
• list of components per version
• management agent
!"#$%&'"()*+"#%,-)%.&
!"#$%& '()*(+%+&
Friday, November 6, 2009
Deployment Repository
!"#$"%&%'()&*(+"%(',*-&'(
.,*-&'/0
1"#$"%&%'/02
3
4
5
!"#$"%&%'()
1"#$"%&%'/0 !"#$"%&%'() !"#$"%&%'(!
1"#$"%&%'/0 !"#$"%&%'(! !"#$"%&%'(*
1"#$"%&%'/1 !"#$"%&%'(*
.,*-&'/61"#$"%&%'/62
3
!"#$"%&%'(*
1"#$"%&%'/0 !"#$"%&%'() !"#$"%&%'(*
Friday, November 6, 2009
Management Agent
• manages life cycle of bundlesBundleContext
• controls package sharing policiesPackageAdmin
• controls starIng/stopping orderStartLevel
• implements a security policyCondi7onalPermissionAdmin
!"#$%"&'($)&%*+,-./'01/'&%"2&)$.$),-$/345&%!"#$%6++$,3)&
7&+&,8&%9:%;&'8$/3%9<=>?3&%=@@A
Friday, November 6, 2009
Management Agent
!"#$%&'(%)$ "!*')+#,-
*'.#"/0#,
"#10)-2#$343(*5
(/"!340)6
!"#"$%!%#&'"$%#&
'('.#
Friday, November 6, 2009
Deployment Admin
• deployment packages
• versioned set of arIfacts
• transacIonal install/update
• fix packages provide deltas
• signing makes them secure
• extensible through resource processors
• AutoConfig defines configuraIon admin data
Friday, November 6, 2009
From dependency to deployment
!"#$%&'%(#)*"#$+
!"#$"%&%' ()*&%+&,-".$ + =,*-%.)%&'%(#)*"#$+
()*&%+& /0-1&'
/%(0#+1%."&'%(#)*"#$+
/0-1&' !"#$"%&%'
Friday, November 6, 2009
Feedback
!"#$"%&'()*+%,+'(+*-!"#$.%/+'(01)%23-'+*%4(56%7*(,851%9%+5%:!"#$.%;21-<*%"=%23-'+*-!"#$9%>3-'+*%+5%7*(,851%:%,2??**-*-!.#$9%&'()*+%,+533*-
!=#".%@A*?B*-%45(%23-'+*,C%151*%4521-!:#".!D#".$E#".$!#".
$"#$E%;21-<*%$"%,+533*-$"#$9$"#.9E$#$$E9#$$
!"#$"%&'()*+%,+'(+*-!"#$.%/+'(01)%23-'+*%4(56%7*(,851%9%+5%:!"#$.%;21-<*%"=%23-'+*-!"#$9%>3-'+*%+5%7*(,851%:%,2??**-*-!.#$9%&'()*+%,+533*-
!"#$%!
&%!'(#)*#(+,-,(&,&$.
-%#+%#/"&"$%/%&!.
"$%&!
012,!.3($
012,!.3($
Friday, November 6, 2009
Demo
Friday, November 6, 2009
Demo
Friday, November 6, 2009
Demo
Friday, November 6, 2009
Demo
Friday, November 6, 2009
Wrapup
• Apache ACE is incubaIng
• Take it for a test-‐drive!
• Looking for contribuIons:
• Apache Felix Karaf
• Maven / Nexus repository
• Kalumet, JEE auto deployment
Friday, November 6, 2009
QuesCons?
?
?
?
?
?
??
?
? ??
?
??
?
?
Friday, November 6, 2009