Configuration Management A True Life Story October 16, 2018 Page 1 - - PowerPoint PPT Presentation

configuration management
SMART_READER_LITE
LIVE PREVIEW

Configuration Management A True Life Story October 16, 2018 Page 1 - - PowerPoint PPT Presentation

Configuration Management A True Life Story October 16, 2018 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


slide-1
SLIDE 1

Page 1 | Configuration Management: A True Life Story

Configuration Management

A True Life Story

October 16, 2018

slide-2
SLIDE 2

Page 2 | Configuration Management: A True Life Story

John E. Picozzi

Senior Drupal Architect

401-228-7660 72 Clifford Street, Providence, RI 02903

  • omphinc.com
  • omph.is/jpicozzi

jpicozzi@oomphinc.com

Drupal Providence

slide-3
SLIDE 3

Page 3 | Configuration Management: A True Life Story

Nathan Dentzau

Senior Web Engineer

401-228-7660 72 Clifford Street, Providence, RI 02903

  • omphinc.com
  • omph.is/ndentzau

nate@oomphinc.com

Drupal Providence

@nathandentzau /nathandentzau

slide-4
SLIDE 4

Page 4 | Configuration Management: A True Life Story

What is configuration?

September 1, 2016

slide-5
SLIDE 5

Page 5 | Configuration Management: A True Life Story

In Drupal, configuration is the collection of admin settings that determine how the site functions, as

  • pposed to the content of the site.

https://www.drupal.org/docs/8/configuration-management

slide-6
SLIDE 6

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

slide-7
SLIDE 7

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
slide-8
SLIDE 8

Page 8 | Configuration Management: A True Life Story

Where is configuration stored?

slide-9
SLIDE 9

Page 9 | Configuration Management: A True Life Story

Configuration Storage: Database

  • Active configuration
  • Stored in a relational database
  • Changes applied immediately
  • Benefits:

○ Performance ○ Security

slide-10
SLIDE 10

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

slide-11
SLIDE 11

Page 11 | Configuration Management: A True Life Story

Configuration Manager

September 1, 2016

slide-12
SLIDE 12

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

slide-13
SLIDE 13

Page 13 | Configuration Management: A True Life Story

View Differences

slide-14
SLIDE 14

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 PROD STAGE DEV

COMMON CONFIG

slide-15
SLIDE 15

Page 15 | Configuration Management: A True Life Story

Configuration Split

September 1, 2016

slide-16
SLIDE 16

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 PROD STAGE DEV

COMMON CONFIG

slide-17
SLIDE 17

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

slide-18
SLIDE 18

Page 18 | Configuration Management: A True Life Story

Why is config split helpful?

slide-19
SLIDE 19

Page 19 | Configuration Management: A True Life Story

Complete Split

slide-20
SLIDE 20

Page 20 | Configuration Management: A True Life Story

Conditional Split

slide-21
SLIDE 21

Page 21 | Configuration Management: A True Life Story

Configuration Readonly

September 1, 2016

slide-22
SLIDE 22

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.

slide-23
SLIDE 23

Page 23 | Configuration Management: A True Life Story

Configuration Installer

September 1, 2016

slide-24
SLIDE 24

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

slide-25
SLIDE 25

Page 25 | Configuration Management: A True Life Story

Configuration & Continuous Integration

September 1, 2016

slide-26
SLIDE 26

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
  • n environment management
  • Developers can confidently merge in

code changes to a project while working on a team

Code Repository Test / Build Website

slide-27
SLIDE 27

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

slide-28
SLIDE 28

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

slide-29
SLIDE 29

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

slide-30
SLIDE 30

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
slide-31
SLIDE 31

Thank You!

Thank you for listening. If you have any questions feel free to contact us.

401-228-7660 Oomphinc.com @oomphinc

  • omph.is/jpicozzi

jpicozzi@oomphinc.com @JohnPicozzi /in/johnpicozzi /u/johnpicozzi @nathandentzau /nathandentzau