capitate 0.1.9 → 0.2.1
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/Capfile +3 -2
- data/History.txt +6 -0
- data/Manifest.txt +28 -11
- data/bin/capitate +13 -61
- data/config/hoe.rb +2 -2
- data/docs/nginx.README +12 -0
- data/docs/recipes/centos.txt +33 -0
- data/docs/recipes/deploy-pending.txt +25 -0
- data/docs/recipes/deploy-web.txt +33 -0
- data/docs/recipes/deploy.txt +159 -0
- data/docs/recipes/docs.txt +26 -0
- data/docs/recipes/imagemagick-centos.txt +20 -0
- data/docs/recipes/imagemagick.txt +8 -0
- data/docs/recipes/index.txt +26 -0
- data/docs/recipes/memcached-centos.txt +32 -0
- data/docs/recipes/memcached.txt +35 -0
- data/docs/recipes/mongrel_cluster-centos.txt +27 -0
- data/docs/recipes/mongrel_cluster.txt +40 -0
- data/docs/recipes/monit-centos.txt +32 -0
- data/docs/recipes/monit.txt +8 -0
- data/docs/recipes/mysql-centos.txt +22 -0
- data/docs/recipes/mysql.txt +58 -0
- data/docs/recipes/nginx-centos.txt +43 -0
- data/docs/recipes/nginx.txt +51 -0
- data/docs/recipes/rails.txt +58 -0
- data/docs/recipes/ruby-centos.txt +22 -0
- data/docs/recipes/ruby.txt +8 -0
- data/docs/recipes/sphinx-centos.txt +35 -0
- data/docs/recipes/sphinx.txt +89 -0
- data/lib/capitate/cap_ext/run_via.rb +14 -0
- data/lib/capitate/plugins/gem.rb +2 -3
- data/lib/capitate/plugins/prompt.rb +24 -0
- data/lib/capitate/plugins/script.rb +29 -15
- data/lib/capitate/plugins/templates.rb +45 -40
- data/lib/capitate/plugins/yum.rb +12 -22
- data/lib/capitate/task_node.rb +28 -9
- data/lib/capitate/version.rb +2 -2
- data/lib/capitate.rb +4 -5
- data/lib/deployment/deploy.rb +42 -0
- data/lib/deployment/install-centos-rubyweb.rb +131 -0
- data/lib/recipes/centos/centos.rb +30 -21
- data/lib/recipes/centos/imagemagick.rb +9 -8
- data/lib/recipes/centos/memcached.rb +11 -21
- data/lib/recipes/centos/mongrel_cluster.rb +7 -11
- data/lib/recipes/centos/monit.rb +13 -18
- data/lib/recipes/centos/mysql.rb +6 -9
- data/lib/recipes/centos/nginx.rb +17 -30
- data/lib/recipes/centos/ruby.rb +14 -19
- data/lib/recipes/centos/sphinx.rb +14 -28
- data/lib/recipes/docs.rb +22 -6
- data/lib/recipes/memcached.rb +14 -8
- data/lib/recipes/mongrel_cluster.rb +11 -14
- data/lib/recipes/mysql.rb +22 -40
- data/lib/recipes/nginx.rb +9 -4
- data/lib/recipes/rails.rb +53 -6
- data/lib/recipes/sphinx.rb +86 -17
- data/lib/templates/capistrano/Capfile +2 -6
- data/lib/templates/monit/cert.sh +1 -1
- data/lib/templates/mysql/install_db.sql.erb +2 -2
- data/lib/templates/sphinx/sphinx.conf.erb +28 -399
- data/lib/templates/sphinx/sphinx_app.initd.centos.erb +1 -1
- data/website/index.html +20 -34
- data/website/index.txt +12 -22
- data/website/stylesheets/screen.css +22 -11
- data/website/template.rhtml +7 -5
- data/website/template_recipe.rhtml +7 -3
- metadata +55 -15
- data/lib/capitate/plugins/package.rb +0 -30
- data/lib/capitate/plugins/profiles.rb +0 -33
- data/lib/capitate/plugins/wget.rb +0 -23
- data/lib/profiles/centos-sick.rb +0 -116
- data/lib/recipes/README +0 -5
- data/lib/recipes/centos/README +0 -3
- data/lib/recipes/gems.rb +0 -20
- data/lib/recipes/packages.rb +0 -39
- data/lib/recipes/recipes.rb +0 -30
- data/lib/templates/centos/setup_for_web.sh +0 -17
- data/lib/templates/centos/sudoers +0 -95
data/website/index.html
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
<link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen" />
|
6
6
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
7
7
|
<title>
|
8
|
-
→ ‘capitate’
|
8
|
+
→ ‘capitate’: Capistrano recipes, plugins and templates.
|
9
9
|
</title>
|
10
10
|
<script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
|
11
11
|
<style>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
validTags: ["div"]
|
24
24
|
};
|
25
25
|
|
26
|
-
curvy_ids = [ "version"
|
26
|
+
curvy_ids = [ "version" ];
|
27
27
|
for(id in curvy_ids) {
|
28
28
|
var box = new curvyCorners(settings, document.getElementById(curvy_ids[id]));
|
29
29
|
box.applyCornersToAll();
|
@@ -38,16 +38,18 @@
|
|
38
38
|
|
39
39
|
<div id="version" class="clickable box" onclick='document.location = "http://rubyforge.org/projects/capitate"; return false'>
|
40
40
|
<p>Get Version</p>
|
41
|
-
<a href="http://rubyforge.org/projects/capitate" class="numbers">0.1
|
41
|
+
<a href="http://rubyforge.org/projects/capitate" class="numbers">0.2.1</a>
|
42
42
|
</div>
|
43
43
|
|
44
|
-
<div id="recipes"
|
44
|
+
<div id="recipes">
|
45
|
+
<p>Documentation:
|
45
46
|
<a href="recipes/index.html">Recipes</a> →
|
46
47
|
<a href="http://svn.ducktyper.com/capitate/trunk/lib/capitate/plugins/">Plugins</a> →
|
47
48
|
<a href="http://svn.ducktyper.com/capitate/trunk/lib/templates/">Templates</a>
|
49
|
+
</p>
|
48
50
|
</div>
|
49
51
|
|
50
|
-
<div
|
52
|
+
<div>
|
51
53
|
<h2>What</h2>
|
52
54
|
|
53
55
|
|
@@ -74,54 +76,38 @@
|
|
74
76
|
<h2>The basics</h2>
|
75
77
|
|
76
78
|
|
77
|
-
<p>Capitate has
|
79
|
+
<p>Capitate has:</p>
|
78
80
|
|
79
81
|
|
80
82
|
<ul>
|
81
|
-
<li>
|
83
|
+
<li>Plugins to help install applications, via yum or manually unpacking, and building. Also to help upload files sanely, prompt for input, install gems, and run scripts.</li>
|
84
|
+
<li>Templates for init scripts and application configuration.</li>
|
82
85
|
<li>Common deployment setup and update_code tasks, such as symlinking in database.yml and more advanced recipes such as sphinx configuration.</li>
|
83
|
-
<li><span class="caps">ERB</span> templates for application configuration files, init scripts, monit configuration, etc.</li>
|
84
|
-
<li>And more…</li>
|
85
86
|
</ul>
|
86
87
|
|
87
88
|
|
88
|
-
<h3>
|
89
|
+
<h3>Example: Using capitate to write an install task:</h3>
|
89
90
|
|
90
91
|
|
91
|
-
<p>
|
92
|
+
<p>See <a href="http://svn.ducktyper.com/capitate/trunk/lib/deployment/install-centos-rubyweb.rb">install-centos-rubyweb.rb</a></p>
|
92
93
|
|
93
94
|
|
94
|
-
<p>
|
95
|
+
<p>Load this in your Capfile:</p>
|
95
96
|
|
96
97
|
|
97
|
-
<pre><code>load "
|
98
|
+
<pre><code>load "lib/deployment/install-centos-rubyweb.rb"</code></pre>
|
98
99
|
|
99
100
|
|
100
|
-
<
|
101
|
+
<p>and then:</p>
|
101
102
|
|
102
103
|
|
103
|
-
<
|
104
|
-
|
105
|
-
|
106
|
-
<p>For example, to script the install of a group of applications as root, use <a href="recipes/recipes.html">recipes:run</a>:</p>
|
104
|
+
<pre><code>cap HOSTS=x.x.x.x install</code></pre>
|
107
105
|
|
108
106
|
|
109
|
-
<
|
110
|
-
|
111
|
-
|
112
|
-
<p><pre class='syntax'>
|
113
|
-
<span class="ident">set</span> <span class="symbol">:recipes_run</span><span class="punct">,</span> <span class="punct">[</span> <span class="punct">"</span><span class="string">ruby:centos:install</span><span class="punct">",</span> <span class="punct">"</span><span class="string">memcached:centos:install</span><span class="punct">"</span> <span class="punct">]</span>
|
114
|
-
<span class="ident">set</span> <span class="symbol">:recipes_user</span><span class="punct">,</span> <span class="punct">"</span><span class="string">root</span><span class="punct">"</span>
|
115
|
-
</pre></p>
|
107
|
+
<h3>Use it</h3>
|
116
108
|
|
117
109
|
|
118
|
-
<p>
|
119
|
-
|
120
|
-
|
121
|
-
<pre><code>cap recipes:run</code></pre>
|
122
|
-
|
123
|
-
|
124
|
-
<p>This is just a basic example.</p>
|
110
|
+
<p><a href="recipes/index.html">View recipes documentation</a></p>
|
125
111
|
|
126
112
|
|
127
113
|
<h2>Forum</h2>
|
@@ -136,7 +122,7 @@
|
|
136
122
|
<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>
|
137
123
|
|
138
124
|
|
139
|
-
<p>The trunk repository is <
|
125
|
+
<p>The trunk repository is <a href="http://svn.ducktyper.com/capitate/trunk">http://svn.ducktyper.com/capitate/trunk</a> for anonymous access.</p>
|
140
126
|
|
141
127
|
|
142
128
|
<h2>License</h2>
|
@@ -151,7 +137,7 @@
|
|
151
137
|
<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>
|
152
138
|
</div>
|
153
139
|
<p class="coda">
|
154
|
-
<a href="
|
140
|
+
<a href="mailto:gabrielh@gmail.com">Gabriel Handford</a>, 23rd February 2008<br>
|
155
141
|
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
156
142
|
</p>
|
157
143
|
</div>
|
data/website/index.txt
CHANGED
@@ -21,42 +21,32 @@ set :project_root, File.dirname(__FILE__)
|
|
21
21
|
|
22
22
|
h2. The basics
|
23
23
|
|
24
|
-
Capitate has
|
24
|
+
Capitate has:
|
25
25
|
|
26
|
-
*
|
26
|
+
* Plugins to help install applications, via yum or manually unpacking, and building. Also to help upload files sanely, prompt for input, install gems, and run scripts.
|
27
|
+
* Templates for init scripts and application configuration.
|
27
28
|
* Common deployment setup and update_code tasks, such as symlinking in database.yml and more advanced recipes such as sphinx configuration.
|
28
|
-
* ERB templates for application configuration files, init scripts, monit configuration, etc.
|
29
|
-
* And more...
|
30
29
|
|
31
30
|
|
32
|
-
h3.
|
31
|
+
h3. Example: Using capitate to write an install task:
|
33
32
|
|
34
|
-
|
33
|
+
See "install-centos-rubyweb.rb":http://svn.ducktyper.com/capitate/trunk/lib/deployment/install-centos-rubyweb.rb
|
35
34
|
|
36
|
-
|
35
|
+
Load this in your Capfile:
|
37
36
|
|
38
|
-
load "
|
37
|
+
load "lib/deployment/install-centos-rubyweb.rb"
|
38
|
+
|
39
|
+
and then:
|
39
40
|
|
41
|
+
cap HOSTS=x.x.x.x install
|
40
42
|
|
41
43
|
|
42
|
-
h3. Use
|
44
|
+
h3. Use it
|
43
45
|
|
44
46
|
"View recipes documentation":recipes/index.html
|
45
47
|
|
46
|
-
For example, to script the install of a group of applications as root, use "recipes:run":recipes/recipes.html:
|
47
48
|
|
48
|
-
Configure your Capfile to run it:
|
49
49
|
|
50
|
-
<pre syntax="ruby">
|
51
|
-
set :recipes_run, [ "ruby:centos:install", "memcached:centos:install" ]
|
52
|
-
set :recipes_user, "root"
|
53
|
-
</pre>
|
54
|
-
|
55
|
-
Then run:
|
56
|
-
|
57
|
-
cap recipes:run
|
58
|
-
|
59
|
-
This is just a basic example.
|
60
50
|
|
61
51
|
h2. Forum
|
62
52
|
|
@@ -66,7 +56,7 @@ h2. How to submit patches
|
|
66
56
|
|
67
57
|
Read the "8 steps for fixing other people's code":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/ and for section "8b: Submit patch to Google Groups":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups, use the Google Group above.
|
68
58
|
|
69
|
-
The trunk repository is
|
59
|
+
The trunk repository is "http://svn.ducktyper.com/capitate/trunk":http://svn.ducktyper.com/capitate/trunk for anonymous access.
|
70
60
|
|
71
61
|
h2. License
|
72
62
|
|
@@ -45,7 +45,6 @@ blockquote {
|
|
45
45
|
}
|
46
46
|
.coda {
|
47
47
|
text-align: right;
|
48
|
-
color: #77f;
|
49
48
|
font-size: smaller;
|
50
49
|
}
|
51
50
|
|
@@ -101,7 +100,7 @@ pre, code {
|
|
101
100
|
.box {
|
102
101
|
font-family: sans-serif;
|
103
102
|
font-weight: normal;
|
104
|
-
background-color: #
|
103
|
+
background-color: #445878;
|
105
104
|
color: #000;
|
106
105
|
padding: 15px 20px 10px 20px;
|
107
106
|
margin: 0 auto;
|
@@ -110,12 +109,25 @@ pre, code {
|
|
110
109
|
}
|
111
110
|
|
112
111
|
.landing h1 {
|
113
|
-
|
112
|
+
|
114
113
|
}
|
115
114
|
|
116
115
|
#recipes {
|
117
|
-
|
118
|
-
|
116
|
+
|
117
|
+
}
|
118
|
+
|
119
|
+
.recipes pre,
|
120
|
+
.recipes code {
|
121
|
+
margin: 0 30px;
|
122
|
+
}
|
123
|
+
|
124
|
+
.recipes code {
|
125
|
+
display:block;
|
126
|
+
}
|
127
|
+
|
128
|
+
.recipes h3 {
|
129
|
+
padding: 4px;
|
130
|
+
background-color: #E6E2AF;
|
119
131
|
}
|
120
132
|
|
121
133
|
#version {
|
@@ -134,16 +146,15 @@ pre, code {
|
|
134
146
|
|
135
147
|
#version p {
|
136
148
|
text-decoration: none;
|
137
|
-
color: #
|
138
|
-
background-color: #
|
149
|
+
color: #FFF;
|
150
|
+
background-color: #445878;
|
139
151
|
margin: 0;
|
140
152
|
padding: 0;
|
141
153
|
}
|
142
154
|
|
143
|
-
#version a
|
144
|
-
#
|
145
|
-
color: #
|
146
|
-
background-color: #A7A37E;
|
155
|
+
#version a {
|
156
|
+
color: #FFF;
|
157
|
+
background-color: #445878;
|
147
158
|
}
|
148
159
|
|
149
160
|
#version a {
|
data/website/template.rhtml
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
<link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen" />
|
6
6
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
7
7
|
<title>
|
8
|
-
<%= title
|
8
|
+
<%= title %>: Capistrano recipes, plugins and templates.
|
9
9
|
</title>
|
10
10
|
<script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
|
11
11
|
<style>
|
@@ -23,7 +23,7 @@
|
|
23
23
|
validTags: ["div"]
|
24
24
|
};
|
25
25
|
|
26
|
-
curvy_ids = [ "version"
|
26
|
+
curvy_ids = [ "version" ];
|
27
27
|
for(id in curvy_ids) {
|
28
28
|
var box = new curvyCorners(settings, document.getElementById(curvy_ids[id]));
|
29
29
|
box.applyCornersToAll();
|
@@ -41,17 +41,19 @@
|
|
41
41
|
<a href="<%= download %>" class="numbers"><%= version %></a>
|
42
42
|
</div>
|
43
43
|
|
44
|
-
<div id="recipes"
|
44
|
+
<div id="recipes">
|
45
|
+
<p>Documentation:
|
45
46
|
<a href="recipes/index.html">Recipes</a> →
|
46
47
|
<a href="http://svn.ducktyper.com/capitate/trunk/lib/capitate/plugins/">Plugins</a> →
|
47
48
|
<a href="http://svn.ducktyper.com/capitate/trunk/lib/templates/">Templates</a>
|
49
|
+
</p>
|
48
50
|
</div>
|
49
51
|
|
50
|
-
<div
|
52
|
+
<div>
|
51
53
|
<%= body %>
|
52
54
|
</div>
|
53
55
|
<p class="coda">
|
54
|
-
<a href="
|
56
|
+
<a href="mailto:gabrielh@gmail.com">Gabriel Handford</a>, <%= modified.pretty %><br>
|
55
57
|
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
56
58
|
</p>
|
57
59
|
</div>
|
@@ -5,16 +5,20 @@
|
|
5
5
|
<link rel="stylesheet" href="../stylesheets/screen.css" type="text/css" media="screen" />
|
6
6
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
7
7
|
<title>
|
8
|
-
|
8
|
+
<% if title != "Recipes" %>
|
9
|
+
Capistrano recipes: <%= title %>
|
10
|
+
<% else %>
|
11
|
+
Capistrano recipes
|
12
|
+
<% end %>
|
9
13
|
</title>
|
10
14
|
</head>
|
11
15
|
<body>
|
12
16
|
<div id="main" class="recipes">
|
13
|
-
|
17
|
+
|
14
18
|
<h1><%= title %></h1>
|
15
19
|
<%= body %>
|
16
20
|
<p class="coda">
|
17
|
-
<a href="
|
21
|
+
<a href="mailto:gabrielh@gmail.com">Gabriel Handford</a>, <%= modified.pretty %><br>
|
18
22
|
Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
|
19
23
|
</p>
|
20
24
|
</div>
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capitate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
5
|
-
platform:
|
4
|
+
version: 0.2.1
|
5
|
+
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriel Handford
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-02-
|
12
|
+
date: 2008-02-24 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -33,6 +33,29 @@ extra_rdoc_files:
|
|
33
33
|
- License.txt
|
34
34
|
- Manifest.txt
|
35
35
|
- README.txt
|
36
|
+
- docs/recipes/centos.txt
|
37
|
+
- docs/recipes/deploy-pending.txt
|
38
|
+
- docs/recipes/deploy-web.txt
|
39
|
+
- docs/recipes/deploy.txt
|
40
|
+
- docs/recipes/docs.txt
|
41
|
+
- docs/recipes/imagemagick-centos.txt
|
42
|
+
- docs/recipes/imagemagick.txt
|
43
|
+
- docs/recipes/index.txt
|
44
|
+
- docs/recipes/memcached-centos.txt
|
45
|
+
- docs/recipes/memcached.txt
|
46
|
+
- docs/recipes/mongrel_cluster-centos.txt
|
47
|
+
- docs/recipes/mongrel_cluster.txt
|
48
|
+
- docs/recipes/monit-centos.txt
|
49
|
+
- docs/recipes/monit.txt
|
50
|
+
- docs/recipes/mysql-centos.txt
|
51
|
+
- docs/recipes/mysql.txt
|
52
|
+
- docs/recipes/nginx-centos.txt
|
53
|
+
- docs/recipes/nginx.txt
|
54
|
+
- docs/recipes/rails.txt
|
55
|
+
- docs/recipes/ruby-centos.txt
|
56
|
+
- docs/recipes/ruby.txt
|
57
|
+
- docs/recipes/sphinx-centos.txt
|
58
|
+
- docs/recipes/sphinx.txt
|
36
59
|
- website/index.txt
|
37
60
|
files:
|
38
61
|
- Capfile
|
@@ -44,25 +67,47 @@ files:
|
|
44
67
|
- bin/capitate
|
45
68
|
- config/hoe.rb
|
46
69
|
- config/requirements.rb
|
70
|
+
- docs/nginx.README
|
71
|
+
- docs/recipes/centos.txt
|
72
|
+
- docs/recipes/deploy-pending.txt
|
73
|
+
- docs/recipes/deploy-web.txt
|
74
|
+
- docs/recipes/deploy.txt
|
75
|
+
- docs/recipes/docs.txt
|
76
|
+
- docs/recipes/imagemagick-centos.txt
|
77
|
+
- docs/recipes/imagemagick.txt
|
78
|
+
- docs/recipes/index.txt
|
79
|
+
- docs/recipes/memcached-centos.txt
|
80
|
+
- docs/recipes/memcached.txt
|
81
|
+
- docs/recipes/mongrel_cluster-centos.txt
|
82
|
+
- docs/recipes/mongrel_cluster.txt
|
83
|
+
- docs/recipes/monit-centos.txt
|
84
|
+
- docs/recipes/monit.txt
|
85
|
+
- docs/recipes/mysql-centos.txt
|
86
|
+
- docs/recipes/mysql.txt
|
87
|
+
- docs/recipes/nginx-centos.txt
|
88
|
+
- docs/recipes/nginx.txt
|
89
|
+
- docs/recipes/rails.txt
|
90
|
+
- docs/recipes/ruby-centos.txt
|
91
|
+
- docs/recipes/ruby.txt
|
92
|
+
- docs/recipes/sphinx-centos.txt
|
93
|
+
- docs/recipes/sphinx.txt
|
47
94
|
- lib/capitate.rb
|
48
95
|
- lib/capitate/cap_ext/connections.rb
|
49
96
|
- lib/capitate/cap_ext/extension_proxy.rb
|
97
|
+
- lib/capitate/cap_ext/run_via.rb
|
50
98
|
- lib/capitate/cap_ext/variables.rb
|
51
99
|
- lib/capitate/plugins/base.rb
|
52
100
|
- lib/capitate/plugins/gem.rb
|
53
|
-
- lib/capitate/plugins/
|
54
|
-
- lib/capitate/plugins/profiles.rb
|
101
|
+
- lib/capitate/plugins/prompt.rb
|
55
102
|
- lib/capitate/plugins/script.rb
|
56
103
|
- lib/capitate/plugins/templates.rb
|
57
104
|
- lib/capitate/plugins/upload.rb
|
58
|
-
- lib/capitate/plugins/wget.rb
|
59
105
|
- lib/capitate/plugins/yum.rb
|
60
106
|
- lib/capitate/recipes.rb
|
61
107
|
- lib/capitate/task_node.rb
|
62
108
|
- lib/capitate/version.rb
|
63
|
-
- lib/
|
64
|
-
- lib/
|
65
|
-
- lib/recipes/centos/README
|
109
|
+
- lib/deployment/deploy.rb
|
110
|
+
- lib/deployment/install-centos-rubyweb.rb
|
66
111
|
- lib/recipes/centos/centos.rb
|
67
112
|
- lib/recipes/centos/imagemagick.rb
|
68
113
|
- lib/recipes/centos/memcached.rb
|
@@ -74,18 +119,13 @@ files:
|
|
74
119
|
- lib/recipes/centos/sphinx.rb
|
75
120
|
- lib/recipes/deploy.rb
|
76
121
|
- lib/recipes/docs.rb
|
77
|
-
- lib/recipes/gems.rb
|
78
122
|
- lib/recipes/memcached.rb
|
79
123
|
- lib/recipes/mongrel_cluster.rb
|
80
124
|
- lib/recipes/mysql.rb
|
81
125
|
- lib/recipes/nginx.rb
|
82
|
-
- lib/recipes/packages.rb
|
83
126
|
- lib/recipes/rails.rb
|
84
|
-
- lib/recipes/recipes.rb
|
85
127
|
- lib/recipes/sphinx.rb
|
86
128
|
- lib/templates/capistrano/Capfile
|
87
|
-
- lib/templates/centos/setup_for_web.sh
|
88
|
-
- lib/templates/centos/sudoers
|
89
129
|
- lib/templates/memcached/memcached.initd.centos.erb
|
90
130
|
- lib/templates/memcached/memcached.monitrc.erb
|
91
131
|
- lib/templates/mongrel/mongrel_cluster.initd.erb
|
@@ -147,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
187
|
requirements: []
|
148
188
|
|
149
189
|
rubyforge_project: capitate
|
150
|
-
rubygems_version: 0.
|
190
|
+
rubygems_version: 1.0.1
|
151
191
|
signing_key:
|
152
192
|
specification_version: 2
|
153
193
|
summary: Capistrano recipes, plugins and templates.
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# Package plugin.
|
2
|
-
#
|
3
|
-
# TODO: If type not set silently fails. NOT GOOD :(
|
4
|
-
#
|
5
|
-
module Capitate::Plugins::Package
|
6
|
-
|
7
|
-
# Setup packager.
|
8
|
-
#
|
9
|
-
# ==== Options
|
10
|
-
# +packager_type+:: Packager type (:yum)
|
11
|
-
#
|
12
|
-
# ==== Examples (in capistrano task)
|
13
|
-
# package.type = :yum
|
14
|
-
# package.install [ "aspell", "foo" ]
|
15
|
-
# package.remove [ "aspell", "foo" ]
|
16
|
-
# package.update [ "aspell", "foo" ]
|
17
|
-
# package.clean
|
18
|
-
#
|
19
|
-
def type=(packager_type)
|
20
|
-
case packager_type.to_sym
|
21
|
-
when :yum
|
22
|
-
include Capitate::Plugins::Yum
|
23
|
-
else
|
24
|
-
raise "Invalid packager type: #{packager_type}"
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
end
|
29
|
-
|
30
|
-
Capistrano.plugin :package, Capitate::Plugins::Package
|
@@ -1,33 +0,0 @@
|
|
1
|
-
# == Profiles
|
2
|
-
# Useful for starting a profile, but your mileage may vary.
|
3
|
-
#
|
4
|
-
module Capitate::Plugins::Profiles
|
5
|
-
|
6
|
-
ProfileDir = File.dirname(__FILE__) + "/../../profiles"
|
7
|
-
|
8
|
-
# Load all profiles with prefix.
|
9
|
-
#
|
10
|
-
# ==== Options
|
11
|
-
# +prefix+:: Prefix to filter/search on
|
12
|
-
#
|
13
|
-
def list(prefix = "")
|
14
|
-
Dir[ProfileDir + "/#{prefix}*.rb"].collect { |file| File.basename(file).gsub(File.extname(file), "") }
|
15
|
-
end
|
16
|
-
|
17
|
-
# Choose a profile (via command line).
|
18
|
-
#
|
19
|
-
# ==== Options
|
20
|
-
# +prefix+:: Prefix to filter/search on
|
21
|
-
#
|
22
|
-
def choose(prefix = "")
|
23
|
-
profile = HighLine.new.choose(*list(prefix)) do |menu|
|
24
|
-
menu.header = "Choose recipe profile"
|
25
|
-
end
|
26
|
-
|
27
|
-
"#{ProfileDir}/#{profile}.rb"
|
28
|
-
end
|
29
|
-
|
30
|
-
end
|
31
|
-
|
32
|
-
|
33
|
-
Capistrano.plugin :profile, Capitate::Plugins::Profiles
|
@@ -1,23 +0,0 @@
|
|
1
|
-
require 'open-uri'
|
2
|
-
|
3
|
-
module Capitate::Plugins::Wget
|
4
|
-
|
5
|
-
# Download the uri, then upload it into the remote destination directory
|
6
|
-
#
|
7
|
-
# ==== Options
|
8
|
-
# +uri+:: URI to get
|
9
|
-
# +remote_dest_dir+:: Remote destination directory, defaults to /tmp
|
10
|
-
#
|
11
|
-
def uri(uri, remote_dest_dir = "/tmp")
|
12
|
-
|
13
|
-
uri = uri = URI.parse(uri)
|
14
|
-
name = uri.path.split("/").last
|
15
|
-
remote_dest_path = File.join(remote_dest_dir, name)
|
16
|
-
|
17
|
-
logger.info "Downloading #{name} from #{uri}..."
|
18
|
-
put open(uri).read, remote_dest_path
|
19
|
-
end
|
20
|
-
|
21
|
-
end
|
22
|
-
|
23
|
-
Capistrano.plugin :wget, Capitate::Plugins::Wget
|
data/lib/profiles/centos-sick.rb
DELETED
@@ -1,116 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# This is an EXAMPLE profile.
|
3
|
-
#
|
4
|
-
# Profile for sick rails app on centos 5.1
|
5
|
-
#
|
6
|
-
|
7
|
-
set :description, "Sick project deployment for centos 5.1 image"
|
8
|
-
|
9
|
-
set :recipes_run, [
|
10
|
-
"centos:setup_for_web",
|
11
|
-
"packages:install",
|
12
|
-
"ruby:centos:install",
|
13
|
-
"nginx:centos:install",
|
14
|
-
"mysql:centos:install",
|
15
|
-
"sphinx:centos:install",
|
16
|
-
"monit:centos:install",
|
17
|
-
"imagemagick:centos:install",
|
18
|
-
"memcached:centos:install",
|
19
|
-
"nginx:install_monit",
|
20
|
-
"mysql:install_monit",
|
21
|
-
"memcached:install_monit",
|
22
|
-
"gems:install",
|
23
|
-
"centos:cleanup"
|
24
|
-
]
|
25
|
-
|
26
|
-
#
|
27
|
-
# Settings for recipes
|
28
|
-
#
|
29
|
-
|
30
|
-
# For packages:install
|
31
|
-
set :packages_type, :yum
|
32
|
-
set :packages_remove, [ "openoffice.org-*", "ImageMagick" ]
|
33
|
-
set :packages_add, [
|
34
|
-
"gcc", "kernel-devel", "libevent-devel", "libxml2-devel",
|
35
|
-
"openssl", "openssl-devel",
|
36
|
-
"aspell", "aspell-devel", "aspell-en", "aspell-es",
|
37
|
-
]
|
38
|
-
|
39
|
-
# For gem:install
|
40
|
-
set :gem_list, [
|
41
|
-
"rake",
|
42
|
-
"mysql -- --with-mysql-include=/usr/include/mysql --with-mysql-lib=/usr/lib/mysql --with-mysql-config",
|
43
|
-
"raspell",
|
44
|
-
"rmagick",
|
45
|
-
"mongrel",
|
46
|
-
"mongrel_cluster",
|
47
|
-
"json"
|
48
|
-
]
|
49
|
-
|
50
|
-
# For monit:install
|
51
|
-
set :monit_port, 2812 # Capistrano::CLI.ui.ask('Monit port: ')
|
52
|
-
set :monit_password, Proc.new { Capistrano::CLI.ui.ask('Monit admin password (to set): ') }
|
53
|
-
|
54
|
-
# For nginx:install
|
55
|
-
set :nginx_bin_path, "/sbin/nginx"
|
56
|
-
set :nginx_conf_path, "/etc/nginx/nginx.conf"
|
57
|
-
set :nginx_pid_path, "/var/run/nginx.pid"
|
58
|
-
set :nginx_prefix_path, "/var/nginx"
|
59
|
-
|
60
|
-
# For mysql:install
|
61
|
-
set :mysql_admin_password_set, Proc.new { Capistrano::CLI.ui.ask('Mysql admin password (to set): ') }
|
62
|
-
set :mysql_pid_path, "/var/run/mysqld/mysqld.pid"
|
63
|
-
set :db_port, 3306 # Capistrano::CLI.ui.ask('Mysql port: ')
|
64
|
-
|
65
|
-
# For sphinx:install
|
66
|
-
set :sphinx_prefix, "/usr/local/sphinx"
|
67
|
-
|
68
|
-
# For memcached:install
|
69
|
-
set :memcached_pid_path, "/var/run/memcached.pid"
|
70
|
-
set :memcached_memory, 64
|
71
|
-
set :memcached_port, 11211
|
72
|
-
|
73
|
-
|
74
|
-
#
|
75
|
-
# Settings for project
|
76
|
-
#
|
77
|
-
|
78
|
-
set :application, "sick"
|
79
|
-
set :user, "sick"
|
80
|
-
set :deploy_to, "/var/www/apps/sick"
|
81
|
-
set :web_host, "WEB_HOST"
|
82
|
-
set :db_host, "DB_HOST"
|
83
|
-
set :db_user, "sick"
|
84
|
-
set :db_pass, "sick"
|
85
|
-
set :db_name, "sick"
|
86
|
-
# db_port set already
|
87
|
-
set :sphinx_host, "SPHINX_HOST"
|
88
|
-
set :sphinx_port, 3312
|
89
|
-
set :repository, "REPOSITORY"
|
90
|
-
set :mongrel_port, 12000
|
91
|
-
set :mongrel_size, 3
|
92
|
-
set :domain_name, "localhost"
|
93
|
-
set :mysql_admin_password, Proc.new { Capistrano::CLI.ui.ask('Mysql admin password: ') }
|
94
|
-
|
95
|
-
set :deploy_via, :copy
|
96
|
-
set :copy_strategy, :export
|
97
|
-
|
98
|
-
role :web, "WEB_URL"
|
99
|
-
role :db, "DB_URL", :primary => true
|
100
|
-
|
101
|
-
|
102
|
-
# Callbacks
|
103
|
-
before "deploy:setup", "centos:add_user_for_app"
|
104
|
-
|
105
|
-
after "deploy:setup", "mysql:setup", "rails:setup", "mongrel_cluster:centos:setup",
|
106
|
-
"nginx:setup_mongrel", "sphinx:centos:setup"
|
107
|
-
|
108
|
-
after "sphinx:centos:setup", "sphinx:setup_monit"
|
109
|
-
after "mongrel_cluster:centos:setup", "mongrel_cluster:setup_monit"
|
110
|
-
|
111
|
-
after "nginx:setup_mongrels", "nginx:centos:restart"
|
112
|
-
|
113
|
-
after "deploy:update_code", "rails:update_code", "sphinx:update_code"
|
114
|
-
|
115
|
-
# Auto cleanup after deploy
|
116
|
-
after "deploy", "deploy:cleanup"
|
data/lib/recipes/README
DELETED
data/lib/recipes/centos/README
DELETED