This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
san_juan /
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Tue May 20 08:01:03 -0700 2008 | |
| |
README.textile | Fri Oct 03 11:35:14 -0700 2008 | |
| |
lib/ | Mon Jun 23 16:13:45 -0700 2008 | |
| |
san_juan.gemspec | Thu Nov 13 15:24:23 -0800 2008 |
README.textile
Description
Want Capistrano to talk to God? Find San Juan
Requirements
Install
gem install jnewland-san_juan
OR
gem install jnewland-san_juan -s http://gems.github.com
Usage
In your Capistrano deploy recipie:
require 'san_juan'
role :app, 'foo.example.com'
role :web, 'bar.example.com'
san_juan.role :app, %w(mongrels memcached)
san_juan.role :web, %w(nginx)
Now, check out cap -T:
...
cap god:all:quit # Quit god, but not the proce...
cap god:all:reload # Reloading God Config
cap god:all:start # Start god
cap god:all:start_interactive # Start god interactively
cap god:all:status # Describe the status of the ...
cap god:all:terminate # Terminate god and all monit...
cap god:app:mongrels:log # Log mongrels
cap god:app:mongrels:remove # Remove mongrels
cap god:app:mongrels:restart # Restart mongrels
cap god:app:mongrels:start # Start mongrels
cap god:app:mongrels:stop # Stop mongrels
cap god:app:mongrels:unmonitor # Unmonitor mongrels
cap god:app:memcached:log # Log memcached
cap god:app:memcached:remove # Remove memcached
cap god:app:memcached:restart # Restart memcached
cap god:app:memcached:start # Start memcached
cap god:app:memcached:stop # Stop memcached
cap god:app:memcached:unmonitor # Unmonitor memcached
cap god:app:quit # Quit god, but not the proce...
cap god:app:reload # Reload the god config file
cap god:app:start # Start god
cap god:app:start_interactive # Start god interactively
cap god:app:terminate # Terminate god and all monit...
cap god:web:nginx:log # Log nginx
cap god:web:nginx:remove # Remove nginx
cap god:web:nginx:restart # Restart nginx
cap god:web:nginx:start # Start nginx
cap god:web:nginx:stop # Stop nginx
cap god:web:nginx:unmonitor # Unmonitor nginx
cap god:web:quit # Quit god, but not the proce...
cap god:web:reload # Reload the god config file
cap god:web:start # Start god
cap god:web:start_interactive # Start god interactively
cap god:web:terminate # Terminate god and all monit...
...
To make capistrano start, stop, and restart your app using God, override the
deploy:start, deploy:stop, and deploy:restart tasks:
namespace :deploy do
desc "Use god to restart the app"
task :restart do
god.all.reload #ensures any changes to the god config are applied at deploy
god.app.mongrels.restart
# god.web.nginx.restart
# ...
end
desc "Use god to start the app"
task :start do
god.all.start
end
desc "Use god to stop the app"
task :stop do
god.all.terminate
end
end
Tweaks
A few of the tasks in the god:all namespace require the path to your god
configuration file. This defaults to:
"#{current_path}/config/god/#{role}.god"
This can be changed by setting the god_config_path capistrano variable:
require 'san_juan'
set :god_config_path, "/path/to/config"
role :app, 'foo.example.com'
role :web, 'bar.example.com'
san_juan.role :app, %w(mongrels memcached)
san_juan.role :web, %w(nginx)







