SlideShare a Scribd company logo
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

More Related Content

PPTX
Git multi repos
PDF
Building and Running OpenStack on POWER8
PDF
Test Driven Infrastructure with Docker, Test Kitchen and Serverspec
PDF
Building a Cauldron for Chef to Cook In
PDF
Puppet evolutions
PPTX
Getting started with automation using ansible
PDF
Amending and Testing changes lab guide
ODP
oS KDE Repos & MM
Git multi repos
Building and Running OpenStack on POWER8
Test Driven Infrastructure with Docker, Test Kitchen and Serverspec
Building a Cauldron for Chef to Cook In
Puppet evolutions
Getting started with automation using ansible
Amending and Testing changes lab guide
oS KDE Repos & MM

Similar to Continuous Automated Deployment with Apache Ace - Jago de Vreede, Marcel Offermans (20)

PDF
Continuous Automated Deployment with Apache ACE
PPT
Managing Change
PPTX
goployer, 코드 기반의 배포 도구 - 송주영 (beNX) :: AWS Community Day 2020
PDF
stackconf 2022: It’s Time to Debloat the Cloud with Unikraft
PDF
Kernel Recipes 2013 - Crosstool-NG, a cross-toolchain generator
PDF
Modern Release Engineering in a Nutshell - Why Researchers should Care!
PPTX
Ciao: Continuous Integration for Apps on OpenStack
PDF
Zure Azure PaaS Zero to Hero - DevOps training day
PDF
Archetype autoplugins
PPT
Eclipse Training - Introduction
PDF
Angular version 10 is here check out the new features, notable changes, depr...
PDF
The Ring programming language version 1.3 book - Part 8 of 88
PPTX
Cross Cloud CI Intro
PDF
Why so continuous
PDF
2 whats-new-in-ios7-m2-xcode-slides
PDF
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with Concourse
PDF
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
PDF
Anatomy of a Continuous Integration and Delivery (CICD) Pipeline
PDF
Arquitectura en detalle de una anatomia devops
PDF
Acunu Analytics: Simpler Real-Time Cassandra Apps
Continuous Automated Deployment with Apache ACE
Managing Change
goployer, 코드 기반의 배포 도구 - 송주영 (beNX) :: AWS Community Day 2020
stackconf 2022: It’s Time to Debloat the Cloud with Unikraft
Kernel Recipes 2013 - Crosstool-NG, a cross-toolchain generator
Modern Release Engineering in a Nutshell - Why Researchers should Care!
Ciao: Continuous Integration for Apps on OpenStack
Zure Azure PaaS Zero to Hero - DevOps training day
Archetype autoplugins
Eclipse Training - Introduction
Angular version 10 is here check out the new features, notable changes, depr...
The Ring programming language version 1.3 book - Part 8 of 88
Cross Cloud CI Intro
Why so continuous
2 whats-new-in-ios7-m2-xcode-slides
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with Concourse
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Anatomy of a Continuous Integration and Delivery (CICD) Pipeline
Arquitectura en detalle de una anatomia devops
Acunu Analytics: Simpler Real-Time Cassandra Apps
Ad

More from mfrancis (20)

PDF
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
PDF
OSGi and Java 9+ - BJ Hargrave (IBM)
PDF
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
PDF
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
PDF
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
PDF
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
PDF
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
PDF
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
PDF
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
PDF
OSGi CDI Integration Specification - Ray Augé (Liferay)
PDF
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
PDF
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
PDF
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
PDF
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
PDF
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
PDF
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
PDF
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
PDF
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
PDF
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
PDF
How to connect your OSGi application - Dirk Fauth (Bosch)
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
OSGi and Java 9+ - BJ Hargrave (IBM)
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
OSGi CDI Integration Specification - Ray Augé (Liferay)
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
How to connect your OSGi application - Dirk Fauth (Bosch)
Ad

Recently uploaded (20)

PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Big Data Technologies - Introduction.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
cuic standard and advanced reporting.pdf
PPTX
Cloud computing and distributed systems.
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Approach and Philosophy of On baking technology
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPT
Teaching material agriculture food technology
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
Unlocking AI with Model Context Protocol (MCP)
Network Security Unit 5.pdf for BCA BBA.
Big Data Technologies - Introduction.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
cuic standard and advanced reporting.pdf
Cloud computing and distributed systems.
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
NewMind AI Weekly Chronicles - August'25 Week I
Review of recent advances in non-invasive hemoglobin estimation
Diabetes mellitus diagnosis method based random forest with bat algorithm
Reach Out and Touch Someone: Haptics and Empathic Computing
Agricultural_Statistics_at_a_Glance_2022_0.pdf
The AUB Centre for AI in Media Proposal.docx
Building Integrated photovoltaic BIPV_UPV.pdf
Approach and Philosophy of On baking technology
MIND Revenue Release Quarter 2 2025 Press Release
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Teaching material agriculture food technology
The Rise and Fall of 3GPP – Time for a Sabbatical?

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

  • 2. 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
  • 3. Agenda • Traditional Continuous Integration • From EAR to bundles • Versioning and baselining • ACE basics • Build env. setup with ACE • Demo Thursday, October 31, 13
  • 4. Traditional Continuous Integration (enterprise) apps before OSGi Source repository Thursday, October 31, 13
  • 5. Traditional Continuous Integration (enterprise) apps before OSGi Source repository Thursday, October 31, 13 CI
  • 6. Traditional Continuous Integration (enterprise) apps before OSGi Source repository Thursday, October 31, 13 CI Package (EAR/WAR)
  • 7. Traditional Continuous Integration (enterprise) apps before OSGi Source repository Thursday, October 31, 13 CI Package (EAR/WAR) Target
  • 8. Traditional Continuous Integration (enterprise) apps before OSGi Maven plugins, scp, and many others Source repository Thursday, October 31, 13 CI Package (EAR/WAR) ? Target
  • 9. 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
  • 10. 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
  • 11. 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
  • 12. 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
  • 14. Apache ACE • Software distribution framework • Manages the installation and upgrade of bundles, configuration, etc. to heterogenous targets Thursday, October 31, 13
  • 15. 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
  • 17. Initial configuration of Apache ACE demo Thursday, October 31, 13
  • 18. Build env. with ACE Source repository Thursday, October 31, 13 CI
  • 19. Build env. with ACE Source repository Thursday, October 31, 13 CI Bundles
  • 20. Build env. with ACE Source repository CI Bundles OBR Releases Snapshots Thursday, October 31, 13
  • 21. Build env. with ACE Source repository CI Bundles OBR Releases Snapshots Thursday, October 31, 13 ACE
  • 22. Build env. with ACE Source repository CI Bundles OBR Releases Snapshots Thursday, October 31, 13 ACE Target
  • 23. Build env. with ACE Releases Bundles from build Thursday, October 31, 13 Snapshots
  • 24. 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
  • 25. 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
  • 26. 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
  • 27. 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
  • 28. 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
  • 29. 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
  • 30. 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
  • 31. 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
  • 32. 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
  • 33. 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
  • 34. 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
  • 35. 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
  • 36. 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
  • 37. 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
  • 38. 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?
  • 39. 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
  • 40. Demo • With the Amdatu Showcase (extended) • https://bitbucket.org/amdatu/showcase demo Thursday, October 31, 13
  • 41. 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/