Deploying From Version Control Within PANTHEON

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
Greg Coit's picture

Congratulations! If you're reading this, you're doing things correctly. In the modern era of the web, we don't want to be making edits directly on a live site. It's just too risky, and it starts getting really tricky when you're working with a team. Deploying from version control solves these problems.

If you already have your own system or method of deploying a whole Drupal installation, feel free to take over all of /var/www on your PANTHEON server. You should base your application on Pressflow and include the ApacheSolr, Varnish and Memcached modules as well as the necessary settings.php configuration to utilize these features. For more on this, see the settings and module configuration page.

However, if you don't have an existing deployment system, but you do keep your code in version control (e.g. SVN) you can easily integrate with the provided Pressflow installation — which is itself checked out from Launchpad for easy updating — by following these instructions:

Remove the Stock sites Directory

Best practice Drupal architecture says that all of your application should be contained within the sites directory. This is where contributed/custom modules, themes and your site configuration are stored, and following this pattern makes it clean and easy to maintain separation between Drupal/Pressflow (the base platform) and your particular websites application.

By default, PANTHEON ships with a bare-bones sites directory in place and some very basic configuration. If you plan to deploy from version control, you should take control of this directory by removing it from the BZR repository:

root@host:~# cd /var/www
root@host:/var/www# bzr rm --force sites
root@host:/var/www# bzr commit -m "Removing stock sites directory in preparation for custom checkout"

This will remove the contents of the sites directory from your local filesystem and the local BZR repository, and clears the way for you to add your own.

Checking Out/Updating Your Own sites Directory

For instance, if I were to want to deploy from SVN, I might do like:

root@host:/var/www# svn co https://svn.getpantheon.com/trunk/sites

You are now all set to independently update your Pressflow Drupal "core" as well as your specific application from version control. When there's a security release of Pressflow you can do:

root@host:/var/www# bzr merge

And when you want to update your sites directory with the latest from your own version control:

root@host:/var/www# svn update sites

NOTE: since you are running your own application, you should make sure you have the necessary modules and settings to take advantage of PANTHEON Mercury's advanced performance capabilities. See the settings and module configuration page for details.

Mercury

Group organizers

Group categories

Post Type

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week