Intro to Configuration Management in Drupal 8
This talk is intended for junior developers who are inexperienced with the Drupal 8 Configuration Management System, but familiar with Drupal 7. We’ll present a small number of fundamental concepts that make it clear how to use Configuration Management to build Drupal websites more easily. We’ll demonstrate how CM is helpful with some common website-building processes, including kicking off a D8 site, sharing configuration between developers, and pushing configuration to the production site.KEY CONCEPTS:
- Active Configuration
- Dev vs Production
- Important and exporting
- Versioning your configuration
- Drupal Console
- What happened to Features?
MORE DETAILS ON THOSE KEY CONCEPTS
- Active Configuration - we’ll discuss the necessity of understanding where your web application’s active configuration is, and how Drupal 8 lets you choose where it is. We’ll explain the various kinds of config folders - we’ll discuss the config/install and config/optional folders provided by modules, and how these have a different purpose from the config/sync folder (or wherever Active Configuration is kept).
- Dev vs Production - for developers who are not accustomed to working on a team, we’ll discuss how to use dev sites to avoid developing on production. We’ll discuss the merits of not editing configuration on the production site. We’ll mention the config_readonly contrib module, which we believe will be popular in the future. We’ll show how to override config settings in settings.php, and how much that improves the dev vs production workflow.
- UUID - we’ll discuss the necessity of matching UUIDs in order to share configuration, and demonstrate how to achieve it in a team with multiple dev sites.
- YAML - we’ll show how a familiar piece of site configuration looks in YAML, and compare the YAML diffs in the CM GUI with the Features diffs we’re accustomed to seeing in Drupal 7. We’ll point out two crucial YAML files which CM export creates for every Drupal 8 site: core.extension.yml and system.site.yml, and why they are special.
- Importing and exporting - we’ll show how the YAML files are the vector for importing and exporting config, regardless of where the active configuration is kept.
- Versioning your configuration - again, for less experienced developers, we’ll discuss and demonstrate the merit of keeping your configuration not only in code, but in version control. We’ll use git for the demo.
- Drupal Console - we’ll show the time-saving power of using Drupal Console vs the CM GUI, and touch on how to install and set it up. We’ll demonstrate merging and resolving conflicts.
- What happened to Features? - We’ll discuss the intended purpose of CM vs Features, and give a couple of use cases for Features in Drupal 8.