Configuration Management A True Life Story Page 1 | Configuration Management: A True Life Story
A presentation at Drupal Providence Meetup in October 2018 in Providence, RI, USA by John Picozzi
Configuration Management A True Life Story Page 1 | Configuration Management: A True Life Story
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
Nathan Dentzau PHP Application Developer @nathandentzau /nathandentzau Drupal Providence chromatichq.com chromatichq.com/users/nathan-dentzau [email protected] Page 3 | Configuration Management: A True Life Story
What is configuration? September 1, 2016 Page 4 | Configuration Management: A True Life Story
” 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
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
Pantheon Workflow https://pantheon.io/docs/pantheon-workflow/#code-moves-up-content-moves-down Page 7 | Configuration Management: A True Life Story
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
Where is configuration stored? Page 9 | Configuration Management: A True Life Story
Configuration Storage: Database ● Active configuration ● Stored in a relational database ● Changes applied immediately ● Benefits: ○ Performance ○ Security Page 10 | Configuration Management: A True Life Story
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
Configuration Manager September 1, 2016 Page 12 | Configuration Management: A True Life Story
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
View Differences Page 14 | Configuration Management: A True Life Story
Configuration Manager: Workflow The Configuration Management module offers a linear workflow where each environment shares the same set of configuration. COMMON CONFIG LOCAL Page 15 | Configuration Management: A True Life Story DEV STAGE PROD
Configuration Split September 1, 2016 Page 16 | Configuration Management: A True Life Story
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
Configuration Split: Workflow The Configuration Split module offers a distributed workflow where each environment has an independent set of configuration built on top of a common config. COMMON CONFIG LOCAL Page 18 | Configuration Management: A True Life Story DEV STAGE PROD
Why is config split helpful? Page 19 | Configuration Management: A True Life Story
Complete Split Page 20 | Configuration Management: A True Life Story
Conditional Split Page 21 | Configuration Management: A True Life Story
Configuration Readonly September 1, 2016 Page 22 | Configuration Management: A True Life Story
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 23 | Configuration Management: A True Life Story
Configuration Installer September 1, 2016 Page 24 | Configuration Management: A True Life Story
Configuration Installer ● ● Contributed install profile Install a new instance of Drupal from an existing set of configuration ● Note: Not compatible with Configuration Split. Manually importing configuration after install works Page 25 | Configuration Management: A True Life Story
Configuration & Continuous Integration September 1, 2016 Page 26 | Configuration Management: A True Life Story
What is Continuous Integration? ● ● ● The process of automating the build and testing of code in a shared code repository Developers can focus on code and less on environment management Developers can confidently merge in code changes to a project while working on a team Repository Test / Build Code Website Page 27 | Configuration Management: A True Life Story
Continuous Integration: Code ● ● ● Developers can use the Configuration Manager module to export Drupal configuration to version control and easily share configuration changes with other team members Developers can use the Configuration Split module to test configuration changes locally for different environments Code syntax validators can be executed with git hooks or manual invocation locally Page 28 | Configuration Management: A True Life Story
Continuous Integration: Repository ● ● ● ● Developers push and pull code from a central code repository like Github Pull requests are created by the developer making the change and reviewed by other team members Automated build and tests are triggered when new commits are pushed Results are posted in the pull request and prevent developers from merging changes until tests pass Page 29 | Configuration Management: A True Life Story
Continuous Integration: Test / Build ● ● ● Continuous integration services like Travis-CI can run code syntax validators, automated tests, and deployments in a CI pipeline The Configuration Installer profile can be used to install a new instance of Drupal testing the validity of configuration changes and to run automated functional tests If a failure occurs in any step in the pipeline, the build is halted Page 30 | Configuration Management: A True Life Story
Continuous Integration: Website ● ● ● Importing configuration changes, database updates and entity updates handled automatically during the deployment process Developers can enable the Configuration Readonly module in Production Improved site reliability and uptime Page 31 | Configuration Management: A True Life Story
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 /users/nathan-dentzau 401-228-7660 oomph.is/jpicozzi Oomphinc.com [email protected] @oomphinc