SlideShare uma empresa Scribd logo
1 de 31
Baixar para ler offline
Using Magnolia in a Microservices Architecture
Presented by Nicolas Barbé
Broadcast on 2015-09-10
Nicolas Barbé
Software engineer and
technology enthusiast
working for Magnolia
MICROSERVICES
“Loosely coupled
service oriented architecture
with bounded contexts”
Adrian Cockcroft
Your organisation can scale
WHY DOES IT MATTER?
NOT A FREE LUNCH
Distributed systems are complex
๏ Testability
๏ Eventual consistency
๏ Operational complexity
http://highscalability.com/blog/2014/4/8/microservices-not-a-free-lunch.html
COMMON PATTERNS
REQUEST - RESPONSE
request
response
BLOCKED
one to one and synchronous
client server
This is a service
PUBLISH - SUBSCRIBE
publish
one to many and asynchronous
subscribetopic
producer
consumers
FACADE
C
Facade B
A
A facade provides an uniformed API
abstracting several underlying services
Request
PROXY
C
proxy B
A
A proxy delegates a request to one of the
underlying services
Request
CRUD
Create / Read / Update / Delete
Straightforward mapping to DB operators but
does not perform well with task based UI
CQRS
Different models for queries and commands
Commands Queries
ROLE OF MAGNOLIA
๏ Editorial Content - Magnolia
๏ Dynamic or User Generated Content
๏ Content & Business Logic - Microservices
๏ Frontend - Magnolia
๏ Backend - Magnolia
MAGNOLIA ASK
A proof of concept of a Q&A website like stack-overflow
WHICH SERVICES?
References must be checked
- Question / Answer
- Question / User
- Answer / User
- Rating / Answer
- Rating / Question
Users have only one vote
Answers are single threaded
USERS
QUESTIONS ANSWERS
RATINGS
ARCHITECTURE
USERS-COMMANDS
users
RATINGS-COMMANDS
ANSWERS-COMMANDS
QUESTIONS-COMMANDS
USERS-QUERIES
votes
questions
answers
QUESTIONS-QUERIES
ANSWERS-QUERIES
pub
pub
pub
pub
sub
sub
sub
sub
sub
sub
sub
sub
sub
req/res
req/res
sub
Magnolia
req/res
req/res
req/res
ANATOMY OF A MICROSERVICE
Commands Queries
QUESTIONS
‣ AskQuestion
‣ CloseQuestion
{
title: Eget lacinia odio sem nec
elit?
description: Cum sociis natoque
penatibus et magnis dis
parturient ontes, nascetur
ridiculus mus.
initiator: nbarbe
createdAt: 2015-08-14T14:45:43

closed: false
}
‣ ListQuestions
‣ ShowQuestion
{
title: Eget lacinia odio sem nec
elit?
description: Cum sociis natoque
penatibus et magnis dis
parturient ontes, nascetur
ridiculus mus.
initiator: Nicolas Barbé
createdAt: 2015-08-14T14:45:43
closed: false
votes: 12
answers: 3
answersBucketId: fh34t738
}
DEEP DIVE IN THE IMPLEMENTATION
CONTAINERS
Additional layer of abstraction and
automation of an OS
CONTAINERS OR VM?
Actually both !
Virtual machine for the hosts
Containers for the microservices
CONTAINER = MICROSERVICE
๏ Clear Boundaries
๏ Reproducible Builds
๏ Network Plumbing
๏ From Dev to Prod to
Dev
๏ Uniform Operations
- Packaging
- Distribution
- Deployment / Upgrade
- Backup / Restore
- Monitoring
- Logging
- Snaphots
DOCKERIZE MAGNOLIA
$ echo 
'FROM nicolasbarbe/magnolia-base
MAINTAINER Nicolas Barbé "https://github.com/nicolasbarbe"
RUN wget -nv http://sourceforge.net/projects/magnolia/files/
magnolia/Magnolia%20CE%205.4.2/magnolia-bundled-
webapp-5.4.2.war/download?use_mirror=autoselect -O
$CATALINA_BASE/webapps/ROOT.war' > Dockerfile
$ docker build -t magnolia .
$ docker run -p 3000:8080 magnolia
TIPS & TRICKS
๏ Follows the recommendations of
the Filesystem Hierarchy Standard
๏ Configuration through
environment variables
- INSTANCE_TYPE
- DB_TYPE
- DB_SCHEMA
- DB_USERNAME
- DB_PASSWORD
- DEVELOP_MODE
- CLUSTER_ID
๏ Tomcat & JVM settings can be
customised
COPY setenv.sh $CATALINA_BASE/bin/setenv.sh
๏ Map a volume from the host to the
container to persist the JCR
repository
-v /var/lib/magnolia/repositories:/var/lib/
magnolia/repositories
๏ Map a volume from the host to the
container for the resources
-v $MAGNOLIA_WEB_RESOURCES:/var/opt/magnolia
MORE INFORMATION
http://nicolasbarbe.com/2015/01/02/a-docker-image-for-magnolia/
FROM DEV …
Build a clone of the production environment locally with Docker Compose
db-author:
image: postgres
environment:
- POSTGRES_USER=magnolia
- POSTGRES_PASSWORD=mysecretpassword
author:
image: nicolasbarbe/ms-frontend:1.0-SNAPSHOT
command: run
ports:
- "3000:8080"
links:
- db-author:db
environment:
- INSTANCE_TYPE=author
- DB_TYPE=postgresql
- DB_ADDRESS=db
- DB_PORT=5432
- DB_SCHEMA=magnolia
- DB_USERNAME=magnolia
- DB_PASSWORD=mysecretpassword
Create a new container for
the database
Create a network link between
the database and magnolia
Create another container for Magnolia
Configure the instance as an author
and to use the postgresql driver
Thanks to the link, we don’t have to specify the
database IP address
… TO PROD
๏ Use a full Docker stack
- Reuse the same Docker Compose definition
- If the architectures are slightly different use extends keyword
- Use Docker Swarm to deploy on multiple hosts
- Use Docker Machine to provision the hosts
๏ But, wait, Docker Compose/Swarm are still in Beta
- Use Kubernetes if you want a cluster with dynamic provisioning and hosts allocation
- Use Ansible if you want static hosts provisioning and allocation (see my blog post*)
๏ In all cases use the same Docker Images !
* http://nicolasbarbe.com/2015/07/13/magnolia-devops-automate-deployment/
SERVICE DISCOVERY
Build a Service Registry to let Magnolia discovers the services automatically
The Service Registry
- Defines microservices in a YAML file
- Discovers the services through
environment variables, Java system
properties, from the JCR or by value
- Injects services in the templates
- Provides a generic connector to
build dedicated content apps in
YAML
services:
questions:
connection:
host: QUESTIONS_QUERIES_HOST
port: QUESTIONS_QUERIES_PORT
type: env
apiVersion: v1
resource:
name: question
properties:
- name: id
type: Integer
- name: title
type: String
- name: description
https://github.com/nicolasbarbe/magnolia-http-utils
DISPLAYING CONTENT
[#assign id=ctx.getParameter("id")]
[#assign question=httpfn.service("question").GET(id)]
<div class="row">
<h2>${question.title}</h2>
<h4>${question.initiator}</h4>
<p class="lead">
${question.description}
</p>
<div class="pull-right">Asked ${question.createdAt?datetime?date}</div>
</div>
MANAGING CONTENT
Presenters uses
Query side
Actions connect to the
Command side
HTTPS://GITHUB.COM/NICOLASBARBE/MAGNOLIA-ASK
QUESTIONS?

Mais conteúdo relacionado

Mais procurados

Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Megan O'Keefe
 
Kubernetes architecture
Kubernetes architectureKubernetes architecture
Kubernetes architectureJanakiram MSV
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopBob Killen
 
Aks pimarox from zero to hero
Aks pimarox from zero to heroAks pimarox from zero to hero
Aks pimarox from zero to heroJohan Biere
 
Deep dive into Kubernetes Networking
Deep dive into Kubernetes NetworkingDeep dive into Kubernetes Networking
Deep dive into Kubernetes NetworkingSreenivas Makam
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideBytemark
 
Getting Started with Kubernetes
Getting Started with Kubernetes Getting Started with Kubernetes
Getting Started with Kubernetes VMware Tanzu
 
Kubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive OverviewKubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive OverviewBob Killen
 
Best Practices with Azure Kubernetes Services
Best Practices with Azure Kubernetes ServicesBest Practices with Azure Kubernetes Services
Best Practices with Azure Kubernetes ServicesQAware GmbH
 
Kubernetes presentation
Kubernetes presentationKubernetes presentation
Kubernetes presentationGauranG Bajpai
 
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...Jitendra Bafna
 
Devops & Configuration management tools
Devops & Configuration management toolsDevops & Configuration management tools
Devops & Configuration management toolsSonu Meena
 
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Edureka!
 
DevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesDevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesRonny Trommer
 
Alphorm.com Formation Kubernetes : Installation et Configuration
Alphorm.com Formation Kubernetes : Installation et ConfigurationAlphorm.com Formation Kubernetes : Installation et Configuration
Alphorm.com Formation Kubernetes : Installation et ConfigurationAlphorm
 
Kubernetes - introduction
Kubernetes - introductionKubernetes - introduction
Kubernetes - introductionSparkbit
 
Containerized Applications Overview
Containerized Applications OverviewContainerized Applications Overview
Containerized Applications OverviewApoorv Anand
 

Mais procurados (20)

Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)Kubernetes: A Short Introduction (2019)
Kubernetes: A Short Introduction (2019)
 
Kubernetes architecture
Kubernetes architectureKubernetes architecture
Kubernetes architecture
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
 
Docker
DockerDocker
Docker
 
Aks pimarox from zero to hero
Aks pimarox from zero to heroAks pimarox from zero to hero
Aks pimarox from zero to hero
 
Deep dive into Kubernetes Networking
Deep dive into Kubernetes NetworkingDeep dive into Kubernetes Networking
Deep dive into Kubernetes Networking
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory Guide
 
Getting Started with Kubernetes
Getting Started with Kubernetes Getting Started with Kubernetes
Getting Started with Kubernetes
 
Kubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive OverviewKubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive Overview
 
Azure AKS
Azure AKSAzure AKS
Azure AKS
 
AKS
AKSAKS
AKS
 
Best Practices with Azure Kubernetes Services
Best Practices with Azure Kubernetes ServicesBest Practices with Azure Kubernetes Services
Best Practices with Azure Kubernetes Services
 
Kubernetes presentation
Kubernetes presentationKubernetes presentation
Kubernetes presentation
 
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
MuleSoft Surat Virtual Meetup#21 - MuleSoft API and RAML Design Best Practice...
 
Devops & Configuration management tools
Devops & Configuration management toolsDevops & Configuration management tools
Devops & Configuration management tools
 
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
 
DevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to KubernetesDevJam 2019 - Introduction to Kubernetes
DevJam 2019 - Introduction to Kubernetes
 
Alphorm.com Formation Kubernetes : Installation et Configuration
Alphorm.com Formation Kubernetes : Installation et ConfigurationAlphorm.com Formation Kubernetes : Installation et Configuration
Alphorm.com Formation Kubernetes : Installation et Configuration
 
Kubernetes - introduction
Kubernetes - introductionKubernetes - introduction
Kubernetes - introduction
 
Containerized Applications Overview
Containerized Applications OverviewContainerized Applications Overview
Containerized Applications Overview
 

Destaque

Magnolia CMS 5.0 - Architecture
Magnolia CMS 5.0 - ArchitectureMagnolia CMS 5.0 - Architecture
Magnolia CMS 5.0 - ArchitecturePhilipp Bärfuss
 
Magnolia Conference 2015 - Pascal Mangold's keynote
Magnolia Conference 2015 - Pascal Mangold's keynoteMagnolia Conference 2015 - Pascal Mangold's keynote
Magnolia Conference 2015 - Pascal Mangold's keynoteMagnolia
 
Customer Engagement in the Digital Era
Customer Engagement in the Digital EraCustomer Engagement in the Digital Era
Customer Engagement in the Digital EraMagnolia
 
Get the Maximum Out of Your Magnolia Workflow
Get the Maximum Out of Your Magnolia WorkflowGet the Maximum Out of Your Magnolia Workflow
Get the Maximum Out of Your Magnolia WorkflowMagnolia
 
Developing Magnolia based sites correctly, quickly and efficiently
Developing Magnolia based sites correctly, quickly and efficientlyDeveloping Magnolia based sites correctly, quickly and efficiently
Developing Magnolia based sites correctly, quickly and efficientlyMagnolia
 
Product keynote - introducing Magnolia 5.4
Product keynote - introducing Magnolia 5.4Product keynote - introducing Magnolia 5.4
Product keynote - introducing Magnolia 5.4Magnolia
 
Spring and Web Content Management
Spring and Web Content ManagementSpring and Web Content Management
Spring and Web Content ManagementZak Greant
 
Spring first in Magnolia CMS - Spring I/O 2015
Spring first in Magnolia CMS - Spring I/O 2015Spring first in Magnolia CMS - Spring I/O 2015
Spring first in Magnolia CMS - Spring I/O 2015Tobias Mattsson
 
Integrating e-Commerce into your Customer Experience
Integrating e-Commerce into your Customer ExperienceIntegrating e-Commerce into your Customer Experience
Integrating e-Commerce into your Customer ExperienceMagnolia
 
The Age of the IOT & Digital Business
The Age of the IOT & Digital BusinessThe Age of the IOT & Digital Business
The Age of the IOT & Digital BusinessMagnolia
 

Destaque (10)

Magnolia CMS 5.0 - Architecture
Magnolia CMS 5.0 - ArchitectureMagnolia CMS 5.0 - Architecture
Magnolia CMS 5.0 - Architecture
 
Magnolia Conference 2015 - Pascal Mangold's keynote
Magnolia Conference 2015 - Pascal Mangold's keynoteMagnolia Conference 2015 - Pascal Mangold's keynote
Magnolia Conference 2015 - Pascal Mangold's keynote
 
Customer Engagement in the Digital Era
Customer Engagement in the Digital EraCustomer Engagement in the Digital Era
Customer Engagement in the Digital Era
 
Get the Maximum Out of Your Magnolia Workflow
Get the Maximum Out of Your Magnolia WorkflowGet the Maximum Out of Your Magnolia Workflow
Get the Maximum Out of Your Magnolia Workflow
 
Developing Magnolia based sites correctly, quickly and efficiently
Developing Magnolia based sites correctly, quickly and efficientlyDeveloping Magnolia based sites correctly, quickly and efficiently
Developing Magnolia based sites correctly, quickly and efficiently
 
Product keynote - introducing Magnolia 5.4
Product keynote - introducing Magnolia 5.4Product keynote - introducing Magnolia 5.4
Product keynote - introducing Magnolia 5.4
 
Spring and Web Content Management
Spring and Web Content ManagementSpring and Web Content Management
Spring and Web Content Management
 
Spring first in Magnolia CMS - Spring I/O 2015
Spring first in Magnolia CMS - Spring I/O 2015Spring first in Magnolia CMS - Spring I/O 2015
Spring first in Magnolia CMS - Spring I/O 2015
 
Integrating e-Commerce into your Customer Experience
Integrating e-Commerce into your Customer ExperienceIntegrating e-Commerce into your Customer Experience
Integrating e-Commerce into your Customer Experience
 
The Age of the IOT & Digital Business
The Age of the IOT & Digital BusinessThe Age of the IOT & Digital Business
The Age of the IOT & Digital Business
 

Semelhante a Using Magnolia in a Microservices Architecture

CA Performance Manager Agility by using Docker Containers for Network Manag...
CA Performance Manager Agility by using Docker Containers for Network Manag...CA Performance Manager Agility by using Docker Containers for Network Manag...
CA Performance Manager Agility by using Docker Containers for Network Manag...CA Technologies
 
DCEU 18: App-in-a-Box with Docker Application Packages
DCEU 18: App-in-a-Box with Docker Application PackagesDCEU 18: App-in-a-Box with Docker Application Packages
DCEU 18: App-in-a-Box with Docker Application PackagesDocker, Inc.
 
Why Kubernetes? Cloud Native and Developer Experience at Zalando - Enterprise...
Why Kubernetes? Cloud Native and Developer Experience at Zalando - Enterprise...Why Kubernetes? Cloud Native and Developer Experience at Zalando - Enterprise...
Why Kubernetes? Cloud Native and Developer Experience at Zalando - Enterprise...Henning Jacobs
 
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...Wojciech Barczyński
 
Running Magnolia on Jelastic Cloud Hosting
Running Magnolia on Jelastic Cloud HostingRunning Magnolia on Jelastic Cloud Hosting
Running Magnolia on Jelastic Cloud HostingMagnolia
 
Magnolia CMS on Jelastic
Magnolia CMS on JelasticMagnolia CMS on Jelastic
Magnolia CMS on JelasticEdgar Vonk
 
Magnolia CMS - on Jelastic
Magnolia CMS - on JelasticMagnolia CMS - on Jelastic
Magnolia CMS - on JelasticInfo.nl
 
'DOCKER' & CLOUD: ENABLERS For DEVOPS
'DOCKER' & CLOUD:  ENABLERS For DEVOPS'DOCKER' & CLOUD:  ENABLERS For DEVOPS
'DOCKER' & CLOUD: ENABLERS For DEVOPSACA IT-Solutions
 
Docker and Cloud - Enables for DevOps - by ACA-IT
Docker and Cloud - Enables for DevOps - by ACA-ITDocker and Cloud - Enables for DevOps - by ACA-IT
Docker and Cloud - Enables for DevOps - by ACA-ITStijn Wijndaele
 
The path to a serverless-native era with Kubernetes
The path to a serverless-native era with KubernetesThe path to a serverless-native era with Kubernetes
The path to a serverless-native era with Kubernetessparkfabrik
 
Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015Chris Ciborowski
 
Velocity NYC 2016 - Containers @ Netflix
Velocity NYC 2016 - Containers @ NetflixVelocity NYC 2016 - Containers @ Netflix
Velocity NYC 2016 - Containers @ Netflixaspyker
 
High available BizTalk infrastructure on Azure IaaS
High available BizTalk infrastructure on Azure IaaSHigh available BizTalk infrastructure on Azure IaaS
High available BizTalk infrastructure on Azure IaaSBizTalk360
 
TransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MSTransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MSLana Kalashnyk
 
Automating the VMware Virtual Datacenter
Automating the VMware Virtual DatacenterAutomating the VMware Virtual Datacenter
Automating the VMware Virtual DatacenterJosh Atwell
 
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex GervaisAmbassador Labs
 
Prod-Like Integration Testing for Distributed Containerized Applications
Prod-Like Integration Testing for Distributed Containerized ApplicationsProd-Like Integration Testing for Distributed Containerized Applications
Prod-Like Integration Testing for Distributed Containerized ApplicationsVMware Tanzu
 
How to Train Your Docker Cloud
How to Train Your Docker CloudHow to Train Your Docker Cloud
How to Train Your Docker CloudC4Media
 
Deep-dive into APIs in a Microservice Architecture
Deep-dive into APIs in a Microservice ArchitectureDeep-dive into APIs in a Microservice Architecture
Deep-dive into APIs in a Microservice ArchitectureWSO2
 
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech Talk
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech TalkCloud-Native Modernization or Death? A false dichotomy. | DevNation Tech Talk
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech TalkRed Hat Developers
 

Semelhante a Using Magnolia in a Microservices Architecture (20)

CA Performance Manager Agility by using Docker Containers for Network Manag...
CA Performance Manager Agility by using Docker Containers for Network Manag...CA Performance Manager Agility by using Docker Containers for Network Manag...
CA Performance Manager Agility by using Docker Containers for Network Manag...
 
DCEU 18: App-in-a-Box with Docker Application Packages
DCEU 18: App-in-a-Box with Docker Application PackagesDCEU 18: App-in-a-Box with Docker Application Packages
DCEU 18: App-in-a-Box with Docker Application Packages
 
Why Kubernetes? Cloud Native and Developer Experience at Zalando - Enterprise...
Why Kubernetes? Cloud Native and Developer Experience at Zalando - Enterprise...Why Kubernetes? Cloud Native and Developer Experience at Zalando - Enterprise...
Why Kubernetes? Cloud Native and Developer Experience at Zalando - Enterprise...
 
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
Effective Kubernetes - Is Kubernetes the new Linux? Is the new Application Se...
 
Running Magnolia on Jelastic Cloud Hosting
Running Magnolia on Jelastic Cloud HostingRunning Magnolia on Jelastic Cloud Hosting
Running Magnolia on Jelastic Cloud Hosting
 
Magnolia CMS on Jelastic
Magnolia CMS on JelasticMagnolia CMS on Jelastic
Magnolia CMS on Jelastic
 
Magnolia CMS - on Jelastic
Magnolia CMS - on JelasticMagnolia CMS - on Jelastic
Magnolia CMS - on Jelastic
 
'DOCKER' & CLOUD: ENABLERS For DEVOPS
'DOCKER' & CLOUD:  ENABLERS For DEVOPS'DOCKER' & CLOUD:  ENABLERS For DEVOPS
'DOCKER' & CLOUD: ENABLERS For DEVOPS
 
Docker and Cloud - Enables for DevOps - by ACA-IT
Docker and Cloud - Enables for DevOps - by ACA-ITDocker and Cloud - Enables for DevOps - by ACA-IT
Docker and Cloud - Enables for DevOps - by ACA-IT
 
The path to a serverless-native era with Kubernetes
The path to a serverless-native era with KubernetesThe path to a serverless-native era with Kubernetes
The path to a serverless-native era with Kubernetes
 
Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015Nebulaworks Docker Overview 09-22-2015
Nebulaworks Docker Overview 09-22-2015
 
Velocity NYC 2016 - Containers @ Netflix
Velocity NYC 2016 - Containers @ NetflixVelocity NYC 2016 - Containers @ Netflix
Velocity NYC 2016 - Containers @ Netflix
 
High available BizTalk infrastructure on Azure IaaS
High available BizTalk infrastructure on Azure IaaSHigh available BizTalk infrastructure on Azure IaaS
High available BizTalk infrastructure on Azure IaaS
 
TransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MSTransitioningToMicroServonDocker_MS
TransitioningToMicroServonDocker_MS
 
Automating the VMware Virtual Datacenter
Automating the VMware Virtual DatacenterAutomating the VMware Virtual Datacenter
Automating the VMware Virtual Datacenter
 
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais
[Confoo Montreal 2020] Build Your Own Serverless with Knative - Alex Gervais
 
Prod-Like Integration Testing for Distributed Containerized Applications
Prod-Like Integration Testing for Distributed Containerized ApplicationsProd-Like Integration Testing for Distributed Containerized Applications
Prod-Like Integration Testing for Distributed Containerized Applications
 
How to Train Your Docker Cloud
How to Train Your Docker CloudHow to Train Your Docker Cloud
How to Train Your Docker Cloud
 
Deep-dive into APIs in a Microservice Architecture
Deep-dive into APIs in a Microservice ArchitectureDeep-dive into APIs in a Microservice Architecture
Deep-dive into APIs in a Microservice Architecture
 
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech Talk
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech TalkCloud-Native Modernization or Death? A false dichotomy. | DevNation Tech Talk
Cloud-Native Modernization or Death? A false dichotomy. | DevNation Tech Talk
 

Mais de Magnolia

The SEO Workflow
The SEO WorkflowThe SEO Workflow
The SEO WorkflowMagnolia
 
Magnolia 6 release walkthrough
Magnolia 6 release walkthroughMagnolia 6 release walkthrough
Magnolia 6 release walkthroughMagnolia
 
Buzzword bingo: The real deal behind omnichannel, personalization and headless
Buzzword bingo: The real deal behind  omnichannel, personalization and headlessBuzzword bingo: The real deal behind  omnichannel, personalization and headless
Buzzword bingo: The real deal behind omnichannel, personalization and headlessMagnolia
 
A modern front end development workflow for Magnolia at Atlassian
A modern front end development workflow for Magnolia at AtlassianA modern front end development workflow for Magnolia at Atlassian
A modern front end development workflow for Magnolia at AtlassianMagnolia
 
Launching Magnolia on demand
Launching Magnolia on demandLaunching Magnolia on demand
Launching Magnolia on demandMagnolia
 
Front-end developers - build Magnolia sites faster
Front-end developers - build Magnolia sites fasterFront-end developers - build Magnolia sites faster
Front-end developers - build Magnolia sites fasterMagnolia
 
Magnolia and beacons: how do they work best together?
Magnolia and beacons: how do they work best together?Magnolia and beacons: how do they work best together?
Magnolia and beacons: how do they work best together?Magnolia
 
Magnolia and the IOT
Magnolia and the IOTMagnolia and the IOT
Magnolia and the IOTMagnolia
 
Internationalization for globalized enterprise websites
Internationalization for globalized enterprise websitesInternationalization for globalized enterprise websites
Internationalization for globalized enterprise websitesMagnolia
 
The new visana website how to fit a square peg into a round hole
The new visana website   how to fit a square peg into a round holeThe new visana website   how to fit a square peg into a round hole
The new visana website how to fit a square peg into a round holeMagnolia
 
Solving for complex UI designs: a front-end perspective and approach
Solving for complex UI designs: a front-end perspective and approachSolving for complex UI designs: a front-end perspective and approach
Solving for complex UI designs: a front-end perspective and approachMagnolia
 
Extending Magnolia with our solutions
Extending Magnolia with our solutionsExtending Magnolia with our solutions
Extending Magnolia with our solutionsMagnolia
 
Boost your online e commerce with magnolia
Boost your online e commerce with magnoliaBoost your online e commerce with magnolia
Boost your online e commerce with magnoliaMagnolia
 
The slick YAML based configuration by file in Magnolia 5.4
The slick YAML based configuration by file in Magnolia 5.4The slick YAML based configuration by file in Magnolia 5.4
The slick YAML based configuration by file in Magnolia 5.4Magnolia
 
Seamless integration with Magnolia's REST API
Seamless integration with Magnolia's REST APISeamless integration with Magnolia's REST API
Seamless integration with Magnolia's REST APIMagnolia
 
Dynamic page caching for Magnolia 5.4
Dynamic page caching for Magnolia 5.4Dynamic page caching for Magnolia 5.4
Dynamic page caching for Magnolia 5.4Magnolia
 
An integrated, fail safe e-business platform based on open source solutions
An integrated, fail safe e-business platform based on open source solutionsAn integrated, fail safe e-business platform based on open source solutions
An integrated, fail safe e-business platform based on open source solutionsMagnolia
 
Magnolia conference 2015 - Boris Kraft's keynote
Magnolia conference 2015 - Boris Kraft's keynoteMagnolia conference 2015 - Boris Kraft's keynote
Magnolia conference 2015 - Boris Kraft's keynoteMagnolia
 
From business requirements to the development of magnolia cms.com - personali...
From business requirements to the development of magnolia cms.com - personali...From business requirements to the development of magnolia cms.com - personali...
From business requirements to the development of magnolia cms.com - personali...Magnolia
 
Building on Magnolia's personalization
Building on Magnolia's personalizationBuilding on Magnolia's personalization
Building on Magnolia's personalizationMagnolia
 

Mais de Magnolia (20)

The SEO Workflow
The SEO WorkflowThe SEO Workflow
The SEO Workflow
 
Magnolia 6 release walkthrough
Magnolia 6 release walkthroughMagnolia 6 release walkthrough
Magnolia 6 release walkthrough
 
Buzzword bingo: The real deal behind omnichannel, personalization and headless
Buzzword bingo: The real deal behind  omnichannel, personalization and headlessBuzzword bingo: The real deal behind  omnichannel, personalization and headless
Buzzword bingo: The real deal behind omnichannel, personalization and headless
 
A modern front end development workflow for Magnolia at Atlassian
A modern front end development workflow for Magnolia at AtlassianA modern front end development workflow for Magnolia at Atlassian
A modern front end development workflow for Magnolia at Atlassian
 
Launching Magnolia on demand
Launching Magnolia on demandLaunching Magnolia on demand
Launching Magnolia on demand
 
Front-end developers - build Magnolia sites faster
Front-end developers - build Magnolia sites fasterFront-end developers - build Magnolia sites faster
Front-end developers - build Magnolia sites faster
 
Magnolia and beacons: how do they work best together?
Magnolia and beacons: how do they work best together?Magnolia and beacons: how do they work best together?
Magnolia and beacons: how do they work best together?
 
Magnolia and the IOT
Magnolia and the IOTMagnolia and the IOT
Magnolia and the IOT
 
Internationalization for globalized enterprise websites
Internationalization for globalized enterprise websitesInternationalization for globalized enterprise websites
Internationalization for globalized enterprise websites
 
The new visana website how to fit a square peg into a round hole
The new visana website   how to fit a square peg into a round holeThe new visana website   how to fit a square peg into a round hole
The new visana website how to fit a square peg into a round hole
 
Solving for complex UI designs: a front-end perspective and approach
Solving for complex UI designs: a front-end perspective and approachSolving for complex UI designs: a front-end perspective and approach
Solving for complex UI designs: a front-end perspective and approach
 
Extending Magnolia with our solutions
Extending Magnolia with our solutionsExtending Magnolia with our solutions
Extending Magnolia with our solutions
 
Boost your online e commerce with magnolia
Boost your online e commerce with magnoliaBoost your online e commerce with magnolia
Boost your online e commerce with magnolia
 
The slick YAML based configuration by file in Magnolia 5.4
The slick YAML based configuration by file in Magnolia 5.4The slick YAML based configuration by file in Magnolia 5.4
The slick YAML based configuration by file in Magnolia 5.4
 
Seamless integration with Magnolia's REST API
Seamless integration with Magnolia's REST APISeamless integration with Magnolia's REST API
Seamless integration with Magnolia's REST API
 
Dynamic page caching for Magnolia 5.4
Dynamic page caching for Magnolia 5.4Dynamic page caching for Magnolia 5.4
Dynamic page caching for Magnolia 5.4
 
An integrated, fail safe e-business platform based on open source solutions
An integrated, fail safe e-business platform based on open source solutionsAn integrated, fail safe e-business platform based on open source solutions
An integrated, fail safe e-business platform based on open source solutions
 
Magnolia conference 2015 - Boris Kraft's keynote
Magnolia conference 2015 - Boris Kraft's keynoteMagnolia conference 2015 - Boris Kraft's keynote
Magnolia conference 2015 - Boris Kraft's keynote
 
From business requirements to the development of magnolia cms.com - personali...
From business requirements to the development of magnolia cms.com - personali...From business requirements to the development of magnolia cms.com - personali...
From business requirements to the development of magnolia cms.com - personali...
 
Building on Magnolia's personalization
Building on Magnolia's personalizationBuilding on Magnolia's personalization
Building on Magnolia's personalization
 

Último

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Último (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

Using Magnolia in a Microservices Architecture

  • 1. Using Magnolia in a Microservices Architecture Presented by Nicolas Barbé Broadcast on 2015-09-10
  • 2. Nicolas Barbé Software engineer and technology enthusiast working for Magnolia
  • 3. MICROSERVICES “Loosely coupled service oriented architecture with bounded contexts” Adrian Cockcroft
  • 4. Your organisation can scale WHY DOES IT MATTER?
  • 5. NOT A FREE LUNCH Distributed systems are complex ๏ Testability ๏ Eventual consistency ๏ Operational complexity http://highscalability.com/blog/2014/4/8/microservices-not-a-free-lunch.html
  • 7. REQUEST - RESPONSE request response BLOCKED one to one and synchronous client server This is a service
  • 8. PUBLISH - SUBSCRIBE publish one to many and asynchronous subscribetopic producer consumers
  • 9. FACADE C Facade B A A facade provides an uniformed API abstracting several underlying services Request
  • 10. PROXY C proxy B A A proxy delegates a request to one of the underlying services Request
  • 11. CRUD Create / Read / Update / Delete Straightforward mapping to DB operators but does not perform well with task based UI
  • 12. CQRS Different models for queries and commands Commands Queries
  • 13. ROLE OF MAGNOLIA ๏ Editorial Content - Magnolia ๏ Dynamic or User Generated Content ๏ Content & Business Logic - Microservices ๏ Frontend - Magnolia ๏ Backend - Magnolia
  • 14. MAGNOLIA ASK A proof of concept of a Q&A website like stack-overflow
  • 15. WHICH SERVICES? References must be checked - Question / Answer - Question / User - Answer / User - Rating / Answer - Rating / Question Users have only one vote Answers are single threaded USERS QUESTIONS ANSWERS RATINGS
  • 17. ANATOMY OF A MICROSERVICE Commands Queries QUESTIONS ‣ AskQuestion ‣ CloseQuestion { title: Eget lacinia odio sem nec elit? description: Cum sociis natoque penatibus et magnis dis parturient ontes, nascetur ridiculus mus. initiator: nbarbe createdAt: 2015-08-14T14:45:43
 closed: false } ‣ ListQuestions ‣ ShowQuestion { title: Eget lacinia odio sem nec elit? description: Cum sociis natoque penatibus et magnis dis parturient ontes, nascetur ridiculus mus. initiator: Nicolas Barbé createdAt: 2015-08-14T14:45:43 closed: false votes: 12 answers: 3 answersBucketId: fh34t738 }
  • 18. DEEP DIVE IN THE IMPLEMENTATION
  • 19. CONTAINERS Additional layer of abstraction and automation of an OS
  • 20. CONTAINERS OR VM? Actually both ! Virtual machine for the hosts Containers for the microservices
  • 21. CONTAINER = MICROSERVICE ๏ Clear Boundaries ๏ Reproducible Builds ๏ Network Plumbing ๏ From Dev to Prod to Dev ๏ Uniform Operations - Packaging - Distribution - Deployment / Upgrade - Backup / Restore - Monitoring - Logging - Snaphots
  • 22. DOCKERIZE MAGNOLIA $ echo 'FROM nicolasbarbe/magnolia-base MAINTAINER Nicolas Barbé "https://github.com/nicolasbarbe" RUN wget -nv http://sourceforge.net/projects/magnolia/files/ magnolia/Magnolia%20CE%205.4.2/magnolia-bundled- webapp-5.4.2.war/download?use_mirror=autoselect -O $CATALINA_BASE/webapps/ROOT.war' > Dockerfile $ docker build -t magnolia . $ docker run -p 3000:8080 magnolia
  • 23. TIPS & TRICKS ๏ Follows the recommendations of the Filesystem Hierarchy Standard ๏ Configuration through environment variables - INSTANCE_TYPE - DB_TYPE - DB_SCHEMA - DB_USERNAME - DB_PASSWORD - DEVELOP_MODE - CLUSTER_ID ๏ Tomcat & JVM settings can be customised COPY setenv.sh $CATALINA_BASE/bin/setenv.sh ๏ Map a volume from the host to the container to persist the JCR repository -v /var/lib/magnolia/repositories:/var/lib/ magnolia/repositories ๏ Map a volume from the host to the container for the resources -v $MAGNOLIA_WEB_RESOURCES:/var/opt/magnolia
  • 25. FROM DEV … Build a clone of the production environment locally with Docker Compose db-author: image: postgres environment: - POSTGRES_USER=magnolia - POSTGRES_PASSWORD=mysecretpassword author: image: nicolasbarbe/ms-frontend:1.0-SNAPSHOT command: run ports: - "3000:8080" links: - db-author:db environment: - INSTANCE_TYPE=author - DB_TYPE=postgresql - DB_ADDRESS=db - DB_PORT=5432 - DB_SCHEMA=magnolia - DB_USERNAME=magnolia - DB_PASSWORD=mysecretpassword Create a new container for the database Create a network link between the database and magnolia Create another container for Magnolia Configure the instance as an author and to use the postgresql driver Thanks to the link, we don’t have to specify the database IP address
  • 26. … TO PROD ๏ Use a full Docker stack - Reuse the same Docker Compose definition - If the architectures are slightly different use extends keyword - Use Docker Swarm to deploy on multiple hosts - Use Docker Machine to provision the hosts ๏ But, wait, Docker Compose/Swarm are still in Beta - Use Kubernetes if you want a cluster with dynamic provisioning and hosts allocation - Use Ansible if you want static hosts provisioning and allocation (see my blog post*) ๏ In all cases use the same Docker Images ! * http://nicolasbarbe.com/2015/07/13/magnolia-devops-automate-deployment/
  • 27. SERVICE DISCOVERY Build a Service Registry to let Magnolia discovers the services automatically The Service Registry - Defines microservices in a YAML file - Discovers the services through environment variables, Java system properties, from the JCR or by value - Injects services in the templates - Provides a generic connector to build dedicated content apps in YAML services: questions: connection: host: QUESTIONS_QUERIES_HOST port: QUESTIONS_QUERIES_PORT type: env apiVersion: v1 resource: name: question properties: - name: id type: Integer - name: title type: String - name: description https://github.com/nicolasbarbe/magnolia-http-utils
  • 28. DISPLAYING CONTENT [#assign id=ctx.getParameter("id")] [#assign question=httpfn.service("question").GET(id)] <div class="row"> <h2>${question.title}</h2> <h4>${question.initiator}</h4> <p class="lead"> ${question.description} </p> <div class="pull-right">Asked ${question.createdAt?datetime?date}</div> </div>
  • 29. MANAGING CONTENT Presenters uses Query side Actions connect to the Command side