Introducing the Drupal 8
Configuration System

 

DrupalCon Austin     June 3, 2014     matthewtift.com

Matthew Tift

mtift

logo

Senior Developer at Lullabot

Drupal 8 configuration system co-maintainter

Configuration Management

... for site builders

Expected Confusion Level

Configuration Management:

What is it?

Configuration Management


Quality

Identify Problems

Coordination

Code Management

Metadata

Consistency

Repeatability

Control

Verification

Documentation

DEV PROD

configuration management
Configuration Management

Process
for establishing and maintaining consistency

Configuration

in Drupal 8

"Config" in Core


Drupal 7

"Configuration": 785

"Config": 2,414

Drupal 8

"Configuration": 5,540

"Config": 18,211

preconfigured

configurable

configurator

configured

configure

Configuration:

Types of Things

Configuration:

Views

Content Types

Image Styles

Forms

Settings

User Roles

Content:

Things

Content:

Article

Basic Page

Menu

User

Taxonomy

Site Builder

vs

Site Editor

That was
too easy

Simple
Configuration

vs

Configuration Entities

Simple
Configuration:

Exactly one copy or version

Configuration Entity:

Creates zero or more items

config content
Credit: Gábor Hojtsy

Simple Configuration

Configuration Entity

↕    

Content Entity

Confusion Check

Configuration:

Benefits

Benefit:

Eliminated 50 database tables


Benefit:

Reduced need for Features and Strongarm

Benefit:

Translatable

Three Items

Two Translatable

Benefit:

Swappable

Benefit:

API for Developers

Migrate in Core

Includes Configuration

Is it useful?

Is it valuable?

Idea

Mockup

Prototype

MVP

Product

Useful

Valuable

How Does
This Work?

Module Config     User Interaction     Import



Active Storage



Export Config

JPEG Quality

file admin/config/media/image-toolkit
file

Module Config

file core/modules/system/config/install/system.image.gd.yml

Active Storage

file

Export Config

file system.image.gd.yml

Drupal 7

JPEG Quality

File

file system/image.gd.inc (Drupal 7)

Database

file

User Interface

file admin/config/media/image-toolkit

Now What?


Consistent?

Repeatable?

Quality?

Diff?

Coordinated?

Metadata?

Other
Drupal 8 Data

Cron last run

Config? Content?

Other D8 Data

State System

state system

Other D8 Data

Settings.php
$config variable

config variable

Confusion Check

Configuration:

How do I use it?

DEV

PROD

Clone Your Site

You can only synchronize configuration between cloned instances of a site

JPEG Quality

Configuration Manager Module

configuration manager module

Configuration Management Section

config management

Export Config

Import Config

PROD Sync

View Differences

Import All

Synchronizing

Synchronization Complete

Sane
JPEG Quality

Configuration Management:

How You Can Help

drupal8cmi.org

IRC: #drupal-cmi

What did
you think?


Evaluate this session

austin2014.drupal.org/schedule

Matthew Tift

Drupal.org: mtift

Web: matthewtift.com

Twitter: @matthewtift


Slide Deck: lb.cm/austin-cmi