Drupal and its contributed modules provides an impressive amount of functionality without needing to write a single line of code by storing information in Drupal’s database tables. Unfortunately this poses a challenge for developers wanting to stage changes between servers. This talk starts to address these issues by describing the problem and presenting a variety of solutions as well as their pros and cons. I also discuss some possible paths to make this easier coming down the pipe.
7. 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)
11. 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
12. 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
15. 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)
16. 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
20. 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
38. Pros & Cons
• Pro - Maintainable through svn and
deployable through normal tools. Great
option for developer-only shops
39. 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.
43. Reserved Key IDs
• Set auto-inc on dev to start at 1
• Set auto-inc on live to start at 1001
44. 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
45. 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
46. 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
53. Pros & Cons
• Pros - Clever outside the box idea. Starts
to address the great unknown of how to
deploy nodes, etc.
54. 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”
60. Exportables
• A part of CTools
• Exposes a hook you implement to export
whatever content you have
61. Exportables
• A part of CTools
• Exposes a hook you implement to export
whatever content you have
• Need to write your own import stuff
62. 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
63. 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
67. Features
• You all went to Robin’s talk right?
• Bundle settings into modules for
distribution
68. Features
• You all went to Robin’s talk right?
• Bundle settings into modules for
distribution
• Built on exportables concept
69. Features
• You all went to Robin’s talk right?
• Bundle settings into modules for
distribution
• Built on exportables concept
• Coverage is small but growing
74. Concept
• Inspired by Services module
• API - Manages Deployment Plans and Servers
• Modules integrate with API
75. Concept
• Inspired by Services module
• API - Manages Deployment Plans and Servers
• Modules integrate with API
• Services receive and manage deployed data
76. 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
77. 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.)