• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Continuous Automated Deployment with Apache Ace - Jago de Vreede, Marcel Offermans
 

Continuous Automated Deployment with Apache Ace - Jago de Vreede, Marcel Offermans

on

  • 849 views

OSGi Community Event 2013 (http://www.osgi.org/CommunityEvent2013/Schedule)

OSGi Community Event 2013 (http://www.osgi.org/CommunityEvent2013/Schedule)

ABSTRACT

Statistics

Views

Total Views
849
Views on SlideShare
849
Embed Views
0

Actions

Likes
3
Downloads
16
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Continuous Automated Deployment with Apache Ace - Jago de Vreede, Marcel Offermans Continuous Automated Deployment with Apache Ace - Jago de Vreede, Marcel Offermans Presentation Transcript

    • Continuous Automated Deployment with Thursday, October 31, 13
    • Who are we Jago de Vreede Senior Developer at Luminis Technologies Marcel Offermans Director at Luminis Technologies Member at the Apache Software Foundation @m4rr5 Thursday, October 31, 13
    • Agenda • Traditional Continuous Integration • From EAR to bundles • Versioning and baselining • ACE basics • Build env. setup with ACE • Demo Thursday, October 31, 13
    • Traditional Continuous Integration (enterprise) apps before OSGi Source repository Thursday, October 31, 13
    • Traditional Continuous Integration (enterprise) apps before OSGi Source repository Thursday, October 31, 13 CI
    • Traditional Continuous Integration (enterprise) apps before OSGi Source repository Thursday, October 31, 13 CI Package (EAR/WAR)
    • Traditional Continuous Integration (enterprise) apps before OSGi Source repository Thursday, October 31, 13 CI Package (EAR/WAR) Target
    • Traditional Continuous Integration (enterprise) apps before OSGi Maven plugins, scp, and many others Source repository Thursday, October 31, 13 CI Package (EAR/WAR) ? Target
    • Monolithic to Modular Single, big, monolithic application Versioned whenever “something” changes Modules versioned independently On every change the whole application has to be redeployed Thursday, October 31, 13 Many, small modules that can be combined to form applications Only modules that changed need to be redeployed
    • What to version? Bundles So we know their contents has changed rted Packages Expo So we know the interface contract has changed our focus here is on bundle versions, because they tell us what to update Thursday, October 31, 13
    • Semantic Versioning tells us what has changed 1.0.0.abc major.minor.micro(.qualifier) Major: Backward incompatible change Minor: Backward compatible change Micro: Implementation change Qualifier: Label, e.g. build number Thursday, October 31, 13
    • Baselining Compares build with latest release Checks if version numbers should be bumped Uses byte code analysis pse with Bndtools Ecli -­‐baseline:  * -­‐removeheaders:  Bnd-­‐LastModified,Tool,Created-­‐By Thursday, October 31, 13
    • Eclipse with Bndtools demo Thursday, October 31, 13
    • Apache ACE • Software distribution framework • Manages the installation and upgrade of bundles, configuration, etc. to heterogenous targets Thursday, October 31, 13
    • Organizing artifacts • group artifacts into features and distributions to make them manageable • Analogy: IKEA catalog License'Repository Store&Repository Ar-fact Thursday, October 31, 13 Feature Distribu-on Distribu1on Target
    • ACE basics Ar#fact Feature Target Ar#fact Target Ar#fact Feature Distribu#on Target Ar#fact Feature Target Distribu#on Ar#fact Feature Ar#fact Thursday, October 31, 13 Target
    • Initial configuration of Apache ACE demo Thursday, October 31, 13
    • Build env. with ACE Source repository Thursday, October 31, 13 CI
    • Build env. with ACE Source repository Thursday, October 31, 13 CI Bundles
    • Build env. with ACE Source repository CI Bundles OBR Releases Snapshots Thursday, October 31, 13
    • Build env. with ACE Source repository CI Bundles OBR Releases Snapshots Thursday, October 31, 13 ACE
    • Build env. with ACE Source repository CI Bundles OBR Releases Snapshots Thursday, October 31, 13 ACE Target
    • Build env. with ACE Releases Bundles from build Thursday, October 31, 13 Snapshots
    • Versioning bundles from a build Assume only bundle A changed since the release Workspace Snapshot Repository Release Repository A 1.0.1.SNAPSHOT A 1.0.1.SNAPSHOT A 1.0.0 B 1.0.1.SNAPSHOT B 1.0.1.SNAPSHOT B 1.0.0 C 1.0.1.SNAPSHOT C 1.0.1.SNAPSHOT C 1.0.0 Thursday, October 31, 13
    • Versioning bundles from a build Assume only bundle A changed since the release Workspace Snapshot Repository Release Repository A 1.0.1.SNAPSHOT A 1.0.1.SNAPSHOT A 1.0.0 B 1.0.1.SNAPSHOT B 1.0.1.SNAPSHOT B 1.0.0 C 1.0.1.SNAPSHOT C 1.0.1.SNAPSHOT C 1.0.0 Thursday, October 31, 13 1.0.1.SNAPSHOT > 1.0.1
    • Versioning bundles from a build Assume only bundle A changed since the release Workspace Snapshot Repository 1.0.1.SNAPSHOT > 1.0.1 A 1.0.1.SNAPSHOT even though they have the same version, not all snapshots are equal B 1.0.1.SNAPSHOT B 1.0.1.SNAPSHOT A 1.0.1.SNAPSHOT C 1.0.1.SNAPSHOT Thursday, October 31, 13 C 1.0.1.SNAPSHOT Release Repository A 1.0.0 B 1.0.0 C 1.0.0
    • Versioning bundles from a build Assume only bundle A changed since the release Workspace Snapshot Repository 1.0.1.SNAPSHOT > 1.0.1 A 1.0.1.SNAPSHOT even though they have the same version, not all snapshots are equal B 1.0.1.SNAPSHOT B 1.0.1.SNAPSHOT A 1.0.1.SNAPSHOT even if nothing changed, C 1.0.1.SNAPSHOT C 1.0.1.SNAPSHOT you still end up with a new snapshot bundle Thursday, October 31, 13 Release Repository A 1.0.0 B 1.0.0 C 1.0.0
    • Versioning bundles from a build Assume only bundle A changed since the release Workspace Snapshot Repository Release Repository A 1.0.1.20131023 A 1.0.1.20131024 A 1.0.0 B 1.0.1.20131023 B 1.0.1.20131024 B 1.0.0 C 1.0.1.20131023 C 1.0.1.20131024 C 1.0.0 Thursday, October 31, 13
    • Versioning bundles from a build Assume only bundle A changed since the release Workspace Snapshot Repository Release Repository A 1.0.1.20131023 A 1.0.1.20131024 A 1.0.0 B 1.0.1.20131023 B 1.0.1.20131024 B 1.0.0 C 1.0.1.20131023 C 1.0.1.20131024 C 1.0.0 Thursday, October 31, 13 1.0.1.20131022 > 1.0.1
    • Versioning bundles from a build Assume only bundle A changed since the release Workspace Snapshot Repository 1.0.1.20131022 > 1.0.1 A 1.0.1.20131024 even though they have a different version, they might still be equal B 1.0.1.20131023 B 1.0.1.20131024 A 1.0.1.20131023 C 1.0.1.20131023 Thursday, October 31, 13 C 1.0.1.20131024 Release Repository A 1.0.0 B 1.0.0 C 1.0.0
    • Versioning bundles from a build Assume only bundle A changed since the release Workspace Snapshot Repository 1.0.1.20131022 > 1.0.1 A 1.0.1.20131024 even though they have a different version, they might still be equal B 1.0.1.20131023 B 1.0.1.20131024 A 1.0.1.20131023 even if nothing changed, C 1.0.1.20131023 C 1.0.1.20131024 you still end up with a new bundle Thursday, October 31, 13 Release Repository A 1.0.0 B 1.0.0 C 1.0.0
    • Versioning bundles from a build Assume only bundle A changed since the release Workspace Snapshot Repository Release Repository A 1.0.1 A 1.0.0.CDS001 A 1.0.0 B 1.0.0 B 1.0.0 B 1.0.0 C 1.0.0 C 1.0.0 C 1.0.0 Thursday, October 31, 13
    • Versioning bundles from a build Assume only bundle A changed since the release Workspace Release Repository A 1.0.1 A 1.0.0.CDS001 A 1.0.0 B 1.0.0 B 1.0.0 B 1.0.0 C 1.0.0 Thursday, October 31, 13 Snapshot Repository C 1.0.0 C 1.0.0 1.0.0.CDS001 < 1.0.1
    • Versioning bundles from a build Assume only bundle A changed since the release Workspace Snapshot Repository Release Repository A 1.0.0.CDS001 A 1.0.0 B 1.0.0 B 1.0.0 B 1.0.0 C 1.0.0 C 1.0.0 C 1.0.0 A 1.0.1 Thursday, October 31, 13 1.0.0.CDS001 < 1.0.1 the bundle gets a new qualifier if it has changed
    • Versioning bundles from a build Assume only bundle A changed since the release Workspace A 1.0.1 B 1.0.0 C 1.0.0 Thursday, October 31, 13 Snapshot Repository Release Repository A 1.0.0.CDS001 A 1.0.0 B 1.0.0 B 1.0.0 1.0.0.CDS001 < 1.0.1 the bundle gets a new qualifier if it has changed if nothing changed, nothing C 1.0.0 new is deployed C 1.0.0
    • What do we need? CI Script that places bundles in the OBR ACE Server with snapshot and release OBR Target Management agent configured to the ACE instance Thursday, October 31, 13
    • GoGo shell • “Standard” OSGi shell (RFC-147) • Powerful and extensible • Available from Apache Felix • ACE provides commands to interact with its client API and OBRs Thursday, October 31, 13
    • Script Setup echo “Define repositories” sourceindex = (repo:index ../release) sourcerepo = (repo:repo R5 $sourceindex) targetrepo = (repo:repo OBR "http://localhost:8084/obr/repository.xml") releaserepo = (repo:repo OBR "http://localhost:8083/obr/repository.xml") Define repositories echo "Deploying bundles" deployed = repo:cd $releaserepo $sourcerepo $targetrepo Deploy bundles echo "Create workspace" workspace = (ace:cw) echo "For each bundle" each $deployed { echo "Get metadata from bundle" identity = $it getIdentity version = $it getVersion name = "$identity - $version" url = $it getUrl mimetype = $it getMimetype echo "Bundle exists?" Thursday, October 31, 13 Create workspace For each bundle done next bundle Get metadata from bundle yes Bundle exists?
    • echo "For each bundle" each $deployed { echo "Get metadata from bundle" identity = $it getIdentity version = $it getVersion name = "$identity - $version" url = $it getUrl mimetype = $it getMimetype echo "Bundle exists?" if { (coll:first ($workspace la "(&(Bundle-SymbolicName=$identity) (Bundle-Version=$version))")) } { echo "$name already exists" } { echo "Create artifact for bundle" $workspace ca [ artifactName="$name" url="$url" mimetype="$mimetype" Bundle-SymbolicName="$identity" Bundle-Version="$version" ] } } echo "Commit workspace" $workspace commit exit 0 Thursday, October 31, 13 For each bundle done next bundle Get metadata from bundle yes Bundle exists? no Create artifact for bundle Commit workspace Quit
    • Demo • With the Amdatu Showcase (extended) • https://bitbucket.org/amdatu/showcase demo Thursday, October 31, 13
    • ovisioning Server Pr ce.apache.org/ http://a Eclipse OSGi plugin http://bndtools.org/ Thursday, October 31, 13 Cloud OSGi services http://www.amdatu.org/ That’s us http://luminis.eu/
    • Thursday, October 31, 13
    • kU an D Maha Merci lo Danke Grazie Takk Obrigado racias G Thursday, October 31, 13 Thank you