12
Managing Drupal Development with Multiple Developers Jay Kalpathy NetLine Corporation

Managing Drupal Development with Multiple Developers - Jay Kalpathy

Embed Size (px)

DESCRIPTION

What are the challenges in managing a Drupal development cycle with multiple developers?So you've decided on Drupal and are putting a development process in place. Source code control - check, build/release process - check. And then you hit the database. Do you use install profiles? Do you just apply the changes each time? I'll talk about some of the Drupal specific problems we faced, especially synchronizing database changes, options we considered and how we overcame the challenges. Our site is www.revresponse.com.

Citation preview

Page 1: Managing Drupal Development with Multiple Developers - Jay Kalpathy

Managing Drupal Development with Multiple Developers

Jay KalpathyNetLine Corporation

Page 2: Managing Drupal Development with Multiple Developers - Jay Kalpathy

Managing Drupal Development with Multiple Developers 2

Who are we?

B2B lead generation & advertising network

Over 15,000 partners in our network

www.revresponse.com is our Drupal based partner portal

Page 3: Managing Drupal Development with Multiple Developers - Jay Kalpathy

Managing Drupal Development with Multiple Developers 3

The Scenario

Dev 1

Dev 3

Dev 2

Dev 5

Dev 4

Test / Staging Production

Version Control

Page 4: Managing Drupal Development with Multiple Developers - Jay Kalpathy

Managing Drupal Development with Multiple Developers 4

Useful Tools

Version Control (modules, themes):– Subversion, CVS, Git, Bazaar

Virtual Machine:– VMware, Xen, …

Build Automation:– Make, Ant, Maven, …

Test:– Selenium, Drupal SimpleTest module

Not Drupal specific. Use what you’re familiar with.

Page 5: Managing Drupal Development with Multiple Developers - Jay Kalpathy

Managing Drupal Development with Multiple Developers 5

What about the database?

Enable Module, Blocks, Permissions,Module Configuration

Page 6: Managing Drupal Development with Multiple Developers - Jay Kalpathy

Managing Drupal Development with Multiple Developers 6

Database Issues

Database changes have to be redone on each server

Content team has to work on the live site

No good way to manage the database changes under source control

Page 7: Managing Drupal Development with Multiple Developers - Jay Kalpathy

Managing Drupal Development with Multiple Developers 7

Solutions

Manual – make the changes each time !

Shared database / shared codebase

Shared database / separate codebases – Chapter Three

Install profiles

Dave Cohen: Reserve 1000 id’s for Staging

France24: Odd / Even id’s

Page 8: Managing Drupal Development with Multiple Developers - Jay Kalpathy

Managing Drupal Development with Multiple Developers 8

Shared Database

All developers work remotely, on the same server, with ONE database.  Each developer gets access to their own codebase and files are managed via repository. … We keep the practice of “code goes up, data comes down” … Jen Lampton, ChapterThree

Sharing a DB works well, but D6 has introduced a few annoyances. For example, when our themer is adding templates, the registry picks it up, and produces errors for everyone else, until we get the template. A good work around has been for the themer to commit an un-modifed template, so that everyone else can at least keep running.

As for dealing with dev/staging/live servers, as Jen mentioned, we keep the DB coming back down from the live server, to staging, to dev. All DB changes that need to go the other way are either handled by install file updates, or documented and manually applied. This is really the only way to guarantee that the live DB stays valid. I wouldn't trust an automated system to touch our live DBs. … ~Rob @ ChapterThree

Page 9: Managing Drupal Development with Multiple Developers - Jay Kalpathy

Managing Drupal Development with Multiple Developers 9

France24: Drupal Staging

Force the staging server to create only even numbered ids and the live server only odd numbered ids.

Use MySQL synchronization from production to staging

Flip from production to staging to go live.

Drupal 5: Sequences table, auto-increment’s

Drupal 6: No more sequences table.

Is France24’s Stage module released?

Page 10: Managing Drupal Development with Multiple Developers - Jay Kalpathy

Managing Drupal Development with Multiple Developers 10

Other Solutions

Deployment - The deployment framework is a series of modules which are designed to allow developers to easily stage Drupal data from one site to another. Unfortunately, all the modifications have to be done manually, so on a large production site it can be very difficult to keep the stage site up-to-date with user content Staging - Description is vague since it is a new comer to this arena. Appears to be designed to send staging configuration to the production site. Could potentially write over user created content. AutoPilot - AutoPilot is a complete build system that captures code and configuration changes from entire teams of developers, merges and synchronizes it, and provides a framework for easy, consistent, and optionally, scheduled builds. Not developed for Drupal 6.xStage - The stage module taps into Drupal's revision system to allow host-based staging of content stored in the database. No module is available and appears to be abandoned.

Page 11: Managing Drupal Development with Multiple Developers - Jay Kalpathy

Managing Drupal Development with Multiple Developers 11

Conclusions

It is a pretty hairy problem, but …

A shared database, coupled with mirroring production data to staging & dev – simple solution, but solves 90% of the problems.

If you really need it, the France24 solution is very elegant, but be prepared to get your hands dirty. You’re making edits to core.

Page 12: Managing Drupal Development with Multiple Developers - Jay Kalpathy

Managing Drupal Development with Multiple Developers 12

References

BDUG Thread: http://groups.google.com/group/berkeley-drupal/browse_thread/thread/2ea6acefa9b0f390/b09b927ad1d3292d?lnk=gst&q=kalpathy#

France24:

– Original post on drupal.org: http://drupal.org/node/181128

– Good explanation by CodeBaboon: http://codebaboon.com/method-syncronising-database-changes

Dave Cohen: http://www.dave-cohen.com/node/1066

Shaun Haber’s presentation from BADCamp 2008http://srhaber.com/blog/2008/10/13/badcamp-slides-and-code/

Greg Dunlap on the Deploy module:http://www.palantir.net/blog/bringing-deployment-capability-drupal

Questions??