ibm drupal users group discussion on managing and deploying configuration
DESCRIPTION
Presentation to the IBM Drupal Users Group on improving configuration management in Drupal using the Features module and exportables. This is becoming a best practice for configuration management.TRANSCRIPT
![Page 1: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/1.jpg)
Managing and deploying configuration
http://drupal.org/project/features
...with exportables and the Features module
![Page 2: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/2.jpg)
Jeff Miccolis,Development Seed
![Page 3: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/3.jpg)
We build websites
![Page 4: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/4.jpg)
We build web apps
![Page 5: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/5.jpg)
“...we decided to host our Drupal environment using virtualization. This allowed us to build and test the Drupal environment locally and easily ship the entire virtual machine to the production hosting platform.”
19 Dec 2006
http://www.ibm.com/developerworks/ibm/library/i-osource12/
![Page 6: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/6.jpg)
Using open source software to design, develop, and deploy a collaborative Web site, Part 12: Hosting and deploying
http://www.ibm.com/developerworks/ibm/library/i-osource12/
![Page 7: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/7.jpg)
This presentation is about making Drupal better at dealing with these problems.
![Page 8: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/8.jpg)
In four parts
1. Problem2. Solution3. Best Practices4. Distributing
![Page 9: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/9.jpg)
1. The Problem
![Page 10: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/10.jpg)
Drupal’s strength is its weakness.
![Page 11: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/11.jpg)
No distinction betweenconfiguration & content.
![Page 12: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/12.jpg)
The Workflow Problem
![Page 13: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/13.jpg)
Development:where the action happens.
![Page 14: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/14.jpg)
Staging:where it’s reviewed.
![Page 16: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/16.jpg)
FYI, developing on the live site is a bad idea, always.
![Page 17: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/17.jpg)
This is a story...
http://developmentseed.org/blog/2009/jul/09/development-staging-production-workflow-problem-drupal
![Page 18: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/18.jpg)
Round one goes fine.Developer, designer & client get the site out the door.
![Page 19: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/19.jpg)
Round two is a PITA.New views build on developmentRebuild on stagingRebuild on developmentRebuild on stagingRinse, Repeat.Rebuild on production.
![Page 20: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/20.jpg)
Round two is a PITA.Requires extensive note takingProne to human errorLoads of repeated tasks
![Page 21: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/21.jpg)
Not having a distinction between configuration and code is bigger that just this one aspect.
![Page 22: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/22.jpg)
2. The SolutionIMHO
![Page 23: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/23.jpg)
Make a distinction between configuration & content
![Page 24: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/24.jpg)
...and write the configuration to code.
![Page 25: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/25.jpg)
What’s in code goes in version control.
![Page 26: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/26.jpg)
fig 1: Configuration components of a feature.
This belongs in your codebase.
![Page 27: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/27.jpg)
Features module semantics
![Page 28: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/28.jpg)
Feature: module that contains collection of Drupal parts that do something specific.
![Page 29: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/29.jpg)
Features: Drupal module that allows for the capture of configuration into code.
![Page 30: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/30.jpg)
feature: something you want your website to do.
![Page 31: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/31.jpg)
features: a set of things you want your website to do.
![Page 32: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/32.jpg)
Yes, I’m sorry. It seemed like a good idea at the time.
![Page 33: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/33.jpg)
The Features module makes Feature modules, which have...
![Page 34: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/34.jpg)
Core exportablesDRUPAL 6
Content typesPermissionsInput filtersMenu items
DRUPAL 7
Content typesFields
PermissionsInput filtersMenu itemsImage stylesVocabularies
![Page 35: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/35.jpg)
Contrib supportContexts
ViewsImageCache
Ctools*
* Ctools is special
![Page 36: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/36.jpg)
Ctools is special
Strongarm, Panels, Feeds, Data, etc...
![Page 37: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/37.jpg)
Features is a system to capture these components,
![Page 38: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/38.jpg)
...these components are the configuration that describes how your site behaves.
![Page 39: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/39.jpg)
Features should be used throughout the development process,
![Page 40: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/40.jpg)
...it won’t fight back, once you get the hang of it.
![Page 41: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/41.jpg)
Create a Feature
![Page 42: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/42.jpg)
Status of Features
![Page 43: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/43.jpg)
Status of Feature
![Page 44: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/44.jpg)
What changed
![Page 45: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/45.jpg)
Create, Update, Revert
![Page 46: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/46.jpg)
Drush commands
features List all the available features for your site.
features-export Export a feature from your site into a module.
features-update Update a feature module on your site.
features-revert Revert a feature module on your site.
![Page 47: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/47.jpg)
How this can work in development:
![Page 48: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/48.jpg)
Alex makes a feature.Jeff adds a couple views.Young adds theme overrides.Alex fixes Jeff ’s and Young’s bugsRolled out.Jeff makes views adjustments
Alex makes views adjustments, to fix Jeff ’s...Rolled out.
Young touches up the views styling
Rolled out.
![Page 49: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/49.jpg)
Views changes are made only once.
Each change has a commit log.
![Page 50: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/50.jpg)
Less room for dumb errors.
More accountability.
![Page 51: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/51.jpg)
It’s easier to do things right.
![Page 52: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/52.jpg)
Not having a distinction between configuration and code is bigger that just this one aspect.
![Page 53: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/53.jpg)
Briefly: Adding exportables to your module.
![Page 54: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/54.jpg)
First: sequential IDs on configuration is the enemy.
![Page 55: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/55.jpg)
the enemy
![Page 56: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/56.jpg)
Machine name (poor man’s UUID)
![Page 57: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/57.jpg)
Second: when in doubt, use Ctoolshttp://civicactions.com/blog/2009/jul/24/using_chaos_tools_module_create_exportables
![Page 58: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/58.jpg)
Ctools’ export.inc crash course...
![Page 59: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/59.jpg)
Your job:
* Database schema* Saving* User Interface
![Page 60: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/60.jpg)
Ctools’ job:
* Loading* Exporting
![Page 61: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/61.jpg)
Q: What’s left?
Dependency detection.
![Page 62: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/62.jpg)
hook_features_export()
* add modules* add components* delegation
![Page 63: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/63.jpg)
3. Best Practice
![Page 64: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/64.jpg)
Kithttp://drupal.org/project/kit
![Page 65: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/65.jpg)
“The goal is to offer a straightforward base packagefor building state-of-the-art Drupal sites while specifying how Features builton top of Kit can be compatible.”
![Page 66: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/66.jpg)
Specifications:Feature Specification (kitf 1.0-draft)Theme Specification (kitt 1.0-draft)
![Page 67: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/67.jpg)
kitfNamespacesUser roles & PermissionsVariablesPaths & Menu itemsBlock visibility & theme regionsDependenciesProblematic components
![Page 68: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/68.jpg)
kittRegionsPage template variablesElement attributes
![Page 69: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/69.jpg)
These are working documents, based on developer feedback.
![Page 70: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/70.jpg)
4. Distributing
![Page 71: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/71.jpg)
How do I share a feature?
![Page 72: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/72.jpg)
![Page 73: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/73.jpg)
Are Open Atrium’s features appropriate on drupal.org?
![Page 74: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/74.jpg)
Can I always share my configuration?
![Page 75: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/75.jpg)
How can I get that nifty update status thing behind the firewall?
![Page 76: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/76.jpg)
![Page 77: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/77.jpg)
Feature Servers
![Page 78: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/78.jpg)
![Page 79: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/79.jpg)
http://code.developmentseed.org/featureserver/
![Page 80: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/80.jpg)
Feature Server allows you to create projects, make new releases... subscribe to updates via the Update status module...
![Page 81: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/81.jpg)
It is simple by design... For greater integration with version control systems or for automatic packaging consider using the Project module.
![Page 82: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/82.jpg)
![Page 83: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/83.jpg)
![Page 84: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/84.jpg)
Based on Drupal’s implicit standards.
* update status xml* exportables* drush make
![Page 85: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/85.jpg)
![Page 86: IBM Drupal Users Group Discussion on Managing and Deploying Configuration](https://reader034.vdocuments.mx/reader034/viewer/2022042515/548d4a84b479591e1d8b45b5/html5/thumbnails/86.jpg)
Demo/Questions?