SlideShare uma empresa Scribd logo
1 de 72
Baixar para ler offline
CONFIG MANAGEMENT IN D8
        Howard Tyson (tizzo)
CONFIG MANAGEMENT IN
         D8
CONFIG MANAGEMENT IN
         D8


This talk is based on my own experiments
CONFIG MANAGEMENT IN
         D8


This talk is based on my own experiments

 ...and kind of pretending they’re done :-)
CONFIG MANAGEMENT IN
         D8


This talk is based on my own experiments

 ...and kind of pretending they’re done :-)

https://github.com/tizzo/system_settings
Configuration Management
Configuration Management


Deploying changes to the same site from one place to another
Configuration Management


Deploying changes to the same site from one place to another

  Dev => Staging => Live
Configuration Management


Deploying changes to the same site from one place to another

  Dev => Staging => Live

Sharing configuration between sites
Configuration Management


Deploying changes to the same site from one place to another

  Dev => Staging => Live

Sharing configuration between sites

  The “Features” model
Current Pain
Current Pain


No way to store data centrally without loading on every page
Current Pain


No way to store data centrally without loading on every page

No central API for exporting (though ctools can provide most of
the plumbing)
Current Pain


No way to store data centrally without loading on every page

No central API for exporting (though ctools can provide most of
the plumbing)

No way to know about configuration (or content) dependencies
Settings API
Settings API


Heavily inspired by ctools exportables
Settings API


Heavily inspired by ctools exportables

Pluggable handlers for discrete components
Settings API


Heavily inspired by ctools exportables

Pluggable handlers for discrete components

Unique names needed throughout
Overrides!
Overrides!


Settings specified in module code
Overrides!


Settings specified in module code

Overridden by the database
Overrides!


Settings specified in module code

Overridden by the database

Alter hooks
Overrides!


Settings specified in module code

Overridden by the database

Alter hooks

Overridden by settings.php
Relations
Relations

Allow settings to be associated with each other, and other things
throughout the system
Relations

Allow settings to be associated with each other, and other things
throughout the system

Currently there are 3 relations
Relations

Allow settings to be associated with each other, and other things
throughout the system

Currently there are 3 relations

  Entity
Relations

Allow settings to be associated with each other, and other things
throughout the system

Currently there are 3 relations

  Entity

  Groups
Relations

Allow settings to be associated with each other, and other things
throughout the system

Currently there are 3 relations

  Entity

  Groups

  Modules (and themes)
Entity
Entity

Bad name (not an entity API entity)
Entity

Bad name (not an entity API entity)

Identifies a “thing” with a “type” and an “name”
Entity

Bad name (not an entity API entity)

Identifies a “thing” with a “type” and an “name”

Tracks
Entity

Bad name (not an entity API entity)

Identifies a “thing” with a “type” and an “name”

Tracks

  requirement relationships between other settings (and maybe
  even content?)
Groups
Groups


Essentially just “tags”
Groups


Essentially just “tags”

Allows you to get all of the settings from a given form, etc.
Groups


Essentially just “tags”

Allows you to get all of the settings from a given form, etc.

Allow hierarchy
Groups


Essentially just “tags”

Allows you to get all of the settings from a given form, etc.

Allow hierarchy

  Commerce => Payment Gateways => Authorize.net
Modules (And Themes)
Modules (And Themes)

Track dependencies
Modules (And Themes)

Track dependencies

  requires
Modules (And Themes)

Track dependencies

  requires

  required by
Modules (And Themes)

Track dependencies

  requires

  required by

Register update callbacks
Modules (And Themes)

Track dependencies

  requires

  required by

Register update callbacks

  Allows module to say “when this changes, please let me know”
Settings Log
Settings Log
Settings Log


Records all settings changes: old setting & new setting
Settings Log


Records all settings changes: old setting & new setting

Serially increments
Settings Log


Records all settings changes: old setting & new setting

Serially increments

Log position stored in settings api (separate from the log)
Settings Log


Records all settings changes: old setting & new setting

Serially increments

Log position stored in settings api (separate from the log)

  This lets us sync the log and then run update.php to apply
  them until we’re back in line
New Interaction Models
New Interaction Models
Replay settings changes (every change can be replayed one after
another)
New Interaction Models
Replay settings changes (every change can be replayed one after
another)

  One way sync from dev to staging, move the log and run
  update
New Interaction Models
Replay settings changes (every change can be replayed one after
another)

  One way sync from dev to staging, move the log and run
  update

  Settings are replayed one by one, callbacks fired if necessary
New Interaction Models
Replay settings changes (every change can be replayed one after
another)

  One way sync from dev to staging, move the log and run
  update

  Settings are replayed one by one, callbacks fired if necessary

Work offline and then “push” every settings change that you
haven’t yet modified to the central system (either over services or
putting config in code)
The Final Frontier
The Final Frontier
Features-like system for exports in core
The Final Frontier
Features-like system for exports in core

“Locked” sites where settings can’t be changed all “clicky
clicky”
The Final Frontier
Features-like system for exports in core

“Locked” sites where settings can’t be changed all “clicky
clicky”

Perhaps “locked” settings can’t be changed all “clicky clicky”?
The Final Frontier
Features-like system for exports in core

“Locked” sites where settings can’t be changed all “clicky
clicky”

Perhaps “locked” settings can’t be changed all “clicky clicky”?

Settings replication over web services
The Final Frontier
Features-like system for exports in core

“Locked” sites where settings can’t be changed all “clicky
clicky”

Perhaps “locked” settings can’t be changed all “clicky clicky”?

Settings replication over web services

  “Push” settings from one site to another
The Final Frontier
Features-like system for exports in core

“Locked” sites where settings can’t be changed all “clicky
clicky”

Perhaps “locked” settings can’t be changed all “clicky clicky”?

Settings replication over web services

  “Push” settings from one site to another

Relations “Masks” to export “slices” of configuration
Known (expected) Issues
Known (expected) Issues
Requirements on a specific value instead of on a value existing
Known (expected) Issues
Requirements on a specific value instead of on a value existing

Preventing deployment if stuff is missing
Known (expected) Issues
Requirements on a specific value instead of on a value existing

Preventing deployment if stuff is missing

Conflict resolution (if we try to “magically” move things around)
Known (expected) Issues
Requirements on a specific value instead of on a value existing

Preventing deployment if stuff is missing

Conflict resolution (if we try to “magically” move things around)

  This doesn’t. Settings are atomic and if one thing sets a
  setting and another changes it, it has been changed.
Known (expected) Issues
Requirements on a specific value instead of on a value existing

Preventing deployment if stuff is missing

Conflict resolution (if we try to “magically” move things around)

  This doesn’t. Settings are atomic and if one thing sets a
  setting and another changes it, it has been changed.

System currently puts all settings in a single db table (harder to
read & maintain... performance concerns...)
Where this stands
Where this stands



Currently a little broken...
Where this stands



Currently a little broken...

  ...and a little incomplete but the framework is coming together

Mais conteúdo relacionado

Destaque

System settings api
System settings apiSystem settings api
System settings apihtyson
 
Meet Drupal
Meet DrupalMeet Drupal
Meet Drupalhtyson
 
System settings api
System settings apiSystem settings api
System settings apihtyson
 
Solving The Deployment Problem
Solving The Deployment ProblemSolving The Deployment Problem
Solving The Deployment Problemhtyson
 
Modules Building Presentation
Modules Building PresentationModules Building Presentation
Modules Building Presentationhtyson
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsLinkedIn
 

Destaque (6)

System settings api
System settings apiSystem settings api
System settings api
 
Meet Drupal
Meet DrupalMeet Drupal
Meet Drupal
 
System settings api
System settings apiSystem settings api
System settings api
 
Solving The Deployment Problem
Solving The Deployment ProblemSolving The Deployment Problem
Solving The Deployment Problem
 
Modules Building Presentation
Modules Building PresentationModules Building Presentation
Modules Building Presentation
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
 

Semelhante a System settings

Test driven infrastructure development (2 - puppetconf 2013 edition)
Test driven infrastructure development (2 - puppetconf 2013 edition)Test driven infrastructure development (2 - puppetconf 2013 edition)
Test driven infrastructure development (2 - puppetconf 2013 edition)Tomas Doran
 
Advanced Topics in Continuous Deployment
Advanced Topics in Continuous DeploymentAdvanced Topics in Continuous Deployment
Advanced Topics in Continuous DeploymentMike Brittain
 
CakePHP 2.0 - It'll rock your world
CakePHP 2.0 - It'll rock your worldCakePHP 2.0 - It'll rock your world
CakePHP 2.0 - It'll rock your worldGraham Weldon
 
The Ember.js Framework - Everything You Need To Know
The Ember.js Framework - Everything You Need To KnowThe Ember.js Framework - Everything You Need To Know
The Ember.js Framework - Everything You Need To KnowAll Things Open
 
.NET Core, ASP.NET Core Course, Session 15
.NET Core, ASP.NET Core Course, Session 15.NET Core, ASP.NET Core Course, Session 15
.NET Core, ASP.NET Core Course, Session 15aminmesbahi
 
Parallel Extentions to the .NET Framework
Parallel Extentions to the .NET FrameworkParallel Extentions to the .NET Framework
Parallel Extentions to the .NET Frameworkukdpe
 
Migraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sitesMigraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sitesdrupalindia
 
Introduction To Navicat MySql GUI
Introduction To Navicat MySql GUIIntroduction To Navicat MySql GUI
Introduction To Navicat MySql GUIchadrobertson75
 
Addmi 11-intro to-patterns
Addmi 11-intro to-patternsAddmi 11-intro to-patterns
Addmi 11-intro to-patternsodanyboy
 
CakePHP - The Path to 2.0
CakePHP - The Path to 2.0CakePHP - The Path to 2.0
CakePHP - The Path to 2.0Graham Weldon
 
Source Code Management Slides
Source Code Management SlidesSource Code Management Slides
Source Code Management Slidesdaschuck
 
User and group security migration
User and group security migrationUser and group security migration
User and group security migrationAmit Sharma
 
User and group security migration
User and group security migrationUser and group security migration
User and group security migrationAmit Sharma
 
Getting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and DataGetting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and DataCory Foy
 
Getting Into Drupal 8 Configuration
Getting Into Drupal 8 ConfigurationGetting Into Drupal 8 Configuration
Getting Into Drupal 8 ConfigurationPhilip Norton
 
Force.com migration utility
Force.com migration utilityForce.com migration utility
Force.com migration utilityAmit Sharma
 
Force.com migration utility
Force.com migration utilityForce.com migration utility
Force.com migration utilityAmit Sharma
 

Semelhante a System settings (20)

Hello Cotrix
Hello CotrixHello Cotrix
Hello Cotrix
 
Test driven infrastructure development (2 - puppetconf 2013 edition)
Test driven infrastructure development (2 - puppetconf 2013 edition)Test driven infrastructure development (2 - puppetconf 2013 edition)
Test driven infrastructure development (2 - puppetconf 2013 edition)
 
Advanced Topics in Continuous Deployment
Advanced Topics in Continuous DeploymentAdvanced Topics in Continuous Deployment
Advanced Topics in Continuous Deployment
 
CakePHP 2.0 - It'll rock your world
CakePHP 2.0 - It'll rock your worldCakePHP 2.0 - It'll rock your world
CakePHP 2.0 - It'll rock your world
 
The Ember.js Framework - Everything You Need To Know
The Ember.js Framework - Everything You Need To KnowThe Ember.js Framework - Everything You Need To Know
The Ember.js Framework - Everything You Need To Know
 
.NET Core, ASP.NET Core Course, Session 15
.NET Core, ASP.NET Core Course, Session 15.NET Core, ASP.NET Core Course, Session 15
.NET Core, ASP.NET Core Course, Session 15
 
Parallel Extentions to the .NET Framework
Parallel Extentions to the .NET FrameworkParallel Extentions to the .NET Framework
Parallel Extentions to the .NET Framework
 
Migraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sitesMigraine Drupal - syncing your staging and live sites
Migraine Drupal - syncing your staging and live sites
 
Introduction To Navicat MySql GUI
Introduction To Navicat MySql GUIIntroduction To Navicat MySql GUI
Introduction To Navicat MySql GUI
 
Addmi 11-intro to-patterns
Addmi 11-intro to-patternsAddmi 11-intro to-patterns
Addmi 11-intro to-patterns
 
DevOps
DevOpsDevOps
DevOps
 
CakePHP - The Path to 2.0
CakePHP - The Path to 2.0CakePHP - The Path to 2.0
CakePHP - The Path to 2.0
 
Source Code Management Slides
Source Code Management SlidesSource Code Management Slides
Source Code Management Slides
 
User and group security migration
User and group security migrationUser and group security migration
User and group security migration
 
User and group security migration
User and group security migrationUser and group security migration
User and group security migration
 
Getting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and DataGetting Unstuck: Working with Legacy Code and Data
Getting Unstuck: Working with Legacy Code and Data
 
Getting Into Drupal 8 Configuration
Getting Into Drupal 8 ConfigurationGetting Into Drupal 8 Configuration
Getting Into Drupal 8 Configuration
 
WordPress Security Blitz
WordPress Security BlitzWordPress Security Blitz
WordPress Security Blitz
 
Force.com migration utility
Force.com migration utilityForce.com migration utility
Force.com migration utility
 
Force.com migration utility
Force.com migration utilityForce.com migration utility
Force.com migration utility
 

System settings

Notas do Editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n