calas-capitate 0.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. data/Capfile +13 -0
  2. data/History.txt +167 -0
  3. data/License.txt +20 -0
  4. data/Manifest.txt +121 -0
  5. data/README.txt +8 -0
  6. data/Rakefile +4 -0
  7. data/config/hoe.rb +72 -0
  8. data/config/requirements.rb +17 -0
  9. data/lib/capitate.rb +56 -0
  10. data/lib/capitate/cap_ext/connections.rb +105 -0
  11. data/lib/capitate/cap_ext/docs.rb +26 -0
  12. data/lib/capitate/cap_ext/namespace.rb +34 -0
  13. data/lib/capitate/cap_ext/run_via.rb +16 -0
  14. data/lib/capitate/cap_ext/task_definition.rb +22 -0
  15. data/lib/capitate/cap_ext/variables.rb +132 -0
  16. data/lib/capitate/plugins/base.rb +140 -0
  17. data/lib/capitate/plugins/build.rb +71 -0
  18. data/lib/capitate/plugins/gem.rb +24 -0
  19. data/lib/capitate/plugins/prompt.rb +109 -0
  20. data/lib/capitate/plugins/rake.rb +25 -0
  21. data/lib/capitate/plugins/script.rb +96 -0
  22. data/lib/capitate/plugins/templates.rb +113 -0
  23. data/lib/capitate/plugins/utils.rb +151 -0
  24. data/lib/capitate/plugins/yum.rb +76 -0
  25. data/lib/capitate/recipes.rb +5 -0
  26. data/lib/capitate/task_node.rb +262 -0
  27. data/lib/capitate/version.rb +9 -0
  28. data/lib/deployment/centos-5.1-64-web/install.rb +196 -0
  29. data/lib/recipes/active_record.rb +36 -0
  30. data/lib/recipes/apache.rb +47 -0
  31. data/lib/recipes/backgroundrb.rb +29 -0
  32. data/lib/recipes/centos/backgroundjob.rb +27 -0
  33. data/lib/recipes/centos/backgroundrb.rb +23 -0
  34. data/lib/recipes/centos/centos.rb +45 -0
  35. data/lib/recipes/centos/imagemagick.rb +29 -0
  36. data/lib/recipes/centos/memcached.rb +45 -0
  37. data/lib/recipes/centos/merb.rb +23 -0
  38. data/lib/recipes/centos/mongrel_cluster.rb +54 -0
  39. data/lib/recipes/centos/monit.rb +62 -0
  40. data/lib/recipes/centos/mysql.rb +25 -0
  41. data/lib/recipes/centos/nginx.rb +64 -0
  42. data/lib/recipes/centos/ruby.rb +40 -0
  43. data/lib/recipes/centos/sphinx.rb +59 -0
  44. data/lib/recipes/docs.rb +24 -0
  45. data/lib/recipes/logrotate/backgroundjob.rb +26 -0
  46. data/lib/recipes/logrotate/backgroundrb.rb +26 -0
  47. data/lib/recipes/logrotate/merb.rb +25 -0
  48. data/lib/recipes/logrotate/mongrel_cluster.rb +29 -0
  49. data/lib/recipes/logrotate/monit.rb +28 -0
  50. data/lib/recipes/logrotate/mysql.rb +26 -0
  51. data/lib/recipes/logrotate/nginx.rb +37 -0
  52. data/lib/recipes/logrotate/rails.rb +21 -0
  53. data/lib/recipes/logrotate/sphinx.rb +21 -0
  54. data/lib/recipes/logrotated.rb +61 -0
  55. data/lib/recipes/memcached.rb +26 -0
  56. data/lib/recipes/merb.rb +32 -0
  57. data/lib/recipes/monit.rb +35 -0
  58. data/lib/recipes/monit/backgroundjob.rb +38 -0
  59. data/lib/recipes/monit/backgroundrb.rb +38 -0
  60. data/lib/recipes/monit/database.rb +25 -0
  61. data/lib/recipes/monit/memcached.rb +22 -0
  62. data/lib/recipes/monit/merb.rb +58 -0
  63. data/lib/recipes/monit/mongrel_cluster.rb +85 -0
  64. data/lib/recipes/monit/mysql.rb +20 -0
  65. data/lib/recipes/monit/nginx.rb +37 -0
  66. data/lib/recipes/monit/sphinx.rb +38 -0
  67. data/lib/recipes/monit/sshd.rb +27 -0
  68. data/lib/recipes/mysql.rb +42 -0
  69. data/lib/recipes/nginx.rb +29 -0
  70. data/lib/recipes/rails.rb +71 -0
  71. data/lib/recipes/redmine.rb +38 -0
  72. data/lib/recipes/sphinx.rb +60 -0
  73. data/lib/recipes/sshd.rb +47 -0
  74. data/lib/recipes/syslogd.rb +21 -0
  75. data/lib/templates/apache/vhost.mongrel_cluster.conf.erb +46 -0
  76. data/lib/templates/backgroundjob/backgroundjob.initd.centos.erb +54 -0
  77. data/lib/templates/backgroundjob/backgroundjob.monitrc.erb +3 -0
  78. data/lib/templates/backgroundrb/backgroundrb.initd.centos.erb +58 -0
  79. data/lib/templates/backgroundrb/backgroundrb.monitrc.erb +3 -0
  80. data/lib/templates/backgroundrb/backgroundrb.yml.erb +14 -0
  81. data/lib/templates/capistrano/Capfile +22 -0
  82. data/lib/templates/logrotated/conf.erb +3 -0
  83. data/lib/templates/memcached/memcached.initd.centos.erb +58 -0
  84. data/lib/templates/memcached/memcached.monitrc.erb +4 -0
  85. data/lib/templates/memcached/memcached.yml.erb +14 -0
  86. data/lib/templates/merb/merb-no-http.monitrc.erb +13 -0
  87. data/lib/templates/merb/merb.initd.centos.erb +123 -0
  88. data/lib/templates/merb/merb.monitrc.erb +15 -0
  89. data/lib/templates/mongrel/mongrel_cluster.initd.centos.erb +94 -0
  90. data/lib/templates/mongrel/mongrel_cluster.monitrc.erb +15 -0
  91. data/lib/templates/mongrel/mongrel_cluster.yml.erb +11 -0
  92. data/lib/templates/monit/monit.cnf +34 -0
  93. data/lib/templates/monit/monit.initd.centos.erb +68 -0
  94. data/lib/templates/monit/monitrc.erb +18 -0
  95. data/lib/templates/mysql/install_db.sql.erb +6 -0
  96. data/lib/templates/mysql/my.cnf.innodb_1024.erb +122 -0
  97. data/lib/templates/mysql/my.cnf.innodb_512.erb +127 -0
  98. data/lib/templates/mysql/mysql.monitrc.erb +6 -0
  99. data/lib/templates/nginx/nginx.conf.erb +97 -0
  100. data/lib/templates/nginx/nginx.initd.centos.erb +69 -0
  101. data/lib/templates/nginx/nginx.monitrc.erb +4 -0
  102. data/lib/templates/nginx/nginx_vhost.conf.erb +101 -0
  103. data/lib/templates/nginx/nginx_vhost_generic.conf.erb +99 -0
  104. data/lib/templates/rails/database.yml.erb +7 -0
  105. data/lib/templates/redmine/email.yml.erb +10 -0
  106. data/lib/templates/ruby/fix_openssl.sh +12 -0
  107. data/lib/templates/sphinx/sphinx.conf.erb +157 -0
  108. data/lib/templates/sphinx/sphinx.monitrc.erb +4 -0
  109. data/lib/templates/sphinx/sphinx_app.initd.centos.erb +90 -0
  110. data/lib/templates/sshd/sshd.monitrc.erb +5 -0
  111. data/script/destroy +14 -0
  112. data/script/generate +14 -0
  113. data/script/txt2html +80 -0
  114. data/setup.rb +1585 -0
  115. data/tasks/deployment.rake +34 -0
  116. data/tasks/environment.rake +7 -0
  117. data/tasks/website.rake +23 -0
  118. data/test/test_helper.rb +2 -0
  119. data/test/test_plugin_upload.rb +32 -0
  120. data/test/test_recipes.rb +37 -0
  121. data/test/test_templates.rb +29 -0
  122. metadata +198 -0
@@ -0,0 +1,76 @@
1
+ module Capitate::Plugins::Yum
2
+
3
+ # Update all installed packages.
4
+ #
5
+ # ==== Options
6
+ # +packages+:: Packages to update, or empty to update all
7
+ #
8
+ # ==== Examples
9
+ # yum.update
10
+ # yum.update([ "aspell" ])
11
+ #
12
+ def update(packages = [])
13
+ run_via "yum -y update #{packages.join(" ")}"
14
+ end
15
+
16
+ # Remove via yum.
17
+ #
18
+ # ==== Options
19
+ # +packages+:: Packages to remove
20
+ #
21
+ # ==== Examples
22
+ # yum.remove
23
+ # yum.remove([ "aspell" ])
24
+ #
25
+ def remove(packages)
26
+ run_via "yum -y remove #{packages.join(" ")}"
27
+ end
28
+
29
+ # Install via yum.
30
+ #
31
+ # ==== Options
32
+ # +packages+:: Packages to install, either String (for single package) or Array
33
+ # +update_existing+:: If package exists, where to yum update it, defaults to true
34
+ #
35
+ # ==== Examples
36
+ # yum.install
37
+ # yum.install([ "aspell" ])
38
+ #
39
+ def install(packages, update_existing = true)
40
+
41
+ # If a single object, wrap in array
42
+ packages = [ packages ] unless packages.is_a?(Array)
43
+
44
+ if update_existing
45
+
46
+ installed_packages = []
47
+
48
+ run_via "yum -d 0 list installed #{packages.join(" ")}" do |channel, stream, data|
49
+ lines = data.split("\n")[1..-1]
50
+ if lines.blank?
51
+ logger.info "Invalid yum output: #{data}"
52
+ else
53
+ installed_packages += lines.collect { |line| line.split(".").first }
54
+ end
55
+ end
56
+
57
+ packages -= installed_packages
58
+
59
+ run_via "yum -y update #{installed_packages.join(" ")}" unless installed_packages.blank?
60
+ end
61
+
62
+ run_via "yum -y install #{packages.join(" ")}" unless packages.blank?
63
+ end
64
+
65
+ # Clean yum.
66
+ #
67
+ # ==== Examples
68
+ # yum.clean
69
+ #
70
+ def clean
71
+ run_via "yum -y clean all"
72
+ end
73
+
74
+ end
75
+
76
+ Capistrano.plugin :yum, Capitate::Plugins::Yum
@@ -0,0 +1,5 @@
1
+ # Load recipes.
2
+ recipes = Dir[File.dirname(__FILE__) + "/../recipes/**/*.rb"].collect { |recipe| File.expand_path(recipe) }
3
+ recipes.each do |recipe|
4
+ Capistrano::Configuration.instance.load recipe
5
+ end
@@ -0,0 +1,262 @@
1
+ # Task node in the capistrano namespace, task hierarchy.
2
+ class Capitate::TaskNode
3
+
4
+ include Capitate::Plugins::Base
5
+
6
+ attr_reader :name, :nodes, :tasks, :parent
7
+
8
+ # Create task node with name and parent
9
+ # For root not use name = "top"
10
+ #
11
+ # ==== Options
12
+ # +name+:: Node name (namespace name)
13
+ # +parent+:: Parent node
14
+ #
15
+ def initialize(name, parent = nil)
16
+ @name = name
17
+ @parent = parent
18
+ @nodes = []
19
+ @tasks = []
20
+ end
21
+
22
+ # Add "child" node.
23
+ #
24
+ # ==== Options
25
+ # +task_node+:: Node
26
+ #
27
+ def add_node(task_node)
28
+ @nodes << task_node
29
+ end
30
+
31
+ # Find node with name (namespace).
32
+ #
33
+ # ==== Options
34
+ # +name+:: Name to look for
35
+ #
36
+ def find(name)
37
+ @nodes.each do |node|
38
+ return node if node.name == name
39
+ end
40
+ nil
41
+ end
42
+
43
+ # Add task to this node.
44
+ #
45
+ # ==== Options
46
+ # +task+:: Add task associated with this node (namespace).
47
+ #
48
+ def add_task(task)
49
+ @tasks << task
50
+ end
51
+
52
+ # Get "child" nodes (sorted).
53
+ def sorted_nodes
54
+ nodes.sort_by(&:name)
55
+ end
56
+
57
+ # Get tasks (sorted).
58
+ def sorted_tasks
59
+ tasks.sort_by(&:fully_qualified_name) # { |t| t.name.to_s }
60
+ end
61
+
62
+ # Iterate over ALL "child" nodes, depth first.
63
+ # Yields |node, level|.
64
+ #
65
+ # ==== Options
66
+ # +level+:: Current level
67
+ #
68
+ def each_node(level = 0, &block)
69
+ sorted_nodes.each do |node|
70
+ yield(node, level)
71
+ node.each_node(level + 1, &block)
72
+ end
73
+ end
74
+
75
+ # Get the full name, using delimeter
76
+ #
77
+ # ==== Options
78
+ # +delimeter+:: Delimeter
79
+ #
80
+ # ==== Examples
81
+ # node.full_name(":") => "mysql:centos" # On node mysql centos node (top -> mysql -> centos)
82
+ #
83
+ def full_name(delimeter = "-")
84
+ if parent
85
+ parent_name = parent.full_name
86
+ return [ parent_name, name ].compact.join(delimeter)
87
+ end
88
+
89
+ # Return nil for top node
90
+ name == "top" ? nil : name
91
+ end
92
+
93
+ # Write textile documentation for node (recursively).
94
+ #
95
+ # Uses task desc attribute for task details.
96
+ #
97
+ # ==== Options
98
+ # +dir+:: Dir to write to
99
+ # +file_name+:: File name to write to, defaults to full name
100
+ # +title+:: Title and h1 for page, defaults to name
101
+ # +options+:: Options
102
+ #
103
+ def write_doc(dir, file_name = nil, title = nil, options = {}, &block)
104
+
105
+ file_name ||= full_name
106
+ title ||= full_name(":")
107
+
108
+
109
+
110
+ path = "#{dir}/#{file_name}.txt"
111
+ puts "%10s %-30s" % [ "create", path ]
112
+
113
+ File.open(path, "w") do |file|
114
+ file.puts "h1. #{title}\n\n"
115
+
116
+ #
117
+ # Breadcrumb generate
118
+ #
119
+ bc_full_name = full_name(":")
120
+ links = []
121
+ if bc_full_name
122
+ names = bc_full_name.split(":")
123
+ links << " #{names.pop} " # Pop off current
124
+
125
+ while(!names.empty?) do
126
+ links << %{ "#{names.last}":#{names.join("-")}.html }
127
+ names.pop
128
+ end
129
+ end
130
+
131
+ # Write breadcrumb
132
+ file.puts %{ "home":../index.html > "recipes":index.html > #{links.reverse.join(" > ")} }
133
+
134
+ # Write task count
135
+ # count = 0
136
+ # each_node do |snode, level|
137
+ # count += snode.tasks.length
138
+ # end
139
+ # file.puts %{\n\n*#{count}* tasks!\n\n}
140
+
141
+ #
142
+ # Namespace
143
+ #
144
+ unless nodes.empty?
145
+ file.puts "\n\nh2. Namespaces\n\n"
146
+ each_node do |snode, level|
147
+ #li_level = (0..level).collect { "*" }.join
148
+ li_level = "*"
149
+ if snode.tasks.length > 0
150
+ file.puts %{#{li_level} "#{snode.full_name(":")}":#{snode.full_name}.html (#{snode.tasks.length}) \n}
151
+ end
152
+ end
153
+ end
154
+
155
+ #
156
+ # Tasks
157
+ #
158
+ unless tasks.empty?
159
+ file.puts "\n\nh2. Tasks\n\n"
160
+ sorted_tasks.each do |task|
161
+ file.puts %{* "#{task.fully_qualified_name}":##{task.fully_qualified_name} \n}
162
+ end
163
+ end
164
+
165
+ #
166
+ # Task details
167
+ #
168
+ unless tasks.empty?
169
+ file.puts "\n\nh2. Task documentation\n\n"
170
+ sorted_tasks.each do |task|
171
+ file.puts %{<div class="recipe">\n\n}
172
+ options = ""
173
+ options = "<span class='options'>, #{task.options.inspect}</span>" unless task.options.blank?
174
+ file.puts "h3(##{task.fully_qualified_name}). #{task.fully_qualified_name}#{options}\n\n"
175
+ file.puts "#{unindent(task.desc)}\n\n"
176
+ if task.arguments
177
+ file.puts "h4. Parameters\n\n"
178
+ file.puts "<dl>\n"
179
+ task.arguments.each do |arg|
180
+ file.puts "<dt>#{arg[:name]}</dt>"
181
+ file.puts "<dd>#{unindent(arg[:desc])}</dd>" if arg.has_key?(:desc)
182
+ if arg.has_key?(:default_desc)
183
+ file.puts "<dd class='default'>Defaults to @#{arg[:default_desc]}@</dd>"
184
+ elsif arg.has_key?(:default)
185
+ file.puts "<dd class='default'>Defaults to @#{arg[:default].inspect}@</dd>"
186
+ end
187
+
188
+ if arg.has_key?(:set)
189
+ file.puts "<dd class='default'>Defaults to @#{arg[:set].inspect}@ (cap setting)</dd>"
190
+ end
191
+
192
+ file.puts "<dd class='example'>Example: @set :#{arg[:name]}, #{arg[:example]}@" if arg.has_key?(:example)
193
+ end
194
+ end
195
+ file.puts "</dl>\n\n"
196
+ file.puts "</div>\n\n\n"
197
+ end
198
+ end
199
+
200
+ #
201
+ # Write doc (recursively for "child" namespace)
202
+ #
203
+ sorted_nodes.each do |snode|
204
+ snode.write_doc(dir, nil, nil, options)
205
+ end
206
+
207
+ # If block then let it do stuff with open file
208
+ if block_given?
209
+ file.puts "\n\n"
210
+ yield(file)
211
+ end
212
+ end
213
+ end
214
+
215
+ # Node to string.
216
+ def to_s(level = 0)
217
+ spaces = " "
218
+ indent = (0...level).collect { spaces }.join("")
219
+
220
+ # Ignore top node (level = -1)
221
+ if level >= 0
222
+ t_indent = "\n#{indent} #{spaces} - "
223
+ task_names = tasks.collect(&:name).sort_by(&:to_s).join(t_indent)
224
+ s = "#{indent} -- #{name}:#{t_indent}#{task_names}\n"
225
+ else
226
+ s = ""
227
+ end
228
+
229
+ sorted_nodes.each do |node|
230
+ s += node.to_s(level + 1)
231
+ end
232
+ s
233
+ end
234
+
235
+ # Create nodes and and task to node.
236
+ #
237
+ # If task is "mysql:centos:install", the nodes will look like:
238
+ #
239
+ # (top node) -> (mysql node) -> (centos node; w/ tasks: install)
240
+ #
241
+ # ==== Options
242
+ # +top_node+:: Node to start at
243
+ # +task+:: Task to add
244
+ #
245
+ def self.populate_with_task(top_node, task)
246
+ node_names = task.namespace.fully_qualified_name.split(":")
247
+
248
+ node = top_node
249
+
250
+ node_names.each do |name|
251
+ parent_node = node
252
+ node = parent_node.find(name)
253
+ if !node
254
+ node = self.new(name, parent_node)
255
+ parent_node.add_node(node)
256
+ end
257
+ end
258
+ node.add_task(task)
259
+ end
260
+
261
+ end
262
+
@@ -0,0 +1,9 @@
1
+ module Capitate #:nodoc:
2
+ module VERSION #:nodoc:
3
+ MAJOR = 0
4
+ MINOR = 3
5
+ TINY = 6
6
+
7
+ STRING = [MAJOR, MINOR, TINY].join('.')
8
+ end
9
+ end
@@ -0,0 +1,196 @@
1
+ #
2
+ # Install recipe for Centos 5.1 x86_64 (@base install)
3
+ #
4
+ # To use this script:
5
+ #
6
+ # cap HOSTS=10.0.6.118:2023 -s user=root -f install.rb install
7
+ #
8
+ # Centos 5.1 x86_64 with packages, including:
9
+ # * Ruby
10
+ # * Nginx
11
+ # * Mysql
12
+ # * Sphinx
13
+ # * Monit
14
+ # * ImageMagick
15
+ # * Memcached
16
+ # * Gems: rake, mysql, raspell, rmagick, mongrel, mongrel_cluster, json, mime-types, hpricot
17
+ #
18
+
19
+ load 'deploy' if respond_to?(:namespace) # cap2 differentiator
20
+
21
+ require 'erb'
22
+
23
+ # Load capitate
24
+ gem 'capitate', '>= 0.2.9'
25
+ require 'capitate'
26
+ require 'capitate/recipes'
27
+
28
+ # Load more recipes
29
+ Dir[File.dirname(__FILE__) + "/recipes/*.rb"].each { |recipe| load recipe }
30
+
31
+ namespace :install do
32
+
33
+ task :default do
34
+
35
+ set :user, "root"
36
+ set :run_method, :run
37
+ check_role
38
+
39
+ # NTP Setup
40
+ yum.install([ "ntp" ])
41
+ script.run_all <<-CMDS
42
+ chkconfig --levels 235 ntpd on
43
+ ntpdate 0.pool.ntp.org
44
+ /sbin/service ntpd start
45
+ CMDS
46
+
47
+ # Setup for web
48
+ # * Add admin group
49
+ # * Change inittab to runlevel 3
50
+ # * Create web apps directory
51
+ # * Add admin group to suders ALL=(ALL) ALL
52
+ script.run_all <<-CMDS
53
+ egrep "^admin" /etc/group || /usr/sbin/groupadd admin
54
+ mkdir -p /var/www/apps
55
+ egrep "^%admin" /etc/sudoers || echo "%admin ALL=(ALL) ALL" >> /etc/sudoers
56
+ CMDS
57
+
58
+ # Package installs
59
+ yum.update
60
+ yum.install [ "gcc", "kernel-devel", "libevent-devel", "libxml2-devel", "openssl", "openssl-devel",
61
+ "aspell", "aspell-devel", "aspell-en", "aspell-es" ]
62
+
63
+ yum.clean
64
+
65
+ #
66
+ # App installs
67
+ #
68
+
69
+ ruby.centos.install
70
+ nginx.centos.install
71
+ mysql.centos.install
72
+ sphinx.centos.install
73
+
74
+ monit.centos.install
75
+ # Install firewall rule manually
76
+ #monit.centos.iptables
77
+
78
+ sshd.monit.install
79
+
80
+ imagemagick.centos.install
81
+ memcached.centos.install
82
+
83
+ #
84
+ # Install monit hooks
85
+ #
86
+ nginx.monit.install
87
+ mysql.monit.install
88
+ memcached.monit.install
89
+
90
+ # Install gems
91
+ gems_only
92
+
93
+ # Cleanup
94
+ yum.clean
95
+
96
+ # Log rotate tasks
97
+ monit.logrotate.install
98
+ nginx.logrotate.install
99
+
100
+ end
101
+
102
+ desc "Install gems only"
103
+ task :gems_only do
104
+ gems.install(fetch(:gems_to_install))
105
+ end
106
+ end
107
+
108
+ # Prompt for server if host not given
109
+ task :check_role do
110
+ # Can use cap HOSTS=192.168.1.111 install
111
+ # Otherwise prompt for the service
112
+ role :install, prompt.ask("Server: ") if find_servers_for_task(current_task).blank?
113
+ end
114
+
115
+ # For for ruby install
116
+ after "ruby:centos:install" do
117
+ # Fix ruby install openssl
118
+ script.sh("ruby/fix_openssl.sh")
119
+ end
120
+
121
+
122
+ #
123
+ # Install options
124
+ #
125
+
126
+ set :gems_to_install, [ "rake", "mysql -- --with-mysql-include=/usr/include/mysql --with-mysql-lib=/usr/lib/mysql --with-mysql-config",
127
+ "raspell", "rmagick", "mongrel", "mongrel_cluster", "json", "mime-types", "hpricot" ]
128
+
129
+
130
+ # Ruby install
131
+ set :ruby_build_options, {
132
+ :url => "http://capitate.s3.amazonaws.com/ruby-1.8.6-p110.tar.gz",
133
+ :build_dest => "/usr/src",
134
+ :configure_options => "--prefix=/usr",
135
+ :clean => false
136
+ }
137
+
138
+ set :rubygems_build_options, {
139
+ :url => "http://rubyforge.org/frs/download.php/29548/rubygems-1.0.1.tgz"
140
+ }
141
+
142
+ # Memcached install
143
+ set :memcached_pid_path, "/var/run/memcached.pid"
144
+ set :memcached_memory, 64
145
+ set :memcached_port, 11211
146
+ set :memcached_build_options, {
147
+ :url => "http://www.danga.com/memcached/dist/memcached-1.2.4.tar.gz",
148
+ :configure_options => "--prefix=/usr/local"
149
+ }
150
+
151
+ # Monit install
152
+ set :monit_conf_dir, "/etc/monit"
153
+ set :monit_pid_path, "/var/run/monit.pid"
154
+ set :monit_port, 2812
155
+ set :monit_build_options, {
156
+ :url => "http://www.tildeslash.com/monit/dist/monit-4.10.1.tar.gz"
157
+ }
158
+
159
+ # Nginx install
160
+ set :nginx_bin_path, "/sbin/nginx"
161
+ set :nginx_conf_path, "/etc/nginx/nginx.conf"
162
+ set :nginx_pid_path, "/var/run/nginx.pid"
163
+ set :nginx_prefix_path, "/var/nginx"
164
+ set :nginx_build_options, {
165
+ :url => "http://sysoev.ru/nginx/nginx-0.5.35.tar.gz",
166
+ :configure_options => "--sbin-path=#{nginx_bin_path} --conf-path=#{nginx_conf_path} \
167
+ --pid-path=#{nginx_pid_path} --error-log-path=/var/log/nginx_master_error.log --lock-path=/var/lock/nginx \
168
+ --prefix=#{nginx_prefix_path} --with-md5=auto/lib/md5 --with-sha1=auto/lib/sha1 --with-http_ssl_module \
169
+ --with-http_flv_module"
170
+ }
171
+
172
+ # Sphinx install
173
+ set :sphinx_prefix, "/usr/local/sphinx-0.9.8-rc1"
174
+ set :sphinx_build_options, {
175
+ :url => "http://www.sphinxsearch.com/downloads/sphinx-0.9.8-rc1.tar.gz",
176
+ :configure_options => "--with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib64/mysql --prefix=#{sphinx_prefix}",
177
+ :symlink => { sphinx_prefix => "/usr/local/sphinx" }
178
+ }
179
+ # Other possible sphinx_build_options
180
+ # :url => "http://www.sphinxsearch.com/downloads/sphinx-0.9.7.tar.gz",
181
+ # :configure_options => "--with-mysql-includes=/usr/include/mysql --with-mysql-libs=/usr/lib/mysql --prefix=#{sphinx_prefix}",
182
+
183
+
184
+ # For mysql:install
185
+ set :mysql_pid_path, "/var/run/mysqld/mysqld.pid"
186
+ set :mysql_port, 3306
187
+
188
+ # Imagemagick install
189
+ set :imagemagick_build_options, {
190
+ :url => "http://capitate.s3.amazonaws.com/ImageMagick.tar.gz",
191
+ :unpack_dir => "ImageMagick-*"
192
+ }
193
+
194
+ # For sshd:monit:install
195
+ set :sshd_pid_path, "/var/run/sshd.pid"
196
+ set :sshd_port, 2023