-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
100 lines (73 loc) · 3.28 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
------------------------------
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, '[email protected]: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