SlideShare a Scribd company logo
Staging Drupal Change Management Strategies for Drupal Staging Drupal – Change Management Strategies DrupalCamp NH 2011
http://twitter.com/ebeyrent http://drupal.org/user/23897 DrupalCamp NH 2011 Introductions Permissions API Permissions Superuser Crowd SSO LDAP Extended Groups Context Local Tasks Search Lucene Biblio Search Lucene Attachments Search Lucene OG Visual Search API My Modules Staging Drupal – Change Management Strategies Erich Beyrent
Agenda Playing well with others Managing code changes Managing database changes Managing content changes Deployment strategies DrupalCamp NH 2011 Staging Drupal – Change Management Strategies
The only thing that's constant is... DrupalCamp CT 2010
Staging?  What is that? DrupalCamp NH 2011 Staging Drupal – Change Management Strategies
Staging?  What is that? “ Staging” is the process of delivering changes from one environment to another. DrupalCamp NH 2011 Staging Drupal – Change Management Strategies
I develop on the live server. I work alone. Backups? DrupalCamp NH 2011 Staging Drupal – Change Management Strategies
The Manual Process Point. Click. Wait. Rinse and repeat. DrupalCamp NH 2011 Staging Drupal – Change Management Strategies
DrupalCamp NH 2011 Staging Drupal – Change Management Strategies
Why it fails It's tedious. It's time-consuming. It's error-prone. It's risky. DrupalCamp NH 2011 Staging Drupal – Change Management Strategies
The staging process should be: Reliable Repeatable Scalable Efficient DrupalCamp NH 2011 Staging Drupal – Change Management Strategies Staging Goals
Anatomy of a Drupal Site DrupalCamp NH 2011 Staging Drupal – Change Management Strategies Files Configuration Content Code
A traditional approach Use source control Staging Drupal – Change Management Strategies DrupalCamp NH 2011
Use source control Essential to the development and staging process Manages changes to the code over time With SVN, use a standard repository layout consisting of “tags, branches, trunk” Use multiple repositories to separate core code from project code Staging Drupal – Change Management Strategies  DrupalCamp NH 2011
What goes into source control Code, configuration, theme-based files Staging Drupal – Change Management Strategies DrupalCamp NH 2011
What goes into source control Code, configuration, theme-based files Use source control templates for files like settings.php Staging Drupal – Change Management Strategies DrupalCamp NH 2011
What goes into source control Code, configuration, theme-based files Use source control templates for files like settings.php What about database snapshots? Staging Drupal – Change Management Strategies DrupalCamp NH 2011
What goes into source control Code, configuration, theme-based files Use source control templates for files like settings.php What about database snapshots? Databases are great at storing and retrieving data, not merging and versioning Staging Drupal – Change Management Strategies DrupalCamp NH 2011
What goes into source control Code, configuration, theme-based files Use source control templates for files like settings.php What about database snapshots? Databases are great at storing and retrieving data, not merging and versioning What about files? Staging Drupal – Change Management Strategies DrupalCamp NH 2011
A traditional approach Use source control Manage changes in code DrupalCamp NH 2011 Staging Drupal – Change Management Strategies
Manage database changes Export your views, panels, rules, and content types to code Use Exportables and Ctools to export other data Manage configurations with Strongarm Use Permissions API for roles and permissions Use Features DrupalCamp NH 2011 Staging Drupal – Change Management Strategies
Why should we do this? Multiple environments need to be updated Allows for a phased approach to change management Saves time and money Is fully testable and reproducible Minimizes downtime and helps manage expectations Staging Drupal – Change Management Strategies DrupalCamp NH 2011
Enable modules function demo_update_7001() { $ret = array(); $modules = array( 'ctools', 'context', 'devel', ); module_enable($modules, TRUE); return $ret; } Staging Drupal – Change Management Strategies DrupalCamp NH 2011
Grant permissions function demo_update_7001() { $ret = array(); $role = user_role_load_by_name('admin'); $permissions = user_permission_get_modules(); user_role_grant_permissions($role->rid, array_keys($permissions));  return $ret; } Staging Drupal – Change Management Strategies DrupalCamp NH 2011
Create content types function demo_update_7001() { $types = array( array( 'type' => 'article',  'name' => st('Article'),  'base' => 'node_content',  'description' => st('Description.'),  'custom' => 1,  'modified' => 1,  'locked' => 0, ) ); Staging Drupal – Change Management Strategies DrupalCamp NH 2011 foreach ($types as $type) { $type = node_type_set_defaults($type); node_type_save($type); node_add_body_field($type); } node_types_rebuild(); }
Create taxonomy function demo_update_7001() { $ret = array();  $vocabulary = new stdClass(); $vocabulary->name = st('Categories'); $vocabulary->machine_name = 'categories'; $vocabulary->description = st('Standard node categories'); $vocabulary->hierarchy = 1; $vocabulary->module = 'demo'; $vocabulary->weight = 0; taxonomy_vocabulary_save($vocabulary); return $ret; } Staging Drupal – Change Management Strategies DrupalCamp NH 2011
Create taxonomy terms function demo_update_7001() { $ret = array();  $term = new stdClass(); $term->name = st('Drupal'); $term->description = st('Category for all things Drupal'); $term->parent = array(0); $term->vid = $vocabulary->vid; taxonomy_term_save($term); return $ret; } Staging Drupal – Change Management Strategies DrupalCamp NH 2011
A traditional approach Use source control Manage database changes in code Use deployment tools DrupalCamp NH 2011 Staging Drupal – Change Management Strategies
 
Use deployment tools Source control as a deployment tool SVN update, post-commit hooks GIT push drush, rsync, make Hudson, Phing http://drupal.org/project/phingdrushtask Capistrano https://github.com/gaspaio/Drupal-Capistrano-Deploy
Drupal Modules Deploy Context Features Ctools UUID Services Boxes Compare various staging modules: http://drupal.org/node/980186 Staging Drupal – Change Management Strategies DrupalCamp NH 2011
The process Import current database snapshot into your sandbox Scrub your database! Update your codebase Develop, commit, update Promote changes to QA environment, test Tag or branch and release Drink beer DrupalCamp NH 2011 Staging Drupal – Change Management Strategies
Test the process Install the Demo module Take snapshot Run update.php Verify results, watchdog, error_log Rewind DrupalCamp NH 2011 Staging Drupal – Change Management Strategies
 
What about content?? Staging Drupal – Change Management Strategies DrupalCamp NH 2011
What about content?? Staging Drupal – Change Management Strategies DrupalCamp NH 2011 Staging content in Drupal sucks Several options, but none are 100% reliable All depend on the UUID module Deploy, Node Export, Migrate, Services Error-prone, authentication issues, transport errors
 
Drupal 8 Proper configuration management A robust entity API and UUIDs in core Join the discussion at http://groups.drupal.org/build-systems-change-management/cmi
Questions?
Thank You! http://twitter.com/ebeyrent http://drupal.org/user/23897

More Related Content

PPT
Hack-Proof Your Drupal App
PDF
3 introduction-php-mvc-cakephp-m3-getting-started-slides
PDF
4 introduction-php-mvc-cakephp-m4-controllers-slides
PDF
6 introduction-php-mvc-cakephp-m6-views-slides
PDF
2 introduction-php-mvc-cakephp-m2-installation-slides
PDF
What to expect when you're Incubating
PDF
Apache Spark - Intro to Large-scale recommendations with Apache Spark and Python
PPTX
Introduction to windows power shell in sharepoint 2010
Hack-Proof Your Drupal App
3 introduction-php-mvc-cakephp-m3-getting-started-slides
4 introduction-php-mvc-cakephp-m4-controllers-slides
6 introduction-php-mvc-cakephp-m6-views-slides
2 introduction-php-mvc-cakephp-m2-installation-slides
What to expect when you're Incubating
Apache Spark - Intro to Large-scale recommendations with Apache Spark and Python
Introduction to windows power shell in sharepoint 2010

What's hot (17)

PDF
CakePHP
PPTX
Oracle SQL Developer: 3 Features You're Not Using But Should Be
PPTX
Power Shell and Sharepoint 2013
PPTX
PDF
Configure Your Projects with Apache Tamaya
PPTX
Integration patterns in AEM 6
PDF
Managing Millions of Tests Using Databricks
PPTX
Turbocharge SQL Performance in PL/SQL with Bulk Processing
PPTX
SQLcl overview - A new Command Line Interface for Oracle Database
PPTX
PLSQL Developer tips and tricks
PDF
The Django Web Application Framework
PDF
Correctness and Performance of Apache Spark SQL with Bogdan Ghit and Nicolas ...
PPTX
Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...
PDF
Building a Dynamic Website Using Django
PPTX
Oracle REST Data Services: POUG Edition
PPTX
Converting (X)HTML/CSS template to Drupal 7 Theme
PPTX
Debugging PL/SQL with Oracle SQL Developer
CakePHP
Oracle SQL Developer: 3 Features You're Not Using But Should Be
Power Shell and Sharepoint 2013
Configure Your Projects with Apache Tamaya
Integration patterns in AEM 6
Managing Millions of Tests Using Databricks
Turbocharge SQL Performance in PL/SQL with Bulk Processing
SQLcl overview - A new Command Line Interface for Oracle Database
PLSQL Developer tips and tricks
The Django Web Application Framework
Correctness and Performance of Apache Spark SQL with Bogdan Ghit and Nicolas ...
Spark SQL Tutorial | Spark SQL Using Scala | Apache Spark Tutorial For Beginn...
Building a Dynamic Website Using Django
Oracle REST Data Services: POUG Edition
Converting (X)HTML/CSS template to Drupal 7 Theme
Debugging PL/SQL with Oracle SQL Developer
Ad

Similar to Staging Drupal: Change Management Strategies for Drupal (20)

PDF
Staging Drupal 8 31 09 1 3
PPT
Deployment Strategies: Managing Code, Content, and Configurations
KEY
Drupal Meetup Lisbon
PDF
Drupal for Project Managers, Part 3: Launching
PPT
Drupal Workflow Concepts
PDF
Drupal 8 Configuration Management with Features
PDF
Building User-Centred Websites with Drupal
PDF
Making Support Fun & Profitable: DrupalCon Portland
PDF
Upgrading to Drupal 7
PPT
Open / Drupal Camp Presentation: Brent Bice
PPTX
Git Going w/ Git
PDF
DrupalCon 2013 Making Support Fun & Profitable
PDF
Opening Keynote - DrupalCamp St. Louis 2014
PPTX
Recruiting for Drupal #Hiring
PDF
Migrate all the things!
PPTX
The Drupal Prescription - A Case Study of Florida Hospital - Rick Mann
PPTX
How to Migrate, Manage and Centralize your Web Infrastructure with Drupal
ZIP
Staging and Deployment
PDF
Planning and Managing Drupal Projects
PPTX
8 Web Practices for Drupal
Staging Drupal 8 31 09 1 3
Deployment Strategies: Managing Code, Content, and Configurations
Drupal Meetup Lisbon
Drupal for Project Managers, Part 3: Launching
Drupal Workflow Concepts
Drupal 8 Configuration Management with Features
Building User-Centred Websites with Drupal
Making Support Fun & Profitable: DrupalCon Portland
Upgrading to Drupal 7
Open / Drupal Camp Presentation: Brent Bice
Git Going w/ Git
DrupalCon 2013 Making Support Fun & Profitable
Opening Keynote - DrupalCamp St. Louis 2014
Recruiting for Drupal #Hiring
Migrate all the things!
The Drupal Prescription - A Case Study of Florida Hospital - Rick Mann
How to Migrate, Manage and Centralize your Web Infrastructure with Drupal
Staging and Deployment
Planning and Managing Drupal Projects
8 Web Practices for Drupal
Ad

Recently uploaded (20)

PDF
Empathic Computing: Creating Shared Understanding
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Encapsulation theory and applications.pdf
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Approach and Philosophy of On baking technology
PPTX
Cloud computing and distributed systems.
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
cuic standard and advanced reporting.pdf
PPT
Teaching material agriculture food technology
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Empathic Computing: Creating Shared Understanding
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
NewMind AI Weekly Chronicles - August'25 Week I
MIND Revenue Release Quarter 2 2025 Press Release
Encapsulation theory and applications.pdf
The AUB Centre for AI in Media Proposal.docx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Approach and Philosophy of On baking technology
Cloud computing and distributed systems.
“AI and Expert System Decision Support & Business Intelligence Systems”
Chapter 3 Spatial Domain Image Processing.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
cuic standard and advanced reporting.pdf
Teaching material agriculture food technology
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...

Staging Drupal: Change Management Strategies for Drupal

  • 1. Staging Drupal Change Management Strategies for Drupal Staging Drupal – Change Management Strategies DrupalCamp NH 2011
  • 2. http://twitter.com/ebeyrent http://drupal.org/user/23897 DrupalCamp NH 2011 Introductions Permissions API Permissions Superuser Crowd SSO LDAP Extended Groups Context Local Tasks Search Lucene Biblio Search Lucene Attachments Search Lucene OG Visual Search API My Modules Staging Drupal – Change Management Strategies Erich Beyrent
  • 3. Agenda Playing well with others Managing code changes Managing database changes Managing content changes Deployment strategies DrupalCamp NH 2011 Staging Drupal – Change Management Strategies
  • 4. The only thing that's constant is... DrupalCamp CT 2010
  • 5. Staging? What is that? DrupalCamp NH 2011 Staging Drupal – Change Management Strategies
  • 6. Staging? What is that? “ Staging” is the process of delivering changes from one environment to another. DrupalCamp NH 2011 Staging Drupal – Change Management Strategies
  • 7. I develop on the live server. I work alone. Backups? DrupalCamp NH 2011 Staging Drupal – Change Management Strategies
  • 8. The Manual Process Point. Click. Wait. Rinse and repeat. DrupalCamp NH 2011 Staging Drupal – Change Management Strategies
  • 9. DrupalCamp NH 2011 Staging Drupal – Change Management Strategies
  • 10. Why it fails It's tedious. It's time-consuming. It's error-prone. It's risky. DrupalCamp NH 2011 Staging Drupal – Change Management Strategies
  • 11. The staging process should be: Reliable Repeatable Scalable Efficient DrupalCamp NH 2011 Staging Drupal – Change Management Strategies Staging Goals
  • 12. Anatomy of a Drupal Site DrupalCamp NH 2011 Staging Drupal – Change Management Strategies Files Configuration Content Code
  • 13. A traditional approach Use source control Staging Drupal – Change Management Strategies DrupalCamp NH 2011
  • 14. Use source control Essential to the development and staging process Manages changes to the code over time With SVN, use a standard repository layout consisting of “tags, branches, trunk” Use multiple repositories to separate core code from project code Staging Drupal – Change Management Strategies DrupalCamp NH 2011
  • 15. What goes into source control Code, configuration, theme-based files Staging Drupal – Change Management Strategies DrupalCamp NH 2011
  • 16. What goes into source control Code, configuration, theme-based files Use source control templates for files like settings.php Staging Drupal – Change Management Strategies DrupalCamp NH 2011
  • 17. What goes into source control Code, configuration, theme-based files Use source control templates for files like settings.php What about database snapshots? Staging Drupal – Change Management Strategies DrupalCamp NH 2011
  • 18. What goes into source control Code, configuration, theme-based files Use source control templates for files like settings.php What about database snapshots? Databases are great at storing and retrieving data, not merging and versioning Staging Drupal – Change Management Strategies DrupalCamp NH 2011
  • 19. What goes into source control Code, configuration, theme-based files Use source control templates for files like settings.php What about database snapshots? Databases are great at storing and retrieving data, not merging and versioning What about files? Staging Drupal – Change Management Strategies DrupalCamp NH 2011
  • 20. A traditional approach Use source control Manage changes in code DrupalCamp NH 2011 Staging Drupal – Change Management Strategies
  • 21. Manage database changes Export your views, panels, rules, and content types to code Use Exportables and Ctools to export other data Manage configurations with Strongarm Use Permissions API for roles and permissions Use Features DrupalCamp NH 2011 Staging Drupal – Change Management Strategies
  • 22. Why should we do this? Multiple environments need to be updated Allows for a phased approach to change management Saves time and money Is fully testable and reproducible Minimizes downtime and helps manage expectations Staging Drupal – Change Management Strategies DrupalCamp NH 2011
  • 23. Enable modules function demo_update_7001() { $ret = array(); $modules = array( 'ctools', 'context', 'devel', ); module_enable($modules, TRUE); return $ret; } Staging Drupal – Change Management Strategies DrupalCamp NH 2011
  • 24. Grant permissions function demo_update_7001() { $ret = array(); $role = user_role_load_by_name('admin'); $permissions = user_permission_get_modules(); user_role_grant_permissions($role->rid, array_keys($permissions)); return $ret; } Staging Drupal – Change Management Strategies DrupalCamp NH 2011
  • 25. Create content types function demo_update_7001() { $types = array( array( 'type' => 'article', 'name' => st('Article'), 'base' => 'node_content', 'description' => st('Description.'), 'custom' => 1, 'modified' => 1, 'locked' => 0, ) ); Staging Drupal – Change Management Strategies DrupalCamp NH 2011 foreach ($types as $type) { $type = node_type_set_defaults($type); node_type_save($type); node_add_body_field($type); } node_types_rebuild(); }
  • 26. Create taxonomy function demo_update_7001() { $ret = array(); $vocabulary = new stdClass(); $vocabulary->name = st('Categories'); $vocabulary->machine_name = 'categories'; $vocabulary->description = st('Standard node categories'); $vocabulary->hierarchy = 1; $vocabulary->module = 'demo'; $vocabulary->weight = 0; taxonomy_vocabulary_save($vocabulary); return $ret; } Staging Drupal – Change Management Strategies DrupalCamp NH 2011
  • 27. Create taxonomy terms function demo_update_7001() { $ret = array(); $term = new stdClass(); $term->name = st('Drupal'); $term->description = st('Category for all things Drupal'); $term->parent = array(0); $term->vid = $vocabulary->vid; taxonomy_term_save($term); return $ret; } Staging Drupal – Change Management Strategies DrupalCamp NH 2011
  • 28. A traditional approach Use source control Manage database changes in code Use deployment tools DrupalCamp NH 2011 Staging Drupal – Change Management Strategies
  • 29.  
  • 30. Use deployment tools Source control as a deployment tool SVN update, post-commit hooks GIT push drush, rsync, make Hudson, Phing http://drupal.org/project/phingdrushtask Capistrano https://github.com/gaspaio/Drupal-Capistrano-Deploy
  • 31. Drupal Modules Deploy Context Features Ctools UUID Services Boxes Compare various staging modules: http://drupal.org/node/980186 Staging Drupal – Change Management Strategies DrupalCamp NH 2011
  • 32. The process Import current database snapshot into your sandbox Scrub your database! Update your codebase Develop, commit, update Promote changes to QA environment, test Tag or branch and release Drink beer DrupalCamp NH 2011 Staging Drupal – Change Management Strategies
  • 33. Test the process Install the Demo module Take snapshot Run update.php Verify results, watchdog, error_log Rewind DrupalCamp NH 2011 Staging Drupal – Change Management Strategies
  • 34.  
  • 35. What about content?? Staging Drupal – Change Management Strategies DrupalCamp NH 2011
  • 36. What about content?? Staging Drupal – Change Management Strategies DrupalCamp NH 2011 Staging content in Drupal sucks Several options, but none are 100% reliable All depend on the UUID module Deploy, Node Export, Migrate, Services Error-prone, authentication issues, transport errors
  • 37.  
  • 38. Drupal 8 Proper configuration management A robust entity API and UUIDs in core Join the discussion at http://groups.drupal.org/build-systems-change-management/cmi
  • 40. Thank You! http://twitter.com/ebeyrent http://drupal.org/user/23897

Editor's Notes

  • #16: Databases are great for storing and querying data, not great for versioning and merging changes
  • #17: Databases are great for storing and querying data, not great for versioning and merging changes
  • #18: Databases are great for storing and querying data, not great for versioning and merging changes
  • #19: Databases are great for storing and querying data, not great for versioning and merging changes
  • #20: Databases are great for storing and querying data, not great for versioning and merging changes