Renfield
This gem adds several interesting features to vlad the deployer
The name comes from Dracula’s servant, R. M. Renfield .
Installation
On your environment.rb :
config.gem :renfield
Then execute rake gems:install if needed.
The Renfield requires vlad – gems:install should install that one too.
You can also install renfield + dependencies manually by doing:
gem install renfield
Your lib/tasks/vlad.rake must also include vlad. Like so:
begin
require 'vlad'
Vlad.load :app => :passenger
rescue LoadError
# do nothing
raise "vlad didn't load!"
end
require 'renfield'
Additions:
Renfield includes:
Methods
- color generation for console messages:
red,green,yellow,blue,magenta,cyan. Example:puts red('hello')will print a red “hello” message on the console. info,warning,error. They are a fancy way of printing information messages, warnings and errors. Example:info 'dump done'remote_rakefor executing a rake on the target server. Example:remote_rake 'db:drop'will dorun "cd #{current_path}; rake RAILS_ENV='production' db:drop"
Remote tasks
vlad:chowndoes nothing yet.vlad:restartdoesrun "cd #{current_path}; touch tmp/restart.txt"vlad:confirmasks for a confirmation before continuing. Otherwise the rake is aborted.vlad:clean_migrateexecutesrake db:reset db:migrateon the target servervlad:maintenance:setputs a “this site is undergoing maintenance” page on the sitevlad:maintenance:removeremoves the maintenance page
That’s all for now.