Staging & Deployment
Greg Dunlap
 Senior Programmer
     Palantir.net
The Problem
Traditional Deployment
Traditional Deployment


• Everything is in code
Traditional Deployment


• Everything is in code
• Mature tools to manage the code (svn,
  editors, command line dist. tools)
Traditional Deployment


• Everything is in code
• Mature tools to manage the code (svn,
  editors, command line dist. tools)
• Code moves one way (dev -> qa -> prod)
Drupal Deployment
Drupal Deployment
• Drupal stores a lot in the database
Drupal Deployment
• Drupal stores a lot in the database
• CCK, Views, Settings, Blocks, Content
Drupal Deployment
• Drupal stores a lot in the database
• CCK, Views, Settings, Blocks, Content
• Data moves both ways (dev/configuration
  starts in production and moves out, user-
  generated content starts at prod and
  comes in) so can’t just mysqldump from
  dev
Drupal Deployment
• Drupal stores a lot in the database
• CCK, Views, Settings, Blocks, Content
• Data moves both ways (dev/configuration
  starts in production and moves out, user-
  generated content starts at prod and
  comes in) so can’t just mysqldump from
  dev
• No mature toolset to merge
Content vs. Config
Content vs. Config
• Content and Configuration have very
  different problems
Content vs. Config
• Content and Configuration have very
  different problems
• Content - Primary key problems,
  inconsistent dependencies, some poor APIs
  (although most are better in D7 yay)
Content vs. Config
• Content and Configuration have very
  different problems
• Content - Primary key problems,
  inconsistent dependencies, some poor APIs
  (although most are better in D7 yay)
• Config - Wildly inconsistent storage and
  exportability, plus a lot of the above too
hook_form_alter()
hook_form_alter()

• The cause of, and solution to, all life’s
  problems.
hook_form_alter()

• The cause of, and solution to, all life’s
  problems.
• Couples back end and front end
hook_form_alter()

• The cause of, and solution to, all life’s
  problems.
• Couples back end and front end
• Makes it difficult for any purely backend
  solution to work consistently
Staging and Deployment
Options That Suck
Options That Suck

• Develop on production
Options That Suck

• Develop on production
• Repeat everything by hand at launch
Options That Suck

• Develop on production
• Repeat everything by hand at launch
• Seriously life is too short
A Better Option
Move stuff traditionally stored in the database into code.
       This is traditionally how people handle it.
Putting it in code
Putting it in code

• Find an import/export mechanism, write an
  update hook.
Putting it in code

• Find an import/export mechanism, write an
  update hook.
• Devel Macro Module (D5 only)
Putting it in code

• Find an import/export mechanism, write an
  update hook.
• Devel Macro Module (D5 only)
• Views / Panels export/import
Putting it in code

• Find an import/export mechanism, write an
  update hook.
• Devel Macro Module (D5 only)
• Views / Panels export/import
• Content Copy
Putting it in code

• Find an import/export mechanism, write an
  update hook.
• Devel Macro Module (D5 only)
• Views / Panels export/import
• Content Copy
• Patterns
Some Links
Some Links

• Programmatic CCK Now Possible
Some Links

• Programmatic CCK Now Possible
• Managing Your Views Code
Some Links

• Programmatic CCK Now Possible
• Managing Your Views Code
• Lullabot - Moving CCK Changes From Dev
  To Live
Pros & Cons
Pros & Cons

• Pro - Maintainable through svn and
  deployable through normal tools. Great
  option for developer-only shops
Pros & Cons

• Pro - Maintainable through svn and
  deployable through normal tools. Great
  option for developer-only shops
• Con - Non-technical users left behind. GUI
  does not automatically update code, still
  have to do that by hand.
Interesting Conceptually
      Primary key database hacks
Reserved Key IDs
Reserved Key IDs

• Set auto-inc on dev to start at 1
Reserved Key IDs

• Set auto-inc on dev to start at 1
• Set auto-inc on live to start at 1001
Reserved Key IDs

• Set auto-inc on dev to start at 1
• Set auto-inc on live to start at 1001
• Module to move items over
Reserved Key IDs

• Set auto-inc on dev to start at 1
• Set auto-inc on live to start at 1001
• Module to move items over
• Always have a clear set of IDs
Reserved Key IDs

• Set auto-inc on dev to start at 1
• Set auto-inc on live to start at 1001
• Module to move items over
• Always have a clear set of IDs
• Dave Cohen's blog post
Database Scripts
Database Scripts

• Extension of the reserved number method
Database Scripts

• Extension of the reserved number method
• Keeps database dumps in version control
Database Scripts

• Extension of the reserved number method
• Keeps database dumps in version control
• Merges dev and production data
Database Scripts

• Extension of the reserved number method
• Keeps database dumps in version control
• Merges dev and production data
• DBscripts
Pros & Cons
Pros & Cons

• Pros - Clever outside the box idea. Starts
  to address the great unknown of how to
  deploy nodes, etc.
Pros & Cons

• Pros - Clever outside the box idea. Starts
  to address the great unknown of how to
  deploy nodes, etc.
• Cons - Core hacks, not forward-thinking,
  not always db-portable, not the “Drupal
  way”
Staging and Deployment
Up & Coming
Exportables
Framework for getting data out
Exportables
Exportables
• A part of CTools
Exportables
• A part of CTools
• Exposes a hook you implement to export
  whatever content you have
Exportables
• A part of CTools
• Exposes a hook you implement to export
  whatever content you have
• Need to write your own import stuff
Exportables
• A part of CTools
• Exposes a hook you implement to export
  whatever content you have
• Need to write your own import stuff
• Good: Standardized, consistent
Exportables
• A part of CTools
• Exposes a hook you implement to export
  whatever content you have
• Need to write your own import stuff
• Good: Standardized, consistent
• Bad: Still suffers from form_alter() issue
Features
  Config
Features
Features

• You all went to Robin’s talk right?
Features

• You all went to Robin’s talk right?
• Bundle settings into modules for
  distribution
Features

• You all went to Robin’s talk right?
• Bundle settings into modules for
  distribution
• Built on exportables concept
Features

• You all went to Robin’s talk right?
• Bundle settings into modules for
  distribution
• Built on exportables concept
• Coverage is small but growing
Deploy
 Content
Concept
Concept
• Inspired by Services module
Concept
• Inspired by Services module
• API - Manages Deployment Plans and Servers
Concept
• Inspired by Services module
• API - Manages Deployment Plans and Servers
• Modules integrate with API
Concept
• Inspired by Services module
• API - Manages Deployment Plans and Servers
• Modules integrate with API
• Services receive and manage deployed data
Concept
• Inspired by Services module
• API - Manages Deployment Plans and Servers
• Modules integrate with API
• Services receive and manage deployed data
• Implements UUIDs to alleviate primary key
  issues
Concept
• Inspired by Services module
• API - Manages Deployment Plans and Servers
• Modules integrate with API
• Services receive and manage deployed data
• Implements UUIDs to alleviate primary key
  issues
• Manages dependencies between nodes and
  other Drupal objects (users, taxonomy, etc.)
Demo Here
Demo Here


• w00t
Problems
Problems

• Revisioning
Problems

• Revisioning
• Rollback (unless you count mysqldump)
Problems

• Revisioning
• Rollback (unless you count mysqldump)
• Can’t do unattended deployments
Problems

• Revisioning
• Rollback (unless you count mysqldump)
• Can’t do unattended deployments
• Gaps in support (upload.module,
  translations, blocks, etc.)
Conclusions
Conclusions

• No magic bullets
Conclusions

• No magic bullets
• Investigate, evaluate, plan plan plan
Conclusions

• No magic bullets
• Investigate, evaluate, plan plan plan
• Ask questions
Conclusions

• No magic bullets
• Investigate, evaluate, plan plan plan
• Ask questions
• Get involved!
Further Discussion
Further Discussion

• Deployment Framework Posting
Further Discussion

• Deployment Framework Posting
• Development Seed Features posts
Further Discussion

• Deployment Framework Posting
• Development Seed Features posts
• Change Management Group

More Related Content

ZIP
44 Slides About 22 Modules
KEY
Project Tools in Web Development
PPTX
'Intro to Infrastructure as Code' - DevOps Belfast
PPTX
Adopting Elixir in a 10 year old codebase
PDF
Going Agile: Brought to You by the Public Broadcasting System - Atlassian Sum...
PDF
Archetype autoplugins
PDF
Migration tales from java ee 5 to 7
PDF
DevelopersSummit2011 【17-E-1】 DBも変化せよ - Jiemamy
44 Slides About 22 Modules
Project Tools in Web Development
'Intro to Infrastructure as Code' - DevOps Belfast
Adopting Elixir in a 10 year old codebase
Going Agile: Brought to You by the Public Broadcasting System - Atlassian Sum...
Archetype autoplugins
Migration tales from java ee 5 to 7
DevelopersSummit2011 【17-E-1】 DBも変化せよ - Jiemamy

What's hot (20)

PDF
DevOps: Automate all the things
PPTX
Getting started with PHP on IBM i
ZIP
Forget The ORM!
PPTX
How I Learned to Stop Worrying and Love Legacy Code.....
PDF
Software Design Trilogy Part III - Domain Driven Design for Ruby on Rails App...
PDF
Dev "Programming" Ops For DevOps Success
PDF
Alex Theedom Java ee revisits design patterns
PPTX
Picnic Software - Developing a flexible and scalable application
PPTX
Profiling and Tuning a Web Application - The Dirty Details
PDF
Whitepages Practical Experience Converting from Ruby to Reactive
PDF
Laravel and Django and Rails, Oh My!
PDF
Concurrent Product Release Planning with JIRA
PPT
Bridging the Gap - Laracon 2013
KEY
Stop Building It From Scratch: Creating Reusable eLearning Components
PDF
Circular interconnected gear pieces smart arts process stages 7 powerpoint d...
PDF
Plone for Education: Bibliographies
PDF
Change and Release Management with JIRA and Bamboo - Atlassian Summit 2010
ODP
But We're Already Open Source! Why Would I Want To Bring My Code To Apache?
PDF
Big Data at Riot Games
PDF
Test Automation for Packaged Systems: Yes, You Can!
DevOps: Automate all the things
Getting started with PHP on IBM i
Forget The ORM!
How I Learned to Stop Worrying and Love Legacy Code.....
Software Design Trilogy Part III - Domain Driven Design for Ruby on Rails App...
Dev "Programming" Ops For DevOps Success
Alex Theedom Java ee revisits design patterns
Picnic Software - Developing a flexible and scalable application
Profiling and Tuning a Web Application - The Dirty Details
Whitepages Practical Experience Converting from Ruby to Reactive
Laravel and Django and Rails, Oh My!
Concurrent Product Release Planning with JIRA
Bridging the Gap - Laracon 2013
Stop Building It From Scratch: Creating Reusable eLearning Components
Circular interconnected gear pieces smart arts process stages 7 powerpoint d...
Plone for Education: Bibliographies
Change and Release Management with JIRA and Bamboo - Atlassian Summit 2010
But We're Already Open Source! Why Would I Want To Bring My Code To Apache?
Big Data at Riot Games
Test Automation for Packaged Systems: Yes, You Can!
Ad

Similar to Staging and Deployment (20)

PDF
Modernize Your Drupal Development
PDF
Cloud Driven Development: a better workflow, less worries, and more power
PDF
Upgrading to Drupal 7
KEY
Drupal Meetup Lisbon
PDF
Drupal and Devops , the Survey Results
PDF
Code driven development in drupal
PDF
Recipes for Drupal distributions
PDF
Continuous Deployment: The Dirty Details
ODP
Features & Installation Profiles
PDF
Going from Zero to Sixty in Drupal with Acquia
PDF
Devops For Drupal
ODP
Drupal Architecture and functionality
PDF
Continuous Delivery: The Dirty Details
PPTX
Drupal Development Tips
PDF
Drupal for Project Managers, Part 3: Launching
PPT
Freelancer Weapons of mass productivity
ODP
Hong Kong Drupal User Group - 2014 March 8th
PDF
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
KEY
Drupal PT Meetup Lisbon (December 2011)
PPTX
Features
Modernize Your Drupal Development
Cloud Driven Development: a better workflow, less worries, and more power
Upgrading to Drupal 7
Drupal Meetup Lisbon
Drupal and Devops , the Survey Results
Code driven development in drupal
Recipes for Drupal distributions
Continuous Deployment: The Dirty Details
Features & Installation Profiles
Going from Zero to Sixty in Drupal with Acquia
Devops For Drupal
Drupal Architecture and functionality
Continuous Delivery: The Dirty Details
Drupal Development Tips
Drupal for Project Managers, Part 3: Launching
Freelancer Weapons of mass productivity
Hong Kong Drupal User Group - 2014 March 8th
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Drupal PT Meetup Lisbon (December 2011)
Features
Ad

More from heyrocker (8)

KEY
Painting the bikeshed
KEY
Drupal 8 Configuration Management Initiative Update
KEY
Come Together - DrupalCamp Stockholm Keynote
KEY
A Shot In The Arm
KEY
Core conv
ZIP
Deployment in Drupal 8
ODP
Drupal Services 3 - Drupal Dev Days 2011, Brussels
KEY
How To Not Suck At Pinball
Painting the bikeshed
Drupal 8 Configuration Management Initiative Update
Come Together - DrupalCamp Stockholm Keynote
A Shot In The Arm
Core conv
Deployment in Drupal 8
Drupal Services 3 - Drupal Dev Days 2011, Brussels
How To Not Suck At Pinball

Recently uploaded (20)

PDF
Introduction to c language from lecture slides
PDF
ELLIE29.pdfWETWETAWTAWETAETAETERTRTERTER
PDF
Human Computer Interaction Miterm Lesson
PDF
Decision Optimization - From Theory to Practice
PDF
EGCB_Solar_Project_Presentation_and Finalcial Analysis.pdf
PDF
NewMind AI Journal Monthly Chronicles - August 2025
PPTX
How to Convert Tickets Into Sales Opportunity in Odoo 18
PPTX
From XAI to XEE through Influence and Provenance.Controlling model fairness o...
PDF
Advancements in abstractive text summarization: a deep learning approach
PPTX
Report in SIP_Distance_Learning_Technology_Impact.pptx
PDF
Fitaura: AI & Machine Learning Powered Fitness Tracker
PPTX
Build automations faster and more reliably with UiPath ScreenPlay
PPTX
Information-Technology-in-Human-Society.pptx
PPTX
Presentation - Principles of Instructional Design.pptx
PDF
Streamline Vulnerability Management From Minimal Images to SBOMs
PPT
Storage Area Network Best Practices from HP
PDF
Chapter 1: computer maintenance and troubleshooting
PDF
Gestión Unificada de los Riegos Externos
PDF
Ebook - The Future of AI A Comprehensive Guide.pdf
PPTX
Blending method and technology for hydrogen.pptx
Introduction to c language from lecture slides
ELLIE29.pdfWETWETAWTAWETAETAETERTRTERTER
Human Computer Interaction Miterm Lesson
Decision Optimization - From Theory to Practice
EGCB_Solar_Project_Presentation_and Finalcial Analysis.pdf
NewMind AI Journal Monthly Chronicles - August 2025
How to Convert Tickets Into Sales Opportunity in Odoo 18
From XAI to XEE through Influence and Provenance.Controlling model fairness o...
Advancements in abstractive text summarization: a deep learning approach
Report in SIP_Distance_Learning_Technology_Impact.pptx
Fitaura: AI & Machine Learning Powered Fitness Tracker
Build automations faster and more reliably with UiPath ScreenPlay
Information-Technology-in-Human-Society.pptx
Presentation - Principles of Instructional Design.pptx
Streamline Vulnerability Management From Minimal Images to SBOMs
Storage Area Network Best Practices from HP
Chapter 1: computer maintenance and troubleshooting
Gestión Unificada de los Riegos Externos
Ebook - The Future of AI A Comprehensive Guide.pdf
Blending method and technology for hydrogen.pptx

Staging and Deployment