System settings

697 views
644 views

Published on

The slides from my "core conversations" talk at DrupalCon Chicago.

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
697
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
9
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • System settings

    1. 1. CONFIG MANAGEMENT IN D8 Howard Tyson (tizzo)
    2. 2. CONFIG MANAGEMENT IN D8
    3. 3. CONFIG MANAGEMENT IN D8This talk is based on my own experiments
    4. 4. CONFIG MANAGEMENT IN D8This talk is based on my own experiments ...and kind of pretending they’re done :-)
    5. 5. CONFIG MANAGEMENT IN D8This talk is based on my own experiments ...and kind of pretending they’re done :-)https://github.com/tizzo/system_settings
    6. 6. Configuration Management
    7. 7. Configuration ManagementDeploying changes to the same site from one place to another
    8. 8. Configuration ManagementDeploying changes to the same site from one place to another Dev => Staging => Live
    9. 9. Configuration ManagementDeploying changes to the same site from one place to another Dev => Staging => LiveSharing configuration between sites
    10. 10. Configuration ManagementDeploying changes to the same site from one place to another Dev => Staging => LiveSharing configuration between sites The “Features” model
    11. 11. Current Pain
    12. 12. Current PainNo way to store data centrally without loading on every page
    13. 13. Current PainNo way to store data centrally without loading on every pageNo central API for exporting (though ctools can provide most ofthe plumbing)
    14. 14. Current PainNo way to store data centrally without loading on every pageNo central API for exporting (though ctools can provide most ofthe plumbing)No way to know about configuration (or content) dependencies
    15. 15. Settings API
    16. 16. Settings APIHeavily inspired by ctools exportables
    17. 17. Settings APIHeavily inspired by ctools exportablesPluggable handlers for discrete components
    18. 18. Settings APIHeavily inspired by ctools exportablesPluggable handlers for discrete componentsUnique names needed throughout
    19. 19. Overrides!
    20. 20. Overrides!Settings specified in module code
    21. 21. Overrides!Settings specified in module codeOverridden by the database
    22. 22. Overrides!Settings specified in module codeOverridden by the databaseAlter hooks
    23. 23. Overrides!Settings specified in module codeOverridden by the databaseAlter hooksOverridden by settings.php
    24. 24. Relations
    25. 25. RelationsAllow settings to be associated with each other, and other thingsthroughout the system
    26. 26. RelationsAllow settings to be associated with each other, and other thingsthroughout the systemCurrently there are 3 relations
    27. 27. RelationsAllow settings to be associated with each other, and other thingsthroughout the systemCurrently there are 3 relations Entity
    28. 28. RelationsAllow settings to be associated with each other, and other thingsthroughout the systemCurrently there are 3 relations Entity Groups
    29. 29. RelationsAllow settings to be associated with each other, and other thingsthroughout the systemCurrently there are 3 relations Entity Groups Modules (and themes)
    30. 30. Entity
    31. 31. EntityBad name (not an entity API entity)
    32. 32. EntityBad name (not an entity API entity)Identifies a “thing” with a “type” and an “name”
    33. 33. EntityBad name (not an entity API entity)Identifies a “thing” with a “type” and an “name”Tracks
    34. 34. EntityBad 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?)
    35. 35. Groups
    36. 36. GroupsEssentially just “tags”
    37. 37. GroupsEssentially just “tags”Allows you to get all of the settings from a given form, etc.
    38. 38. GroupsEssentially just “tags”Allows you to get all of the settings from a given form, etc.Allow hierarchy
    39. 39. GroupsEssentially just “tags”Allows you to get all of the settings from a given form, etc.Allow hierarchy Commerce => Payment Gateways => Authorize.net
    40. 40. Modules (And Themes)
    41. 41. Modules (And Themes)Track dependencies
    42. 42. Modules (And Themes)Track dependencies requires
    43. 43. Modules (And Themes)Track dependencies requires required by
    44. 44. Modules (And Themes)Track dependencies requires required byRegister update callbacks
    45. 45. Modules (And Themes)Track dependencies requires required byRegister update callbacks Allows module to say “when this changes, please let me know”
    46. 46. Settings Log
    47. 47. Settings Log
    48. 48. Settings LogRecords all settings changes: old setting & new setting
    49. 49. Settings LogRecords all settings changes: old setting & new settingSerially increments
    50. 50. Settings LogRecords all settings changes: old setting & new settingSerially incrementsLog position stored in settings api (separate from the log)
    51. 51. Settings LogRecords all settings changes: old setting & new settingSerially incrementsLog 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
    52. 52. New Interaction Models
    53. 53. New Interaction ModelsReplay settings changes (every change can be replayed one afteranother)
    54. 54. New Interaction ModelsReplay settings changes (every change can be replayed one afteranother) One way sync from dev to staging, move the log and run update
    55. 55. New Interaction ModelsReplay settings changes (every change can be replayed one afteranother) One way sync from dev to staging, move the log and run update Settings are replayed one by one, callbacks fired if necessary
    56. 56. New Interaction ModelsReplay settings changes (every change can be replayed one afteranother) One way sync from dev to staging, move the log and run update Settings are replayed one by one, callbacks fired if necessaryWork offline and then “push” every settings change that youhaven’t yet modified to the central system (either over services orputting config in code)
    57. 57. The Final Frontier
    58. 58. The Final FrontierFeatures-like system for exports in core
    59. 59. The Final FrontierFeatures-like system for exports in core“Locked” sites where settings can’t be changed all “clickyclicky”
    60. 60. The Final FrontierFeatures-like system for exports in core“Locked” sites where settings can’t be changed all “clickyclicky”Perhaps “locked” settings can’t be changed all “clicky clicky”?
    61. 61. The Final FrontierFeatures-like system for exports in core“Locked” sites where settings can’t be changed all “clickyclicky”Perhaps “locked” settings can’t be changed all “clicky clicky”?Settings replication over web services
    62. 62. The Final FrontierFeatures-like system for exports in core“Locked” sites where settings can’t be changed all “clickyclicky”Perhaps “locked” settings can’t be changed all “clicky clicky”?Settings replication over web services “Push” settings from one site to another
    63. 63. The Final FrontierFeatures-like system for exports in core“Locked” sites where settings can’t be changed all “clickyclicky”Perhaps “locked” settings can’t be changed all “clicky clicky”?Settings replication over web services “Push” settings from one site to anotherRelations “Masks” to export “slices” of configuration
    64. 64. Known (expected) Issues
    65. 65. Known (expected) IssuesRequirements on a specific value instead of on a value existing
    66. 66. Known (expected) IssuesRequirements on a specific value instead of on a value existingPreventing deployment if stuff is missing
    67. 67. Known (expected) IssuesRequirements on a specific value instead of on a value existingPreventing deployment if stuff is missingConflict resolution (if we try to “magically” move things around)
    68. 68. Known (expected) IssuesRequirements on a specific value instead of on a value existingPreventing deployment if stuff is missingConflict 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.
    69. 69. Known (expected) IssuesRequirements on a specific value instead of on a value existingPreventing deployment if stuff is missingConflict 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 toread & maintain... performance concerns...)
    70. 70. Where this stands
    71. 71. Where this standsCurrently a little broken...
    72. 72. Where this standsCurrently a little broken... ...and a little incomplete but the framework is coming together

    ×