Drupal - Features Module - Configuration in code

2,402 views

Published on

A 10 minute introduction to the Drupal Features module.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,402
On SlideShare
0
From Embeds
0
Number of Embeds
196
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Drupal - Features Module - Configuration in code

  1. 1. Features Module Drupal configuration in code
  2. 2. Overview• What Seems to be the Problem?• Potential Solutions• Features / Exportables Approach• How to use Features Module
  3. 3. The Problem Configuration is stored in the databasedev1 stage productiondev2dev3
  4. 4. The Problem Configuration is stored in the database Which makes the following difficult:Integration / Deployment / Roll-back / Merging Staging Revert
  5. 5. How could we solve it?• Replicate changes with admin interface• Database-level merge• Create a module for your site and use the hook_update to program database updates.• Capture admin actions in re-playable “macros”• Deploy module / Patterns module
  6. 6. The “Features” Approach Export configuration into code• Code can be version controlled (svn / git etc.).• Code can be diffed (to see what has changed).• We can deploy our code using version control.• We can revert back to old code if we need to.• Configuration lives in code, content in the db.
  7. 7. The Big Idea Image © Development Seed
  8. 8. Compatibility• CCK fields and content types• Views• Ctools (context, spaces, panels, strongarm etc.)• ImageCache• User Roles / Permissions• More in contrib...
  9. 9. Step 1. Create a feature
  10. 10. Step 2. Add components
  11. 11. Step 3. Download and Enable FeatureDownload to: sites/all/modules/features/my-feature/
  12. 12. Benefits of using Features• Your configuration is now version-controlled.• Functionality can be packaged in a generic way and shared / re-used.• Less checkbox clicking• Scriptable deployment (using Drush)• Continuous Integration is possible
  13. 13. Any Questions? john@atchai.com

×