• No results found

Continuous Automated Deployment with

N/A
N/A
Protected

Academic year: 2021

Share "Continuous Automated Deployment with"

Copied!
28
0
0

Loading.... (view fulltext now)

Full text

(1)

Continuous Automated

Deployment with

(2)

Who are we

Director at Luminis Technologies

Member at the Apache Software Foundation

@m4rr5

Marcel Offermans

Jan Willem Janssen

Software Architect at Luminis Technologies

committer and PMC member of Apache ACE

(3)

Agenda

Traditional Continuous Integration

From EAR to bundles

Versioning and baselining

ACE basics

Build env. setup with ACE

(4)

Typical CI workflow

(D)VCS

CI

EAR/WAR

?

Target

Maven,!

scp, ftp, nfs,

smb, …

(5)

Monolithic to Modular

Single, big, monolithic

application


Versioned whenever

“something” changes

On every change the

whole application has

to be redeployed

Many, small modules

that can be combined

to form applications

Modules versioned

independently

Only modules that

changed need to be

redeployed

(6)

What to version?

So we know their contents has changed

So we know the interface contract has changed

our focus here is on bundle versions,

because they tell us what to update

Bundles

(7)

Semantic Versioning

Major: Backward incompatible change!

Minor: Backward compatible change!

Micro: Implementation change!

Qualifier: Label, e.g. build number

major.minor.micro(.qualifier)

1.0.0.abc

(8)

Baselining

Compares build with latest release

Checks if version numbers should be bumped

Uses byte code analysis

-­‐baseline:  *  

-­‐removeheaders:  Bnd-­‐LastModified,Tool,Created-­‐By

(9)

Baselining

Bnd annotations

@ProviderType


A  type  that  is  provided  by  the  

implementor  of  the  contract.  

@ConsumerType


A  type  that  is  typically  implemented  by  

the  consumer  of  the  contract.

(10)

Eclipse with Bndtools

(11)

Apache ACE

Software distribution framework

Manage installation/upgrade of targets

bundles

configurations

(12)

ACE basics

target target target network provisioning. server component. repository client management. agent management. agent management. agent

(13)

ACE basics

Store&Repository

Ar-fact

Feature

Distribu-on

License'Repository

Distribu1on

Target

group artifacts into features and distributions

to make them manageable

(14)

Organising artifacts

Ar#fact

Feature

Distribu#on

Ar#fact

Ar#fact

Ar#fact

Ar#fact

Ar#fact

Feature

Feature

Feature

Distribu#on

Target

Target

Target

Target

Target

(15)

Apache ACE

(16)

CI workflow

(D)VCS

CI

Bundles

Target

Snapshots

Releases

OBR

ACE

(17)

Build env. with ACE

Snapshots

Releases

Bundles from

build

(18)

A 1.0.1.SNAPSHOT

Workspace

B 1.0.1.SNAPSHOT

C 1.0.1.SNAPSHOT

Snapshot Repository

A 1.0.0

B 1.0.0

C 1.0.0

Release Repository

A 1.0.1.SNAPSHOT

B 1.0.1.SNAPSHOT

C 1.0.1.SNAPSHOT

Versioning bundles

from a build

Assume only bundle A changed since the release

1.0.1.SNAPSHOT > 1.0.1

even though they have the

same version, not all

snapshots are equal

even if nothing changed,

you still end up with a new

(19)

A 1.0.1.20131023

Workspace

B 1.0.1.20131023

C 1.0.1.20131023

A 1.0.1.20131024

B 1.0.1.20131024

C 1.0.1.20131024

Snapshot Repository

A 1.0.0

B 1.0.0

C 1.0.0

Release Repository

Versioning bundles

from a build

Assume only bundle A changed since the release

1.0.1.20131022 > 1.0.1

even though they have a

different version, they

might still be equal

even if nothing changed,

you still end up with a new

(20)

Versioning bundles

from a build

Assume only bundle A changed since the release

A 1.0.1

Workspace

B 1.0.0

C 1.0.0

A 1.0.0.CDS001

Snapshot Repository

B 1.0.0

C 1.0.0

A 1.0.0

B 1.0.0

C 1.0.0

Release Repository

1.0.0.CDS001 < 1.0.1

the bundle gets a new

qualifier if it has changed

if nothing changed, nothing

new is deployed

(21)

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

(22)

GoGo shell

“Standard” OSGi shell (RFC-147)

Powerful and extensible

Available from Apache Felix

ACE provides commands to interact with its

(23)

Script

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")

!

echo "Deploying bundles"

deployed = repo:cd $releaserepo $sourcerepo $targetrepo

!

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?"

if { (coll:first 
 Setup Define repositories Deploy bundles Create workspace Get metadata from bundle

Create artifact for bundle Bundle exists? Commit workspace Quit For each bundle no yes next bundle done

(24)

!

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 Setup Define repositories Deploy bundles Create workspace Get metadata from bundle

Create artifact for bundle Bundle exists? Commit workspace Quit For each bundle no yes next bundle done

(25)

Example

Amdatu showcase in local git repo

post-­‐commit or post-­‐receive hook

Jenkins

post build step to deploy to ACE

ACE

(26)

Demo

With the Amdatu Showcase (extended)

(27)

Cloud OSGi services!

http://www.amdatu.org/

http://bndtools.org/

Eclipse OSGi plugin!

!

Provisioning Server!

http://ace.apache.org/!

That’s us!

http://luminis.eu/

Demo code!

(28)

Takk

Grazie

Thank!

you

Obrigado

Mahalo

Danke

Dank

U

Merci

Gracias

References

Related documents

Although client devices that do not support IEEE 802.11r can associate to a BSS with Fast Transition enabled, some client device drivers have been found to be incompatible and

Between- and within-individual correlation between activity and risk-taking of adult male Lacerta viridis in the pooled sample (All) and in the different treatment groups (HF =

Recurrent programmes (excl. Reruns, sports events, programmes aired less than 3 times, programmes shorter than 3 minutes)... guests in DVR- or IPTV-households,

a) Site traffic movements are organised and controlled so that vehicles can be driven safely and the risk of collisions is minimised. b) Entry, parking and exit to active heavy

Brookhaven Magnet Division - Nuclear Physics Program Support Activities.. Spin Program support

The results obtained from this study is in conformity with induced liver damage previous literatures with overdose of acetaminophen [12-13] as evidenced by the

This paper documents a method of controlling complex sound synthesis processes such as granular synthesis, additive synthesis, timbre morphology, swarm-based

We have also produced a combined analysis with high resolution K-band data from the previous analysis by BR14 giving a total of 619 high resolution time series spectra taken of