Upload
others
View
7
Download
0
Embed Size (px)
Citation preview
APACHE SLING & FRIENDS TECH MEETUPBERLIN, 26-28 SEPTEMBER 2016
AEM in DockerAndrei Darashenka, freelancer
adaptTo() 2016 2
adaptTo() 2016 3
Docker
Docker benefits
adaptTo() 2016 4
▪ Software delivery▪ Predictable environments▪ Fast rollout▪ Cheap “Virtualisation”▪ Overlay filesystem
Docker vocabulary
adaptTo() 2016 5
▪ Image like a filesystem snapshot▪ Container like a running program▪ Docker hub like an app store for docker images▪ Registry like a private docker hub
adaptTo() 2016 6
AEM in Docker
AEM is an antipattern for Docker
adaptTo() 2016 8
▪ Docker is designed for microservices▪ AEM is a monolith
▪ Docker runs the best with stateless containers▪ AEM has a big filesystem snapshot
▪
You cannot drive fast
adaptTo() 2016 9
Alternative without docker
adaptTo() 2016 10
Good news
adaptTo() 2016 12
▪ Tarmk is append-only storage▪ Mongomk is a remote▪ Solrcloud▪ Data Store on external filesystem or on S3
adaptTo() 2016 13
▪ Live instances: Many publishers, same dataset▪
▪ Test instances: Many publishers, many datasets▪▪
Test vs. Live instances
Building AEM images for test
adaptTo() 2016 14
▪ Dockerfile to create base, author, publisher▪ Start author+publisher, install project, import
products, rollout pages, replicate▪ Stop author+publisher, compact tar, commit▪ Image: 3-50 GB
Building AEM images for test
adaptTo() 2016 15
▪ Feature-branch image▪▪
▪ Build time 15-20 min, Image 50-200 MB
▪ 2-5 min to start
Building AEM images for test
adaptTo() 2016 16
▪ Volumes▪▪▪▪
Building AEM images for live with tarmk
adaptTo() 2016 17
▪ Use data container: backup etc...▪▪
▪ Use log container: send logs to ELK▪▪
▪ /tmp
Starting new publisher with tarmk
adaptTo() 2016 18
1. Add this publisher to author with fake IP:port2. Pause other publisher + commit data-container3. Start new publisher from committed data-image4. On author set correct IP:port of the publisher5. Enable publisher in load-balancer
Use AEM in cluster
adaptTo() 2016 19
▪ Use S3 with binaryless replication
▪ Put publisher/dispatcher in one pod
▪ Commit your containers just before/after rollout▪ On problems simply recreate a publisher▪ Hot-standby is important ;)▪ Varnish 5.0 is released :)
adaptTo() 2016 20
Appendix
Andrei Darashenka▪▪▪▪
adaptTo() 2016 22
Questions