Configuration Management: True Life Stories

A presentation at NERDSummit in March 2019 in Amherst, MA, USA by John Picozzi

Slide 1

Slide 1

Configuration Management A True Life Story Page 1 | Configuration Management: A True Life Story

Slide 2

Slide 2

John E. Picozzi Senior Drupal Architect Drupal Providence 401-228-7660 oomphinc.com 72 Clifford Street, oomph.is/jpicozzi Providence, RI 02903 [email protected] Page 2 | Configuration Management: A True Life Story

Slide 3

Slide 3

Nathan Dentzau Senior Developer Drupal Providence chromatichq.com chromatichq.com/users/nathan-dentzau [email protected] Page 3 | Configuration Management: A True Life Story

Slide 4

Slide 4

What is configuration? September 1, 2016 Page 4 | Configuration Management: A True Life Story

Slide 5

Slide 5

” In Drupal, configuration is the collection of admin settings that determine how the site functions, as opposed to the content of the site. https://www.drupal.org/docs/8/configuration-management Page 5 | Configuration Management: A True Life Story

Slide 6

Slide 6

Configuration vs. Content Configuration Content Content types Nodes Taxonomy vocabulary Taxonomy terms Menus Menu links Blocks Block content Media types Media Page 6 | Configuration Management: A True Life Story

Slide 7

Slide 7

Pantheon Workflow https://pantheon.io/docs/pantheon-workflow/#code-moves-up-content-moves-down Page 7 | Configuration Management: A True Life Story

Slide 8

Slide 8

Other types of configuration ● Fields ● Language settings ● Views ● System settings ● Display modes ● User roles ● Image styles ● Module settings Page 8 | Configuration Management: A True Life Story

Slide 9

Slide 9

Where is configuration stored? Page 9 | Configuration Management: A True Life Story

Slide 10

Slide 10

Configuration Storage: Database ● Active configuration ● Stored in a relational database ● Changes applied immediately ● Benefits: ○ Performance ○ Security Page 10 | Configuration Management: A True Life Story

Slide 11

Slide 11

Configuration Storage: Filesystem ● Staged configuration ● Stored on the filesystem as YAML files ● Changes applied by export or import ● Benefits: ○ Portability ○ Security Page 11 | Configuration Management: A True Life Story

Slide 12

Slide 12

Configuration Manager September 1, 2016 Page 12 | Configuration Management: A True Life Story

Slide 13

Slide 13

Configuration Manager ● ● ● Core module Import and export a single set of configuration to the filesystem ○ User Interface ○ Drush Install configuration from modules, profiles and themes ○ Required config ○ Optional config Page 13 | Configuration Management: A True Life Story

Slide 14

Slide 14

View Differences Page 14 | Configuration Management: A True Life Story

Slide 15

Slide 15

Configuration Manager: Workflow The Configuration Management module offers a linear workflow where each environment shares the same set of configuration. CONFIG SYNC LOCAL Page 15 | Configuration Management: A True Life Story DEV STAGE PROD

Slide 16

Slide 16

Configuration Split September 1, 2016 Page 16 | Configuration Management: A True Life Story

Slide 17

Slide 17

Configuration Split ● ● ● ● Contributed module Import and export multiple sets (splits) of configuration to the filesystem ○ User Interface ○ Drush Enable/disable modules or themes for different environments Store different configuration values for different environments ○ Complete Split / Blacklist ○ Conditional Split / Graylist Page 17 | Configuration Management: A True Life Story

Slide 18

Slide 18

Complete Split Page 18 | Configuration Management: A True Life Story

Slide 19

Slide 19

Conditional Split Page 19 | Configuration Management: A True Life Story

Slide 20

Slide 20

Configuration Split: Environment Workflow Creating configuration splits by environment allows developers to group sets of configuration that differ per environment (e.g. dev, test, prod). CONFIG SYNC LOCAL Page 20 | Configuration Management: A True Life Story DEV STAGE PROD

Slide 21

Slide 21

Configuration Split: Feature Workflow Creating configuration splits by features allows developers to turn individual features (e.g. modules) on and off no matter the context the site is running in. CONFIG SYNC DEVEL Page 21 | Configuration Management: A True Life Story FASTLY SOLR REDIS

Slide 22

Slide 22

Comparison of Config Directories Environment Splits Page 22 | Configuration Management: A True Life Story Feature Splits

Slide 23

Slide 23

Comparison of Settings Files Environment Splits Feature Splits Note: Each config_split is turned OFF by default, enabling splits are cleaner in settings.php Page 23 | Configuration Management: A True Life Story

Slide 24

Slide 24

Configuration Readonly September 1, 2016 Page 24 | Configuration Management: A True Life Story

Slide 25

Slide 25

Configuration Readonly ● ● ● ● Contributed module Prevents administrators from editing active configuration through the User Interface Module can be enabled per environment with Configuration Split Warning: Have a solid continuous integration pipeline and testing procedures in place before enabling in a production environment. Page 25 | Configuration Management: A True Life Story

Slide 26

Slide 26

Config Ignore September 1, 2016 Page 26 | Configuration Management: A True Life Story

Slide 27

Slide 27

Config Ignore ● ● ● ● Contributed module Allows for defined config to be ignored by import and export Module can be enabled per environment with Configuration Split Compatibility with Config Readonly: You can use the Config Ignore Readonly module to automatically whitelist configuration forms that are ignored. Page 27 | Configuration Management: A True Life Story

Slide 28

Slide 28

Thank You! Thank you for listening. If you have any questions feel free to contact us. nathandenzau /in/johnpicozzi @nathandentzau @johnpicozzi nathandentzau johnpicozzi chromatichq.com @chromatichq [email protected] oomphinc.com @oomphinc [email protected]