Cached Externals
December 3rd, 2008
Jan. 14, 2009 Update: The techniques discussed in this post are still relevant but the externals only apply to Mephisto 0.8. See Upgrading to Mephisto 0.8.1 for information about the externals that I'm currently caching.
Cached Externals is a Rails plugin that extends Capistrano to speed up deployments by not deploying vendor gems and plugins unless they change. The way it accomplishes the performance gain also results in explicit management of the cached gems and plugins, something worthwhile in it's own right. In this this post I'll walk you through installation and use of the plugin by describing how I used it for this Mephisto blog application. gitting Started with Mephisto describes how the application was set-up and Deploying Mephisto with Capistrano to DreamHost provides the pre-Cached Externals deployment details. Basically the app is just a customized copy of Mephisto in a git repository. The vendor directory holds Rails 2.0.2 and TZInfo along with all the gems and plugins that are part of the Mephisto distribution. The repository is kept locally on a laptop so Capistrano's copy strategy is used to deploy it to the production server. Read the rest of this entry
Production Data to Development
December 1st, 2008
It's often helpful to be able to bring MySQL production data down to a development machine. I wanted to do this for my Mephisto blog engine (see gitting Started with Mephisto and Deploying Mephisto with Capistrano to DreamHost) so that I could see how changes would look with existing data before deploying an update. Production data is also useful for tracking down bugs with production data and for backups. This post describes the Capistrano namespace I created for doing this. Read the rest of this entry
Hiding MySQL Passwords with Capistrano
December 1st, 2008
I was using Capistrano 2.5.2 to run a MySQL dump on a deployment target and what started as a simple implementation to prevent the command line password from showing up in the Capistrano log evolved into a research effort about the security of using passwords on the MySQL command line. This post describes how to suppress run execution lines from showing up in the Capistrano log, the real risks with using passwords on the MySQL command line and how to use Capistrano to avoid command line passwords without putting the password in a ~/.my.cnf file.
Read the rest of this entry
Deploying Mephisto with Capistrano to DreamHost
November 30th, 2008
This post describes how to use Capistrano to deploy a Mephisto based blogging engine to a DreamHost account running Phusion Passenger. The blog code is deployed from a local git repository. gitting Started with Mephisto describes how the repository was set-up. With some modifications the script and commands presented here should be adaptable to other hosting services and other Phusion based Rails applications. Read the rest of this entry