Skip to content

rails plugin of capistrano recipes for planet argon's shared hosting plan

License

Notifications You must be signed in to change notification settings

prior/argon_masala

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

------------------------------
argon_masala
------------------------------
A rails plugin of capistrano recipes for Planet Argon's shared hosting.

This simplifies deployment on Planet Argon by encapsulating knowledge of
their hosting contraints, traps, tricks, methods, etc.  This plugin 
attempts to make things as easy as possible.  Hopefully it will save you
a headache (hint: if you don't have a headache deploying on planetargon
then it did)




------------------------------
steps to setting up trouble-free deployment
------------------------------
ensure host has mongrel, mongrel_cluster gems installed
ensure local has latest capistrano, mongrel, mongrel_cluster
rake rails:freeze:gems  #freeze rails library in vendor
add 'config.gem' lines for all require gems in environment.rb
rake gems:unpack:dependencies  #freezes all required gems
capify .
vhcs your domain
set up your db if you need to
set up your deploy.rb (see below)

then the magic happens:
cap deploy:setup
cap deploy:cold
cap pa:nginx:start

may have to do pa:nginx:restart for some reason

thereafter only need to do a 
cap deploy



----------------
deploy.rb
----------------

required for argon_masala!
:pa_account_domain  : this is the main domain used to identify your account
:pa_target_domain   : this is target domain for this application
:user               : this is your vuxxxx username
:application        : this is the name of your rails app

once these are taken care of then no need to specify roles,servers

others used by argon_masala:
:pa_mongrel_count   : number of mongrel servers to use (defaults to 1)
:pa_port_offset     : this is offset to use when specifying ports (defaults to 0)
                    :    remember you only have 10 ports total to play with
                    :    and you must specify each app's offset and count
                    :    so that you don't tread on any of the other apps'
                    :    mongrels

others you won't have to touch unless you deviate from defaults
:pa_mount_point     : mounting directory is relative to ~ (expects initial slash and none at end-- screwy-- know)
                    : default is determined acccording to VCHS defaults for alias/subdomains
                    : won't have to worry about if you use the VCHS default mount point



------------------------------
example deploy.rb
------------------------------
set :application, "planet_argon"
set :user, "vu2000"
set :pa_account_domain, "maindomain.com"
set :pa_target_domain, "www.kickassdomain.net"

set :ssh_options, { :forward_agent => true }

set :scm, :git
set :git_enable_submodules, true
set :deploy_via, :remote_cache
set :repository,  'git@cracklabs.com:plugins/apps/planet_argon.git'
set :branch, 'master'


---------------
to dos
---------------
-make each application aware of other application so explicit knowledge of ports and offsets isn't necessary
-above would also make teardown and build up of applications easier (nginx configs and rclocal configs)
-tie nginx:start/restart/stop into other events
-clean up database stuff-- perhaps use local database.production.yml
-allow subdomains of nonaccount domains
-document ssh/keys stuff
-document document document
-use capistrano dependency functionality to ensure correct gems, etc. are in place




Copyright (c) 2008 cracklabs.com, released under the MIT license

About

rails plugin of capistrano recipes for planet argon's shared hosting plan

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages