Upload
bertrand-delacretaz
View
280
Download
4
Embed Size (px)
DESCRIPTION
Slides of my "modern operations with Apache Sling" presentation at http://adapt.to/ 2014
Citation preview
APACHE SLING & FRIENDS TECH MEETUP BERLIN, 22-24 SEPTEMBER 2014
Bertrand Delacrétaz - Principal Scientist, Adobe - Apache Sling PMC member
Modern Operations with Apache Sling@bdelacretaz - grep.codeconsult.ch - slides revision 2014-09-23
2
Modern Operations?
modern operations with Apache Sling - @bdelacretaz - September 2014
modern operations with Apache Sling - @bdelacretaz - September 2014
tinyurl.com/slingops
modern operations with Apache Sling - @bdelacretaz - September 2014
modern operations with Apache Sling - @bdelacretaz - September 2014
1..N2Sling2instances
7
How can Sling help?
modern operations with Apache Sling - @bdelacretaz - September 2014
Modern Operations
ProgrammableInfrastructure
Git>drivendeployments
Elasticclusters
Self>healing2systems
First>class2logs
http://12factor.net/
Stateless services
Immutableservices
?
Metrics
Distributed workers
Service discovery
modern operations with Apache Sling - @bdelacretaz - September 2014We’re still exploring…
pict
ure:
mxr
uben
on
mor
guef
ile.c
om
10
Let’s play with this stuff
modern operations with Apache Sling - @bdelacretaz - September 2014
Playground:https://github.com/bdelacretaz/docker>sling>cluster/
Each2box2is2a2Docker2container2Fig2defines2the2cluster2topology2
Etcd2used2for2discovery
…
12
Git-driven Sling setup
modern operations with Apache Sling - @bdelacretaz - September 2014
Sling2Crankstart2Launcher:2Single2text2file2fully2defines2a2Sling2instance
Artifacts Repository
GenericLauncher
modern operations with Apache Sling - @bdelacretaz - September 2014Crankstart/1
modern operations with Apache Sling - @bdelacretaz - September 2014Crankstart/2
modern operations with Apache Sling - @bdelacretaz - September 2014Crankstart/3
modern operations with Apache Sling - @bdelacretaz - September 2014
Git>driven2Sling2setup!
Artifacts Repository
GenericLauncher
modern operations with Apache Sling - @bdelacretaz - September 2014
Modern Operations
ProgrammableInfrastructure
Git>drivendeployments
Elasticclusters
Self>healing2systems
First>class2logs
http://12factor.net/
Stateless services
Metrics
Distributed workers
Service discovery
Experimenting2with
Immutableservices
19
Docker and Fig
modern operations with Apache Sling - @bdelacretaz - September 2014
start.sh2(excerpts) Dockerfile
Starting2Sling2in2a2Docker2image
Service2discovery2via2Docker2links2(env.2variables)
modern operations with Apache Sling - @bdelacretaz - September 2014fig.yml2defines2the2cluster
fig.yml2excerpts2fig2up2to2start2fig2scale2sling=42to2scale
modern operations with Apache Sling - @bdelacretaz - September 2014
https://github.com/bdelacretaz/docker>sling>cluster/
Services2launched2by2fig2Static2discovery:2Docker2links2
Dynamic2discovery:2etcd
…
modern operations with Apache Sling - @bdelacretaz - September 2014
Modern Operations
ProgrammableInfrastructure
Git>drivendeployments
Elasticclusters
Self>healing2systems
First>class2logs
http://12factor.net/
Stateless services
Metrics
Distributed workers
Service discovery
Experimenting2with
Immutableservices
24
So, what’s missing?
modern operations with Apache Sling - @bdelacretaz - September 2014
Get2configs2from2environment2variables.2Reconnect2without2interruption2if2backend2changes.
Dynamic2service2discovery2needs2some2work
modern operations with Apache Sling - @bdelacretaz - September 2014
// Code from Sling’s NodeTypeBasedRenderingTestuploadTestScript(scriptPath, "nodetype-and-path.esp", “html.esp”);!// next request might hit a different Sling instance which// does not see the changed content yetString content = getContent(testNodeUrl + ".html", CONTENT_TYPE_HTML);
Eventual2consistency2impacts2applications
modern operations with Apache Sling - @bdelacretaz - September 2014
Continuous2deployment2requires2interoperability
While2moving2from2C12to2C2,2the2same2content2might2be2exposed2to2two2different2versions2of2your2application.
Old2app New2app
modern operations with Apache Sling - @bdelacretaz - September 2014
Modern Operations
ProgrammableInfrastructure
Git>drivendeployments
Elasticclusters
Self>healing2systems
First>class2logs
http://12factor.net/
Stateless services
Metrics
Distributed workers
Service discovery
Experimenting2with
Not2too2bad…the2devil2is2in2the2details!
Immutableservices
29
Conclusions
modern operations with Apache Sling - @bdelacretaz - September 2014
No2major2problems2with2Sling2in2modern2operations.2
Runtime2assembly2might2help.2
Dynamic2backend2discovery2needs2testing,2OSGi2helps.2
Programmable,2elastic,2dynamic2deployments2become2the2norm.2
Applications2might2need2some2work:2eventual2consistency,2interoperability2of2versions.
https://github.com/bdelacretaz/docker>sling>cluster/tinyurl.com/slingops