Free Website Tips
Recent Twitter Posts
DrupalCon Session Review: Delivering Drupal
This session dives deep into how large web development shops handle deployment of websites that see heavy traffic. In talks a lot about the concept of continuous delivery. The talk is somewhat of an overview of a wide range of topics, but it provides a ton of helpful information and starting places to begin building out your companies website deployment strategy. The talk covers three basic topics: development workflows, testing, deployment.
Most of this section of the talk was about how to easily move your code/configuration around to different environments for doing development. They touch a little bit on some best practices for generating database dumps to use on a development server. The key take away there is that you want to anonymize everything in the database to prevent private information from being compromised and to prevent your dev environment from affecting the users of the real site.
They also talked about the Stage File Proxy Drupal module, which allows you to easily setup your dev server to use the files from your live site, so that you don't have to copy them all over. This is particularly useful if you have several gigabytes of files on the server.
The other big item they talked about was Jenkins (aka Hudson) for doing continuous integration. From what they said, Jenkins has all of the tools to be the central manager of all of your development workflows, testing, and deployment. One big take away here was the idea of deploying more often instead of doing really large complicated deployments. Doing lots of smaller deployements can prevent a lot of different issues. The also talked about using Puppet and Chef to manage virtual machines configurations for development and testing.
Drupal 7 has made testing a much bigger reality in the world of Drupal, but there are many other elements that they talk about in the talk. They talked about several ways of doing testing:
Unit Testing: write the code for the feature and then write the code to test the feature
Test Driven Development (TDD): write the test case and then write to code to satisfy the test
Unit tests can be created using Simpletest and PHPUnit. Behat and Mink will allow you to do TDD and BDD testing. Selenium is another key component to testing. It allows you to run tests that require a true browser environment (JS and CSS tests especially).
One other random piece of helpful information for good configuration management is to divide settings.php configuration into several seperate files, so that you can easily manage different server configurations:
settings.php - in Git, stores settings for all environments
settings.$role.php - in Git, example: settings.dev.php with configuration to prevent email from going out on the development server
settings.local.php - not in Git, included by settings.php, does all of the specific environment setup (ie database parameters, etc) and includes the specific role configuration file