Configuration Management - DrupalCon · Page 22 | Configuration Management: A True Life Story...
Transcript of Configuration Management - DrupalCon · Page 22 | Configuration Management: A True Life Story...
![Page 1: Configuration Management - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/1.jpg)
Page 1 | Configuration Management: A True Life Story
Configuration Management A True Life Story
October 16, 2018
![Page 2: Configuration Management - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/2.jpg)
Page 2 | Configuration Management: A True Life Story
John E. PicozziSenior Drupal Architect
401-228-7660
72 Clifford Street,
Providence, RI 02903
oomphinc.com
oomph.is/jpicozzi
Drupal Providence
![Page 3: Configuration Management - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/3.jpg)
Page 3 | Configuration Management: A True Life Story
Nathan DentzauSenior Web Engineer
401-228-7660
72 Clifford Street,
Providence, RI 02903
oomphinc.com
oomph.is/ndentzau
Drupal Providence
@nathandentzau
/nathandentzau
![Page 4: Configuration Management - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/4.jpg)
Page 4 | Configuration Management: A True Life Story
What is configuration?
September 1, 2016
![Page 5: Configuration Management - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/5.jpg)
Page 5 | 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 6: Configuration Management - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/6.jpg)
Page 6 | 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 7: Configuration Management - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/7.jpg)
Page 7 | Configuration Management: A True Life Story
Other types of configuration
● Fields
● Views
● Display modes
● Image styles
● Language settings
● System settings
● User roles
● Module settings
![Page 8: Configuration Management - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/8.jpg)
Page 8 | Configuration Management: A True Life Story
Where is configuration stored?
![Page 9: Configuration Management - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/9.jpg)
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 - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/10.jpg)
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 - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/11.jpg)
Page 11 | Configuration Management: A True Life Story
Configuration Manager
September 1, 2016
![Page 12: Configuration Management - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/12.jpg)
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 - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/13.jpg)
Page 13 | Configuration Management: A True Life Story
View Differences
![Page 14: Configuration Management - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/14.jpg)
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.
LOCAL PRODSTAGEDEVCOMMONCONFIG
![Page 15: Configuration Management - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/15.jpg)
Page 15 | Configuration Management: A True Life Story
Configuration Split
September 1, 2016
![Page 16: Configuration Management - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/16.jpg)
Page 16 | 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.
LOCAL PRODSTAGEDEV
COMMON CONFIG
![Page 17: Configuration Management - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/17.jpg)
Page 17 | 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 18: Configuration Management - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/18.jpg)
Page 18 | Configuration Management: A True Life Story
Why is config split helpful?
![Page 19: Configuration Management - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/19.jpg)
Page 19 | Configuration Management: A True Life Story
Complete Split
![Page 20: Configuration Management - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/20.jpg)
Page 20 | Configuration Management: A True Life Story
Conditional Split
![Page 21: Configuration Management - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/21.jpg)
Page 21 | Configuration Management: A True Life Story
Configuration Readonly
September 1, 2016
![Page 22: Configuration Management - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/22.jpg)
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 - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/23.jpg)
Page 23 | Configuration Management: A True Life Story
Configuration Installer
September 1, 2016
![Page 24: Configuration Management - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/24.jpg)
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 - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/25.jpg)
Page 25 | Configuration Management: A True Life Story
Configuration & Continuous Integration
September 1, 2016
![Page 26: Configuration Management - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/26.jpg)
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
Code
Repository
Test / Build
Website
![Page 27: Configuration Management - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/27.jpg)
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 - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/28.jpg)
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 - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/29.jpg)
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 - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/30.jpg)
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 - DrupalCon · Page 22 | Configuration Management: A True Life Story Configuration Readonly Contributed module Prevents administrators from editing active](https://reader033.fdocuments.net/reader033/viewer/2022042601/5f820ee1cf488123a809d6eb/html5/thumbnails/31.jpg)
Thank You!Thank you for listening. If you have any questions feel free to contact us.
401-228-7660
Oomphinc.com
@oomphinc
oomph.is/jpicozzi
@JohnPicozzi /in/johnpicozzi/u/johnpicozzi
@nathandentzau /nathandentzau