public
Description: A capistrano/rails plugin that makes it easy to deploy/manage/scale to EC2
Home | Edit | New

Installation

Rubber can be installed as a rubygem (recommended) or as a plugin into your rails project. The gem is available as “rubber” from gemcutter or as “wr0ngway-rubber” from github. Once installed, you need to vulcanize your project by running rubber’s vulcanize generator to add a basic set of configuration files to your project.

sudo gem install rubber
./script/generate vulcanize complete_passenger_mysql

or for a non-rails project, use the convenience script bundled with the rubber gem:

vulcanize complete_passenger_mysql

The vulcanize generator follows a mixin model. You can choose to generate a complete deployment scenario like “complete_passenger_mysql”, or you can start with the “base” or “mysql_minimal” generator and mixin in the modules you want for your needs. The goal here is to get people to contribute generators so that we all don’t have to reinvent the wheel every time we need to come up with a deployment environment. For example,

./script/generate vulcanize mysql_minimal
./script/generate vulcanize monit

to setup a minimal mysql setup (a stack made up of mysql, mongrel and nginx), and add in monit for making sure your components stay running.

Each component/stack will install a set of transformable config files, a rubber-module.yml file for configuring their transformation, and a deploy-module.rb file for doing the right thing for that module during deployment. I try to ensure that all components have sane defaults so they will work out of the box, but you’ll still want to peruse the files they generate to customize their behavior.

Edit config/rubber/rubber*.yml to add your settings. You can edit or add to the config files in RAILS_ROOT/config/rubber/<common|role|host> to transform those config files globally for all instances or for specific roles and/or hosts.

You may also want to customize config/deploy.rb for your needs. The deployment scripts in config/deploy-MODULE.yml contain MODULE specific (mongrel, nginx, etc) scripts for deploying those pieces of your setup.

To test that your transformations all work before deploying, you can run “rake rubber:config” in a development env. This will transform all your rubber config files into RAILS_ROOT/tmp/rubber as if it were “/” on your remote servers.

Last edited by wr0ngway, Tue Oct 06 16:12:13 -0700 2009
Home | Edit | New
Versions: