SlideShare una empresa de Scribd logo
1 de 37
Descargar para leer sin conexión
Modularity in the
cloud
A case study
Paul Bakker
Architect at Luminis Technologies
@pbakker
Marcel Offermans
Director at Luminis Technologies
Member at Apache
@m4rr5
The case
Educational system focussed on
personalized learning
Used in high schools in
The Netherlands
Expand to other countries in the
near future
Cross device HTML 5 + JS
RESTful web services
OSGi services
Mongo
Apache Felix
A
m
d
a
t
u
S3
Amdatu: OSGi Cloud components
JAX-RS
MONGO DB
BlobStores
Multi-tenancy
Search
OpenSocial
...
Apache Licensed
open source
project
Some numbers
190
bundles
in a deployment
120
PulseOn
bundles
School B
Load
Deployment
Load Balancer
PulseOn node
PulseOn node
PulseOn node
Load Balancer
PulseOn node
PulseOn node
PulseOn node
School A
Mongo
Mongo
Mongo
Mongo
Mongo
Mongo
Availability zones
Load Balancer
PulseOn node
PulseOn node
PulseOn node
PulseOn node
PulseOn node
PulseOn node
Availability Zone 1
Mongo
Mongo
Mongo
Mongo
Mongo
Mongo
Availability Zone 2
Horizontal scalability
Horizontal scaling requires stateless nodes
HTML5 clients need less server side state
Any state should go to some kind of store
Auto scaling
Considerable higher loads during school hours
Enough
capacity
Without paying
for idle servers
at night...
Load Balancer small node
Cluster per school
Always use a load balancer because we don’t want
downtime during scaling
Load Balancer small node
large node
large node
Early morning...
End of the day...
Load Balancer small node
large node
large node
But how do we install
our software on a node?
Provisioning servers
ace screenshot
User Interface
REST API Shell scripting
Node
AWS Auto Scaling
1. Start
Load Balancer
Apache ACE
2. register
3. register
4. provision
deployment
package
Provisioning servers
./as-­‐create-­‐launch-­‐config  demo  
          -­‐-­‐image-­‐id  ami-­‐0ee8e07a  
          -­‐-­‐instance-­‐type  m1.small  
          -­‐-­‐region  eu-­‐west-­‐1  
          -­‐-­‐group  sg-­‐ce1420ba  
          -­‐-­‐user-­‐data-­‐file  userdata.txt
./as-­‐create-­‐auto-­‐scaling-­‐group  demo  
        -­‐-­‐launch-­‐configuration  demo  
        -­‐-­‐min-­‐size  1  
        -­‐-­‐max-­‐size  1  
        -­‐-­‐availability-­‐zones  eu-­‐west-­‐1a  
        -­‐-­‐load-­‐balancers  demo  
        -­‐-­‐tag  "k=Name,v=demo,p=true"
Build releases
CI server
Release OBR
-runbundles: org.apache.felix.http.jetty;version=2.2.0,
	 org.apache.felix.gogo.command;version=0.10.0,
	 org.apache.felix.gogo.runtime;version=0.10.0,
	 org.apache.felix.gogo.shell;version=0.10.0,
	 osgi.cmpn;version='(4.2.0,4.2.1]',
	 org.amdatu.security.tokenprovider.api;version=latest,
	 org.amdatu.security.tokenprovider.impl;version=latest,
	 org.amdatu.web.rest.doc,
	 com.lopexs.arl.opensocial.config;version=latest,
	 jackson-core-asl,
Apache ACE
2. Baseline 3. Publish
4. Distribution
Targets
1. GIT tag
5. Provision
How do we know which
bundles to update?
Semantic versioning
is usually about
package versions
Export-Package: org.apache.felix.dm;version="3.1.0"
Semantic versioning
demystified
major.minor.micro(.qualifier)
Major: Backward incompatible change
Minor: Backward compatible change
Micro: Implementation change
Qualifier: Label, e.g. build number
1.0.0.x
Semantic versioning
on bundles
Bundle-Version: 1.0.0
Important for deployment!
Baselining
Bytecode analysis
Compare build with latest release
Check if version numbers should
be bumped
Continuous deployment
CI server
Release OBR
-runbundles: org.apache.felix.http.jetty;version=2.2.0,
	 org.apache.felix.gogo.command;version=0.10.0,
	 org.apache.felix.gogo.runtime;version=0.10.0,
	 org.apache.felix.gogo.shell;version=0.10.0,
	 osgi.cmpn;version='(4.2.0,4.2.1]',
	 org.amdatu.security.tokenprovider.api;version=latest,
	 org.amdatu.security.tokenprovider.impl;version=latest,
	 org.amdatu.web.rest.doc,
	 com.lopexs.arl.opensocial.config;version=latest,
	 jackson-core-asl,
Apache ACE
2. Baseline 3. Publish
4. Distribution
CD server
1. GIT tag
5. Provision
Snapshot OBR
ACE scripting with GoGo
targetrepourl = "$DEPLOYMENT_TARGETOBR_URL"
releaserepourl = "$DEPLOYMENT_RELEASEOBR_URL"
autoconfurl = "$DEPLOYMENT_AUTOCONF_URL"
sourceindex = (repo:index /tmp/ace-cdeploy)
sourcerepo = (repo:repo R5 $sourceindex)
targetrepo = (repo:repo OBR $targetrepourl)
releaserepo = (repo:repo OBR $releaserepourl)
echo "Deploying release resources"
deployed = repo:cd $releaserepo $sourcerepo $targetrepo
echo "Opening client workspace"
workspace = (ace:cw)
echo "Removing old artifacts"
artifacts = ($workspace la)
each $artifacts {
$workspace da $it
}
echo "Creating new artifacts"
each $deployed {
identity = $it getIdentity
version = $it getVersion
name = "$identity - $version"
url = $it getUrl
mimetype = $it getMimetype
ACE scripting with GoGo
echo "Creating new artifacts"
each $deployed {
identity = $it getIdentity
version = $it getVersion
name = "$identity - $version"
url = $it getUrl
mimetype = $it getMimetype
if { $mimetype equals "application/xml:osgi-autoconf" } {
$workspace ca [
artifactName="$name"
url="$url"
mimetype="$mimetype"
filename="$name"
processorPid="org.osgi.deployment.rp.autoconf"
] [
cdartifact="true"
]
} {
$workspace ca [
artifactName="$name"
url="$url"
mimetype="$mimetype"
Bundle-SymbolicName="$identity"
Bundle-Version="$version"
] [
cdartifact="true"
]
}
}
echo "Create artifact to feature association"
if { (coll:first ($workspace la2f "(rightEndpoint=*name=cdfeature*)")) } {
ACE scripting with GoGo
echo "Create artifact to feature association"
if { (coll:first ($workspace la2f "(rightEndpoint=*name=cdfeature*)")) } {
} {
$workspace ca2f "(cdartifact=true)" "(name=cdfeature)" "N" "1"
}
echo "Create feature"
if { (coll:first ($workspace lf "(name=cdfeature)")) } {
} {
$workspace cf "cdfeature"
}
echo "Create feature to distribution association"
if { (coll:first ($workspace lf2d "(leftEndpoint=*name=cdfeature*)")) } {
} {
$workspace cf2d "(name=cdfeature)" "(name=cddistribution)" "1" "1"
}
echo "Create distribution"
if { (coll:first ($workspace ld "(name=cddistribution)")) } {
} {
$workspace cd "cddistribution"
}
echo "Create distribution to target association"
if { (coll:first ($workspace ld2t "(leftEndpoint=*name=cddistribution*)")) } {
} {
$workspace cd2t "(name=cddistribution)" "(id=*)" "1" "N"
}
echo "Create target"
target = (coll:first ($workspace lt "(id=cdtarget)"))
ACE scripting with GoGo
echo "Create target"
target = (coll:first ($workspace lt "(id=cdtarget)"))
if { $target } { } { target = ($workspace ct "cdtarget") }
if { $target isRegistered } { } { $target register }
echo "Configure target properties"
$target addTag "ip-address" "127.0.0.1"
$target addTag "schoolid" "someschool"
$target addTag "timezone" "Europe/Amsterdam"
echo "Committing workspace"
$workspace commit
Cluster
OSGi Target
Load Balancer
MongoDB
MongoDB
MongoDB
OSGi Target
Infrastructure
Management
Component
Provisioning
Cluster
Management
System
Monitoring
Automatic
Scaling
Starts/stops nodes
Deploys and updates
software components
MonitorsQualityofService
aspects
Adds/rem
oves
nodes
from
the
cluster
Instantiates one or more
template based clusters
Cluster
TemplateCluster
TemplateCluster
Template
Artifacts,
Features &
Deployments
5
Cluster
Configuration
1
Requests nodes based on
provided requirements
2 3Assigns
softw
are
distributions
to
targets
4
Gets configured with artifacts
for deployments
Provides usage data for
scaling algorithms
6
7
89
Tooling and
frameworks are
now mature
enough
How does this fit other applications?
The architecture
fits most
modern web
applications
Works in the
cloud
(but not a
requirement)
amdatu.org
Recommended reading ;)
Available NOW!
Book signing
Tue 14.30
@ O’Reilly Booth
(JavaOne Pavilion)
Free books for the
early birds...
There is more...
Building Modular Cloud Applications in Java:
Lessons Learned
Tue 10am - 11am
Modular JavaScript
Wed 3pm - 4pm
Cloud provisioning
http://ace.apache.org/
Cloud OSGi services
http://www.amdatu.org/
Eclipse OSGi plugin
http://bndtools.org/
That’s us
http://luminis.eu/
There is more...
Takk
Grazie
Thank
you
Obrigado
Mahalo
DankeDank U
Merci
Gracias

Más contenido relacionado

Más de Marcel Offermans

Building Secure OSGi Applications
Building Secure OSGi ApplicationsBuilding Secure OSGi Applications
Building Secure OSGi ApplicationsMarcel Offermans
 
OSGi on Google Android using Apache Felix
OSGi on Google Android using Apache FelixOSGi on Google Android using Apache Felix
OSGi on Google Android using Apache FelixMarcel Offermans
 
Component-based ontwikkelen met OSGi: van embedded tot enterprise
Component-based ontwikkelen met OSGi: van embedded tot enterpriseComponent-based ontwikkelen met OSGi: van embedded tot enterprise
Component-based ontwikkelen met OSGi: van embedded tot enterpriseMarcel Offermans
 
Dependencies, dependencies, dependencies
Dependencies, dependencies, dependenciesDependencies, dependencies, dependencies
Dependencies, dependencies, dependenciesMarcel Offermans
 
Modular Architectures using Micro Services
Modular Architectures using Micro ServicesModular Architectures using Micro Services
Modular Architectures using Micro ServicesMarcel Offermans
 
Felix HTTP - Paving the road to the future
Felix HTTP - Paving the road to the futureFelix HTTP - Paving the road to the future
Felix HTTP - Paving the road to the futureMarcel Offermans
 
Dynamic Deployment With Apache Felix
Dynamic Deployment With Apache FelixDynamic Deployment With Apache Felix
Dynamic Deployment With Apache FelixMarcel Offermans
 

Más de Marcel Offermans (8)

De leukste Bug
De leukste BugDe leukste Bug
De leukste Bug
 
Building Secure OSGi Applications
Building Secure OSGi ApplicationsBuilding Secure OSGi Applications
Building Secure OSGi Applications
 
OSGi on Google Android using Apache Felix
OSGi on Google Android using Apache FelixOSGi on Google Android using Apache Felix
OSGi on Google Android using Apache Felix
 
Component-based ontwikkelen met OSGi: van embedded tot enterprise
Component-based ontwikkelen met OSGi: van embedded tot enterpriseComponent-based ontwikkelen met OSGi: van embedded tot enterprise
Component-based ontwikkelen met OSGi: van embedded tot enterprise
 
Dependencies, dependencies, dependencies
Dependencies, dependencies, dependenciesDependencies, dependencies, dependencies
Dependencies, dependencies, dependencies
 
Modular Architectures using Micro Services
Modular Architectures using Micro ServicesModular Architectures using Micro Services
Modular Architectures using Micro Services
 
Felix HTTP - Paving the road to the future
Felix HTTP - Paving the road to the futureFelix HTTP - Paving the road to the future
Felix HTTP - Paving the road to the future
 
Dynamic Deployment With Apache Felix
Dynamic Deployment With Apache FelixDynamic Deployment With Apache Felix
Dynamic Deployment With Apache Felix
 

Último

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 

Último (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

Modularity in the cloud a case study

  • 2. Paul Bakker Architect at Luminis Technologies @pbakker Marcel Offermans Director at Luminis Technologies Member at Apache @m4rr5
  • 3. The case Educational system focussed on personalized learning Used in high schools in The Netherlands Expand to other countries in the near future
  • 4.
  • 5. Cross device HTML 5 + JS RESTful web services OSGi services Mongo Apache Felix A m d a t u S3
  • 6. Amdatu: OSGi Cloud components JAX-RS MONGO DB BlobStores Multi-tenancy Search OpenSocial ... Apache Licensed open source project
  • 7. Some numbers 190 bundles in a deployment 120 PulseOn bundles
  • 8. School B Load Deployment Load Balancer PulseOn node PulseOn node PulseOn node Load Balancer PulseOn node PulseOn node PulseOn node School A Mongo Mongo Mongo Mongo Mongo Mongo
  • 9. Availability zones Load Balancer PulseOn node PulseOn node PulseOn node PulseOn node PulseOn node PulseOn node Availability Zone 1 Mongo Mongo Mongo Mongo Mongo Mongo Availability Zone 2
  • 10. Horizontal scalability Horizontal scaling requires stateless nodes HTML5 clients need less server side state Any state should go to some kind of store
  • 11. Auto scaling Considerable higher loads during school hours Enough capacity Without paying for idle servers at night...
  • 12. Load Balancer small node Cluster per school Always use a load balancer because we don’t want downtime during scaling
  • 13. Load Balancer small node large node large node Early morning...
  • 14. End of the day... Load Balancer small node large node large node
  • 15. But how do we install our software on a node?
  • 17. ace screenshot User Interface REST API Shell scripting
  • 18. Node AWS Auto Scaling 1. Start Load Balancer Apache ACE 2. register 3. register 4. provision deployment package Provisioning servers
  • 19. ./as-­‐create-­‐launch-­‐config  demo            -­‐-­‐image-­‐id  ami-­‐0ee8e07a            -­‐-­‐instance-­‐type  m1.small            -­‐-­‐region  eu-­‐west-­‐1            -­‐-­‐group  sg-­‐ce1420ba            -­‐-­‐user-­‐data-­‐file  userdata.txt ./as-­‐create-­‐auto-­‐scaling-­‐group  demo          -­‐-­‐launch-­‐configuration  demo          -­‐-­‐min-­‐size  1          -­‐-­‐max-­‐size  1          -­‐-­‐availability-­‐zones  eu-­‐west-­‐1a          -­‐-­‐load-­‐balancers  demo          -­‐-­‐tag  "k=Name,v=demo,p=true"
  • 20. Build releases CI server Release OBR -runbundles: org.apache.felix.http.jetty;version=2.2.0, org.apache.felix.gogo.command;version=0.10.0, org.apache.felix.gogo.runtime;version=0.10.0, org.apache.felix.gogo.shell;version=0.10.0, osgi.cmpn;version='(4.2.0,4.2.1]', org.amdatu.security.tokenprovider.api;version=latest, org.amdatu.security.tokenprovider.impl;version=latest, org.amdatu.web.rest.doc, com.lopexs.arl.opensocial.config;version=latest, jackson-core-asl, Apache ACE 2. Baseline 3. Publish 4. Distribution Targets 1. GIT tag 5. Provision
  • 21. How do we know which bundles to update?
  • 22. Semantic versioning is usually about package versions Export-Package: org.apache.felix.dm;version="3.1.0"
  • 23. Semantic versioning demystified major.minor.micro(.qualifier) Major: Backward incompatible change Minor: Backward compatible change Micro: Implementation change Qualifier: Label, e.g. build number 1.0.0.x
  • 24. Semantic versioning on bundles Bundle-Version: 1.0.0 Important for deployment!
  • 25. Baselining Bytecode analysis Compare build with latest release Check if version numbers should be bumped
  • 26. Continuous deployment CI server Release OBR -runbundles: org.apache.felix.http.jetty;version=2.2.0, org.apache.felix.gogo.command;version=0.10.0, org.apache.felix.gogo.runtime;version=0.10.0, org.apache.felix.gogo.shell;version=0.10.0, osgi.cmpn;version='(4.2.0,4.2.1]', org.amdatu.security.tokenprovider.api;version=latest, org.amdatu.security.tokenprovider.impl;version=latest, org.amdatu.web.rest.doc, com.lopexs.arl.opensocial.config;version=latest, jackson-core-asl, Apache ACE 2. Baseline 3. Publish 4. Distribution CD server 1. GIT tag 5. Provision Snapshot OBR
  • 27. ACE scripting with GoGo targetrepourl = "$DEPLOYMENT_TARGETOBR_URL" releaserepourl = "$DEPLOYMENT_RELEASEOBR_URL" autoconfurl = "$DEPLOYMENT_AUTOCONF_URL" sourceindex = (repo:index /tmp/ace-cdeploy) sourcerepo = (repo:repo R5 $sourceindex) targetrepo = (repo:repo OBR $targetrepourl) releaserepo = (repo:repo OBR $releaserepourl) echo "Deploying release resources" deployed = repo:cd $releaserepo $sourcerepo $targetrepo echo "Opening client workspace" workspace = (ace:cw) echo "Removing old artifacts" artifacts = ($workspace la) each $artifacts { $workspace da $it } echo "Creating new artifacts" each $deployed { identity = $it getIdentity version = $it getVersion name = "$identity - $version" url = $it getUrl mimetype = $it getMimetype
  • 28. ACE scripting with GoGo echo "Creating new artifacts" each $deployed { identity = $it getIdentity version = $it getVersion name = "$identity - $version" url = $it getUrl mimetype = $it getMimetype if { $mimetype equals "application/xml:osgi-autoconf" } { $workspace ca [ artifactName="$name" url="$url" mimetype="$mimetype" filename="$name" processorPid="org.osgi.deployment.rp.autoconf" ] [ cdartifact="true" ] } { $workspace ca [ artifactName="$name" url="$url" mimetype="$mimetype" Bundle-SymbolicName="$identity" Bundle-Version="$version" ] [ cdartifact="true" ] } } echo "Create artifact to feature association" if { (coll:first ($workspace la2f "(rightEndpoint=*name=cdfeature*)")) } {
  • 29. ACE scripting with GoGo echo "Create artifact to feature association" if { (coll:first ($workspace la2f "(rightEndpoint=*name=cdfeature*)")) } { } { $workspace ca2f "(cdartifact=true)" "(name=cdfeature)" "N" "1" } echo "Create feature" if { (coll:first ($workspace lf "(name=cdfeature)")) } { } { $workspace cf "cdfeature" } echo "Create feature to distribution association" if { (coll:first ($workspace lf2d "(leftEndpoint=*name=cdfeature*)")) } { } { $workspace cf2d "(name=cdfeature)" "(name=cddistribution)" "1" "1" } echo "Create distribution" if { (coll:first ($workspace ld "(name=cddistribution)")) } { } { $workspace cd "cddistribution" } echo "Create distribution to target association" if { (coll:first ($workspace ld2t "(leftEndpoint=*name=cddistribution*)")) } { } { $workspace cd2t "(name=cddistribution)" "(id=*)" "1" "N" } echo "Create target" target = (coll:first ($workspace lt "(id=cdtarget)"))
  • 30. ACE scripting with GoGo echo "Create target" target = (coll:first ($workspace lt "(id=cdtarget)")) if { $target } { } { target = ($workspace ct "cdtarget") } if { $target isRegistered } { } { $target register } echo "Configure target properties" $target addTag "ip-address" "127.0.0.1" $target addTag "schoolid" "someschool" $target addTag "timezone" "Europe/Amsterdam" echo "Committing workspace" $workspace commit
  • 31. Cluster OSGi Target Load Balancer MongoDB MongoDB MongoDB OSGi Target Infrastructure Management Component Provisioning Cluster Management System Monitoring Automatic Scaling Starts/stops nodes Deploys and updates software components MonitorsQualityofService aspects Adds/rem oves nodes from the cluster Instantiates one or more template based clusters Cluster TemplateCluster TemplateCluster Template Artifacts, Features & Deployments 5 Cluster Configuration 1 Requests nodes based on provided requirements 2 3Assigns softw are distributions to targets 4 Gets configured with artifacts for deployments Provides usage data for scaling algorithms 6 7 89
  • 32. Tooling and frameworks are now mature enough How does this fit other applications? The architecture fits most modern web applications Works in the cloud (but not a requirement)
  • 34. Recommended reading ;) Available NOW! Book signing Tue 14.30 @ O’Reilly Booth (JavaOne Pavilion) Free books for the early birds...
  • 35. There is more... Building Modular Cloud Applications in Java: Lessons Learned Tue 10am - 11am Modular JavaScript Wed 3pm - 4pm
  • 36. Cloud provisioning http://ace.apache.org/ Cloud OSGi services http://www.amdatu.org/ Eclipse OSGi plugin http://bndtools.org/ That’s us http://luminis.eu/ There is more...