Configuration Management - DrupalCon

Transcription

Configuration ManagementA True Life StoryOctober 16, 2018Page 1 Configuration Management: A True Life Story

John E. PicozziSenior Drupal ArchitectDrupal Providence401-228-7660oomphinc.com72 Clifford Street,oomph.is/jpicozziProvidence, RI 02903jpicozzi@oomphinc.comPage 2 Configuration Management: A True Life Story

Nathan DentzauSenior Web Engineer@nathandentzau/nathandentzauDrupal Providence401-228-7660oomphinc.com72 Clifford Street,oomph.is/ndentzauProvidence, RI 02903nate@oomphinc.comPage 3 Configuration Management: A True Life Story

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

”In Drupal, configuration is the collection of adminsettings that determine how the site functions, asopposed to the content of the anagementPage 5 Configuration Management: A True Life Story

Configuration vs. ContentConfigurationContentContent typesNodesTaxonomy vocabularyTaxonomy termsMenusMenu linksBlocksBlock contentMedia typesMediaPage 6 Configuration Management: A True Life Story

Other types of configuration Fields Language settings Views System settings Display modes User roles Image styles Module settingsPage 7 Configuration Management: A True Life Story

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

Configuration Storage: Database Active configuration Stored in a relational database Changes applied immediately Benefits: Performance SecurityPage 9 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 SecurityPage 10 Configuration Management: A True Life Story

Configuration ManagerSeptember 1, 2016Page 11 Configuration Management: A True Life Story

ConfigurationManager Core moduleImport and export a single set ofconfiguration to the filesystem User Interface DrushInstall configuration from modules,profiles and themes Required config Optional configPage 12 Configuration Management: A True Life Story

View DifferencesPage 13 Configuration Management: A True Life Story

Configuration Manager: WorkflowThe Configuration Management module offers a linear workflow where eachenvironment shares the same set of configuration.COMMONCONFIGLOCALPage 14 Configuration Management: A True Life StoryDEVSTAGEPROD

Configuration SplitSeptember 1, 2016Page 15 Configuration Management: A True Life Story

Configuration Split: WorkflowThe Configuration Split module offers a distributed workflow where each environmenthas an independent set of configuration built on top of a common config.COMMON CONFIGLOCALPage 16 Configuration Management: A True Life StoryDEVSTAGEPROD

Configuration Split Contributed moduleImport and export multiple sets (splits) ofconfiguration to the filesystem User Interface DrushEnable/disable modules or themes fordifferent environmentsStore different configuration values fordifferent environments Complete Split / Blacklist Conditional Split / GraylistPage 17 Configuration Management: A True Life Story

Why is config splithelpful?Page 18 Configuration Management: A True Life Story

Complete SplitPage 19 Configuration Management: A True Life Story

Conditional SplitPage 20 Configuration Management: A True Life Story

Configuration ReadonlySeptember 1, 2016Page 21 Configuration Management: A True Life Story

ConfigurationReadonly Contributed modulePrevents administrators from editingactive configuration through the UserInterfaceModule can be enabled per environmentwith Configuration SplitWarning: Have a solid continuousintegration pipeline and testing proceduresin place before enabling in a productionenvironment.Page 22 Configuration Management: A True Life Story

Configuration InstallerSeptember 1, 2016Page 23 Configuration Management: A True Life Story

ConfigurationInstaller Contributed install profileInstall a new instance ofDrupal from an existing set ofconfiguration Note: Not compatible withConfiguration Split. Manuallyimporting configuration afterinstall worksPage 24 Configuration Management: A True Life Story

Configuration & ContinuousIntegrationSeptember 1, 2016Page 25 Configuration Management: A True Life Story

What is ContinuousIntegration? The process of automating the buildand testing of code in a shared coderepositoryDevelopers can focus on code and lesson environment managementDevelopers can confidently merge incode changes to a project whileworking on a teamRepositoryTest / BuildCodeWebsitePage 26 Configuration Management: A True Life Story

ContinuousIntegration: Code Developers can use the ConfigurationManager module to export Drupalconfiguration to version control and easilyshare configuration changes with other teammembersDevelopers can use the Configuration Splitmodule to test configuration changes locallyfor different environmentsCode syntax validators can be executed withgit hooks or manual invocation locallyPage 27 Configuration Management: A True Life Story

ContinuousIntegration: Repository Developers push and pull code from acentral code repository like GithubPull requests are created by the developermaking the change and reviewed by otherteam membersAutomated build and tests are triggeredwhen new commits are pushedResults are posted in the pull request andprevent developers from merging changesuntil tests passPage 28 Configuration Management: A True Life Story

Continuous Integration:Test / Build Continuous integration services likeTravis-CI can run code syntax validators,automated tests, and deployments in a CIpipelineThe Configuration Installer profile can beused to install a new instance of Drupaltesting the validity of configuration changesand to run automated functional testsIf a failure occurs in any step in the pipeline,the build is haltedPage 29 Configuration Management: A True Life Story

Continuous Integration:Website Importing configuration changes,database updates and entity updateshandled automatically during thedeployment processDevelopers can enable theConfiguration Readonly module inProductionImproved site reliability and uptimePage 30 Configuration Management: A True Life Story

Thank You!Thank you for listening. If you have any questionsfeel free to contact iOomphinc.comjpicozzi@oomphinc.com@oomphinc

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