SlideShare une entreprise Scribd logo
1  sur  32
Télécharger pour lire hors ligne
APACHE SLING & FRIENDS TECH MEETUP
BERLIN, 25-27 SEPTEMBER 2017
Robert Munteanu, Tomek Rękawek @ Adobe
0DT deployments for Sling-based apps
Agenda
● Motivation
● Concepts
● Usage
● Demo
● Wrap-up
Motivation
Clustered deployments
Standalone deployments
Concepts
Separate content from code
Oak Composite NodeStore
Oak Composite NodeStore
● Manages a number of 1 to n NodeStores
● Always has a global NodeStore, holding the content not
claimed by other NodeStores
● Multiple mounted NodeStores, owning content for certain
paths, for instance /libs and /apps
● Certain paths in the global mount can be claimed by mounts
– Looks for a :oak:mount- prefx in node names and matches them with mounts
– Currently implemented for indexes
Typical confguraton
Note: for your viewing pleasure, not an actual config file
/ <default> # global mount
/libs libs # read-only mount
/apps libs # read-only mount
Following paths also belong to the libs mount:
●
/oak:index/uuid/:oak:mount-libs-index ( and others )
● /jcr:system/rep:permissionStore/oak:mount-libs-
default
Oak composite store with Sling / AEM
● Two repositories:
– /apps & /libs - stored in a separate, read-only
repository-libs,
– other data - stored in the normal repository (Segment,
Mongo or RDB).
● The first one has to be created before starting
the instance.
Limitatons
● Mounts are always read-only
– Atomic state changes non trivial to get right, fast, scalable
– Write support requires additonal change to multple Oak subsystems
– No observaton events generated
● Referenceable nodes are not suported in non-default
NodeStores
● Versionable nodes are not supported in non-default
NodeStores
Ensuring consistency
● Mount-time checks
– No versionable nodes in non-default NodeStores
– No referenceable nodes in non-default NodeStoress
– No duplicate entries in unique indexes amongst all NodeStores
– Node type defnitons from mounts consistent with the global node type
registry
– Namespace usage in mounts consistent with the global namespace registry
● Run-time checks
– No cross-mount references may be created at run-tme
Applicaton-level changes
● No run-time changes under /libs or /apps
– Usually fne or applicatons
– More painful for testng
● Read-only status exposed via
Session.hasCapability, not
Session.hasPermission
Usage
Running instance in the composite mode
●
We need to have two repositories in the composite mode:
– one for the applicaton (/apps and /libs),
– one for the content (everything else).
● When running the instance in the composite mode, the
application part is read-only
– so it's not possible to install the applicaton from the content packages, as usual.
● Therefore, using composite mode involves two-step process:
– start instance without the composite node store, to create the applicaton repository,
– start instance with the composite node store.
Building and startng composite instance
Building the composite-enabled instance
●
First, the instance is started without the composite node store.
●
The composite-init.jar waits until the instance is ready:
– start level 30,
– no indexing jobs in progress.
●
Then it stops the instance.
● The created repository is renamed to repository-libs.
●
It's a completely initialized repository:
– /apps, /libs will be used for the composite node store mount,
– other content will be used to pre-populate the default node store when running the instance.
Startng the quickstart in composite mode
● The instance is configured with two node stores: the default one and
the repository-libs.
● They are combined together with composite node store.
● If the instance is started for the first time:
– the default store is empty, so the composite node store pre-populates it with the content from
the repository-libs,
– it copies everything except the apps-related data,
– once the inital pre-populaton is done, the instance startup will carry on.
● If the instance references an existing default repository:
– the startup proceeds, with the new /apps and /libs part.
Customer applicaton integraton
●
The customer application can't be installed in the instance runtime.
●
It has to be integrated with the Sling/AEM code.
●
Sling Provisioning Model:
[artifacts startLevel=20]
com.acme.site/com.acme.site.content/1.0.0/zip
com.acme.site/com.acme.site.core/1.0.0
com.acme.site/com.acme.site.email/1.0.0
com.acme.site/com.acme.site.templating/1.0.0
[configurations]
com.acme.site.core.AcmeService
enabled=B"true"
path="/home/acme"
Composite mode with Docker
● This 2-stage process needs to be automated.
●
Docker is a perfect tool for the task - it allows to
encapsulate both logic and data:
– Dockerfile can be used to orchestrate the required steps,
– the created Docker image embedds the artfacts and
repository-libs.
●
A separate image for author and publish.
Dockerizing the composite instance
Running the container
● The container uses an external storage for the
non-application content.
● Either VOLUME for the TarMK or a Mongo
instance.
● The /apps and /libs are served from the
embedded repository-libs.
Docker setup summary
Deployment scenarios
Blue-green deployments
Blue green deployments
●
Now we have the whole application code enclosed in the container.
● While the other data (/content) is stored externally.
● This allows to perform a blue-green deployment.
●
Blue container is the one running the older version of code.
●
Without disabling it, we're creating a green container, running the newer code.
● They are both using the same content, but their /apps subtrees and bundles
are different.
● Now we can switch the load balancer to point the green container.
●
The blue one can be shut down.
Incompatble content changes
●
The assumption is that the green container doesn't introduce incomatible
changes.
●
Otherwise the blue may break.
●
In AEM context: eg. no new components should be added if the older version
doesn't support them.
●
If the property name changes, the new version should fallback to reading the
older name as well.
●
If the content schema changes, a script may be used to update the content
after switching the load balancer,
– the new applicaton should allow to read the older schema too.
Demo
Zero downtme demo
● Start a Dockerized, Mongo-based AEM instance with
application v1.
● Start the second container, with application v2,
connecting to the same MongoDB.
● Confirm it contains a new "video" component.
● Switch the load balancer.
● Destroy the old instance.
Wrap-up
Resources
● https://jackrabbit.apache.org/oak/docs/node
store/compositens.html

Contenu connexe

Tendances

Introduction to Atomic: Tailoring a Trusted OS for Containers
Introduction to Atomic: Tailoring a Trusted OS for ContainersIntroduction to Atomic: Tailoring a Trusted OS for Containers
Introduction to Atomic: Tailoring a Trusted OS for ContainersJoe Brockmeier
 
Thoughts on heptio's ark - Contributors Meet 21st Sept 2018
Thoughts on heptio's ark - Contributors Meet 21st Sept 2018Thoughts on heptio's ark - Contributors Meet 21st Sept 2018
Thoughts on heptio's ark - Contributors Meet 21st Sept 2018OpenEBS
 
Magnum first-class-resource
Magnum first-class-resourceMagnum first-class-resource
Magnum first-class-resourceAdrian Otto
 
Gluster Containerized Storage for Cloud Applications
Gluster Containerized Storage for Cloud ApplicationsGluster Containerized Storage for Cloud Applications
Gluster Containerized Storage for Cloud ApplicationsGluster.org
 
Persistent Storage in Openshift using GlusterFS
Persistent Storage in Openshift using GlusterFSPersistent Storage in Openshift using GlusterFS
Persistent Storage in Openshift using GlusterFSHumble Chirammal
 
Bug smash day magnum
Bug smash day magnumBug smash day magnum
Bug smash day magnumTon Ngo
 
Container (Docker) Orchestration Tools
Container (Docker) Orchestration ToolsContainer (Docker) Orchestration Tools
Container (Docker) Orchestration ToolsDhilipsiva DS
 
OpenStack Magnum
OpenStack MagnumOpenStack Magnum
OpenStack MagnumAdrian Otto
 
Elasticsearch Monitoring in Openshift
Elasticsearch Monitoring in OpenshiftElasticsearch Monitoring in Openshift
Elasticsearch Monitoring in OpenshiftLukas Vlcek
 
An Open Source Story: Open Containers & Open Communities
An Open Source Story: Open Containers & Open CommunitiesAn Open Source Story: Open Containers & Open Communities
An Open Source Story: Open Containers & Open CommunitiesPhil Estes
 
Monitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusMonitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusGrafana Labs
 
Bug smash day magnum
Bug smash day magnumBug smash day magnum
Bug smash day magnumTon Ngo
 
Kubernetes and OpenStack at Scale
Kubernetes and OpenStack at ScaleKubernetes and OpenStack at Scale
Kubernetes and OpenStack at ScaleStephen Gordon
 
Using Docker with OpenStack - Hands On!
 Using Docker with OpenStack - Hands On! Using Docker with OpenStack - Hands On!
Using Docker with OpenStack - Hands On!Adrian Otto
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to KubernetesRoss Kukulinski
 
Let's Try Every CRI Runtime Available for Kubernetes
Let's Try Every CRI Runtime Available for KubernetesLet's Try Every CRI Runtime Available for Kubernetes
Let's Try Every CRI Runtime Available for KubernetesPhil Estes
 
Extended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use casesExtended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use casesPhil Estes
 
Devoxx 2016: A Developer's Guide to OCI and runC
Devoxx 2016: A Developer's Guide to OCI and runCDevoxx 2016: A Developer's Guide to OCI and runC
Devoxx 2016: A Developer's Guide to OCI and runCPhil Estes
 
FOSDEM 2019: A containerd Project Update
FOSDEM 2019: A containerd Project UpdateFOSDEM 2019: A containerd Project Update
FOSDEM 2019: A containerd Project UpdatePhil Estes
 

Tendances (20)

Introduction to Atomic: Tailoring a Trusted OS for Containers
Introduction to Atomic: Tailoring a Trusted OS for ContainersIntroduction to Atomic: Tailoring a Trusted OS for Containers
Introduction to Atomic: Tailoring a Trusted OS for Containers
 
Thoughts on heptio's ark - Contributors Meet 21st Sept 2018
Thoughts on heptio's ark - Contributors Meet 21st Sept 2018Thoughts on heptio's ark - Contributors Meet 21st Sept 2018
Thoughts on heptio's ark - Contributors Meet 21st Sept 2018
 
Magnum first-class-resource
Magnum first-class-resourceMagnum first-class-resource
Magnum first-class-resource
 
Gluster Containerized Storage for Cloud Applications
Gluster Containerized Storage for Cloud ApplicationsGluster Containerized Storage for Cloud Applications
Gluster Containerized Storage for Cloud Applications
 
Persistent Storage in Openshift using GlusterFS
Persistent Storage in Openshift using GlusterFSPersistent Storage in Openshift using GlusterFS
Persistent Storage in Openshift using GlusterFS
 
Gluster containers!
Gluster containers!Gluster containers!
Gluster containers!
 
Bug smash day magnum
Bug smash day magnumBug smash day magnum
Bug smash day magnum
 
Container (Docker) Orchestration Tools
Container (Docker) Orchestration ToolsContainer (Docker) Orchestration Tools
Container (Docker) Orchestration Tools
 
OpenStack Magnum
OpenStack MagnumOpenStack Magnum
OpenStack Magnum
 
Elasticsearch Monitoring in Openshift
Elasticsearch Monitoring in OpenshiftElasticsearch Monitoring in Openshift
Elasticsearch Monitoring in Openshift
 
An Open Source Story: Open Containers & Open Communities
An Open Source Story: Open Containers & Open CommunitiesAn Open Source Story: Open Containers & Open Communities
An Open Source Story: Open Containers & Open Communities
 
Monitoring Kubernetes with Prometheus
Monitoring Kubernetes with PrometheusMonitoring Kubernetes with Prometheus
Monitoring Kubernetes with Prometheus
 
Bug smash day magnum
Bug smash day magnumBug smash day magnum
Bug smash day magnum
 
Kubernetes and OpenStack at Scale
Kubernetes and OpenStack at ScaleKubernetes and OpenStack at Scale
Kubernetes and OpenStack at Scale
 
Using Docker with OpenStack - Hands On!
 Using Docker with OpenStack - Hands On! Using Docker with OpenStack - Hands On!
Using Docker with OpenStack - Hands On!
 
Introduction to Kubernetes
Introduction to KubernetesIntroduction to Kubernetes
Introduction to Kubernetes
 
Let's Try Every CRI Runtime Available for Kubernetes
Let's Try Every CRI Runtime Available for KubernetesLet's Try Every CRI Runtime Available for Kubernetes
Let's Try Every CRI Runtime Available for Kubernetes
 
Extended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use casesExtended and embedding: containerd update & project use cases
Extended and embedding: containerd update & project use cases
 
Devoxx 2016: A Developer's Guide to OCI and runC
Devoxx 2016: A Developer's Guide to OCI and runCDevoxx 2016: A Developer's Guide to OCI and runC
Devoxx 2016: A Developer's Guide to OCI and runC
 
FOSDEM 2019: A containerd Project Update
FOSDEM 2019: A containerd Project UpdateFOSDEM 2019: A containerd Project Update
FOSDEM 2019: A containerd Project Update
 

Similaire à Zero downtime deployments for the Sling-based apps using Docker

Migraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sitesMigraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sitesdrupalindia
 
Mule scopes&amp;error handling
Mule scopes&amp;error handlingMule scopes&amp;error handling
Mule scopes&amp;error handlingSumit Gole
 
Node JS - A brief overview on building real-time web applications
Node JS - A brief overview on building real-time web applicationsNode JS - A brief overview on building real-time web applications
Node JS - A brief overview on building real-time web applicationsExpeed Software
 
System software module 3 presentation file
System software module 3 presentation fileSystem software module 3 presentation file
System software module 3 presentation filejithujithin657
 
System software module 3 presentation file
System software module 3 presentation fileSystem software module 3 presentation file
System software module 3 presentation filejithujithin657
 
Essential applications management with Tiny Puppet
Essential applications management with Tiny PuppetEssential applications management with Tiny Puppet
Essential applications management with Tiny PuppetAlessandro Franceschi
 
Overview of Node JS
Overview of Node JSOverview of Node JS
Overview of Node JSJacob Nelson
 
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...OpenShift Origin
 
Eclipse Training - Introduction
Eclipse Training - IntroductionEclipse Training - Introduction
Eclipse Training - IntroductionLuca D'Onofrio
 
CD in kubernetes using helm and ksonnet. Stas Kolenkin
CD in kubernetes using helm and ksonnet. Stas KolenkinCD in kubernetes using helm and ksonnet. Stas Kolenkin
CD in kubernetes using helm and ksonnet. Stas KolenkinDataArt
 
Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.jsSu Zin Kyaw
 
Tips and Tricks for the Advanced Mule Developer with Tesla and Twitter
Tips and Tricks for the Advanced Mule Developer with Tesla and Twitter Tips and Tricks for the Advanced Mule Developer with Tesla and Twitter
Tips and Tricks for the Advanced Mule Developer with Tesla and Twitter MuleSoft
 
Efficient development workflows with composer
Efficient development workflows with composerEfficient development workflows with composer
Efficient development workflows with composernuppla
 
Organizing JavaScript
Organizing JavaScriptOrganizing JavaScript
Organizing JavaScriptmcordingley
 
01 web-apps
01 web-apps01 web-apps
01 web-appssnopteck
 

Similaire à Zero downtime deployments for the Sling-based apps using Docker (20)

Migraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sitesMigraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sites
 
Java 9 Features
Java 9 FeaturesJava 9 Features
Java 9 Features
 
Mule scopes&amp;error handling
Mule scopes&amp;error handlingMule scopes&amp;error handling
Mule scopes&amp;error handling
 
Node JS - A brief overview on building real-time web applications
Node JS - A brief overview on building real-time web applicationsNode JS - A brief overview on building real-time web applications
Node JS - A brief overview on building real-time web applications
 
Node js Global Packages
Node js Global PackagesNode js Global Packages
Node js Global Packages
 
Open Dayligth usando SDN-NFV
Open Dayligth usando SDN-NFVOpen Dayligth usando SDN-NFV
Open Dayligth usando SDN-NFV
 
System software module 3 presentation file
System software module 3 presentation fileSystem software module 3 presentation file
System software module 3 presentation file
 
System software module 3 presentation file
System software module 3 presentation fileSystem software module 3 presentation file
System software module 3 presentation file
 
Essential applications management with Tiny Puppet
Essential applications management with Tiny PuppetEssential applications management with Tiny Puppet
Essential applications management with Tiny Puppet
 
Webpack: from 0 to 2
Webpack: from 0 to 2Webpack: from 0 to 2
Webpack: from 0 to 2
 
Overview of Node JS
Overview of Node JSOverview of Node JS
Overview of Node JS
 
Carbon and OSGi Deep Dive
Carbon and OSGi Deep DiveCarbon and OSGi Deep Dive
Carbon and OSGi Deep Dive
 
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...
 
Eclipse Training - Introduction
Eclipse Training - IntroductionEclipse Training - Introduction
Eclipse Training - Introduction
 
CD in kubernetes using helm and ksonnet. Stas Kolenkin
CD in kubernetes using helm and ksonnet. Stas KolenkinCD in kubernetes using helm and ksonnet. Stas Kolenkin
CD in kubernetes using helm and ksonnet. Stas Kolenkin
 
Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.js
 
Tips and Tricks for the Advanced Mule Developer with Tesla and Twitter
Tips and Tricks for the Advanced Mule Developer with Tesla and Twitter Tips and Tricks for the Advanced Mule Developer with Tesla and Twitter
Tips and Tricks for the Advanced Mule Developer with Tesla and Twitter
 
Efficient development workflows with composer
Efficient development workflows with composerEfficient development workflows with composer
Efficient development workflows with composer
 
Organizing JavaScript
Organizing JavaScriptOrganizing JavaScript
Organizing JavaScript
 
01 web-apps
01 web-apps01 web-apps
01 web-apps
 

Plus de Tomasz Rękawek

Emulating Game Boy in Java
Emulating Game Boy in JavaEmulating Game Boy in Java
Emulating Game Boy in JavaTomasz Rękawek
 
CRX2Oak - all the secrets of repository migration
CRX2Oak - all the secrets of repository migrationCRX2Oak - all the secrets of repository migration
CRX2Oak - all the secrets of repository migrationTomasz Rękawek
 
Inter-Sling communication with message queue
Inter-Sling communication with message queueInter-Sling communication with message queue
Inter-Sling communication with message queueTomasz Rękawek
 
Shooting rabbits with sling
Shooting rabbits with slingShooting rabbits with sling
Shooting rabbits with slingTomasz Rękawek
 

Plus de Tomasz Rękawek (8)

Radio ad blocker
Radio ad blockerRadio ad blocker
Radio ad blocker
 
Emulating Game Boy in Java
Emulating Game Boy in JavaEmulating Game Boy in Java
Emulating Game Boy in Java
 
CRX2Oak - all the secrets of repository migration
CRX2Oak - all the secrets of repository migrationCRX2Oak - all the secrets of repository migration
CRX2Oak - all the secrets of repository migration
 
SlingQuery
SlingQuerySlingQuery
SlingQuery
 
Code metrics
Code metricsCode metrics
Code metrics
 
Inter-Sling communication with message queue
Inter-Sling communication with message queueInter-Sling communication with message queue
Inter-Sling communication with message queue
 
Sling Dynamic Include
Sling Dynamic IncludeSling Dynamic Include
Sling Dynamic Include
 
Shooting rabbits with sling
Shooting rabbits with slingShooting rabbits with sling
Shooting rabbits with sling
 

Dernier

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 

Dernier (20)

Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 

Zero downtime deployments for the Sling-based apps using Docker

  • 1. APACHE SLING & FRIENDS TECH MEETUP BERLIN, 25-27 SEPTEMBER 2017 Robert Munteanu, Tomek Rękawek @ Adobe 0DT deployments for Sling-based apps
  • 2. Agenda ● Motivation ● Concepts ● Usage ● Demo ● Wrap-up
  • 9. Oak Composite NodeStore ● Manages a number of 1 to n NodeStores ● Always has a global NodeStore, holding the content not claimed by other NodeStores ● Multiple mounted NodeStores, owning content for certain paths, for instance /libs and /apps ● Certain paths in the global mount can be claimed by mounts – Looks for a :oak:mount- prefx in node names and matches them with mounts – Currently implemented for indexes
  • 10. Typical confguraton Note: for your viewing pleasure, not an actual config file / <default> # global mount /libs libs # read-only mount /apps libs # read-only mount Following paths also belong to the libs mount: ● /oak:index/uuid/:oak:mount-libs-index ( and others ) ● /jcr:system/rep:permissionStore/oak:mount-libs- default
  • 11. Oak composite store with Sling / AEM ● Two repositories: – /apps & /libs - stored in a separate, read-only repository-libs, – other data - stored in the normal repository (Segment, Mongo or RDB). ● The first one has to be created before starting the instance.
  • 12. Limitatons ● Mounts are always read-only – Atomic state changes non trivial to get right, fast, scalable – Write support requires additonal change to multple Oak subsystems – No observaton events generated ● Referenceable nodes are not suported in non-default NodeStores ● Versionable nodes are not supported in non-default NodeStores
  • 13. Ensuring consistency ● Mount-time checks – No versionable nodes in non-default NodeStores – No referenceable nodes in non-default NodeStoress – No duplicate entries in unique indexes amongst all NodeStores – Node type defnitons from mounts consistent with the global node type registry – Namespace usage in mounts consistent with the global namespace registry ● Run-time checks – No cross-mount references may be created at run-tme
  • 14. Applicaton-level changes ● No run-time changes under /libs or /apps – Usually fne or applicatons – More painful for testng ● Read-only status exposed via Session.hasCapability, not Session.hasPermission
  • 15. Usage
  • 16. Running instance in the composite mode ● We need to have two repositories in the composite mode: – one for the applicaton (/apps and /libs), – one for the content (everything else). ● When running the instance in the composite mode, the application part is read-only – so it's not possible to install the applicaton from the content packages, as usual. ● Therefore, using composite mode involves two-step process: – start instance without the composite node store, to create the applicaton repository, – start instance with the composite node store.
  • 17. Building and startng composite instance
  • 18. Building the composite-enabled instance ● First, the instance is started without the composite node store. ● The composite-init.jar waits until the instance is ready: – start level 30, – no indexing jobs in progress. ● Then it stops the instance. ● The created repository is renamed to repository-libs. ● It's a completely initialized repository: – /apps, /libs will be used for the composite node store mount, – other content will be used to pre-populate the default node store when running the instance.
  • 19. Startng the quickstart in composite mode ● The instance is configured with two node stores: the default one and the repository-libs. ● They are combined together with composite node store. ● If the instance is started for the first time: – the default store is empty, so the composite node store pre-populates it with the content from the repository-libs, – it copies everything except the apps-related data, – once the inital pre-populaton is done, the instance startup will carry on. ● If the instance references an existing default repository: – the startup proceeds, with the new /apps and /libs part.
  • 20. Customer applicaton integraton ● The customer application can't be installed in the instance runtime. ● It has to be integrated with the Sling/AEM code. ● Sling Provisioning Model: [artifacts startLevel=20] com.acme.site/com.acme.site.content/1.0.0/zip com.acme.site/com.acme.site.core/1.0.0 com.acme.site/com.acme.site.email/1.0.0 com.acme.site/com.acme.site.templating/1.0.0 [configurations] com.acme.site.core.AcmeService enabled=B"true" path="/home/acme"
  • 21. Composite mode with Docker ● This 2-stage process needs to be automated. ● Docker is a perfect tool for the task - it allows to encapsulate both logic and data: – Dockerfile can be used to orchestrate the required steps, – the created Docker image embedds the artfacts and repository-libs. ● A separate image for author and publish.
  • 23. Running the container ● The container uses an external storage for the non-application content. ● Either VOLUME for the TarMK or a Mongo instance. ● The /apps and /libs are served from the embedded repository-libs.
  • 27. Blue green deployments ● Now we have the whole application code enclosed in the container. ● While the other data (/content) is stored externally. ● This allows to perform a blue-green deployment. ● Blue container is the one running the older version of code. ● Without disabling it, we're creating a green container, running the newer code. ● They are both using the same content, but their /apps subtrees and bundles are different. ● Now we can switch the load balancer to point the green container. ● The blue one can be shut down.
  • 28. Incompatble content changes ● The assumption is that the green container doesn't introduce incomatible changes. ● Otherwise the blue may break. ● In AEM context: eg. no new components should be added if the older version doesn't support them. ● If the property name changes, the new version should fallback to reading the older name as well. ● If the content schema changes, a script may be used to update the content after switching the load balancer, – the new applicaton should allow to read the older schema too.
  • 29. Demo
  • 30. Zero downtme demo ● Start a Dockerized, Mongo-based AEM instance with application v1. ● Start the second container, with application v2, connecting to the same MongoDB. ● Confirm it contains a new "video" component. ● Switch the load balancer. ● Destroy the old instance.