SlideShare a Scribd company logo
1 of 40
Visuel à insérer ici
EZ CONFERENCE 2016
PARIS
Managing Changes to the Database Across the
Project Life Cycle
WHO AM I
The short version
• « the guy who has written a lot of answers
on the eZPublish forums »
• Working at Kaliop in London since 2014
• Principal consultant at eZ Systems for 7 years
• Love coffee and bicycles ?
• @gggeek
VOTRE SCHEMA
WHAT THIS TALK IS ABOUT
The short version, too
Database vs. cms vs. the project
lifecycle
01
Project life cycle
• Development
• Testing
• Maintenance
Development phase
• Only one source of data: the “dev” db
• Size of data set is generally small
• Changes to content structure are frequent
• Developers need to share the database (mostly the structure)
Testing phase
• Two sources of data: the “dev” and “test” db
• Size of data set can be small or not
• Changes to content structure are less frequent
• Developers need to share the dev database
• Controlled releases of changes from dev to test
• The bulk of test “content” is not overwritten
Maintenance phase
• 3 (or more) sources of data: the “dev”, “test” and “prod” db
• Size of data set can be large
• Changes to content structure are infrequent
• Few developers need to share the dev database
• Controlled releases of changes
• Content might flow the opposite way than
changes to structure: “copy prod to test”
What we learned
• Different needs during different phases of the project
• Changes to Content and to Content-structure have different flows
What the CMS brings in
• Content structure can be modified via the GUI! 
• Many tables, with many relations
• No foreign keys 
(import scripts can break referential integrity)
• Some data is tied to files stored on disk 
(take care when doing backups!)
• Impossible to replicate / sync single tables 
Is it all for the better?
• Easy to deploy changes to Content Structure after go live
Unless the changes takes hours to apply
Will never cover 100% of the cases
• Hard to automate
• Hard to verify
Managing database changes
A. I connect to the Admin Interface
B. A solved problem
02
Keeping Databases in sync
Many possibilities:
A. All developers connect to the same db
B. Managing changes manually
C. The database is committed to git
D. Managing changes via scripts
E. Live DB replication (really ???)
F. More ?
A single, shared database
A
Connecting to a shared database
• good for teams which are *not* geographically distributed
• works when developers do not blow up the database with junk
content: needs some developer discipline
• works only up to the 1st deployment to TEST env;
then 2 dbs have to be managed anyway
Manual change control
B
Managing database changes manually
• Changes to be applied are documented and applied via GUI
• Most Unsafe Option (TM)
• Some tools to help you to keep mental sanity:
ggsysinfo
ezdbintegrity
ggsysinfo
https://github.com/gggeek/ggsysinfo
• Legacy Extension (no eZPlatform version yet)
• Allows to export in a format easy to diff:
Content Types definitions
Roles and Policies definitions
Workflows and Triggers
ggsysinfo
https://github.com/gggeek/ggsysinfo
ggsysinfo
https://github.com/gggeek/ggsysinfo
ggsysinfo
https://github.com/gggeek/ggsysinfo
ezdbintegrity
https://github.com/gggeek/ezdbintegrity
• Legacy Extension (no eZPlatform version yet)
• Allows to verify consistency of data in the database:
Foreign keys
Content fields
Orphaned storage files
Custom rules added by the end user
• No GUI
ezdbintegrity
https://github.com/gggeek/ezdbintegrity
ezdbintegrity
https://github.com/gggeek/ezdbintegrity
Database as source code
C
Committing the database to git
• good for when the development database does not contain a
huge number of contents and assets
• good for when the development database does not change too
frequently
• developers might be working on different versions
of the db: needs some developer discipline
• works only up to the 1st deployment to UAT env;
then 2 dbs have to be managed anyway
Committing the database to git
TIPS
• Database export/import scripts have to developed
• Good idea: remove temporary data before export
• Bad idea: hardcode database passwords in the scripts
• Good idea: read the db passwords from the ezpublish configuration
“Kaliop eZPublish 5 installer”
• Good idea: have the script manage binary contents & clear caches
ex: github.com/kaliop-uk/websummercamp2016/tree/master/site/bin
Automated change control
D
Managing database changes via script
• Safest option
• Good for when the development database does not change too
frequently
• Perfect after deployment to TEST/PROD
• kaliop/ezmigrationbundle
eZ Migration Bundle
https://github.com/kalipo-uk/ezmigrationbundle
• An eZPublish 5 bundle (no support for pure Legacy mode)
• Allows to define “migrations”
• Each migration is a set of changes to the DB – content or structure
• Migrations are stored as part of the application source code
• A console command is used to execute them
• A custom table in the db stored information on already executed ones
An example migration
https://github.com/kalipo-uk/ezmigrationbundle
What types of migrations are supported
https://github.com/kalipo-uk/ezmigrationbundle
• creation, update and deletion of Contents
• creation, update and deletion of Locations
• creation, update and deletion of Users
• creation, update and deletion of UserGroups
• creation, update and deletion of Roles
• creation, update and deletion of ContentTypes
• creation and deletion of Languages
• creation of Tags (from the Netgen Tags Bundle)
Cool features I
https://github.com/kalipo-uk/ezmigrationbundle
• Well documented (*)
• Stable: functional tests are run on Travis
• Future proof: based on the eZPublish Public API
* = opinions may vary
Cool features II
https://github.com/kalipo-uk/ezmigrationbundle
• Supports ids, identifiers and remote-ids to match elements
• Supports the concept of ‘references’ to anything which has just been
created/updated
• Update and delete operations can affect a whole set of
elements in a single pass
Cool features III
https://github.com/kalipo-uk/ezmigrationbundle
For more complex needs, two types of custom migrations:
• SQL files
• PHP classes with a simple Interface
Fully extensible using standard Symfony mechanisms
• Event listeners
• Tagged services
• Service definition takeover
Demo time
03
Going forward
04
Version 3 released today!
https://github.com/kalipo-uk/ezmigrationbundle
If the demo effect does not strike now…
Is your favourite feature missing?
https://github.com/kalipo-uk/ezmigrationbundle
The first brick is laid, many scenarios are possible
ex: allow a full ETL process / migrate across eZ installations
Feature requests and Bugs are managed on Github
Pull Requests are welcome
(thanks Lolautruche!)
THANK YOU
@gggeek
https://github.com/kaliop-uk
https://github.com/kaliop
http://www.kaliop.co.uk/info/ez.html

More Related Content

What's hot

Ursula Sarracini - When Old Meets New: Codebases
Ursula Sarracini - When Old Meets New: CodebasesUrsula Sarracini - When Old Meets New: Codebases
Ursula Sarracini - When Old Meets New: CodebasesAnton Caceres
 
Vincit Teatime 2015.2 - Niko Kurtti: SaaSiin pa(i)nostusta
Vincit Teatime 2015.2 - Niko Kurtti: SaaSiin pa(i)nostustaVincit Teatime 2015.2 - Niko Kurtti: SaaSiin pa(i)nostusta
Vincit Teatime 2015.2 - Niko Kurtti: SaaSiin pa(i)nostustaVincitOy
 
Next generation pipelines
Next generation pipelinesNext generation pipelines
Next generation pipelinesAlex Landa
 
Docker for everything
Docker for everythingDocker for everything
Docker for everythingTim Haak
 
Devops and Immutable infrastructure - Cloud Expo 2015 NYC
Devops and Immutable infrastructure  - Cloud Expo 2015 NYCDevops and Immutable infrastructure  - Cloud Expo 2015 NYC
Devops and Immutable infrastructure - Cloud Expo 2015 NYCJohn Willis
 
Going serverless with aws
Going serverless with awsGoing serverless with aws
Going serverless with awsAlex Landa
 
We don't need consensus: All agreed?
We don't need consensus: All agreed?We don't need consensus: All agreed?
We don't need consensus: All agreed?Weaveworks
 
ASP.NET Core - Phillosophies, Processes and Tooling
ASP.NET Core - Phillosophies, Processes and ToolingASP.NET Core - Phillosophies, Processes and Tooling
ASP.NET Core - Phillosophies, Processes and Tooling💻 Spencer Schneidenbach
 
The New Frontend Toolchain
The New Frontend ToolchainThe New Frontend Toolchain
The New Frontend ToolchainBruno Abrantes
 
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...Matthew Groves
 
WordPress Development Environments
WordPress Development EnvironmentsWordPress Development Environments
WordPress Development EnvironmentsJosh Cummings
 
Untangling fall2017 week2
Untangling fall2017 week2Untangling fall2017 week2
Untangling fall2017 week2Derek Jacoby
 
Stabilizing SE Build - Selenium conf 2013
Stabilizing SE Build - Selenium conf 2013 Stabilizing SE Build - Selenium conf 2013
Stabilizing SE Build - Selenium conf 2013 dimakovalenko
 
Devops With Boxfuse and Shippable
Devops With Boxfuse and ShippableDevops With Boxfuse and Shippable
Devops With Boxfuse and ShippableAndrew Schwabe
 
OpenFaaS serverless framework for Docker and Kubernetes - London
OpenFaaS serverless framework for Docker and Kubernetes - LondonOpenFaaS serverless framework for Docker and Kubernetes - London
OpenFaaS serverless framework for Docker and Kubernetes - LondonAlex Ellis
 
Dark launching with Consul at Hootsuite - Bill Monkman
Dark launching with Consul at Hootsuite - Bill MonkmanDark launching with Consul at Hootsuite - Bill Monkman
Dark launching with Consul at Hootsuite - Bill MonkmanAmbassador Labs
 

What's hot (19)

Ursula Sarracini - When Old Meets New: Codebases
Ursula Sarracini - When Old Meets New: CodebasesUrsula Sarracini - When Old Meets New: Codebases
Ursula Sarracini - When Old Meets New: Codebases
 
Vincit Teatime 2015.2 - Niko Kurtti: SaaSiin pa(i)nostusta
Vincit Teatime 2015.2 - Niko Kurtti: SaaSiin pa(i)nostustaVincit Teatime 2015.2 - Niko Kurtti: SaaSiin pa(i)nostusta
Vincit Teatime 2015.2 - Niko Kurtti: SaaSiin pa(i)nostusta
 
Next generation pipelines
Next generation pipelinesNext generation pipelines
Next generation pipelines
 
Docker for everything
Docker for everythingDocker for everything
Docker for everything
 
Week7
Week7Week7
Week7
 
Devops and Immutable infrastructure - Cloud Expo 2015 NYC
Devops and Immutable infrastructure  - Cloud Expo 2015 NYCDevops and Immutable infrastructure  - Cloud Expo 2015 NYC
Devops and Immutable infrastructure - Cloud Expo 2015 NYC
 
Going serverless with aws
Going serverless with awsGoing serverless with aws
Going serverless with aws
 
We don't need consensus: All agreed?
We don't need consensus: All agreed?We don't need consensus: All agreed?
We don't need consensus: All agreed?
 
ASP.NET Core - Phillosophies, Processes and Tooling
ASP.NET Core - Phillosophies, Processes and ToolingASP.NET Core - Phillosophies, Processes and Tooling
ASP.NET Core - Phillosophies, Processes and Tooling
 
The New Frontend Toolchain
The New Frontend ToolchainThe New Frontend Toolchain
The New Frontend Toolchain
 
Celery workshop
Celery workshopCelery workshop
Celery workshop
 
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
5 Popular Choices for NoSQL on a Microsoft Platform - All Things Open - Octob...
 
WordPress Development Environments
WordPress Development EnvironmentsWordPress Development Environments
WordPress Development Environments
 
Untangling fall2017 week2
Untangling fall2017 week2Untangling fall2017 week2
Untangling fall2017 week2
 
Stabilizing SE Build - Selenium conf 2013
Stabilizing SE Build - Selenium conf 2013 Stabilizing SE Build - Selenium conf 2013
Stabilizing SE Build - Selenium conf 2013
 
Devops With Boxfuse and Shippable
Devops With Boxfuse and ShippableDevops With Boxfuse and Shippable
Devops With Boxfuse and Shippable
 
Rails tools
Rails toolsRails tools
Rails tools
 
OpenFaaS serverless framework for Docker and Kubernetes - London
OpenFaaS serverless framework for Docker and Kubernetes - LondonOpenFaaS serverless framework for Docker and Kubernetes - London
OpenFaaS serverless framework for Docker and Kubernetes - London
 
Dark launching with Consul at Hootsuite - Bill Monkman
Dark launching with Consul at Hootsuite - Bill MonkmanDark launching with Consul at Hootsuite - Bill Monkman
Dark launching with Consul at Hootsuite - Bill Monkman
 

Viewers also liked

eZ Publish Opensource open standards conference talk
eZ Publish Opensource open standards conference talkeZ Publish Opensource open standards conference talk
eZ Publish Opensource open standards conference talkTony Wood
 
N2Vlabs Talks - leanstartup101
N2Vlabs Talks - leanstartup101N2Vlabs Talks - leanstartup101
N2Vlabs Talks - leanstartup101Rami Al-Karmi
 
5 steps to develop your personality
5 steps to develop your personality5 steps to develop your personality
5 steps to develop your personalityzubeditufail
 
Selecting The Right CMS For Law Firms
Selecting The Right CMS For Law FirmsSelecting The Right CMS For Law Firms
Selecting The Right CMS For Law Firmsedynamic
 
Rabbits, indians and... Symfony meets queueing brokers
Rabbits, indians and...  Symfony meets queueing brokersRabbits, indians and...  Symfony meets queueing brokers
Rabbits, indians and... Symfony meets queueing brokersGaetano Giunta
 
StartupWeekend Amman @ZAINJO business model innovation and secrets of succesf...
StartupWeekend Amman @ZAINJO business model innovation and secrets of succesf...StartupWeekend Amman @ZAINJO business model innovation and secrets of succesf...
StartupWeekend Amman @ZAINJO business model innovation and secrets of succesf...Rami Al-Karmi
 
C1 - Communication : Mass & Other Forms
C1 - Communication : Mass & Other FormsC1 - Communication : Mass & Other Forms
C1 - Communication : Mass & Other FormsFatin Nazihah Aziz
 
Bangladesh All Mobile operators query short code.
Bangladesh All Mobile operators query short code.Bangladesh All Mobile operators query short code.
Bangladesh All Mobile operators query short code.PRAN-RFL Group
 
Microservices Architecture for Content Management Systems using AWS Lambda an...
Microservices Architecture for Content Management Systems using AWS Lambda an...Microservices Architecture for Content Management Systems using AWS Lambda an...
Microservices Architecture for Content Management Systems using AWS Lambda an...Mitoc Group
 

Viewers also liked (19)

eZ Publish Opensource open standards conference talk
eZ Publish Opensource open standards conference talkeZ Publish Opensource open standards conference talk
eZ Publish Opensource open standards conference talk
 
Bharat Hydraulic, Morvi, Mixer Machine
Bharat Hydraulic, Morvi, Mixer MachineBharat Hydraulic, Morvi, Mixer Machine
Bharat Hydraulic, Morvi, Mixer Machine
 
Asia Offer Latter
Asia Offer LatterAsia Offer Latter
Asia Offer Latter
 
La loteria2
La loteria2La loteria2
La loteria2
 
N2Vlabs Talks - leanstartup101
N2Vlabs Talks - leanstartup101N2Vlabs Talks - leanstartup101
N2Vlabs Talks - leanstartup101
 
5 steps to develop your personality
5 steps to develop your personality5 steps to develop your personality
5 steps to develop your personality
 
Selecting The Right CMS For Law Firms
Selecting The Right CMS For Law FirmsSelecting The Right CMS For Law Firms
Selecting The Right CMS For Law Firms
 
Contoh kalimat deduktif
Contoh kalimat  deduktifContoh kalimat  deduktif
Contoh kalimat deduktif
 
ZMF12 Hoe te komen tot WOW?
ZMF12 Hoe te komen tot WOW? ZMF12 Hoe te komen tot WOW?
ZMF12 Hoe te komen tot WOW?
 
Zorgmarketingfestival 2012
Zorgmarketingfestival 2012Zorgmarketingfestival 2012
Zorgmarketingfestival 2012
 
Rabbits, indians and... Symfony meets queueing brokers
Rabbits, indians and...  Symfony meets queueing brokersRabbits, indians and...  Symfony meets queueing brokers
Rabbits, indians and... Symfony meets queueing brokers
 
C4 - Power Politics
C4 - Power PoliticsC4 - Power Politics
C4 - Power Politics
 
StartupWeekend Amman @ZAINJO business model innovation and secrets of succesf...
StartupWeekend Amman @ZAINJO business model innovation and secrets of succesf...StartupWeekend Amman @ZAINJO business model innovation and secrets of succesf...
StartupWeekend Amman @ZAINJO business model innovation and secrets of succesf...
 
C1 - Communication : Mass & Other Forms
C1 - Communication : Mass & Other FormsC1 - Communication : Mass & Other Forms
C1 - Communication : Mass & Other Forms
 
Bangladesh All Mobile operators query short code.
Bangladesh All Mobile operators query short code.Bangladesh All Mobile operators query short code.
Bangladesh All Mobile operators query short code.
 
Introduction Islamic Ethics
Introduction Islamic EthicsIntroduction Islamic Ethics
Introduction Islamic Ethics
 
Tips for a Sustainable Future
Tips for a Sustainable FutureTips for a Sustainable Future
Tips for a Sustainable Future
 
Topic 4 - Al-Farabi
Topic 4 - Al-FarabiTopic 4 - Al-Farabi
Topic 4 - Al-Farabi
 
Microservices Architecture for Content Management Systems using AWS Lambda an...
Microservices Architecture for Content Management Systems using AWS Lambda an...Microservices Architecture for Content Management Systems using AWS Lambda an...
Microservices Architecture for Content Management Systems using AWS Lambda an...
 

Similar to Managing changes to eZPublish Database

DevOps+Data: Working with Source Control
DevOps+Data: Working with Source ControlDevOps+Data: Working with Source Control
DevOps+Data: Working with Source ControlEd Leighton-Dick
 
Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Bruno Capuano
 
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)Ahmed El-Arabawy
 
Git Going w/ Git
Git Going w/ GitGit Going w/ Git
Git Going w/ GitheyMP
 
Starting from scratch in 2017
Starting from scratch in 2017Starting from scratch in 2017
Starting from scratch in 2017Stefano Bonetta
 
Introduction to Git for Network Engineers
Introduction to Git for Network EngineersIntroduction to Git for Network Engineers
Introduction to Git for Network EngineersJoel W. King
 
Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Derek Jacoby
 
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAutomation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAppDynamics
 
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGroup
 
Docs as Part of the Product - Open Source Summit North America 2018
Docs as Part of the Product - Open Source Summit North America 2018Docs as Part of the Product - Open Source Summit North America 2018
Docs as Part of the Product - Open Source Summit North America 2018Den Delimarsky
 
SQL Server DevOps Jumpstart
SQL Server DevOps JumpstartSQL Server DevOps Jumpstart
SQL Server DevOps JumpstartOri Donner
 
Evolutionary database design
Evolutionary database designEvolutionary database design
Evolutionary database designSalehein Syed
 
Agile Secure Cloud Application Development Management
Agile Secure Cloud Application Development ManagementAgile Secure Cloud Application Development Management
Agile Secure Cloud Application Development ManagementAdam Getchell
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Henry S
 
Achieving Full Stack DevOps at Colonial Life
Achieving Full Stack DevOps at Colonial Life Achieving Full Stack DevOps at Colonial Life
Achieving Full Stack DevOps at Colonial Life DevOps.com
 
OUG Ireland Meet-up 12th January
OUG Ireland Meet-up 12th JanuaryOUG Ireland Meet-up 12th January
OUG Ireland Meet-up 12th JanuaryBrendan Tierney
 

Similar to Managing changes to eZPublish Database (20)

DevOps+Data: Working with Source Control
DevOps+Data: Working with Source ControlDevOps+Data: Working with Source Control
DevOps+Data: Working with Source Control
 
Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?
 
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
 
WebDev Crash Course
WebDev Crash CourseWebDev Crash Course
WebDev Crash Course
 
Git SVN Migrate Reasons
Git SVN Migrate ReasonsGit SVN Migrate Reasons
Git SVN Migrate Reasons
 
Git Going w/ Git
Git Going w/ GitGit Going w/ Git
Git Going w/ Git
 
Starting from scratch in 2017
Starting from scratch in 2017Starting from scratch in 2017
Starting from scratch in 2017
 
Introduction to Git for Network Engineers
Introduction to Git for Network EngineersIntroduction to Git for Network Engineers
Introduction to Git for Network Engineers
 
Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9
 
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit EuropeAutomation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
Automation: The Good, The Bad and The Ugly with DevOpsGuys - AppD Summit Europe
 
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The UglyDevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
DevOpsGuys - DevOps Automation - The Good, The Bad and The Ugly
 
Docs as Part of the Product - Open Source Summit North America 2018
Docs as Part of the Product - Open Source Summit North America 2018Docs as Part of the Product - Open Source Summit North America 2018
Docs as Part of the Product - Open Source Summit North America 2018
 
SQL Server DevOps Jumpstart
SQL Server DevOps JumpstartSQL Server DevOps Jumpstart
SQL Server DevOps Jumpstart
 
Evolutionary database design
Evolutionary database designEvolutionary database design
Evolutionary database design
 
Agile Secure Cloud Application Development Management
Agile Secure Cloud Application Development ManagementAgile Secure Cloud Application Development Management
Agile Secure Cloud Application Development Management
 
Mini-training: Let’s Git It!
Mini-training: Let’s Git It!Mini-training: Let’s Git It!
Mini-training: Let’s Git It!
 
Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1Code for Startup MVP (Ruby on Rails) Session 1
Code for Startup MVP (Ruby on Rails) Session 1
 
Achieving Full Stack DevOps at Colonial Life
Achieving Full Stack DevOps at Colonial Life Achieving Full Stack DevOps at Colonial Life
Achieving Full Stack DevOps at Colonial Life
 
OUG Ireland Meet-up 12th January
OUG Ireland Meet-up 12th JanuaryOUG Ireland Meet-up 12th January
OUG Ireland Meet-up 12th January
 
Building gRPC services
Building gRPC servicesBuilding gRPC services
Building gRPC services
 

More from Gaetano Giunta

php day 2008 - Introduzione agli ez components
php day 2008 - Introduzione agli ez componentsphp day 2008 - Introduzione agli ez components
php day 2008 - Introduzione agli ez componentsGaetano Giunta
 
phpday 2006 - SEA case study
phpday 2006 - SEA case studyphpday 2006 - SEA case study
phpday 2006 - SEA case studyGaetano Giunta
 
phpday 2006 - WS in PHP
phpday 2006 - WS in PHPphpday 2006 - WS in PHP
phpday 2006 - WS in PHPGaetano Giunta
 
Symfony2 for legacy app rejuvenation: the eZ Publish case study
Symfony2 for legacy app rejuvenation: the eZ Publish case studySymfony2 for legacy app rejuvenation: the eZ Publish case study
Symfony2 for legacy app rejuvenation: the eZ Publish case studyGaetano Giunta
 
Making Symfony Services async with RabbitMq (and more Symfony)
Making Symfony Services async with RabbitMq (and more Symfony)Making Symfony Services async with RabbitMq (and more Symfony)
Making Symfony Services async with RabbitMq (and more Symfony)Gaetano Giunta
 
EzPerformancelogger & Graphite
EzPerformancelogger & GraphiteEzPerformancelogger & Graphite
EzPerformancelogger & GraphiteGaetano Giunta
 
Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...
Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...
Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...Gaetano Giunta
 
eZPublish meets Simfony2 - phpDay2013
eZPublish meets Simfony2  - phpDay2013eZPublish meets Simfony2  - phpDay2013
eZPublish meets Simfony2 - phpDay2013Gaetano Giunta
 
Ez performance measurement
Ez performance measurementEz performance measurement
Ez performance measurementGaetano Giunta
 
Ez Content Staging for the rest of us
Ez Content Staging for the rest of usEz Content Staging for the rest of us
Ez Content Staging for the rest of usGaetano Giunta
 
An eZ Publish Craftsman's toolchest
An eZ Publish Craftsman's toolchestAn eZ Publish Craftsman's toolchest
An eZ Publish Craftsman's toolchestGaetano Giunta
 

More from Gaetano Giunta (11)

php day 2008 - Introduzione agli ez components
php day 2008 - Introduzione agli ez componentsphp day 2008 - Introduzione agli ez components
php day 2008 - Introduzione agli ez components
 
phpday 2006 - SEA case study
phpday 2006 - SEA case studyphpday 2006 - SEA case study
phpday 2006 - SEA case study
 
phpday 2006 - WS in PHP
phpday 2006 - WS in PHPphpday 2006 - WS in PHP
phpday 2006 - WS in PHP
 
Symfony2 for legacy app rejuvenation: the eZ Publish case study
Symfony2 for legacy app rejuvenation: the eZ Publish case studySymfony2 for legacy app rejuvenation: the eZ Publish case study
Symfony2 for legacy app rejuvenation: the eZ Publish case study
 
Making Symfony Services async with RabbitMq (and more Symfony)
Making Symfony Services async with RabbitMq (and more Symfony)Making Symfony Services async with RabbitMq (and more Symfony)
Making Symfony Services async with RabbitMq (and more Symfony)
 
EzPerformancelogger & Graphite
EzPerformancelogger & GraphiteEzPerformancelogger & Graphite
EzPerformancelogger & Graphite
 
Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...
Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...
Symfony HTTP Kernel for refactoring legacy apps: the eZ Publish case study - ...
 
eZPublish meets Simfony2 - phpDay2013
eZPublish meets Simfony2  - phpDay2013eZPublish meets Simfony2  - phpDay2013
eZPublish meets Simfony2 - phpDay2013
 
Ez performance measurement
Ez performance measurementEz performance measurement
Ez performance measurement
 
Ez Content Staging for the rest of us
Ez Content Staging for the rest of usEz Content Staging for the rest of us
Ez Content Staging for the rest of us
 
An eZ Publish Craftsman's toolchest
An eZ Publish Craftsman's toolchestAn eZ Publish Craftsman's toolchest
An eZ Publish Craftsman's toolchest
 

Recently uploaded

Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Roomishabajaj13
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Servicesexy call girls service in goa
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...aditipandeya
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Roomdivyansh0kumar0
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607dollysharma2066
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Roomgirls4nights
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$kojalkojal131
 
Gram Darshan PPT cyber rural in villages of india
Gram Darshan PPT cyber rural  in villages of indiaGram Darshan PPT cyber rural  in villages of india
Gram Darshan PPT cyber rural in villages of indiaimessage0108
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024APNIC
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersDamian Radcliffe
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts servicesonalikaur4
 
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebJames Anderson
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝soniya singh
 

Recently uploaded (20)

Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls in Kolkata Ishita 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls in Kolkata Ishita 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
 
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine ServiceHot Service (+9316020077 ) Goa  Call Girls Real Photos and Genuine Service
Hot Service (+9316020077 ) Goa Call Girls Real Photos and Genuine Service
 
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICECall Girls In South Ex 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
Call Girls In South Ex 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SERVICE
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130  Available With RoomVIP Kolkata Call Girl Kestopur 👉 8250192130  Available With Room
VIP Kolkata Call Girl Kestopur 👉 8250192130 Available With Room
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
 
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With RoomVIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
VIP Kolkata Call Girls Salt Lake 8250192130 Available With Room
 
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
Call Girls Dubai Prolapsed O525547819 Call Girls In Dubai Princes$
 
Gram Darshan PPT cyber rural in villages of india
Gram Darshan PPT cyber rural  in villages of indiaGram Darshan PPT cyber rural  in villages of india
Gram Darshan PPT cyber rural in villages of india
 
On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024On Starlink, presented by Geoff Huston at NZNOG 2024
On Starlink, presented by Geoff Huston at NZNOG 2024
 
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providersMoving Beyond Twitter/X and Facebook - Social Media for local news providers
Moving Beyond Twitter/X and Facebook - Social Media for local news providers
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
 
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Saket Delhi 💯Call Us 🔝8264348440🔝
 

Managing changes to eZPublish Database

  • 1. Visuel à insérer ici EZ CONFERENCE 2016 PARIS Managing Changes to the Database Across the Project Life Cycle
  • 2. WHO AM I The short version • « the guy who has written a lot of answers on the eZPublish forums » • Working at Kaliop in London since 2014 • Principal consultant at eZ Systems for 7 years • Love coffee and bicycles ? • @gggeek VOTRE SCHEMA
  • 3. WHAT THIS TALK IS ABOUT The short version, too
  • 4. Database vs. cms vs. the project lifecycle 01
  • 5. Project life cycle • Development • Testing • Maintenance
  • 6. Development phase • Only one source of data: the “dev” db • Size of data set is generally small • Changes to content structure are frequent • Developers need to share the database (mostly the structure)
  • 7. Testing phase • Two sources of data: the “dev” and “test” db • Size of data set can be small or not • Changes to content structure are less frequent • Developers need to share the dev database • Controlled releases of changes from dev to test • The bulk of test “content” is not overwritten
  • 8. Maintenance phase • 3 (or more) sources of data: the “dev”, “test” and “prod” db • Size of data set can be large • Changes to content structure are infrequent • Few developers need to share the dev database • Controlled releases of changes • Content might flow the opposite way than changes to structure: “copy prod to test”
  • 9. What we learned • Different needs during different phases of the project • Changes to Content and to Content-structure have different flows
  • 10. What the CMS brings in • Content structure can be modified via the GUI!  • Many tables, with many relations • No foreign keys  (import scripts can break referential integrity) • Some data is tied to files stored on disk  (take care when doing backups!) • Impossible to replicate / sync single tables 
  • 11. Is it all for the better? • Easy to deploy changes to Content Structure after go live Unless the changes takes hours to apply Will never cover 100% of the cases • Hard to automate • Hard to verify
  • 12. Managing database changes A. I connect to the Admin Interface B. A solved problem 02
  • 13. Keeping Databases in sync Many possibilities: A. All developers connect to the same db B. Managing changes manually C. The database is committed to git D. Managing changes via scripts E. Live DB replication (really ???) F. More ?
  • 14. A single, shared database A
  • 15. Connecting to a shared database • good for teams which are *not* geographically distributed • works when developers do not blow up the database with junk content: needs some developer discipline • works only up to the 1st deployment to TEST env; then 2 dbs have to be managed anyway
  • 17. Managing database changes manually • Changes to be applied are documented and applied via GUI • Most Unsafe Option (TM) • Some tools to help you to keep mental sanity: ggsysinfo ezdbintegrity
  • 18. ggsysinfo https://github.com/gggeek/ggsysinfo • Legacy Extension (no eZPlatform version yet) • Allows to export in a format easy to diff: Content Types definitions Roles and Policies definitions Workflows and Triggers
  • 22. ezdbintegrity https://github.com/gggeek/ezdbintegrity • Legacy Extension (no eZPlatform version yet) • Allows to verify consistency of data in the database: Foreign keys Content fields Orphaned storage files Custom rules added by the end user • No GUI
  • 26. Committing the database to git • good for when the development database does not contain a huge number of contents and assets • good for when the development database does not change too frequently • developers might be working on different versions of the db: needs some developer discipline • works only up to the 1st deployment to UAT env; then 2 dbs have to be managed anyway
  • 27. Committing the database to git TIPS • Database export/import scripts have to developed • Good idea: remove temporary data before export • Bad idea: hardcode database passwords in the scripts • Good idea: read the db passwords from the ezpublish configuration “Kaliop eZPublish 5 installer” • Good idea: have the script manage binary contents & clear caches ex: github.com/kaliop-uk/websummercamp2016/tree/master/site/bin
  • 29. Managing database changes via script • Safest option • Good for when the development database does not change too frequently • Perfect after deployment to TEST/PROD • kaliop/ezmigrationbundle
  • 30. eZ Migration Bundle https://github.com/kalipo-uk/ezmigrationbundle • An eZPublish 5 bundle (no support for pure Legacy mode) • Allows to define “migrations” • Each migration is a set of changes to the DB – content or structure • Migrations are stored as part of the application source code • A console command is used to execute them • A custom table in the db stored information on already executed ones
  • 32. What types of migrations are supported https://github.com/kalipo-uk/ezmigrationbundle • creation, update and deletion of Contents • creation, update and deletion of Locations • creation, update and deletion of Users • creation, update and deletion of UserGroups • creation, update and deletion of Roles • creation, update and deletion of ContentTypes • creation and deletion of Languages • creation of Tags (from the Netgen Tags Bundle)
  • 33. Cool features I https://github.com/kalipo-uk/ezmigrationbundle • Well documented (*) • Stable: functional tests are run on Travis • Future proof: based on the eZPublish Public API * = opinions may vary
  • 34. Cool features II https://github.com/kalipo-uk/ezmigrationbundle • Supports ids, identifiers and remote-ids to match elements • Supports the concept of ‘references’ to anything which has just been created/updated • Update and delete operations can affect a whole set of elements in a single pass
  • 35. Cool features III https://github.com/kalipo-uk/ezmigrationbundle For more complex needs, two types of custom migrations: • SQL files • PHP classes with a simple Interface Fully extensible using standard Symfony mechanisms • Event listeners • Tagged services • Service definition takeover
  • 38. Version 3 released today! https://github.com/kalipo-uk/ezmigrationbundle If the demo effect does not strike now…
  • 39. Is your favourite feature missing? https://github.com/kalipo-uk/ezmigrationbundle The first brick is laid, many scenarios are possible ex: allow a full ETL process / migrate across eZ installations Feature requests and Bugs are managed on Github Pull Requests are welcome (thanks Lolautruche!)

Editor's Notes

  1. do I even have to explain why ?
  2. Easy to automate