rv 2.99 → 2.991
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +1 -1
- data/README +24 -13
- data/lib/rv.rb +6 -5
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
|
2
|
-
v2.
|
2
|
+
v2.991. Gem'd; RDoc documentation; automated setup scripts; cluster support. Incompatible changes. Pre-release.
|
3
3
|
|
4
4
|
v2. Mongrel static directory handler.
|
5
5
|
|
data/README
CHANGED
@@ -11,10 +11,12 @@ Copyright 2007 Cloudburst, LLC. See the included LICENSE file.
|
|
11
11
|
|
12
12
|
* cluster support
|
13
13
|
* custom database configuration
|
14
|
-
*
|
14
|
+
* interactive setup tasks
|
15
15
|
|
16
16
|
Linux is required. Ubuntu is known to work; Gentoo should work; others should work with minor or no changes.
|
17
17
|
|
18
|
+
= Usage
|
19
|
+
|
18
20
|
== Installation
|
19
21
|
|
20
22
|
First, run:
|
@@ -35,10 +37,12 @@ On Gentoo, run:
|
|
35
37
|
Each Camping app should live in its own directory. Traverse to this directory and run:
|
36
38
|
sudo rv setup
|
37
39
|
|
38
|
-
|
40
|
+
The app will now start at boot. You can start it manually (along with your other Rv apps) by running:
|
39
41
|
sudo /etc/init.d/rv start
|
40
|
-
|
41
|
-
The script also responds to <tt>status</tt>, <tt>restart</tt>, and <tt>stop</tt>.
|
42
|
+
|
43
|
+
The script also responds to <tt>status</tt>, <tt>restart</tt>, and <tt>stop</tt>. You can adjust the app-specific configuration later by rerunning <tt>sudo rv setup</tt> or by editing <tt>/etc/rv/your_app.yml</tt>.
|
44
|
+
|
45
|
+
= Extras
|
42
46
|
|
43
47
|
== Troubleshooting
|
44
48
|
|
@@ -66,17 +70,24 @@ If you're using Apache 2.2, here's how to configure it to see your Camping proxy
|
|
66
70
|
|
67
71
|
If you configured a cluster, use a <tt>Proxy balancer</tt> instead:
|
68
72
|
|
69
|
-
<
|
70
|
-
|
71
|
-
BalancerMember http://127.0.0.1:4001
|
72
|
-
BalancerMember http://127.0.0.1:4002
|
73
|
-
# etc.
|
74
|
-
</Proxy>
|
73
|
+
<VirtualHost *:80>
|
74
|
+
ServerName myapp.example.com
|
75
75
|
|
76
|
-
|
76
|
+
<Proxy balancer://myapp_custer>
|
77
|
+
BalancerMember http://127.0.0.1:4000
|
78
|
+
BalancerMember http://127.0.0.1:4001
|
79
|
+
BalancerMember http://127.0.0.1:4002
|
80
|
+
# etc.
|
81
|
+
</Proxy>
|
77
82
|
|
78
|
-
|
79
|
-
|
83
|
+
ProxyPass / balancer://myapp_custer/
|
84
|
+
ProxyPassReverse / balancer://myapp_custer/
|
85
|
+
ProxyPreserveHost On
|
86
|
+
|
87
|
+
#Fix for Apache bug 39499
|
88
|
+
SetEnv force-proxy-request-1.0 1
|
89
|
+
SetEnv proxy-nokeepalive 1
|
90
|
+
</VirtualHost>
|
80
91
|
|
81
92
|
Do not use the line <tt>ProxyRequests Off</tt>.
|
82
93
|
|
data/lib/rv.rb
CHANGED
@@ -50,6 +50,7 @@ class Rv
|
|
50
50
|
'ruby' => '/usr/bin/env ruby',
|
51
51
|
'conf_dir' => '/etc/rv',
|
52
52
|
'log' => '/var/log/rv.log',
|
53
|
+
'harness' => 'rv_harness.rb',
|
53
54
|
'null_stream' => '< /dev/null > /dev/null 2>&1',
|
54
55
|
'log_stream' => '< /dev/null >> #{LOG} 2>&1',
|
55
56
|
'max_tries' => 10
|
@@ -175,15 +176,15 @@ class Rv
|
|
175
176
|
this_dir = `pwd`.chomp
|
176
177
|
app_name = this_dir.split("/").last
|
177
178
|
harness_source = "#{File.dirname(__FILE__)}/rv_harness.rb"
|
178
|
-
harness_target = "#{this_dir}
|
179
|
+
harness_target = "#{this_dir}/#{options['harness']}"
|
179
180
|
|
180
181
|
if !File.exist?(harness_target) or
|
181
182
|
(File.open(harness_target).readlines[2] != File.open(harness_source).readlines[2] and
|
182
|
-
agree("
|
183
|
-
puts "Installing
|
183
|
+
agree("#{options['harness']} is out-of-date; overwrite? "))
|
184
|
+
puts "Installing #{options['harness']} file."
|
184
185
|
File.copy harness_source, harness_target
|
185
186
|
else
|
186
|
-
puts "
|
187
|
+
puts "#{options['harness']} not changed."
|
187
188
|
end
|
188
189
|
|
189
190
|
defaults = {
|
@@ -233,7 +234,7 @@ class Rv
|
|
233
234
|
exit_with "Couldn't write to '#{options['conf_dir']}'. Please rerun with 'sudo'."
|
234
235
|
end
|
235
236
|
|
236
|
-
exit_with "All done. Please double-check the database configuration in '
|
237
|
+
exit_with "All done. Please double-check the database configuration in '#{options['harness']}';\nthen run 'sudo /etc/init.d/rv start'."
|
237
238
|
end
|
238
239
|
|
239
240
|
# Installs the 'rv' executable into /etc/init.d.
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: rv
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: "2.
|
7
|
-
date: 2007-08-
|
6
|
+
version: "2.991"
|
7
|
+
date: 2007-08-07 00:00:00 -04:00
|
8
8
|
summary: A little init.d system for running Camping apps.
|
9
9
|
require_paths:
|
10
10
|
- lib
|