capitate 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +10 -0
- data/Manifest.txt +3 -9
- data/lib/capitate.rb +14 -0
- data/lib/capitate/cap_ext/namespace.rb +34 -0
- data/lib/capitate/cap_ext/task_definition.rb +22 -0
- data/lib/capitate/task_node.rb +21 -1
- data/lib/capitate/version.rb +1 -1
- data/lib/recipes/active_record.rb +7 -36
- data/lib/recipes/backgroundrb.rb +4 -19
- data/lib/recipes/centos/backgroundjob.rb +5 -26
- data/lib/recipes/centos/backgroundrb.rb +2 -13
- data/lib/recipes/centos/centos.rb +4 -26
- data/lib/recipes/centos/imagemagick.rb +8 -9
- data/lib/recipes/centos/memcached.rb +12 -53
- data/lib/recipes/centos/merb.rb +7 -33
- data/lib/recipes/centos/mongrel_cluster.rb +15 -51
- data/lib/recipes/centos/monit.rb +10 -36
- data/lib/recipes/centos/mysql.rb +1 -10
- data/lib/recipes/centos/nginx.rb +14 -42
- data/lib/recipes/centos/ruby.rb +6 -15
- data/lib/recipes/centos/sphinx.rb +13 -36
- data/lib/recipes/docs.rb +2 -14
- data/lib/recipes/logrotated.rb +20 -40
- data/lib/recipes/memcached.rb +10 -41
- data/lib/recipes/merb.rb +3 -4
- data/lib/recipes/monit.rb +4 -23
- data/lib/recipes/monit/merb.rb +7 -12
- data/lib/recipes/monit/mysql.rb +3 -19
- data/lib/recipes/monit/nginx.rb +2 -16
- data/lib/recipes/monit/sphinx.rb +20 -11
- data/lib/recipes/mysql.rb +13 -53
- data/lib/recipes/nginx.rb +9 -65
- data/lib/recipes/rails.rb +0 -58
- data/lib/recipes/sphinx.rb +20 -46
- data/lib/recipes/sshd.rb +6 -15
- data/lib/recipes/syslogd.rb +3 -43
- data/lib/templates/backgroundjob/backgroundjob.initd.centos.erb +4 -4
- data/lib/templates/merb/merb-no-http.monitrc.erb +13 -0
- data/lib/templates/merb/merb.initd.centos.erb +3 -3
- metadata +5 -12
- data/docs/nginx.README +0 -12
- data/website/index.html +0 -154
- data/website/index.txt +0 -69
- data/website/javascripts/code_highlighter.js +0 -188
- data/website/javascripts/rounded_corners_lite.inc.js +0 -285
- data/website/javascripts/ruby.js +0 -18
- data/website/stylesheets/screen.css +0 -265
- data/website/template.rhtml +0 -69
- data/website/template_recipe.rhtml +0 -44
data/lib/recipes/rails.rb
CHANGED
@@ -1,64 +1,6 @@
|
|
1
1
|
# Rails recipes
|
2
2
|
namespace :rails do
|
3
3
|
|
4
|
-
desc <<-DESC
|
5
|
-
Create database yaml in shared path. Note: If both @:db_host@ and @:db_socket@ are used, @db_socket@ wins.
|
6
|
-
|
7
|
-
*DEPRECATED*: Use @active_record:setup@
|
8
|
-
|
9
|
-
<dl>
|
10
|
-
<dt>db_name</dt>
|
11
|
-
<dd>Database name.</dd>
|
12
|
-
<dd>@set :db_name, "app_db_name"@</dd>
|
13
|
-
|
14
|
-
<dt>db_user</dt>
|
15
|
-
<dd>Database user.</dd>
|
16
|
-
<dd>@set :db_user, "app_db_user"@</dd>
|
17
|
-
|
18
|
-
<dt>db_pass</dt>
|
19
|
-
<dd>Database password.</dd>
|
20
|
-
<dd>@set :db_pass, "the_password"@</dd>
|
21
|
-
|
22
|
-
<dt>db_host</dt>
|
23
|
-
<dd>Database host (can be nil, if you are using socket).</dd>
|
24
|
-
<dd class="default">Defaults to @nil@</dd>
|
25
|
-
|
26
|
-
<dt>db_socket</dt>
|
27
|
-
<dd>Database socket (can be nil, if you are using host).</dd>
|
28
|
-
<dd class="default">Defaults to @nil@</dd>
|
29
|
-
<dd>@set :db_socket, "/var/lib/mysql/mysql.sock"@</dd>
|
30
|
-
|
31
|
-
<dt>database_yml_template</dt>
|
32
|
-
<dd>Path to database yml erb template.
|
33
|
-
<dd class="default">Defaults to @rails/database.yml.erb@ (in this GEM)</dd>
|
34
|
-
</dl>
|
35
|
-
|
36
|
-
"Source":#{link_to_source(__FILE__)}
|
37
|
-
DESC
|
38
|
-
task :setup, :roles => :app do
|
39
|
-
|
40
|
-
# Settings
|
41
|
-
fetch(:db_name)
|
42
|
-
fetch(:db_user)
|
43
|
-
fetch(:db_pass)
|
44
|
-
fetch_or_default(:db_host, nil)
|
45
|
-
fetch_or_default(:db_socket, nil)
|
46
|
-
fetch_or_default(:database_yml_template, "rails/database.yml.erb")
|
47
|
-
|
48
|
-
unless db_host.blank?
|
49
|
-
set :db_connect_type, "host"
|
50
|
-
set :db_connect, db_host
|
51
|
-
end
|
52
|
-
|
53
|
-
unless db_socket.blank?
|
54
|
-
set :db_connect_type, "socket"
|
55
|
-
set :db_connect, db_socket
|
56
|
-
end
|
57
|
-
|
58
|
-
run "mkdir -p #{shared_path}/config"
|
59
|
-
put template.load(database_yml_template), "#{shared_path}/config/database.yml"
|
60
|
-
end
|
61
|
-
|
62
4
|
desc "Make symlink for database yaml"
|
63
5
|
task :update_code do
|
64
6
|
run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml"
|
data/lib/recipes/sphinx.rb
CHANGED
@@ -2,45 +2,26 @@
|
|
2
2
|
namespace :sphinx do
|
3
3
|
|
4
4
|
desc <<-DESC
|
5
|
-
Update sphinx for application.
|
5
|
+
Update sphinx conf for application.
|
6
6
|
|
7
|
-
<dl>
|
8
|
-
<dt>sphinx_conf_template</dt><dd>Path to sphinx.conf.erb.</dd><dd>_Defaults to "config/templates/sphinx.conf.erb"_</dd>
|
9
|
-
<dt>sphinx_conf_path</dt><dd>Path to sphinx.conf.</dd><dd>_Defaults to "[shared_path]/config/sphinx.conf"_</dd>
|
10
|
-
<dt>sphinx_port</dt><dd>Sphinx port.</dd><dd>_Defaults to 3312_</dd>
|
11
|
-
<dt>sphinx_conf_root</dt><dd>Directory for sphinx configuration, like stopwords.txt.</dd><dd>_Defaults to [current_path]/config_</dd>
|
12
|
-
<dt>sphinx_index_root</dt><dd>Directory for sphinx indexes.</dd><dd>_Defaults to "[shared_path]/var/index"_</dd>
|
13
|
-
<dt>sphinx_log_root</dt><dd>Directory for sphinx logs.</dd><dd>_Defaults to "[shared_path]/log"_</dd>
|
14
|
-
<dt>sphinx_pid_root</dt><dd>Directory for sphinx pids.</dd><dd>_Defaults to "[shared_path]/pids"_</dd>
|
15
|
-
|
16
|
-
<dt>sphinx_db_user</dt><dd>Sphinx DB user.</dd><dd>_Defaults to db_user_</dd>
|
17
|
-
<dt>sphinx_db_pass</dt><dd>Sphinx DB password.</dd><dd>_Defaults to db_pass_</dd>
|
18
|
-
<dt>sphinx_db_name</dt><dd>Sphinx DB name.</dd><dd>_Defaults to db_name_</dd>
|
19
|
-
<dt>sphinx_db_port</dt><dd>Sphinx DB port.</dd><dd>_Defaults to db_port_</dd>
|
20
|
-
|
21
|
-
<dt>sphinx_db_host</dt><dd>Sphinx DB host.</dd><dd>_Defaults to db_host_</dd>
|
22
|
-
<dt>sphinx_conf_host</dt><dd>Sphinx DB host to listen on.</dd><dd>_Defaults to 127.0.0.1_</dd>
|
23
|
-
|
24
|
-
</dl>
|
25
7
|
"Source":#{link_to_source(__FILE__)}
|
26
8
|
DESC
|
9
|
+
task_arg(:sphinx_conf_template, "Path to sphinx.conf.erb template", :default => "config/templates/sphinx.conf.erb")
|
10
|
+
task_arg(:sphinx_port, "Sphinx port", :default => 3312)
|
11
|
+
task_arg(:sphinx_conf_path, "Path to sphinx.conf", :default => Proc.new {"#{shared_path}/config/sphinx.conf"}, :default_desc => "\#{shared_path}/config/sphinx.conf")
|
12
|
+
task_arg(:sphinx_conf_root, "Directory for sphinx configuration, like stopwords.txt", :default => Proc.new {"#{current_path}/config"}, :default_desc => "\#{current_path}/config")
|
13
|
+
task_arg(:sphinx_index_root, "Directory for sphinx indexes", :default => Proc.new {"#{shared_path}/var/index"}, :default_desc => "\#{shared_path}/var/index")
|
14
|
+
task_arg(:sphinx_log_root, "Directory for sphinx logs", :default => Proc.new {"#{shared_path}/log"}, :default_desc => "\#{shared_path}/log")
|
15
|
+
task_arg(:sphinx_pid_path, "Directory for sphinx pids", :default => Proc.new {"#{shared_path}/pids/searchd.pid"}, :default_desc => "\#{shared_path}/pids/searchd.pid")
|
16
|
+
|
17
|
+
task_arg(:sphinx_db_user, "Sphinx DB user", :set => :db_user)
|
18
|
+
task_arg(:sphinx_db_pass, "Sphinx DB password", :set => :db_pass)
|
19
|
+
task_arg(:sphinx_db_name, "Sphinx DB name", :set => :db_name)
|
20
|
+
task_arg(:sphinx_db_port, "Sphinx DB port", :set => :db_port)
|
21
|
+
task_arg(:sphinx_db_host, "Sphinx DB host", :set => :db_host)
|
22
|
+
|
23
|
+
task_arg(:sphinx_conf_host, "Sphinx DB host to listen on", :default => "127.0.0.1")
|
27
24
|
task :update_conf do
|
28
|
-
|
29
|
-
fetch_or_default(:sphinx_conf_template, "config/templates/sphinx.conf.erb")
|
30
|
-
fetch_or_default(:sphinx_port, 3312)
|
31
|
-
fetch_or_default(:sphinx_conf_path, "#{shared_path}/config/sphinx.conf")
|
32
|
-
fetch_or_default(:sphinx_conf_root, "#{current_path}/config")
|
33
|
-
fetch_or_default(:sphinx_index_root, "#{shared_path}/var/index")
|
34
|
-
fetch_or_default(:sphinx_log_root, "#{shared_path}/log")
|
35
|
-
fetch_or_default(:sphinx_pid_path, "#{shared_path}/pids/searchd.pid")
|
36
|
-
|
37
|
-
fetch_or_set(:sphinx_db_user, :db_user)
|
38
|
-
fetch_or_set(:sphinx_db_pass, :db_pass)
|
39
|
-
fetch_or_set(:sphinx_db_name, :db_name)
|
40
|
-
fetch_or_set(:sphinx_db_port, :db_port)
|
41
|
-
fetch_or_set(:sphinx_db_host, :db_host)
|
42
|
-
fetch_or_default(:sphinx_conf_host, "127.0.0.1")
|
43
|
-
|
44
25
|
put(template.load(sphinx_conf_template), sphinx_conf_path)
|
45
26
|
end
|
46
27
|
|
@@ -52,17 +33,12 @@ namespace :sphinx do
|
|
52
33
|
desc <<-DESC
|
53
34
|
Rotate sphinx index for application.
|
54
35
|
|
55
|
-
*sphinx_prefix*<dd>Location to sphinx install. _Defaults to nil_\n
|
56
|
-
*sphinx_conf*<dd>Location to sphinx conf. _Defaults to "[shared_path]/config/sphinx.conf"_\n
|
57
|
-
|
58
36
|
"Source":#{link_to_source(__FILE__)}
|
59
37
|
DESC
|
38
|
+
task_arg(:sphinx_prefix, :default => nil)
|
39
|
+
task_arg(:sphinx_conf, :default => Proc.new{"#{shared_path}/config/sphinx.conf"}, :default_desc => "\#{shared_path}/config/sphinx.conf")
|
60
40
|
task :rotate_all do
|
61
|
-
fetch_or_default(:sphinx_prefix, nil)
|
62
|
-
fetch_or_default(:sphinx_conf, "#{shared_path}/config/sphinx.conf")
|
63
|
-
|
64
41
|
indexer_path = sphinx_prefix ? "#{sphinx_prefix}/bin/indexer" : "indexer"
|
65
|
-
|
66
42
|
run "#{indexer_path} --config #{sphinx_conf} --rotate --all"
|
67
43
|
end
|
68
44
|
|
@@ -74,12 +50,10 @@ namespace :sphinx do
|
|
74
50
|
|
75
51
|
"Source":#{link_to_source(__FILE__)}
|
76
52
|
DESC
|
53
|
+
task_arg(:sphinx_prefix, :default => nil)
|
54
|
+
task_arg(:sphinx_conf, :default => Proc.new{"#{shared_path}/config/sphinx.conf"}, :default_desc => "\#{shared_path}/config/sphinx.conf")
|
77
55
|
task :index_all do
|
78
|
-
fetch_or_default(:sphinx_prefix, nil)
|
79
|
-
fetch_or_default(:sphinx_conf, "#{shared_path}/config/sphinx.conf")
|
80
|
-
|
81
56
|
indexer_path = sphinx_prefix ? "#{sphinx_prefix}/bin/indexer" : "indexer"
|
82
|
-
|
83
57
|
run "#{indexer_path} --config #{sphinx_conf} --all"
|
84
58
|
end
|
85
59
|
|
data/lib/recipes/sshd.rb
CHANGED
@@ -3,15 +3,11 @@ namespace :sshd do
|
|
3
3
|
desc <<-DESC
|
4
4
|
Create public and private keys for ssh.
|
5
5
|
|
6
|
-
*ssh_keygen_type*: SSH keygen type. _Defaults to rsa_\n
|
7
|
-
*ssh_keygen_bits*: SSH keygen bits. _Defaults to 2048_\n
|
8
|
-
|
9
6
|
"Source":#{link_to_source(__FILE__)}
|
10
7
|
DESC
|
8
|
+
task_arg(:ssh_keygen_type, "SSH keygen type", :default => "rsa")
|
9
|
+
task_arg(:ssh_keygen_bits, "SSH keygen bits", :default => 2048)
|
11
10
|
task :keygen do
|
12
|
-
# Settings
|
13
|
-
fetch_or_default(:ssh_keygen_type, "rsa")
|
14
|
-
fetch_or_default(:ssh_keygen_bits, 2048)
|
15
11
|
|
16
12
|
run "ssh-keygen -t #{ssh_keygen_type} -b #{ssh_keygen_bits}" do |channel, stream, data|
|
17
13
|
logger.trace data
|
@@ -33,19 +29,14 @@ namespace :sshd do
|
|
33
29
|
end
|
34
30
|
|
35
31
|
desc <<-DESC
|
36
|
-
Add to authorized keys. Uses
|
37
|
-
|
38
|
-
*ssh_public_key*: The public key from ssh:keygen.
|
32
|
+
Add to authorized keys. Uses @.ssh/authorized_keys@.
|
39
33
|
|
40
34
|
"Source":#{link_to_source(__FILE__)}
|
41
35
|
DESC
|
36
|
+
task_arg(:ssh_public_key, "The public key from sshd:keygen")
|
37
|
+
task_arg(:ssh_dir, "SSH home directory", :default => "~/.ssh")
|
38
|
+
task_arg(:authorized_keys_path, "Path to authorized keys", :default => "~/.ssh/authorized_keys")
|
42
39
|
task :authorize_key do
|
43
|
-
|
44
|
-
fetch(:ssh_public_key)
|
45
|
-
|
46
|
-
ssh_dir = "~/.ssh"
|
47
|
-
authorized_keys_path = "#{ssh_dir}/authorized_keys"
|
48
|
-
|
49
40
|
run_all <<-CMDS
|
50
41
|
if [ ! -d #{ssh_dir} ]; then mkdir #{ssh_dir} ; chmod 700 #{ssh_dir} ; fi
|
51
42
|
if [ ! -f #{authorized_keys_path} ]; then touch #{authorized_keys_path} ; chmod 600 #{authorized_keys_path} ; fi
|
data/lib/recipes/syslogd.rb
CHANGED
@@ -3,17 +3,12 @@ namespace :syslogd do
|
|
3
3
|
desc <<-DESC
|
4
4
|
Add entry to syslog for application.
|
5
5
|
|
6
|
-
*syslog_program_name*: syslog program name. What you used for <tt>SyslogLogger.new("program_name_here")</tt>\n
|
7
|
-
*syslog_log_path*: Path to log.\n
|
8
|
-
*syslog_conf_path*: Path to syslog conf. _Defaults to <tt>/etc/syslog.conf</tt>_\n
|
9
|
-
|
10
6
|
"Source":#{link_to_source(__FILE__)}
|
11
7
|
DESC
|
8
|
+
task_arg(:syslog_program_name, "Syslog program name. What you used for @SyslogLogger.new(\"program_name_here\")@")
|
9
|
+
task_arg(:syslog_log_path, "Path to log")
|
10
|
+
task_arg(:syslog_conf_path, :default => "/etc/syslog.conf")
|
12
11
|
task :setup_conf do
|
13
|
-
|
14
|
-
fetch(:syslog_program_name)
|
15
|
-
fetch(:syslog_log_path)
|
16
|
-
fetch_or_default(:syslog_conf_path, "/etc/syslog.conf")
|
17
12
|
|
18
13
|
utils.append_to(syslog_conf_path, <<-DATA, "^!#{syslog_program_name}")
|
19
14
|
|
@@ -23,39 +18,4 @@ namespace :syslogd do
|
|
23
18
|
DATA
|
24
19
|
end
|
25
20
|
|
26
|
-
desc <<-DESC
|
27
|
-
Add entry to newsyslog for application. See newsyslog man page for details.
|
28
|
-
|
29
|
-
Adds entry like:
|
30
|
-
|
31
|
-
<pre>
|
32
|
-
/var/log/my_app.log 640 7 * @T00 Z
|
33
|
-
</pre>
|
34
|
-
|
35
|
-
*syslog_log_path*: Path to log. _Defaults to <tt>/var/log/[syslog_program_name].log</tt>_\n
|
36
|
-
*newsyslog_conf_path*: Path to newsyslog conf.\n
|
37
|
-
*newsyslog_mode*: File mode (to create log with). _Defaults to _\n
|
38
|
-
*newsyslog_count*: Number of files to keep. _Defaults to 7_\n
|
39
|
-
*newsyslog_size*: Max size. _Defaults to *_\n
|
40
|
-
*newsyslog_when*: When to rotate. _Defaults to @T00_\n
|
41
|
-
*newsyslog_zb*: Whether to gzip or tarball. _Defaults to Z_\n
|
42
|
-
|
43
|
-
"Source":#{link_to_source(__FILE__)}
|
44
|
-
DESC
|
45
|
-
task :setup_newsyslog_conf do
|
46
|
-
|
47
|
-
fetch(:syslog_log_path)
|
48
|
-
fetch_or_default(:newsyslog_conf_path, "/etc/newsyslog.conf")
|
49
|
-
|
50
|
-
fetch_or_default(:newsyslog_mode, "640")
|
51
|
-
fetch_or_default(:newsyslog_count, "7")
|
52
|
-
fetch_or_default(:newsyslog_size, "*")
|
53
|
-
fetch_or_default(:newsyslog_when, "@T00")
|
54
|
-
fetch_or_default(:newsyslog_zb, "Z")
|
55
|
-
|
56
|
-
entry = "#{syslog_log_path} \t#{newsyslog_mode} \t#{newsyslog_count} \t#{newsyslog_size} \t#{newsyslog_when} \t#{newsyslog_zb}"
|
57
|
-
|
58
|
-
utils.append_to(newsyslog_conf_path, entry, "^#{syslog_log_path}")
|
59
|
-
end
|
60
|
-
|
61
21
|
end
|
@@ -13,12 +13,12 @@
|
|
13
13
|
RETVAL=0
|
14
14
|
|
15
15
|
DESC="backgroundjob daemon (<%= application %>)"
|
16
|
-
|
17
|
-
|
16
|
+
BIN_PATH="<%= backgroundjob_bin_path %>"
|
17
|
+
PID_FILE="<%= backgroundjob_pid_path %>"
|
18
18
|
|
19
19
|
start() {
|
20
20
|
echo -n $"Starting $DESC: "
|
21
|
-
daemon --user sick
|
21
|
+
daemon --user sick $BIN_PATH
|
22
22
|
RETVAL=$?
|
23
23
|
echo
|
24
24
|
return $RETVAL;
|
@@ -26,7 +26,7 @@ start() {
|
|
26
26
|
|
27
27
|
stop() {
|
28
28
|
echo -n $"Stopping $DESC:"
|
29
|
-
killproc -p $
|
29
|
+
killproc -p $PID_FILE
|
30
30
|
RETVAL=$?
|
31
31
|
echo
|
32
32
|
return $RETVAL;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<% processes.each do |process| %>
|
2
|
+
|
3
|
+
check process <%= merb_application %>_<%= process[:port] %> with pidfile <%= process[:pid_path] %>
|
4
|
+
group <%= merb_application %>
|
5
|
+
start program = "<%= process[:start] %>"
|
6
|
+
stop program = "<%= process[:stop] %>"
|
7
|
+
if totalmem > 100 Mb then restart
|
8
|
+
if cpu is greater than 60% for 2 cycles then alert
|
9
|
+
if cpu > 80% for 5 cycles then restart
|
10
|
+
if loadavg(5min) greater than 10 for 8 cycles then restart
|
11
|
+
if 3 restarts within 5 cycles then timeout
|
12
|
+
|
13
|
+
<% end %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#!/bin/
|
1
|
+
#!/bin/sh
|
2
2
|
#
|
3
3
|
# Copyright (c) 2008 Gabriel Handford, gabrielh@gmail.com
|
4
4
|
#
|
@@ -37,7 +37,7 @@ RETVAL=0
|
|
37
37
|
start() {
|
38
38
|
echo -n $"Starting $NAME: "
|
39
39
|
cd $ROOT_DIR
|
40
|
-
$CMD $CMD_OPTIONS -c $NODES -p $PORT
|
40
|
+
daemon --user $USER $CMD $CMD_OPTIONS -c $NODES -p $PORT
|
41
41
|
RETVAL=$?
|
42
42
|
[ "$RETVAL" -eq 0 ] && success $"$NAME start" || failure $"$NAME start"
|
43
43
|
echo
|
@@ -47,7 +47,7 @@ start() {
|
|
47
47
|
# Start only a single daemon function ($1=port)
|
48
48
|
start_only() {
|
49
49
|
cd $ROOT_DIR
|
50
|
-
$CMD $CMD_OPTIONS -c 1 -p $1
|
50
|
+
daemon --user $USER $CMD $CMD_OPTIONS -c 1 -p $1
|
51
51
|
}
|
52
52
|
|
53
53
|
stop() {
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capitate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ""
|
6
6
|
authors:
|
7
7
|
- Gabriel Handford
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-05-
|
12
|
+
date: 2008-05-14 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -33,7 +33,6 @@ extra_rdoc_files:
|
|
33
33
|
- License.txt
|
34
34
|
- Manifest.txt
|
35
35
|
- README.txt
|
36
|
-
- website/index.txt
|
37
36
|
files:
|
38
37
|
- Capfile
|
39
38
|
- History.txt
|
@@ -43,11 +42,12 @@ files:
|
|
43
42
|
- Rakefile
|
44
43
|
- config/hoe.rb
|
45
44
|
- config/requirements.rb
|
46
|
-
- docs/nginx.README
|
47
45
|
- lib/capitate.rb
|
48
46
|
- lib/capitate/cap_ext/connections.rb
|
49
47
|
- lib/capitate/cap_ext/docs.rb
|
48
|
+
- lib/capitate/cap_ext/namespace.rb
|
50
49
|
- lib/capitate/cap_ext/run_via.rb
|
50
|
+
- lib/capitate/cap_ext/task_definition.rb
|
51
51
|
- lib/capitate/cap_ext/variables.rb
|
52
52
|
- lib/capitate/plugins/base.rb
|
53
53
|
- lib/capitate/plugins/build.rb
|
@@ -115,6 +115,7 @@ files:
|
|
115
115
|
- lib/templates/memcached/memcached.initd.centos.erb
|
116
116
|
- lib/templates/memcached/memcached.monitrc.erb
|
117
117
|
- lib/templates/memcached/memcached.yml.erb
|
118
|
+
- lib/templates/merb/merb-no-http.monitrc.erb
|
118
119
|
- lib/templates/merb/merb.initd.centos.erb
|
119
120
|
- lib/templates/merb/merb.monitrc.erb
|
120
121
|
- lib/templates/mongrel/mongrel_cluster.initd.centos.erb
|
@@ -149,14 +150,6 @@ files:
|
|
149
150
|
- test/test_plugin_upload.rb
|
150
151
|
- test/test_recipes.rb
|
151
152
|
- test/test_templates.rb
|
152
|
-
- website/index.html
|
153
|
-
- website/index.txt
|
154
|
-
- website/javascripts/code_highlighter.js
|
155
|
-
- website/javascripts/rounded_corners_lite.inc.js
|
156
|
-
- website/javascripts/ruby.js
|
157
|
-
- website/stylesheets/screen.css
|
158
|
-
- website/template.rhtml
|
159
|
-
- website/template_recipe.rhtml
|
160
153
|
has_rdoc: true
|
161
154
|
homepage: http://capitate.rubyforge.org
|
162
155
|
post_install_message:
|
data/docs/nginx.README
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
=== Nginx + mongrel
|
2
|
-
http://brainspl.at/articles/2006/08/23/nginx-my-new-favorite-front-end-for-mongrel-cluster
|
3
|
-
http://brainspl.at/articles/2007/01/03/new-nginx-conf-with-optimizations
|
4
|
-
http://topfunky.net/svn/shovel/nginx
|
5
|
-
|
6
|
-
=== Nginx + memcached:
|
7
|
-
http://www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/
|
8
|
-
http://blog.kovyrin.net/2007/08/05/using-nginx-ssi-and-memcache-to-make-your-web-applications-faster/
|
9
|
-
|
10
|
-
=== Nginx
|
11
|
-
http://robsanheim.com/2008/02/07/beware-the-default-nginx-config-old-ie6-hates-gzip/
|
12
|
-
http://brainspl.at/articles/2007/11/09/a-fair-proxy-balancer-for-nginx-and-mongrel
|
data/website/index.html
DELETED
@@ -1,154 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
-
<head>
|
5
|
-
<link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen" />
|
6
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
7
|
-
<title>
|
8
|
-
→ ‘capitate’: Capistrano recipes, plugins and templates.
|
9
|
-
</title>
|
10
|
-
<script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
|
11
|
-
<script type="text/javascript">
|
12
|
-
window.onload = function() {
|
13
|
-
settings = {
|
14
|
-
tl: { radius: 10 },
|
15
|
-
tr: { radius: 10 },
|
16
|
-
bl: { radius: 10 },
|
17
|
-
br: { radius: 10 },
|
18
|
-
antiAlias: true,
|
19
|
-
autoPad: true,
|
20
|
-
validTags: ["div"]
|
21
|
-
};
|
22
|
-
|
23
|
-
curvy_ids = [ "version" ];
|
24
|
-
for(id in curvy_ids) {
|
25
|
-
var box = new curvyCorners(settings, document.getElementById(curvy_ids[id]));
|
26
|
-
box.applyCornersToAll();
|
27
|
-
}
|
28
|
-
}
|
29
|
-
</script>
|
30
|
-
</head>
|
31
|
-
<body>
|
32
|
-
<div id="main" class="landing">
|
33
|
-
|
34
|
-
<h1>→ ‘capitate’</h1>
|
35
|
-
|
36
|
-
<div id="version" class="clickable box" onclick='document.location = "http://rubyforge.org/projects/capitate"; return false'>
|
37
|
-
<p>Get Version</p>
|
38
|
-
<a href="http://rubyforge.org/projects/capitate" class="numbers">0.3.5</a>
|
39
|
-
</div>
|
40
|
-
|
41
|
-
<div id="recipes">
|
42
|
-
<p>Documentation:
|
43
|
-
<a href="recipes/index.html">Recipes</a> →
|
44
|
-
<a href="http://github.com/gabriel/capitate/tree/master/lib/capitate/plugins">Plugins</a> →
|
45
|
-
<a href="http://github.com/gabriel/capitate/tree/master/lib/templates">Templates</a>
|
46
|
-
</p>
|
47
|
-
</div>
|
48
|
-
|
49
|
-
<div>
|
50
|
-
<h2>What</h2>
|
51
|
-
|
52
|
-
|
53
|
-
<p>Capistrano plugins, recipes and templates.</p>
|
54
|
-
|
55
|
-
|
56
|
-
<h2>Installing</h2>
|
57
|
-
|
58
|
-
|
59
|
-
<pre>sudo gem install capitate</pre>
|
60
|
-
|
61
|
-
<h2>Running</h2>
|
62
|
-
|
63
|
-
|
64
|
-
<p>Add capitate to your Capfile. Copy this somewhere near the top:</p>
|
65
|
-
|
66
|
-
|
67
|
-
<p><pre class='syntax'><span class="ident">require</span> <span class="punct">'</span><span class="string">capitate</span><span class="punct">'</span>
|
68
|
-
<span class="ident">require</span> <span class="punct">'</span><span class="string">capitate/recipes</span><span class="punct">'</span>
|
69
|
-
<span class="ident">set</span> <span class="symbol">:project_root</span><span class="punct">,</span> <span class="constant">File</span><span class="punct">.</span><span class="ident">dirname</span><span class="punct">(</span><span class="constant">__FILE__</span><span class="punct">)</span>
|
70
|
-
</pre></p>
|
71
|
-
|
72
|
-
|
73
|
-
<h2>The basics</h2>
|
74
|
-
|
75
|
-
|
76
|
-
<p>Capitate has:</p>
|
77
|
-
|
78
|
-
|
79
|
-
<ul>
|
80
|
-
<li>Plugins to help install applications, via yum or manually unpacking, and building. Also to prompt for input, install gems, run shell scripts, etc.</li>
|
81
|
-
<li>Templates for init scripts and application configuration</li>
|
82
|
-
<li>Templates and recipes for common apps like monit, nginx, sphinx, mongrel, ruby and mysql</li>
|
83
|
-
<li>Common deployment setup and update_code tasks, such as symlinking in database.yml and more advanced recipes such as sphinx configuration.</li>
|
84
|
-
</ul>
|
85
|
-
|
86
|
-
|
87
|
-
<h3>Example: Using capitate to write an install task:</h3>
|
88
|
-
|
89
|
-
|
90
|
-
<p>See <a href="http://github.com/gabriel/capitate/tree/master/lib/deployment/centos-5.1-64-web/install.rb">centos-5.1-64-web/install.rb</a></p>
|
91
|
-
|
92
|
-
|
93
|
-
<p>Load this in your Capfile:</p>
|
94
|
-
|
95
|
-
|
96
|
-
<pre><code>load "lib/deployment/centos-5.1-64-web/install.rb"</code></pre>
|
97
|
-
|
98
|
-
|
99
|
-
<p>and then:</p>
|
100
|
-
|
101
|
-
|
102
|
-
<pre><code>cap HOSTS=x.x.x.x install</code></pre>
|
103
|
-
|
104
|
-
|
105
|
-
<h3>Use recipes</h3>
|
106
|
-
|
107
|
-
|
108
|
-
<p><a href="recipes/index.html">View recipes documentation</a></p>
|
109
|
-
|
110
|
-
|
111
|
-
<h2>Forum</h2>
|
112
|
-
|
113
|
-
|
114
|
-
<p><a href="http://groups.google.com/group/capitate">http://groups.google.com/group/capitate</a></p>
|
115
|
-
|
116
|
-
|
117
|
-
<h2>How to submit patches</h2>
|
118
|
-
|
119
|
-
|
120
|
-
<p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people’s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p>
|
121
|
-
|
122
|
-
|
123
|
-
<p>The trunk repository is <a href="http://github.com/gabriel/capitate/tree/master">http://github.com/gabriel/capitate/tree/master</a> for anonymous access.</p>
|
124
|
-
|
125
|
-
|
126
|
-
<h2>License</h2>
|
127
|
-
|
128
|
-
|
129
|
-
<p>This code is free to use under the terms of the <span class="caps">MIT</span> license.</p>
|
130
|
-
|
131
|
-
|
132
|
-
<h2>Contact</h2>
|
133
|
-
|
134
|
-
|
135
|
-
<p>Comments are welcome. Send an email to <a href="mailto:gabrielh@gmail.com">Gabriel Handford</a> via the <a href="http://groups.google.com/group/capitate">forum</a></p>
|
136
|
-
</div>
|
137
|
-
<p class="coda">
|
138
|
-
<a href="http://ducktyper.com">ducktyper.com</a>, 8th May 2008<br>
|
139
|
-
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
140
|
-
</p>
|
141
|
-
</div>
|
142
|
-
|
143
|
-
<script type="text/javascript">
|
144
|
-
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
145
|
-
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
146
|
-
</script>
|
147
|
-
<script type="text/javascript">
|
148
|
-
var pageTracker = _gat._getTracker("UA-1286493-6");
|
149
|
-
pageTracker._initData();
|
150
|
-
pageTracker._trackPageview();
|
151
|
-
</script>
|
152
|
-
|
153
|
-
</body>
|
154
|
-
</html>
|