capitate 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +14 -0
- data/Manifest.txt +10 -2
- data/docs/recipes/imagemagick-centos.txt +6 -0
- data/docs/recipes/index.txt +9 -6
- data/docs/recipes/memcached-centos.txt +7 -0
- data/docs/recipes/memcached-monit.txt +30 -0
- data/docs/recipes/memcached.txt +1 -27
- data/docs/recipes/{mongrel_cluster-centos.txt → mongrel-cluster-centos.txt} +12 -8
- data/docs/recipes/{mongrel_cluster.txt → mongrel-cluster-monit.txt} +12 -16
- data/docs/recipes/mongrel-cluster.txt +9 -0
- data/docs/recipes/mongrel.txt +9 -0
- data/docs/recipes/monit-centos.txt +2 -0
- data/docs/recipes/mysql-monit.txt +28 -0
- data/docs/recipes/mysql.txt +3 -19
- data/docs/recipes/nginx-centos.txt +9 -0
- data/docs/recipes/nginx-mongrel.txt +33 -0
- data/docs/recipes/nginx-monit.txt +26 -0
- data/docs/recipes/nginx.txt +2 -44
- data/docs/recipes/ruby-centos.txt +9 -0
- data/docs/recipes/sphinx-centos.txt +8 -0
- data/docs/recipes/sphinx-monit.txt +22 -0
- data/docs/recipes/sphinx.txt +1 -11
- data/lib/capitate/cap_ext/connections.rb +15 -13
- data/lib/capitate/cap_ext/roles.rb +26 -0
- data/lib/capitate/plugins/base.rb +1 -0
- data/lib/capitate/plugins/prompt.rb +49 -6
- data/lib/capitate/plugins/script.rb +17 -13
- data/lib/capitate/recipes.rb +0 -3
- data/lib/capitate/version.rb +1 -1
- data/lib/capitate.rb +3 -0
- data/lib/deployment/deploy.rb +4 -7
- data/lib/deployment/install-centos-rubyweb.rb +3 -3
- data/lib/recipes/centos/centos.rb +17 -9
- data/lib/recipes/centos/imagemagick.rb +6 -0
- data/lib/recipes/centos/memcached.rb +6 -0
- data/lib/recipes/centos/mongrel_cluster.rb +42 -28
- data/lib/recipes/centos/monit.rb +2 -1
- data/lib/recipes/centos/mysql.rb +1 -1
- data/lib/recipes/centos/nginx.rb +8 -0
- data/lib/recipes/centos/ruby.rb +10 -2
- data/lib/recipes/centos/sphinx.rb +8 -1
- data/lib/recipes/memcached.rb +20 -22
- data/lib/recipes/mongrel_cluster.rb +60 -50
- data/lib/recipes/mysql.rb +21 -17
- data/lib/recipes/nginx.rb +47 -39
- data/lib/recipes/rails.rb +10 -0
- data/lib/recipes/sphinx.rb +15 -11
- data/lib/templates/mongrel/mongrel_cluster.initd.erb +6 -6
- data/lib/templates/mongrel/mongrel_cluster.monitrc.erb +2 -2
- data/lib/templates/mongrel/mongrel_cluster.yml.erb +1 -1
- data/lib/templates/nginx/nginx_vhost.conf.erb +8 -4
- data/lib/templates/rails/database.yml.erb +1 -2
- data/website/index.html +1 -1
- metadata +21 -6
data/History.txt
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
== 0.2.5 2008-02-28
|
2
|
+
|
3
|
+
* Adding application configuration for mongrel cluster monit setup.
|
4
|
+
* Renaming recipes, using consistent names for namespaces.
|
5
|
+
* Capistrano patch: if missing role, ignore the task instead of throwing error.
|
6
|
+
* Capistranp patch: Showing debug statement on SSH connect.
|
7
|
+
|
8
|
+
== 0.2.4 2008-02-26
|
9
|
+
|
10
|
+
* Change prompt.password to take options
|
11
|
+
* Adding password retry and check_hash
|
12
|
+
* Fixing :shell option for build scripting
|
13
|
+
* Add readline-devel to ruby centos install dependency
|
14
|
+
|
1
15
|
== 0.2.3 2008-02-25
|
2
16
|
|
3
17
|
* Various task and recipe fixes.
|
data/Manifest.txt
CHANGED
@@ -17,23 +17,31 @@ docs/recipes/imagemagick-centos.txt
|
|
17
17
|
docs/recipes/imagemagick.txt
|
18
18
|
docs/recipes/index.txt
|
19
19
|
docs/recipes/memcached-centos.txt
|
20
|
+
docs/recipes/memcached-monit.txt
|
20
21
|
docs/recipes/memcached.txt
|
21
|
-
docs/recipes/
|
22
|
-
docs/recipes/
|
22
|
+
docs/recipes/mongrel-cluster-centos.txt
|
23
|
+
docs/recipes/mongrel-cluster-monit.txt
|
24
|
+
docs/recipes/mongrel-cluster.txt
|
25
|
+
docs/recipes/mongrel.txt
|
23
26
|
docs/recipes/monit-centos.txt
|
24
27
|
docs/recipes/monit.txt
|
25
28
|
docs/recipes/mysql-centos.txt
|
29
|
+
docs/recipes/mysql-monit.txt
|
26
30
|
docs/recipes/mysql.txt
|
27
31
|
docs/recipes/nginx-centos.txt
|
32
|
+
docs/recipes/nginx-mongrel.txt
|
33
|
+
docs/recipes/nginx-monit.txt
|
28
34
|
docs/recipes/nginx.txt
|
29
35
|
docs/recipes/rails.txt
|
30
36
|
docs/recipes/ruby-centos.txt
|
31
37
|
docs/recipes/ruby.txt
|
32
38
|
docs/recipes/sphinx-centos.txt
|
39
|
+
docs/recipes/sphinx-monit.txt
|
33
40
|
docs/recipes/sphinx.txt
|
34
41
|
lib/capitate.rb
|
35
42
|
lib/capitate/cap_ext/connections.rb
|
36
43
|
lib/capitate/cap_ext/extension_proxy.rb
|
44
|
+
lib/capitate/cap_ext/roles.rb
|
37
45
|
lib/capitate/cap_ext/run_via.rb
|
38
46
|
lib/capitate/cap_ext/variables.rb
|
39
47
|
lib/capitate/plugins/base.rb
|
@@ -15,6 +15,12 @@ h3(#imagemagick:centos:install). imagemagick:centos:install
|
|
15
15
|
Install imagemagick.
|
16
16
|
|
17
17
|
*imagemagick_build_options*: Imagemagick build options.
|
18
|
+
<pre>
|
19
|
+
set :imagemagick_build_options, {
|
20
|
+
:url => "ftp://ftp.imagemagick.org/pub/ImageMagick/ImageMagick.tar.gz",
|
21
|
+
:unpack_dir => "ImageMagick-*"
|
22
|
+
}
|
23
|
+
</pre>
|
18
24
|
|
19
25
|
|
20
26
|
|
data/docs/recipes/index.txt
CHANGED
@@ -11,16 +11,19 @@ h2. Namespaces
|
|
11
11
|
* "deploy:web":deploy-web.html (2)
|
12
12
|
* "docs":docs.html (1)
|
13
13
|
* "imagemagick:centos":imagemagick-centos.html (1)
|
14
|
-
* "memcached":memcached.html (1)
|
15
14
|
* "memcached:centos":memcached-centos.html (1)
|
16
|
-
* "
|
17
|
-
* "
|
15
|
+
* "memcached:monit":memcached-monit.html (1)
|
16
|
+
* "mongrel-cluster:centos":mongrel-cluster-centos.html (1)
|
17
|
+
* "mongrel-cluster:monit":mongrel-cluster-monit.html (1)
|
18
18
|
* "monit:centos":monit-centos.html (2)
|
19
|
-
* "mysql":mysql.html (
|
19
|
+
* "mysql":mysql.html (1)
|
20
20
|
* "mysql:centos":mysql-centos.html (1)
|
21
|
-
* "
|
21
|
+
* "mysql:monit":mysql-monit.html (1)
|
22
22
|
* "nginx:centos":nginx-centos.html (2)
|
23
|
+
* "nginx:mongrel":nginx-mongrel.html (1)
|
24
|
+
* "nginx:monit":nginx-monit.html (1)
|
23
25
|
* "rails":rails.html (5)
|
24
26
|
* "ruby:centos":ruby-centos.html (1)
|
25
|
-
* "sphinx":sphinx.html (
|
27
|
+
* "sphinx":sphinx.html (4)
|
26
28
|
* "sphinx:centos":sphinx-centos.html (2)
|
29
|
+
* "sphinx:monit":sphinx-monit.html (1)
|
@@ -16,6 +16,13 @@ Install memcached.
|
|
16
16
|
|
17
17
|
*memcached_build_options*: Memcached build options.
|
18
18
|
|
19
|
+
<pre>
|
20
|
+
set :memcached_build_options, {
|
21
|
+
:url => "http://www.danga.com/memcached/dist/memcached-1.2.4.tar.gz",
|
22
|
+
:configure_options => "--prefix=/usr/local"
|
23
|
+
}
|
24
|
+
</pre>
|
25
|
+
|
19
26
|
*memcached_memory*: Memcached memory (in MB).
|
20
27
|
|
21
28
|
@set :memcached_memory, 64@
|
@@ -0,0 +1,30 @@
|
|
1
|
+
h1. memcached:monit
|
2
|
+
|
3
|
+
"home":../index.html > "recipes":index.html > "memcached":memcached.html > monit
|
4
|
+
|
5
|
+
|
6
|
+
h2. Tasks
|
7
|
+
|
8
|
+
* "memcached:monit:install":#memcached:monit:install
|
9
|
+
|
10
|
+
|
11
|
+
h2. Task documentation
|
12
|
+
|
13
|
+
h3(#memcached:monit:install). memcached:monit:install
|
14
|
+
|
15
|
+
Generate and install memcached monitrc.
|
16
|
+
|
17
|
+
*memcached_pid_path*: Path to memcached pid file. _Defaults to /var/run/memcached.pid_
|
18
|
+
|
19
|
+
@set :memcached_pid_path, "/var/run/memcached.pid"@
|
20
|
+
|
21
|
+
*memcached_port*: Memcached port. _Defaults to 11211_
|
22
|
+
|
23
|
+
@set :memcached_port, 11211@
|
24
|
+
|
25
|
+
*monit_conf_dir*: Destination for monitrc. _Defaults to "/etc/monit"_
|
26
|
+
|
27
|
+
@set :monit_conf_dir, "/etc/monit"@
|
28
|
+
|
29
|
+
|
30
|
+
|
data/docs/recipes/memcached.txt
CHANGED
@@ -6,30 +6,4 @@ h1. memcached
|
|
6
6
|
h2. Namespaces
|
7
7
|
|
8
8
|
* "memcached:centos":memcached-centos.html (1)
|
9
|
-
|
10
|
-
|
11
|
-
h2. Tasks
|
12
|
-
|
13
|
-
* "memcached:install_monit":#memcached:install_monit
|
14
|
-
|
15
|
-
|
16
|
-
h2. Task documentation
|
17
|
-
|
18
|
-
h3(#memcached:install_monit). memcached:install_monit
|
19
|
-
|
20
|
-
Generate and install memcached monitrc.
|
21
|
-
|
22
|
-
*memcached_pid_path*: Path to memcached pid file. _Defaults to /var/run/memcached.pid_
|
23
|
-
|
24
|
-
@set :memcached_pid_path, "/var/run/memcached.pid"@
|
25
|
-
|
26
|
-
*memcached_port*: Memcached port. _Defaults to 11211_
|
27
|
-
|
28
|
-
@set :memcached_port, 11211@
|
29
|
-
|
30
|
-
*monit_conf_dir*: Destination for monitrc. _Defaults to "/etc/monit"_
|
31
|
-
|
32
|
-
@set :monit_conf_dir, "/etc/monit"@
|
33
|
-
|
34
|
-
|
35
|
-
|
9
|
+
* "memcached:monit":memcached-monit.html (1)
|
@@ -1,33 +1,37 @@
|
|
1
|
-
h1.
|
1
|
+
h1. mongrel-cluster:centos
|
2
2
|
|
3
|
-
"home":../index.html > "recipes":index.html > "
|
3
|
+
"home":../index.html > "recipes":index.html > "mongrel-cluster":mongrel-cluster.html > centos
|
4
4
|
|
5
5
|
|
6
6
|
h2. Tasks
|
7
7
|
|
8
|
-
* "
|
8
|
+
* "mongrel:cluster:centos:setup":#mongrel:cluster:centos:setup
|
9
9
|
|
10
10
|
|
11
11
|
h2. Task documentation
|
12
12
|
|
13
|
-
h3(#
|
13
|
+
h3(#mongrel:cluster:centos:setup). mongrel:cluster:centos:setup
|
14
14
|
|
15
15
|
Create mongrel cluster.
|
16
|
-
|
16
|
+
|
17
17
|
*mongrel_size*: Number of mongrels.
|
18
|
-
|
18
|
+
|
19
19
|
@set :mongrel_size, 3@
|
20
20
|
|
21
21
|
*mongrel_port*: Starting port for mongrels. If there are 3 mongrels with port 9000,
|
22
22
|
then instances will be at 9000, 9001, and 9002
|
23
|
-
|
23
|
+
|
24
24
|
@set :mongrel_port, 9000@
|
25
|
-
|
25
|
+
|
26
26
|
*mongrel_config_dir*: Directory for mongrel config. _Defaults to "[shared_path]/config/mongrel"_
|
27
27
|
*mongrel_pid_dir*: Directory for mongrel pids. _Defaults to "[shared_path]/pids"
|
28
28
|
*mongrel_config_script*: Config script to load with mongrel. _Defaults to nil_
|
29
29
|
|
30
30
|
@set :mongrel_config_script, "config/mongrel_handler.rb"@
|
31
31
|
|
32
|
+
*mongrel_cluster_command*: Mongrel cluster command. _Defaults to mongrel_cluster_ctl_
|
33
|
+
*mongrel_initscript_name*: Mongrel initscript name. _Defaults to mongrel_cluster_#{application}_
|
34
|
+
*mongrel_config_options*: Config options appended to cluster yml. _Defaults to <tt>{}</tt>_
|
35
|
+
|
32
36
|
|
33
37
|
|
@@ -1,39 +1,35 @@
|
|
1
|
-
h1.
|
1
|
+
h1. mongrel-cluster:monit
|
2
2
|
|
3
|
-
"home":../index.html > "recipes":index.html >
|
4
|
-
|
5
|
-
|
6
|
-
h2. Namespaces
|
7
|
-
|
8
|
-
* "mongrel_cluster:centos":mongrel_cluster-centos.html (1)
|
3
|
+
"home":../index.html > "recipes":index.html > "mongrel-cluster":mongrel-cluster.html > monit
|
9
4
|
|
10
5
|
|
11
6
|
h2. Tasks
|
12
7
|
|
13
|
-
* "
|
8
|
+
* "mongrel:cluster:monit:setup":#mongrel:cluster:monit:setup
|
14
9
|
|
15
10
|
|
16
11
|
h2. Task documentation
|
17
12
|
|
18
|
-
h3(#
|
13
|
+
h3(#mongrel:cluster:monit:setup). mongrel:cluster:monit:setup
|
19
14
|
|
20
15
|
Create monit configuration for mongrel cluster.
|
21
|
-
|
16
|
+
|
17
|
+
*mongrel_application*: Name of application (monit group). _Defaults to <tt>"mongrel_cluster_#{fetch(:application)}"</tt>_
|
22
18
|
*mongrel_size*: Number of mongrels.
|
23
|
-
|
19
|
+
|
24
20
|
@set :mongrel_size, 3@
|
25
21
|
|
26
22
|
*mongrel_port*: Starting port for mongrels. If there are 3 mongrels with port 9000, then instances
|
27
23
|
will be at 9000, 9001, and 9002
|
28
|
-
|
24
|
+
|
29
25
|
@set :mongrel_port, 9000@
|
30
|
-
|
26
|
+
|
31
27
|
*mongrel_config_script*: Config script to load with mongrel. _Defaults to nil_
|
32
|
-
|
33
|
-
@set :mongrel_config_script, "config/mongrel_handler.rb"@
|
34
28
|
|
29
|
+
@set :mongrel_config_script, "config/mongrel_handler.rb"@
|
30
|
+
|
35
31
|
*monit_conf_dir*: Destination for monitrc. _Defaults to "/etc/monit"_
|
36
|
-
|
32
|
+
|
37
33
|
@set :monit_conf_dir, "/etc/monit"@
|
38
34
|
|
39
35
|
|
@@ -0,0 +1,28 @@
|
|
1
|
+
h1. mysql:monit
|
2
|
+
|
3
|
+
"home":../index.html > "recipes":index.html > "mysql":mysql.html > monit
|
4
|
+
|
5
|
+
|
6
|
+
h2. Tasks
|
7
|
+
|
8
|
+
* "mysql:monit:install":#mysql:monit:install
|
9
|
+
|
10
|
+
|
11
|
+
h2. Task documentation
|
12
|
+
|
13
|
+
h3(#mysql:monit:install). mysql:monit:install
|
14
|
+
|
15
|
+
Install mysql monit hooks.
|
16
|
+
|
17
|
+
*db_port*: Mysql port. _Defaults to 3306_
|
18
|
+
|
19
|
+
*mysql_pid_path*: Path to mysql pid file. _Defaults to /var/run/mysqld/mysqld.pid_
|
20
|
+
|
21
|
+
@set :mysql_pid_path, "/var/run/mysqld/mysqld.pid"@
|
22
|
+
|
23
|
+
*monit_conf_dir*: Destination for monitrc. _Defaults to "/etc/monit"_
|
24
|
+
|
25
|
+
@set :monit_conf_dir, "/etc/monit"@
|
26
|
+
|
27
|
+
|
28
|
+
|
data/docs/recipes/mysql.txt
CHANGED
@@ -6,32 +6,16 @@ h1. mysql
|
|
6
6
|
h2. Namespaces
|
7
7
|
|
8
8
|
* "mysql:centos":mysql-centos.html (1)
|
9
|
+
* "mysql:monit":mysql-monit.html (1)
|
9
10
|
|
10
11
|
|
11
12
|
h2. Tasks
|
12
13
|
|
13
|
-
* "mysql:install_monit":#mysql:install_monit
|
14
14
|
* "mysql:setup":#mysql:setup
|
15
15
|
|
16
16
|
|
17
17
|
h2. Task documentation
|
18
18
|
|
19
|
-
h3(#mysql:install_monit). mysql:install_monit
|
20
|
-
|
21
|
-
Install mysql monit hooks.
|
22
|
-
|
23
|
-
*db_port*: Mysql port. _Defaults to 3306_
|
24
|
-
|
25
|
-
*mysql_pid_path*: Path to mysql pid file. _Defaults to /var/run/mysqld/mysqld.pid_
|
26
|
-
|
27
|
-
@set :mysql_pid_path, "/var/run/mysqld/mysqld.pid"@
|
28
|
-
|
29
|
-
*monit_conf_dir*: Destination for monitrc. _Defaults to "/etc/monit"_
|
30
|
-
|
31
|
-
@set :monit_conf_dir, "/etc/monit"@
|
32
|
-
|
33
|
-
|
34
|
-
|
35
19
|
h3(#mysql:setup). mysql:setup
|
36
20
|
|
37
21
|
Create database, database user, and set grant permissions.
|
@@ -44,11 +28,11 @@ Create database, database user, and set grant permissions.
|
|
44
28
|
|
45
29
|
*mysql_grant_locations*: Grant locations. _Defaults to localhost_
|
46
30
|
|
47
|
-
@set :
|
31
|
+
@set :mysql_grant_locations, [ "localhost", "192.168.1.111" ]@
|
48
32
|
|
49
33
|
*mysql_grant_priv_type*: Grant privilege types. _Defaults to ALL_
|
50
34
|
|
51
|
-
@set :
|
35
|
+
@set :mysql_grant_priv_type, "ALL"@
|
52
36
|
|
53
37
|
*mysql_admin_password*: Mysql admin password (to use to connect). Defaults to password prompt.
|
54
38
|
|
@@ -17,6 +17,15 @@ Install nginx, conf, initscript, nginx user and service.
|
|
17
17
|
|
18
18
|
*nginx_build_options*: Nginx build options.
|
19
19
|
|
20
|
+
<pre>
|
21
|
+
set :nginx_build_options, {
|
22
|
+
:url => "http://sysoev.ru/nginx/nginx-0.5.35.tar.gz",
|
23
|
+
:configure_options => "--sbin-path=#{nginx_bin_path} --conf-path=#{nginx_conf_path}
|
24
|
+
--pid-path=#{nginx_pid_path} --error-log-path=/var/log/nginx_master_error.log --lock-path=/var/lock/nginx
|
25
|
+
--prefix=#{nginx_prefix_path} --with-md5=auto/lib/md5 --with-sha1=auto/lib/sha1 --with-http_ssl_module"
|
26
|
+
}
|
27
|
+
</pre>
|
28
|
+
|
20
29
|
*nginx_bin_path*: Nginx sbin path. _Defaults to /sbin/nginx_
|
21
30
|
|
22
31
|
@set :nginx_bin_path, "/sbin/nginx"@
|
@@ -0,0 +1,33 @@
|
|
1
|
+
h1. nginx:mongrel
|
2
|
+
|
3
|
+
"home":../index.html > "recipes":index.html > "nginx":nginx.html > mongrel
|
4
|
+
|
5
|
+
|
6
|
+
h2. Tasks
|
7
|
+
|
8
|
+
* "nginx:mongrel:setup":#nginx:mongrel:setup
|
9
|
+
|
10
|
+
|
11
|
+
h2. Task documentation
|
12
|
+
|
13
|
+
h3(#nginx:mongrel:setup). nginx:mongrel:setup
|
14
|
+
|
15
|
+
Create and update the nginx vhost include.
|
16
|
+
|
17
|
+
*mongrel_application*: Mongrel application. _Defaults to <tt>:application</tt>_
|
18
|
+
*mongrel_size*: Number of mongrels.
|
19
|
+
|
20
|
+
@set :mongrel_size, 3@
|
21
|
+
|
22
|
+
*mongrel_port*: Starting port for mongrels.
|
23
|
+
|
24
|
+
If there are 3 mongrels with port 9000, then instances will be at 9000, 9001, and 9002
|
25
|
+
|
26
|
+
@set :mongrel_port, 9000@
|
27
|
+
|
28
|
+
*domain_name*: Domain name for nginx virtual host, (without www prefix).
|
29
|
+
|
30
|
+
@set :domain_name, "foo.com"@
|
31
|
+
|
32
|
+
|
33
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
h1. nginx:monit
|
2
|
+
|
3
|
+
"home":../index.html > "recipes":index.html > "nginx":nginx.html > monit
|
4
|
+
|
5
|
+
|
6
|
+
h2. Tasks
|
7
|
+
|
8
|
+
* "nginx:monit:install":#nginx:monit:install
|
9
|
+
|
10
|
+
|
11
|
+
h2. Task documentation
|
12
|
+
|
13
|
+
h3(#nginx:monit:install). nginx:monit:install
|
14
|
+
|
15
|
+
Install nginx monit hooks.
|
16
|
+
|
17
|
+
*nginx_pid_path*: Path to nginx pid file. _Defaults to /var/run/nginx.pid_
|
18
|
+
|
19
|
+
@set :nginx_pid_path, "/var/run/nginx.pid"@
|
20
|
+
|
21
|
+
*monit_conf_dir*: Destination for monitrc. _Defaults to "/etc/monit"_
|
22
|
+
|
23
|
+
@set :monit_conf_dir, "/etc/monit"@
|
24
|
+
|
25
|
+
|
26
|
+
|
data/docs/recipes/nginx.txt
CHANGED
@@ -6,47 +6,5 @@ h1. nginx
|
|
6
6
|
h2. Namespaces
|
7
7
|
|
8
8
|
* "nginx:centos":nginx-centos.html (2)
|
9
|
-
|
10
|
-
|
11
|
-
h2. Tasks
|
12
|
-
|
13
|
-
* "nginx:install_monit":#nginx:install_monit
|
14
|
-
* "nginx:setup_mongrel":#nginx:setup_mongrel
|
15
|
-
|
16
|
-
|
17
|
-
h2. Task documentation
|
18
|
-
|
19
|
-
h3(#nginx:install_monit). nginx:install_monit
|
20
|
-
|
21
|
-
Install nginx monit hooks.
|
22
|
-
|
23
|
-
*nginx_pid_path*: Path to nginx pid file. _Defaults to /var/run/nginx.pid_
|
24
|
-
|
25
|
-
@set :nginx_pid_path, "/var/run/nginx.pid"@
|
26
|
-
|
27
|
-
*monit_conf_dir*: Destination for monitrc. _Defaults to "/etc/monit"_
|
28
|
-
|
29
|
-
@set :monit_conf_dir, "/etc/monit"@
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
h3(#nginx:setup_mongrel). nginx:setup_mongrel
|
34
|
-
|
35
|
-
Create and update the nginx vhost include.
|
36
|
-
|
37
|
-
*mongrel_size*: Number of mongrels.
|
38
|
-
|
39
|
-
@set :mongrel_size, 3@
|
40
|
-
|
41
|
-
*mongrel_port*: Starting port for mongrels.
|
42
|
-
|
43
|
-
If there are 3 mongrels with port 9000, then instances will be at 9000, 9001, and 9002
|
44
|
-
|
45
|
-
@set :mongrel_port, 9000@
|
46
|
-
|
47
|
-
*domain_name*: Domain name for nginx virtual host, (without www prefix).
|
48
|
-
|
49
|
-
@set :domain_name, "foo.com"@
|
50
|
-
|
51
|
-
|
52
|
-
|
9
|
+
* "nginx:mongrel":nginx-mongrel.html (1)
|
10
|
+
* "nginx:monit":nginx-monit.html (1)
|
@@ -18,5 +18,14 @@ Install ruby and rubygems.
|
|
18
18
|
|
19
19
|
*rubygems_build_options*: Rubygems build options.
|
20
20
|
|
21
|
+
<pre>
|
22
|
+
set :ruby_build_options, {
|
23
|
+
:url => "http://capitate.s3.amazonaws.com/ruby-1.8.6-p110.tar.gz",
|
24
|
+
:build_dest => "/usr/src",
|
25
|
+
:configure_options => "--prefix=/usr",
|
26
|
+
:clean => false
|
27
|
+
}
|
28
|
+
</pre>
|
29
|
+
|
21
30
|
|
22
31
|
|
@@ -17,6 +17,14 @@ Install sphinx.
|
|
17
17
|
|
18
18
|
*sphinx_build_options*: Sphinx build options.
|
19
19
|
|
20
|
+
<pre>
|
21
|
+
set :sphinx_build_options, {
|
22
|
+
:url => "http://www.sphinxsearch.com/downloads/sphinx-0.9.7.tar.gz",
|
23
|
+
:configure_options => "--with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib/mysql
|
24
|
+
--prefix=#{sphinx_prefix}"
|
25
|
+
}
|
26
|
+
</pre>
|
27
|
+
|
20
28
|
*sphinx_prefix*: Sphinx install prefix. _Defaults to "/usr/local/sphinx"_
|
21
29
|
|
22
30
|
|
@@ -0,0 +1,22 @@
|
|
1
|
+
h1. sphinx:monit
|
2
|
+
|
3
|
+
"home":../index.html > "recipes":index.html > "sphinx":sphinx.html > monit
|
4
|
+
|
5
|
+
|
6
|
+
h2. Tasks
|
7
|
+
|
8
|
+
* "sphinx:monit:setup":#sphinx:monit:setup
|
9
|
+
|
10
|
+
|
11
|
+
h2. Task documentation
|
12
|
+
|
13
|
+
h3(#sphinx:monit:setup). sphinx:monit:setup
|
14
|
+
|
15
|
+
Create monit configuration for sphinx.
|
16
|
+
|
17
|
+
*monit_conf_dir*: Destination for monitrc. _Defaults to "/etc/monit"_
|
18
|
+
|
19
|
+
*sphinx_pid_path*: Location for sphinx pid. _Defaults to "[shared_path]/pids/searchd.pid"_
|
20
|
+
|
21
|
+
|
22
|
+
|
data/docs/recipes/sphinx.txt
CHANGED
@@ -6,6 +6,7 @@ h1. sphinx
|
|
6
6
|
h2. Namespaces
|
7
7
|
|
8
8
|
* "sphinx:centos":sphinx-centos.html (2)
|
9
|
+
* "sphinx:monit":sphinx-monit.html (1)
|
9
10
|
|
10
11
|
|
11
12
|
h2. Tasks
|
@@ -13,7 +14,6 @@ h2. Tasks
|
|
13
14
|
* "sphinx:index_all":#sphinx:index_all
|
14
15
|
* "sphinx:restart":#sphinx:restart
|
15
16
|
* "sphinx:rotate_all":#sphinx:rotate_all
|
16
|
-
* "sphinx:setup_monit":#sphinx:setup_monit
|
17
17
|
* "sphinx:update_conf":#sphinx:update_conf
|
18
18
|
|
19
19
|
|
@@ -45,16 +45,6 @@ Rotate sphinx index for application.
|
|
45
45
|
|
46
46
|
|
47
47
|
|
48
|
-
h3(#sphinx:setup_monit). sphinx:setup_monit
|
49
|
-
|
50
|
-
Create monit configuration for sphinx.
|
51
|
-
|
52
|
-
*monit_conf_dir*: Destination for monitrc. _Defaults to "/etc/monit"_
|
53
|
-
|
54
|
-
*sphinx_pid_path*: Location for sphinx pid. _Defaults to "[shared_path]/pids/searchd.pid"_
|
55
|
-
|
56
|
-
|
57
|
-
|
58
48
|
h3(#sphinx:update_conf). sphinx:update_conf
|
59
49
|
|
60
50
|
Update sphinx for application.
|
@@ -76,21 +76,23 @@ module Capistrano::Configuration::Connections
|
|
76
76
|
def reset_password
|
77
77
|
set :password, Proc.new {
|
78
78
|
Capistrano::CLI.password_prompt("Password (for user: #{user}): ")
|
79
|
-
}
|
79
|
+
}
|
80
80
|
end
|
81
81
|
|
82
82
|
end
|
83
83
|
|
84
84
|
# Debug connections
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
#
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
85
|
+
class Capistrano::SSH
|
86
|
+
|
87
|
+
class << self
|
88
|
+
|
89
|
+
def connect_with_logging(server, options={}, &block)
|
90
|
+
puts "=== Connecting to #{server} with user: #{options[:user]}"
|
91
|
+
|
92
|
+
connect_without_logging(server, options, &block)
|
93
|
+
end
|
94
|
+
|
95
|
+
alias_method_chain :connect, :logging
|
96
|
+
|
97
|
+
end
|
98
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Capitate
|
2
|
+
module CapExt
|
3
|
+
module Roles
|
4
|
+
|
5
|
+
def self.included(base) #:nodoc:
|
6
|
+
base.send :alias_method, :role_list_from_without_capitate, :role_list_from
|
7
|
+
base.send :alias_method, :role_list_from, :role_list_from_with_capitate
|
8
|
+
end
|
9
|
+
|
10
|
+
def role_list_from_with_capitate(roles)
|
11
|
+
roles = roles.split(/,/) if String === roles
|
12
|
+
roles = build_list(roles)
|
13
|
+
roles.map { |role|
|
14
|
+
role = String === role ? role.strip.to_sym : role
|
15
|
+
unless self.roles.key?(role)
|
16
|
+
logger.important "unknown role `#{role}'"
|
17
|
+
nil
|
18
|
+
else
|
19
|
+
role
|
20
|
+
end
|
21
|
+
}.compact
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|