SlideShare a Scribd company logo
From Drupal 7 to Drupal 8
Features vs. Configuration
Management
Andrea Pescetti
andrea@nuvole.org
Antonio De Marco
antonio@nuvole.org
0
Nuvole
a 100% Drupal company
✈ Our Distributed Team
Italy Belgium Czech
Republic
ὄ Our Clients
Ὃ Our Projects
International organisations
Institutions
Fast delivery: several developers working simultaneously
on the same site
Frequent configuration changes: need for safe updates
 Challenges We Face
Remote collaboration on site development
Keeping track of all configuration changes during
development
Pushing upgrades to production sites
Chapter 1
ἱ ἴ ἳ ἲ ἱ
The Evolution of
Code-Driven Development
in Drupal 8
὆ The long march to a
"code-driven" Drupal
Historically, Drupal has kept both configuration and
content in the same database.
Every time you click in the administrative interface, no record is kept.
Drupal 6: Features appears, with the possibility to export
configuration to PHP code
Drupal 7: Features support is mature, but still relying on
third parties and incomplete
Drupal 8: Configuration and content are separated,
configuration is text-based
  
The database-driven
workflow disadvantages
Default in Drupal 6 and Drupal 7 (core)
Standard approach: you click, you save, Drupal saves to
database and forgets
Bad: Mixing configuration and content
Bad: Losing track of configuration changes
Theoretically still possible in Drupal 8!
 
The Features-driven
workflow disadvantages
A structural flaw: to package configuration into modules,
you need to make it exportable to "code"
Features is very good for packaging, not as good for
exporting; but there's no packaging without exporting
Not everything is exportable/traceable
You must "whitelist" elements to be tracked: you never
have the whole site under control
 
Code-driven is not just
Features
It’s a global technical choice
For example, it includes makefiles and profiles, still
applicable in D8
Keywords: text-based configuration, traceability,
repeatability, reuse
Ἲ
New in Drupal 8
Configuration Management
Ἲ
A guided example of
Configuration Management
Ἲ
Reference Use Case
Modify the configuration of a production site:
Keeping the site online all the time.
Developing/testing the new configuration on a
development copy.
Exporting the configuration changes from development
and importing them into production.
Ἲ Step 1 of 6
Clone Site to Dev
Production
Install Site
Full backup:
Database
Full Drupal tree
Files
Development
Restore the backup
Ἲ Step 2 of 6
Modify Configuration
Production
Site operates normally:
new users
new content
Development
Ἲ Step 3 of 6
Export Configuration
Production
Site operates normally:
new users
new content
Development
Ἲ Step 4 of 6
Import into Staging
Production Development
Ἲ Step 5 of 6
Review Changes
Production Development
Ἲ Step 6 of 6
Apply Changes
Production Development
How this would have
worked in Drupal 7
Clone site to development environment
Create a feature exporting the site name variable
Development: update the feature
Transfer the feature to Production
Production: enable/revert the feature
drush
DRUpal SHell: everybody loves!
Drupal 8 ⇔ drush 7
Both not stable yet
A new installation method: composer
Ἲ Step 3 of 6 — Drush Style
Export Configuration
Development
$ drush config-export
The current contents of your export directory
(sites/default/files/config_H6raw/staging) will be deleted. (y/n): y
Configuration successfully exported to [success]
sites/default/files/config_H6raw/staging.
Ἲ Step 5 of 6 — Drush Style
Review Changes
Production
$ drush config-import --preview=diff
Configuration successfully exported to /tmp/drush_tmp_xy. [success]
diff -u /tmp/drush_tmp_xy/system.site.yml sites/.../staging/system.site.yml
--- /tmp/drush_tmp_xy/system.site.yml
+++ sites/default/files/config_H6raw/staging/system.site.yml
@@ -1,5 +1,5 @@
uuid: ca04efa4-51bf-4d12-8b00-e7b244b97aef
-name: 'Drupal 8'
+name: 'Amsterdam - alpha15'
mail: drupal@example.com
slogan: ''
page:
Import the listed configuration changes? (y/n):
Chapter 2

Inner workings of
Configuration Management
and Features
 Use case
Features
A collection of logically
related Drupal elements
Packaged into PHP code,
using hooks
Exportability is a
precondition to packaging
Configuration Management
Reference for the whole site
configuration, development to
production
Ὄ Configuration format
PHP
Imperative
Interpreted
Can break site if corrupted
Located in folders for
modules
Treated as modules
YAML
Declarative
Parsed
Cannot break anything if corrupted
Located in specific folders
for config
Treated as data (like Rules'
JSON in D7)
 Support
Optional
Modules must offer support
for Features
No guarantees
Mandatory
Core configuration
The only way to supply
configuration
ὒ Configuration and
modules
Drupal 7
Features are special
modules
Once a Feature is enabled,
its configuration is tracked
forever
Drupal 8
Modules provide initial
values
In this sense, every module
is a Feature
Configuration is decoupled
from modules after
installation
 Components selection
Drupal 7
Explicitly listed in info file
Rest is not tracked
Drupal 8
All configuration is tracked
Configuration is saved per
config entity
Can be individually
imported/exported
Config synchronisation
requires all files to be
present (missing = deleted)
 Configuration staging
Drupal 7
Feature states: normal,
overridden, needs review
Operations: features
update/revert
Diff available
Drupal 8
Active store and staging
store (multiple stores
possible)
Operations: import and
export
Diff available

Drush workflow
Drupal 7
drush features-update
drush features-revert
Drupal 8 (with drush 7.x-dev)
drush cex
drush cim
Ἴ ⚽
Cross-site compatibility
Drupal 7
Write once, deploy
anywhere
A feature is ready to be
deployed on multiple sites
Drupal 8
Specific to multiple
instances (dev, prod) of the
same site
This is the CMI use case
Configuration Management
relies on UUIDs
 Ὁ
Boundaries of configuration
Drupal 7
Entities through entity api,
CTools plugins
Variables with Strongarm
Content with
features_uuid
Menu links, custom and
contrib modules can be
problematic
Drupal 8
Configuration
Content
State
All clearly defined
὎ ὎ ὎
Features done right?
Drupal 7
Not optimal
A bit "forced" at times since
it is not native in Drupal 7
Drupal 8
Clean
Native
Not as powerful as
D7+Features yet
Chapter 3
 
How to build
Re-usable components

Contrib module:
Configuration development
1. Automated import of configuration files into the active
storage.
2. Automated export of configuration objects into files.
https://www.drupal.org/project/config_devel

config_devel & drush
nuvole_article.info.yml
config_devel:
- field.instance.node.article.field_image
- field.storage.node.field_image
- node.type.article
drush
$ drush config-devel-export-module nuvole_article
 Features 8.x-3.x
Goes back to the core mission of Features: package
functionality for re-use.
No more project specific features!
Under development in sandbox
 Other considerations
config_devel can also “import” configuration, only
important during development of a re-usable feature
Room for another drush extension that re-installs the
default config.
Chapter 4
Ἱ
Configuration Management
For Developers
 An overview
⇆ API import
The Config namespace configuration must always be
imported/exported through the API, never edit the files!
The filesystem is not a good option, and this is the reason
for Drupal 8 to store the active config in database by
default:
Performance
Safety
Security
⚙
Configurables in Drupal 8
ConfigEntityBaseclass
Two namespaces: one for config, one for content
⚙
Working with configuration
Reading and writing configuration
// Get site name.
$site_name = Drupal::config('system.site')->get('name');
// Set site name.
Drupal::config('system.site')->set('name', 'My site')->save();
⛼
variable_get()and variable_set()died.
⚙
Information about the
system state
instance-specific? (e.g., last cron run) → state
configuration? (e.g., site mail) → config
Site = filesystem + content + configuration + state
⚙
Working with states
Reading and writing states
// Get last cron run timestamp.
$time = Drupal::state()->get('system.cron_last');
// Set cron run timestamp.
Drupal::state()->set('system.cron_last', REQUEST_TIME);
⚙
Overriding "on the fly"
The $confarray is still available as $config
Useful in settings.local.php:
Differentiate development and production environment
ὄ
Thank you!

More Related Content

Viewers also liked

[drupalday2017] - DRUPAL per la PA: il modello della Trasparenza di Sapienza
[drupalday2017] - DRUPAL per la PA: il modello della Trasparenza di Sapienza[drupalday2017] - DRUPAL per la PA: il modello della Trasparenza di Sapienza
[drupalday2017] - DRUPAL per la PA: il modello della Trasparenza di Sapienza
DrupalDay
 
[drupalday2017] - Drupal & Patternlab: un nuovo approccio al theming
[drupalday2017] - Drupal & Patternlab: un nuovo approccio al theming[drupalday2017] - Drupal & Patternlab: un nuovo approccio al theming
[drupalday2017] - Drupal & Patternlab: un nuovo approccio al theming
DrupalDay
 
DDAY2014 - Loveyourpix Case Study
DDAY2014 - Loveyourpix Case StudyDDAY2014 - Loveyourpix Case Study
DDAY2014 - Loveyourpix Case Study
DrupalDay
 
Drupal per la PA dell'Emilia-Romagna
Drupal per la PA dell'Emilia-RomagnaDrupal per la PA dell'Emilia-Romagna
Drupal per la PA dell'Emilia-Romagna
DrupalDay
 
La piattaforma web di CNA: Istanze Drupal replicabili integrate con Alfresco ...
La piattaforma web di CNA: Istanze Drupal replicabili integrate con Alfresco ...La piattaforma web di CNA: Istanze Drupal replicabili integrate con Alfresco ...
La piattaforma web di CNA: Istanze Drupal replicabili integrate con Alfresco ...
DrupalDay
 
Drupal 8: dal download del Core alla pubblicazione in produzione. Cos'è cambi...
Drupal 8: dal download del Core alla pubblicazione in produzione. Cos'è cambi...Drupal 8: dal download del Core alla pubblicazione in produzione. Cos'è cambi...
Drupal 8: dal download del Core alla pubblicazione in produzione. Cos'è cambi...
DrupalDay
 
La semantica per automatizzare una redazione web: l'esperienza di Innolabplus.eu
La semantica per automatizzare una redazione web: l'esperienza di Innolabplus.euLa semantica per automatizzare una redazione web: l'esperienza di Innolabplus.eu
La semantica per automatizzare una redazione web: l'esperienza di Innolabplus.eu
DrupalDay
 
Come progettare e realizzare una distribuzione in Drupal 8
Come progettare e realizzare una distribuzione in Drupal 8Come progettare e realizzare una distribuzione in Drupal 8
Come progettare e realizzare una distribuzione in Drupal 8
DrupalDay
 
Da X a Drupal 8, migra tutto e vivi sereno
Da X a Drupal 8, migra tutto e vivi serenoDa X a Drupal 8, migra tutto e vivi sereno
Da X a Drupal 8, migra tutto e vivi sereno
DrupalDay
 
[drupalday2017] - DevOps: strumenti di automazione per Drupal8
[drupalday2017] - DevOps: strumenti di automazione per Drupal8[drupalday2017] - DevOps: strumenti di automazione per Drupal8
[drupalday2017] - DevOps: strumenti di automazione per Drupal8
DrupalDay
 
[drupalday2017] - Async navigation with a lightweight ES6 framework
[drupalday2017] - Async navigation with a lightweight ES6 framework[drupalday2017] - Async navigation with a lightweight ES6 framework
[drupalday2017] - Async navigation with a lightweight ES6 framework
DrupalDay
 
[drupalday2017] - Drupal 4 Stakeholders
[drupalday2017] - Drupal 4 Stakeholders[drupalday2017] - Drupal 4 Stakeholders
[drupalday2017] - Drupal 4 Stakeholders
DrupalDay
 
[drupalday 2017] - Accessibilità Web: Finalità, metodologie e strumenti.
[drupalday 2017] - Accessibilità Web: Finalità, metodologie e strumenti.[drupalday 2017] - Accessibilità Web: Finalità, metodologie e strumenti.
[drupalday 2017] - Accessibilità Web: Finalità, metodologie e strumenti.
DrupalDay
 
[drupalday2017 - KEYNOTE] - Saving the world one Open Source project at a time
[drupalday2017 - KEYNOTE] - Saving the world one Open Source project at a time[drupalday2017 - KEYNOTE] - Saving the world one Open Source project at a time
[drupalday2017 - KEYNOTE] - Saving the world one Open Source project at a time
DrupalDay
 
[drupalday2017] - Behat per Drupal: test automatici e molto di più
[drupalday2017] - Behat per Drupal: test automatici e molto di più[drupalday2017] - Behat per Drupal: test automatici e molto di più
[drupalday2017] - Behat per Drupal: test automatici e molto di più
DrupalDay
 
[drupalday2017] - Contenuti educativi digitali aperti, creare contenuti e dis...
[drupalday2017] - Contenuti educativi digitali aperti, creare contenuti e dis...[drupalday2017] - Contenuti educativi digitali aperti, creare contenuti e dis...
[drupalday2017] - Contenuti educativi digitali aperti, creare contenuti e dis...
DrupalDay
 
[drupalday2017] - Open Data con Drupal nella PA: considerazioni su licensing ...
[drupalday2017] - Open Data con Drupal nella PA: considerazioni su licensing ...[drupalday2017] - Open Data con Drupal nella PA: considerazioni su licensing ...
[drupalday2017] - Open Data con Drupal nella PA: considerazioni su licensing ...
DrupalDay
 
[drupalday2017] - Cosa significa convertire un modulo da D7 a D8
[drupalday2017] - Cosa significa convertire un modulo da D7 a D8[drupalday2017] - Cosa significa convertire un modulo da D7 a D8
[drupalday2017] - Cosa significa convertire un modulo da D7 a D8
DrupalDay
 
[drupalday2017] - Cloud e integrazione per la PA: la sfida dell'Open Source t...
[drupalday2017] - Cloud e integrazione per la PA: la sfida dell'Open Source t...[drupalday2017] - Cloud e integrazione per la PA: la sfida dell'Open Source t...
[drupalday2017] - Cloud e integrazione per la PA: la sfida dell'Open Source t...
DrupalDay
 
[drupalday2017] - Drupal come frontend che consuma servizi: HTTP Client Manager
[drupalday2017] - Drupal come frontend che consuma servizi: HTTP Client Manager[drupalday2017] - Drupal come frontend che consuma servizi: HTTP Client Manager
[drupalday2017] - Drupal come frontend che consuma servizi: HTTP Client Manager
DrupalDay
 

Viewers also liked (20)

[drupalday2017] - DRUPAL per la PA: il modello della Trasparenza di Sapienza
[drupalday2017] - DRUPAL per la PA: il modello della Trasparenza di Sapienza[drupalday2017] - DRUPAL per la PA: il modello della Trasparenza di Sapienza
[drupalday2017] - DRUPAL per la PA: il modello della Trasparenza di Sapienza
 
[drupalday2017] - Drupal & Patternlab: un nuovo approccio al theming
[drupalday2017] - Drupal & Patternlab: un nuovo approccio al theming[drupalday2017] - Drupal & Patternlab: un nuovo approccio al theming
[drupalday2017] - Drupal & Patternlab: un nuovo approccio al theming
 
DDAY2014 - Loveyourpix Case Study
DDAY2014 - Loveyourpix Case StudyDDAY2014 - Loveyourpix Case Study
DDAY2014 - Loveyourpix Case Study
 
Drupal per la PA dell'Emilia-Romagna
Drupal per la PA dell'Emilia-RomagnaDrupal per la PA dell'Emilia-Romagna
Drupal per la PA dell'Emilia-Romagna
 
La piattaforma web di CNA: Istanze Drupal replicabili integrate con Alfresco ...
La piattaforma web di CNA: Istanze Drupal replicabili integrate con Alfresco ...La piattaforma web di CNA: Istanze Drupal replicabili integrate con Alfresco ...
La piattaforma web di CNA: Istanze Drupal replicabili integrate con Alfresco ...
 
Drupal 8: dal download del Core alla pubblicazione in produzione. Cos'è cambi...
Drupal 8: dal download del Core alla pubblicazione in produzione. Cos'è cambi...Drupal 8: dal download del Core alla pubblicazione in produzione. Cos'è cambi...
Drupal 8: dal download del Core alla pubblicazione in produzione. Cos'è cambi...
 
La semantica per automatizzare una redazione web: l'esperienza di Innolabplus.eu
La semantica per automatizzare una redazione web: l'esperienza di Innolabplus.euLa semantica per automatizzare una redazione web: l'esperienza di Innolabplus.eu
La semantica per automatizzare una redazione web: l'esperienza di Innolabplus.eu
 
Come progettare e realizzare una distribuzione in Drupal 8
Come progettare e realizzare una distribuzione in Drupal 8Come progettare e realizzare una distribuzione in Drupal 8
Come progettare e realizzare una distribuzione in Drupal 8
 
Da X a Drupal 8, migra tutto e vivi sereno
Da X a Drupal 8, migra tutto e vivi serenoDa X a Drupal 8, migra tutto e vivi sereno
Da X a Drupal 8, migra tutto e vivi sereno
 
[drupalday2017] - DevOps: strumenti di automazione per Drupal8
[drupalday2017] - DevOps: strumenti di automazione per Drupal8[drupalday2017] - DevOps: strumenti di automazione per Drupal8
[drupalday2017] - DevOps: strumenti di automazione per Drupal8
 
[drupalday2017] - Async navigation with a lightweight ES6 framework
[drupalday2017] - Async navigation with a lightweight ES6 framework[drupalday2017] - Async navigation with a lightweight ES6 framework
[drupalday2017] - Async navigation with a lightweight ES6 framework
 
[drupalday2017] - Drupal 4 Stakeholders
[drupalday2017] - Drupal 4 Stakeholders[drupalday2017] - Drupal 4 Stakeholders
[drupalday2017] - Drupal 4 Stakeholders
 
[drupalday 2017] - Accessibilità Web: Finalità, metodologie e strumenti.
[drupalday 2017] - Accessibilità Web: Finalità, metodologie e strumenti.[drupalday 2017] - Accessibilità Web: Finalità, metodologie e strumenti.
[drupalday 2017] - Accessibilità Web: Finalità, metodologie e strumenti.
 
[drupalday2017 - KEYNOTE] - Saving the world one Open Source project at a time
[drupalday2017 - KEYNOTE] - Saving the world one Open Source project at a time[drupalday2017 - KEYNOTE] - Saving the world one Open Source project at a time
[drupalday2017 - KEYNOTE] - Saving the world one Open Source project at a time
 
[drupalday2017] - Behat per Drupal: test automatici e molto di più
[drupalday2017] - Behat per Drupal: test automatici e molto di più[drupalday2017] - Behat per Drupal: test automatici e molto di più
[drupalday2017] - Behat per Drupal: test automatici e molto di più
 
[drupalday2017] - Contenuti educativi digitali aperti, creare contenuti e dis...
[drupalday2017] - Contenuti educativi digitali aperti, creare contenuti e dis...[drupalday2017] - Contenuti educativi digitali aperti, creare contenuti e dis...
[drupalday2017] - Contenuti educativi digitali aperti, creare contenuti e dis...
 
[drupalday2017] - Open Data con Drupal nella PA: considerazioni su licensing ...
[drupalday2017] - Open Data con Drupal nella PA: considerazioni su licensing ...[drupalday2017] - Open Data con Drupal nella PA: considerazioni su licensing ...
[drupalday2017] - Open Data con Drupal nella PA: considerazioni su licensing ...
 
[drupalday2017] - Cosa significa convertire un modulo da D7 a D8
[drupalday2017] - Cosa significa convertire un modulo da D7 a D8[drupalday2017] - Cosa significa convertire un modulo da D7 a D8
[drupalday2017] - Cosa significa convertire un modulo da D7 a D8
 
[drupalday2017] - Cloud e integrazione per la PA: la sfida dell'Open Source t...
[drupalday2017] - Cloud e integrazione per la PA: la sfida dell'Open Source t...[drupalday2017] - Cloud e integrazione per la PA: la sfida dell'Open Source t...
[drupalday2017] - Cloud e integrazione per la PA: la sfida dell'Open Source t...
 
[drupalday2017] - Drupal come frontend che consuma servizi: HTTP Client Manager
[drupalday2017] - Drupal come frontend che consuma servizi: HTTP Client Manager[drupalday2017] - Drupal come frontend che consuma servizi: HTTP Client Manager
[drupalday2017] - Drupal come frontend che consuma servizi: HTTP Client Manager
 

Similar to DDAY2014 - Features per Drupal 8

Drupal 8 Configuration Management with Features
Drupal 8 Configuration Management with FeaturesDrupal 8 Configuration Management with Features
Drupal 8 Configuration Management with Features
Nuvole
 
Drupal 8 Configuration Management
Drupal 8 Configuration ManagementDrupal 8 Configuration Management
Drupal 8 Configuration Management
Sathya Sheela Sankaralingam
 
Drupal 8 Configuration Management for you and your team
Drupal 8 Configuration Management for you and your teamDrupal 8 Configuration Management for you and your team
Drupal 8 Configuration Management for you and your team
Luc Bézier
 
Configuration Management in Drupal 8: A preview (DrupalCamp Alpe Adria 2014)
Configuration Management in Drupal 8: A preview (DrupalCamp Alpe Adria 2014)Configuration Management in Drupal 8: A preview (DrupalCamp Alpe Adria 2014)
Configuration Management in Drupal 8: A preview (DrupalCamp Alpe Adria 2014)
Nuvole
 
Configuration Management in Drupal 8: A preview (DrupalDays Milano 2014)
Configuration Management in Drupal 8: A preview (DrupalDays Milano 2014)Configuration Management in Drupal 8: A preview (DrupalDays Milano 2014)
Configuration Management in Drupal 8: A preview (DrupalDays Milano 2014)
Nuvole
 
Building and Maintaining a Distribution in Drupal 7 with Features
Building and Maintaining a  Distribution in Drupal 7 with FeaturesBuilding and Maintaining a  Distribution in Drupal 7 with Features
Building and Maintaining a Distribution in Drupal 7 with Features
Nuvole
 
Gestione della configurazione in Drupal 8
Gestione della configurazione in Drupal 8Gestione della configurazione in Drupal 8
Gestione della configurazione in Drupal 8
Eugenio Minardi
 
Drupal Migrations in 2018
Drupal Migrations in 2018Drupal Migrations in 2018
Drupal Migrations in 2018
Pantheon
 
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
Eric Sembrat
 
Features everywhere
Features everywhere Features everywhere
Features everywhere
Mediacurrent
 
Drupal 6 to Drupal 8 Migration
Drupal 6 to Drupal 8 MigrationDrupal 6 to Drupal 8 Migration
Drupal 6 to Drupal 8 Migration
Ameex Technologies
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Mack Hardy
 
How to Migrate Drupal 6 to Drupal 8?
How to Migrate Drupal 6 to Drupal 8?How to Migrate Drupal 6 to Drupal 8?
How to Migrate Drupal 6 to Drupal 8?
DrupalGeeks
 
Features & Installation Profiles
Features & Installation ProfilesFeatures & Installation Profiles
Features & Installation Profiles
David Watson
 
Docman - The swiss army knife for Drupal multisite docroot management and dep...
Docman - The swiss army knife for Drupal multisite docroot management and dep...Docman - The swiss army knife for Drupal multisite docroot management and dep...
Docman - The swiss army knife for Drupal multisite docroot management and dep...
Aleksey Tkachenko
 
Taking your site from Drupal 6 to Drupal 7
Taking your site from Drupal 6 to Drupal 7Taking your site from Drupal 6 to Drupal 7
Taking your site from Drupal 6 to Drupal 7
Phase2
 
Building a Drupal Distribution using Features, Drush Make, Installation Profi...
Building a Drupal Distribution using Features, Drush Make, Installation Profi...Building a Drupal Distribution using Features, Drush Make, Installation Profi...
Building a Drupal Distribution using Features, Drush Make, Installation Profi...
Ben Shell
 
Drupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesDrupal 8 - Core and API Changes
Drupal 8 - Core and API Changes
Shabir Ahmad
 

Similar to DDAY2014 - Features per Drupal 8 (20)

Drupal 8 Configuration Management with Features
Drupal 8 Configuration Management with FeaturesDrupal 8 Configuration Management with Features
Drupal 8 Configuration Management with Features
 
Drupal 8 Configuration Management
Drupal 8 Configuration ManagementDrupal 8 Configuration Management
Drupal 8 Configuration Management
 
Drupal 8 Configuration Management for you and your team
Drupal 8 Configuration Management for you and your teamDrupal 8 Configuration Management for you and your team
Drupal 8 Configuration Management for you and your team
 
Configuration Management in Drupal 8: A preview (DrupalCamp Alpe Adria 2014)
Configuration Management in Drupal 8: A preview (DrupalCamp Alpe Adria 2014)Configuration Management in Drupal 8: A preview (DrupalCamp Alpe Adria 2014)
Configuration Management in Drupal 8: A preview (DrupalCamp Alpe Adria 2014)
 
Configuration Management in Drupal 8: A preview (DrupalDays Milano 2014)
Configuration Management in Drupal 8: A preview (DrupalDays Milano 2014)Configuration Management in Drupal 8: A preview (DrupalDays Milano 2014)
Configuration Management in Drupal 8: A preview (DrupalDays Milano 2014)
 
Building and Maintaining a Distribution in Drupal 7 with Features
Building and Maintaining a  Distribution in Drupal 7 with FeaturesBuilding and Maintaining a  Distribution in Drupal 7 with Features
Building and Maintaining a Distribution in Drupal 7 with Features
 
Gestione della configurazione in Drupal 8
Gestione della configurazione in Drupal 8Gestione della configurazione in Drupal 8
Gestione della configurazione in Drupal 8
 
Drupal Migrations in 2018
Drupal Migrations in 2018Drupal Migrations in 2018
Drupal Migrations in 2018
 
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
October 2016 - USG Rock Eagle - Everything You Need to Know to Plan Your Drup...
 
Features everywhere
Features everywhere Features everywhere
Features everywhere
 
Drupal 6 to Drupal 8 Migration
Drupal 6 to Drupal 8 MigrationDrupal 6 to Drupal 8 Migration
Drupal 6 to Drupal 8 Migration
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
 
How to Migrate Drupal 6 to Drupal 8?
How to Migrate Drupal 6 to Drupal 8?How to Migrate Drupal 6 to Drupal 8?
How to Migrate Drupal 6 to Drupal 8?
 
Test
TestTest
Test
 
Features & Installation Profiles
Features & Installation ProfilesFeatures & Installation Profiles
Features & Installation Profiles
 
Docman - The swiss army knife for Drupal multisite docroot management and dep...
Docman - The swiss army knife for Drupal multisite docroot management and dep...Docman - The swiss army knife for Drupal multisite docroot management and dep...
Docman - The swiss army knife for Drupal multisite docroot management and dep...
 
Into to drupal8
Into to drupal8Into to drupal8
Into to drupal8
 
Taking your site from Drupal 6 to Drupal 7
Taking your site from Drupal 6 to Drupal 7Taking your site from Drupal 6 to Drupal 7
Taking your site from Drupal 6 to Drupal 7
 
Building a Drupal Distribution using Features, Drush Make, Installation Profi...
Building a Drupal Distribution using Features, Drush Make, Installation Profi...Building a Drupal Distribution using Features, Drush Make, Installation Profi...
Building a Drupal Distribution using Features, Drush Make, Installation Profi...
 
Drupal 8 - Core and API Changes
Drupal 8 - Core and API ChangesDrupal 8 - Core and API Changes
Drupal 8 - Core and API Changes
 

More from DrupalDay

[drupalday2017] - Decoupled frontend con Drupal 8 e OpenUI 5
[drupalday2017] - Decoupled frontend con Drupal 8 e OpenUI 5[drupalday2017] - Decoupled frontend con Drupal 8 e OpenUI 5
[drupalday2017] - Decoupled frontend con Drupal 8 e OpenUI 5
DrupalDay
 
[drupalday2017] - Venezia & Drupal. Venezia è Drupal!
[drupalday2017] - Venezia & Drupal. Venezia è Drupal![drupalday2017] - Venezia & Drupal. Venezia è Drupal!
[drupalday2017] - Venezia & Drupal. Venezia è Drupal!
DrupalDay
 
[drupalday2017] - Quando l’informazione è un servizio
[drupalday2017] - Quando l’informazione è un servizio[drupalday2017] - Quando l’informazione è un servizio
[drupalday2017] - Quando l’informazione è un servizio
DrupalDay
 
[drupalday2017] - Devel - D8 release party
[drupalday2017] - Devel - D8 release party[drupalday2017] - Devel - D8 release party
[drupalday2017] - Devel - D8 release party
DrupalDay
 
[drupalday2017] - Speed-up your Drupal instance!
[drupalday2017] - Speed-up your Drupal instance![drupalday2017] - Speed-up your Drupal instance!
[drupalday2017] - Speed-up your Drupal instance!
DrupalDay
 
[drupalday2017] - DevOps: strumenti di automazione per Drupal8
[drupalday2017] - DevOps: strumenti di automazione per Drupal8[drupalday2017] - DevOps: strumenti di automazione per Drupal8
[drupalday2017] - DevOps: strumenti di automazione per Drupal8
DrupalDay
 
[drupalday2017] - REST in pieces
[drupalday2017] - REST in pieces[drupalday2017] - REST in pieces
[drupalday2017] - REST in pieces
DrupalDay
 
Your Entity, Your Code
Your Entity, Your CodeYour Entity, Your Code
Your Entity, Your Code
DrupalDay
 
Once you go cloud you never go down
Once you go cloud you never go downOnce you go cloud you never go down
Once you go cloud you never go down
DrupalDay
 
Tooling per il tema in Drupal 8
Tooling per il tema in Drupal 8Tooling per il tema in Drupal 8
Tooling per il tema in Drupal 8
DrupalDay
 
Drupal per la PA
Drupal per la PADrupal per la PA
Drupal per la PA
DrupalDay
 
Mantenere una distribuzione Drupal attraverso test coverage: Paddle case study
Mantenere una distribuzione Drupal attraverso test coverage: Paddle case studyMantenere una distribuzione Drupal attraverso test coverage: Paddle case study
Mantenere una distribuzione Drupal attraverso test coverage: Paddle case study
DrupalDay
 
Invisiblefarm condivide l'esperienza DrupalGIS
Invisiblefarm condivide l'esperienza DrupalGISInvisiblefarm condivide l'esperienza DrupalGIS
Invisiblefarm condivide l'esperienza DrupalGIS
DrupalDay
 
"Twig e i belli dentro": panoramica sui nuovi standard di frontend-developmen...
"Twig e i belli dentro": panoramica sui nuovi standard di frontend-developmen..."Twig e i belli dentro": panoramica sui nuovi standard di frontend-developmen...
"Twig e i belli dentro": panoramica sui nuovi standard di frontend-developmen...
DrupalDay
 

More from DrupalDay (14)

[drupalday2017] - Decoupled frontend con Drupal 8 e OpenUI 5
[drupalday2017] - Decoupled frontend con Drupal 8 e OpenUI 5[drupalday2017] - Decoupled frontend con Drupal 8 e OpenUI 5
[drupalday2017] - Decoupled frontend con Drupal 8 e OpenUI 5
 
[drupalday2017] - Venezia & Drupal. Venezia è Drupal!
[drupalday2017] - Venezia & Drupal. Venezia è Drupal![drupalday2017] - Venezia & Drupal. Venezia è Drupal!
[drupalday2017] - Venezia & Drupal. Venezia è Drupal!
 
[drupalday2017] - Quando l’informazione è un servizio
[drupalday2017] - Quando l’informazione è un servizio[drupalday2017] - Quando l’informazione è un servizio
[drupalday2017] - Quando l’informazione è un servizio
 
[drupalday2017] - Devel - D8 release party
[drupalday2017] - Devel - D8 release party[drupalday2017] - Devel - D8 release party
[drupalday2017] - Devel - D8 release party
 
[drupalday2017] - Speed-up your Drupal instance!
[drupalday2017] - Speed-up your Drupal instance![drupalday2017] - Speed-up your Drupal instance!
[drupalday2017] - Speed-up your Drupal instance!
 
[drupalday2017] - DevOps: strumenti di automazione per Drupal8
[drupalday2017] - DevOps: strumenti di automazione per Drupal8[drupalday2017] - DevOps: strumenti di automazione per Drupal8
[drupalday2017] - DevOps: strumenti di automazione per Drupal8
 
[drupalday2017] - REST in pieces
[drupalday2017] - REST in pieces[drupalday2017] - REST in pieces
[drupalday2017] - REST in pieces
 
Your Entity, Your Code
Your Entity, Your CodeYour Entity, Your Code
Your Entity, Your Code
 
Once you go cloud you never go down
Once you go cloud you never go downOnce you go cloud you never go down
Once you go cloud you never go down
 
Tooling per il tema in Drupal 8
Tooling per il tema in Drupal 8Tooling per il tema in Drupal 8
Tooling per il tema in Drupal 8
 
Drupal per la PA
Drupal per la PADrupal per la PA
Drupal per la PA
 
Mantenere una distribuzione Drupal attraverso test coverage: Paddle case study
Mantenere una distribuzione Drupal attraverso test coverage: Paddle case studyMantenere una distribuzione Drupal attraverso test coverage: Paddle case study
Mantenere una distribuzione Drupal attraverso test coverage: Paddle case study
 
Invisiblefarm condivide l'esperienza DrupalGIS
Invisiblefarm condivide l'esperienza DrupalGISInvisiblefarm condivide l'esperienza DrupalGIS
Invisiblefarm condivide l'esperienza DrupalGIS
 
"Twig e i belli dentro": panoramica sui nuovi standard di frontend-developmen...
"Twig e i belli dentro": panoramica sui nuovi standard di frontend-developmen..."Twig e i belli dentro": panoramica sui nuovi standard di frontend-developmen...
"Twig e i belli dentro": panoramica sui nuovi standard di frontend-developmen...
 

Recently uploaded

FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 

DDAY2014 - Features per Drupal 8

  • 1. From Drupal 7 to Drupal 8 Features vs. Configuration Management Andrea Pescetti andrea@nuvole.org Antonio De Marco antonio@nuvole.org 0
  • 3. ✈ Our Distributed Team Italy Belgium Czech Republic
  • 5. Ὃ Our Projects International organisations Institutions Fast delivery: several developers working simultaneously on the same site Frequent configuration changes: need for safe updates
  • 6.  Challenges We Face Remote collaboration on site development Keeping track of all configuration changes during development Pushing upgrades to production sites
  • 7. Chapter 1 ἱ ἴ ἳ ἲ ἱ The Evolution of Code-Driven Development in Drupal 8
  • 8. ὆ The long march to a "code-driven" Drupal Historically, Drupal has kept both configuration and content in the same database. Every time you click in the administrative interface, no record is kept. Drupal 6: Features appears, with the possibility to export configuration to PHP code Drupal 7: Features support is mature, but still relying on third parties and incomplete Drupal 8: Configuration and content are separated, configuration is text-based
  • 9.    The database-driven workflow disadvantages Default in Drupal 6 and Drupal 7 (core) Standard approach: you click, you save, Drupal saves to database and forgets Bad: Mixing configuration and content Bad: Losing track of configuration changes Theoretically still possible in Drupal 8!
  • 10.   The Features-driven workflow disadvantages A structural flaw: to package configuration into modules, you need to make it exportable to "code" Features is very good for packaging, not as good for exporting; but there's no packaging without exporting Not everything is exportable/traceable You must "whitelist" elements to be tracked: you never have the whole site under control
  • 11.   Code-driven is not just Features It’s a global technical choice For example, it includes makefiles and profiles, still applicable in D8 Keywords: text-based configuration, traceability, repeatability, reuse
  • 12. Ἲ New in Drupal 8 Configuration Management
  • 13. Ἲ A guided example of Configuration Management
  • 14. Ἲ Reference Use Case Modify the configuration of a production site: Keeping the site online all the time. Developing/testing the new configuration on a development copy. Exporting the configuration changes from development and importing them into production.
  • 15. Ἲ Step 1 of 6 Clone Site to Dev Production Install Site Full backup: Database Full Drupal tree Files Development Restore the backup
  • 16. Ἲ Step 2 of 6 Modify Configuration Production Site operates normally: new users new content Development
  • 17. Ἲ Step 3 of 6 Export Configuration Production Site operates normally: new users new content Development
  • 18. Ἲ Step 4 of 6 Import into Staging Production Development
  • 19. Ἲ Step 5 of 6 Review Changes Production Development
  • 20. Ἲ Step 6 of 6 Apply Changes Production Development
  • 21. How this would have worked in Drupal 7 Clone site to development environment Create a feature exporting the site name variable Development: update the feature Transfer the feature to Production Production: enable/revert the feature
  • 22. drush DRUpal SHell: everybody loves! Drupal 8 ⇔ drush 7 Both not stable yet A new installation method: composer
  • 23. Ἲ Step 3 of 6 — Drush Style Export Configuration Development $ drush config-export The current contents of your export directory (sites/default/files/config_H6raw/staging) will be deleted. (y/n): y Configuration successfully exported to [success] sites/default/files/config_H6raw/staging.
  • 24. Ἲ Step 5 of 6 — Drush Style Review Changes Production $ drush config-import --preview=diff Configuration successfully exported to /tmp/drush_tmp_xy. [success] diff -u /tmp/drush_tmp_xy/system.site.yml sites/.../staging/system.site.yml --- /tmp/drush_tmp_xy/system.site.yml +++ sites/default/files/config_H6raw/staging/system.site.yml @@ -1,5 +1,5 @@ uuid: ca04efa4-51bf-4d12-8b00-e7b244b97aef -name: 'Drupal 8' +name: 'Amsterdam - alpha15' mail: drupal@example.com slogan: '' page: Import the listed configuration changes? (y/n):
  • 25. Chapter 2  Inner workings of Configuration Management and Features
  • 26.  Use case Features A collection of logically related Drupal elements Packaged into PHP code, using hooks Exportability is a precondition to packaging Configuration Management Reference for the whole site configuration, development to production
  • 27. Ὄ Configuration format PHP Imperative Interpreted Can break site if corrupted Located in folders for modules Treated as modules YAML Declarative Parsed Cannot break anything if corrupted Located in specific folders for config Treated as data (like Rules' JSON in D7)
  • 28.  Support Optional Modules must offer support for Features No guarantees Mandatory Core configuration The only way to supply configuration
  • 29. ὒ Configuration and modules Drupal 7 Features are special modules Once a Feature is enabled, its configuration is tracked forever Drupal 8 Modules provide initial values In this sense, every module is a Feature Configuration is decoupled from modules after installation
  • 30.  Components selection Drupal 7 Explicitly listed in info file Rest is not tracked Drupal 8 All configuration is tracked Configuration is saved per config entity Can be individually imported/exported Config synchronisation requires all files to be present (missing = deleted)
  • 31.  Configuration staging Drupal 7 Feature states: normal, overridden, needs review Operations: features update/revert Diff available Drupal 8 Active store and staging store (multiple stores possible) Operations: import and export Diff available
  • 32.  Drush workflow Drupal 7 drush features-update drush features-revert Drupal 8 (with drush 7.x-dev) drush cex drush cim
  • 33. Ἴ ⚽ Cross-site compatibility Drupal 7 Write once, deploy anywhere A feature is ready to be deployed on multiple sites Drupal 8 Specific to multiple instances (dev, prod) of the same site This is the CMI use case Configuration Management relies on UUIDs
  • 34.  Ὁ Boundaries of configuration Drupal 7 Entities through entity api, CTools plugins Variables with Strongarm Content with features_uuid Menu links, custom and contrib modules can be problematic Drupal 8 Configuration Content State All clearly defined
  • 35. ὎ ὎ ὎ Features done right? Drupal 7 Not optimal A bit "forced" at times since it is not native in Drupal 7 Drupal 8 Clean Native Not as powerful as D7+Features yet
  • 36. Chapter 3   How to build Re-usable components
  • 37.  Contrib module: Configuration development 1. Automated import of configuration files into the active storage. 2. Automated export of configuration objects into files. https://www.drupal.org/project/config_devel
  • 38.  config_devel & drush nuvole_article.info.yml config_devel: - field.instance.node.article.field_image - field.storage.node.field_image - node.type.article drush $ drush config-devel-export-module nuvole_article
  • 39.  Features 8.x-3.x Goes back to the core mission of Features: package functionality for re-use. No more project specific features! Under development in sandbox
  • 40.  Other considerations config_devel can also “import” configuration, only important during development of a re-usable feature Room for another drush extension that re-installs the default config.
  • 43. ⇆ API import The Config namespace configuration must always be imported/exported through the API, never edit the files! The filesystem is not a good option, and this is the reason for Drupal 8 to store the active config in database by default: Performance Safety Security
  • 44. ⚙ Configurables in Drupal 8 ConfigEntityBaseclass Two namespaces: one for config, one for content
  • 45. ⚙ Working with configuration Reading and writing configuration // Get site name. $site_name = Drupal::config('system.site')->get('name'); // Set site name. Drupal::config('system.site')->set('name', 'My site')->save(); ⛼ variable_get()and variable_set()died.
  • 46. ⚙ Information about the system state instance-specific? (e.g., last cron run) → state configuration? (e.g., site mail) → config Site = filesystem + content + configuration + state
  • 47. ⚙ Working with states Reading and writing states // Get last cron run timestamp. $time = Drupal::state()->get('system.cron_last'); // Set cron run timestamp. Drupal::state()->set('system.cron_last', REQUEST_TIME);
  • 48. ⚙ Overriding "on the fly" The $confarray is still available as $config Useful in settings.local.php: Differentiate development and production environment