Upload
others
View
0
Download
0
Embed Size (px)
Citation preview
(Don’t Fear) the Features Now with more cowbell. AND DRUPAL 8!!
Aimee Degnan / [email protected]
[email protected] [email protected]
Me 1996 – Enterprise Web Tech & CMS 2006 – PMP, Stanford Advanced PM 2008 – Drupal 2010 – Agile: Scrum Master, Product Owner [email protected] @aimeeraed
www.hook42.com
@hook42inc
Aimee Degnan, CEO
[email protected] [email protected]
Hook 42
A boutique software development firm. Cater to both luxury clients and humanitarian efforts. Specialize in complex projects. Contribute to the community. Focus areas: site rescue, migration / upgrades, multilingual, SEO, responsive design, digital strategy, business process improvements
Who are we?
[email protected] [email protected]
Drupal has a nice feature,
you can create a feature using Features.
Remember when…
Are you scared yet?
[email protected] [email protected]
Remember when… Drupal has a nice [development and
deployment] feature - you can create a feature [on your website]
[using the] Features [module].
6
[email protected] [email protected]
What is the Features module? It exports Drupal configurations in the database to
code in the structure of a
module.
[email protected] [email protected]
Intended Usage of Features Bundle a reusable website feature for reuse on other sites.
Site1.com/blog Site2.com/blog Site3.com/blog
For example, a custom blog feature = content type + views + block + permissions Feature: h42_awesome_blog
[email protected] [email protected]
Adapted Usage of D7 Features Bundle database configurations to code for deployment in a multi-stage publication process for a single web site.
example.com Dev à Test à Prod
[email protected] [email protected]
D7 Features has a bad reputation Too much work Hard to use Messy Painful Evil Ugh
[email protected] [email protected]
Poorly made Features hurts everyone
Missing variables Circular & multiple dependencies Missing settings Non-exportable?! Un-tested?!?
[email protected] [email protected]
Goal: Fix Configuration Management in D8 core The next-gen cowbell has arrived.
[email protected] [email protected]
Isn’t it cute? Less menacing?
[email protected] [email protected]
But wait… Is there a D8 version of Features?
Yes What does it do?
Exports configuration as module code. Do I need it?
Depends on your use case. Does Configuration Management replace the use of Features?
For configuration exports. Yes. Absolutely. Are there usage considerations with Configuration Management?
Yes. Absolutely.
[email protected] [email protected]
Improvements Drupal 8 Features Management Interface (single roll-up page) Clearer terminology aligned to core
revert->import update->export generate -> write overridden -> changed
Namespace management Can bundle Features together Bundle prefix management for module export Automatic packaging / architecting features Automatic namespace management Can configure what is “automatic”
[email protected] [email protected]
FEATURES VS. CONFIG MANAGEMENT FOCUS: KNOW WHAT EACH SYSTEM IS REALLY GOOD FOR
[email protected] [email protected]
Features Nice interface Easy to see changes Creates modules Modules generate an “active config” footprint in the Config Management system
Configuration Management
Manual, needs dev skill. All or none model. Core UI is overwhelming. See Config partial export module for UI.
Picking & Choosing Changes
[email protected] [email protected]
Features
Nice interface. Namespace management. Module packaged for you.
Configuration Management
Manual creation of module from YAML exports. Needs more dev skill. It can be done.
Sharing
[email protected] [email protected]
Features
D7 – low to medium. D8 – much better. Edge cases and less supported modules iffy.
Configuration Management
Core config management is great! Contrib is better off the start. Edge cases and less
supported modules better than D7, but still may have issues.
Confidence in Exports
[email protected] [email protected]
Features D7 – based on architecture. D8 – much better. Zombie fields, deletion management. Dreaded Features Override.
Configuration Management
Core config management is great! Contrib is better off the start. Zombie fields. “Stuck” imports.
Confidence in Imports
[email protected] [email protected]
Features
features-export fex/fu features-import fim/fr D7 (drush cc)
Configuration Management
cex (config-export) cim (config-import) cget (config-get) cset (config-set) config-merge D8 (drush cr)
Command line differences
[email protected] [email protected]
Watch out for… The gotchas.
D7Features:Incorrectmodule
exports
D7Features:StatebasedVariablesinStrongarm
D7Features:Circular&Mul>pleDependencies
Timingdependencydeployments
ThingsthathaveanID(role,terms,content)
D7Features:Filesdon’tgetdeleted
FieldCleanup
D7Features:Moduledependencies&patching
Force,ccall==drushcim,drushcr
Conflicts
[email protected] [email protected]
Takeaways 1. A Feature is an bundled export of custom configurations and
custom YAML code. 2. A Feature is great for sharing. 3. Features, you did well in D7. You are better in D8. 4. Drupal 8 is time for Configuration Management. 5. I’m going to try work without Features in D8. 6. D7 Features best practices help parallel development in D8. 7. I love you, Features. Sort of. ;)
[email protected] [email protected]
Reference Links Mike Potter: https://www.phase2technology.com/blog/best-practices-for-cmi-and-features-in-drupal-8/ https://chromatichq.com/blog/drupal-7-features-vs-drupal-8-configuration-management http://nuvole.org/blog/2013/sep/03/configuration-management-and-features-look-drupal-8 https://www.drupal.org/project/config_partial_export https://pantheon.io/blog/configuration-workflow-drupal-8-sites https://pantheon.io/docs/drupal-8-configuration-management/