modern operations with apache sling (2014 adaptto version)

30
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

Upload: bertrand-delacretaz

Post on 22-Nov-2014

280 views

Category:

Technology


4 download

DESCRIPTION

Slides of my "modern operations with Apache Sling" presentation at http://adapt.to/ 2014

TRANSCRIPT

Page 1: Modern operations with Apache Sling (2014 adaptTo version)

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

Page 2: Modern operations with Apache Sling (2014 adaptTo version)

2

Modern Operations?

Page 3: Modern operations with Apache Sling (2014 adaptTo version)

modern operations with Apache Sling - @bdelacretaz - September 2014

Page 4: Modern operations with Apache Sling (2014 adaptTo version)

modern operations with Apache Sling - @bdelacretaz - September 2014

tinyurl.com/slingops

Page 5: Modern operations with Apache Sling (2014 adaptTo version)

modern operations with Apache Sling - @bdelacretaz - September 2014

Page 6: Modern operations with Apache Sling (2014 adaptTo version)

modern operations with Apache Sling - @bdelacretaz - September 2014

1..N2Sling2instances

Page 7: Modern operations with Apache Sling (2014 adaptTo version)

7

How can Sling help?

Page 8: Modern operations with Apache Sling (2014 adaptTo version)

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

Page 9: Modern operations with Apache Sling (2014 adaptTo version)

modern operations with Apache Sling - @bdelacretaz - September 2014We’re still exploring…

pict

ure:

mxr

uben

on

mor

guef

ile.c

om

Page 10: Modern operations with Apache Sling (2014 adaptTo version)

10

Let’s play with this stuff

Page 11: Modern operations with Apache Sling (2014 adaptTo version)

modern operations with Apache Sling - @bdelacretaz - September 2014

Playground:https://github.com/bdelacretaz/docker>sling>cluster/

Each2box2is2a2Docker2container2Fig2defines2the2cluster2topology2

Etcd2used2for2discovery

Page 12: Modern operations with Apache Sling (2014 adaptTo version)

12

Git-driven Sling setup

Page 13: Modern operations with Apache Sling (2014 adaptTo version)

modern operations with Apache Sling - @bdelacretaz - September 2014

Sling2Crankstart2Launcher:2Single2text2file2fully2defines2a2Sling2instance

Artifacts Repository

GenericLauncher

Page 14: Modern operations with Apache Sling (2014 adaptTo version)

modern operations with Apache Sling - @bdelacretaz - September 2014Crankstart/1

Page 15: Modern operations with Apache Sling (2014 adaptTo version)

modern operations with Apache Sling - @bdelacretaz - September 2014Crankstart/2

Page 16: Modern operations with Apache Sling (2014 adaptTo version)

modern operations with Apache Sling - @bdelacretaz - September 2014Crankstart/3

Page 17: Modern operations with Apache Sling (2014 adaptTo version)

modern operations with Apache Sling - @bdelacretaz - September 2014

Git>driven2Sling2setup!

Artifacts Repository

GenericLauncher

Page 18: Modern operations with Apache Sling (2014 adaptTo version)

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

Page 19: Modern operations with Apache Sling (2014 adaptTo version)

19

Docker and Fig

Page 20: Modern operations with Apache Sling (2014 adaptTo version)

modern operations with Apache Sling - @bdelacretaz - September 2014

start.sh2(excerpts) Dockerfile

Starting2Sling2in2a2Docker2image

Service2discovery2via2Docker2links2(env.2variables)

Page 21: Modern operations with Apache Sling (2014 adaptTo version)

modern operations with Apache Sling - @bdelacretaz - September 2014fig.yml2defines2the2cluster

fig.yml2excerpts2fig2up2to2start2fig2scale2sling=42to2scale

Page 22: Modern operations with Apache Sling (2014 adaptTo version)

modern operations with Apache Sling - @bdelacretaz - September 2014

https://github.com/bdelacretaz/docker>sling>cluster/

Services2launched2by2fig2Static2discovery:2Docker2links2

Dynamic2discovery:2etcd

Page 23: Modern operations with Apache Sling (2014 adaptTo version)

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

Page 24: Modern operations with Apache Sling (2014 adaptTo version)

24

So, what’s missing?

Page 25: Modern operations with Apache Sling (2014 adaptTo version)

modern operations with Apache Sling - @bdelacretaz - September 2014

Get2configs2from2environment2variables.2Reconnect2without2interruption2if2backend2changes.

Dynamic2service2discovery2needs2some2work

Page 26: Modern operations with Apache Sling (2014 adaptTo version)

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

Page 27: Modern operations with Apache Sling (2014 adaptTo version)

modern operations with Apache Sling - @bdelacretaz - September 2014

Continuous2deployment2requires2interoperability

While2moving2from2C12to2C2,2the2same2content2might2be2exposed2to2two2different2versions2of2your2application.

Old2app New2app

Page 28: Modern operations with Apache Sling (2014 adaptTo version)

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

Page 29: Modern operations with Apache Sling (2014 adaptTo version)

29

Conclusions

Page 30: Modern operations with Apache Sling (2014 adaptTo version)

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