le1t0-deprec 2.1.6.001

Sign up to get free protection for your applications and to get access to all the features.
Files changed (230) hide show
  1. data/CHANGELOG +444 -0
  2. data/COPYING +19 -0
  3. data/LICENSE +339 -0
  4. data/README +154 -0
  5. data/THANKS +17 -0
  6. data/bin/depify +139 -0
  7. data/docs/EXAMPLE-installing_tracks.txt +41 -0
  8. data/docs/README.nagios +22 -0
  9. data/docs/README.rails +17 -0
  10. data/docs/config_gen_explained.txt +39 -0
  11. data/docs/deprec-1.x/deprec-1.x.quickstart +50 -0
  12. data/docs/deprec-1.x/notes.txt +12 -0
  13. data/docs/old/deprec_banner.gif +0 -0
  14. data/docs/windows_linux.txt +350 -0
  15. data/docs/xen/traffic_monitoring_with_vnstat.txt +95 -0
  16. data/docs/xen/xen-tools-notes.txt +31 -0
  17. data/docs/xen/xen_on_hardy.txt +39 -0
  18. data/lib/deprec.rb +42 -0
  19. data/lib/deprec/capistrano_extensions.rb +446 -0
  20. data/lib/deprec/recipes.rb +7 -0
  21. data/lib/deprec/recipes/aoe.rb +79 -0
  22. data/lib/deprec/recipes/app/mongrel.rb +213 -0
  23. data/lib/deprec/recipes/app/passenger.rb +190 -0
  24. data/lib/deprec/recipes/ar_sendmail.rb +67 -0
  25. data/lib/deprec/recipes/aspell.rb +22 -0
  26. data/lib/deprec/recipes/canonical.rb +68 -0
  27. data/lib/deprec/recipes/cap.rb +39 -0
  28. data/lib/deprec/recipes/chef.rb +68 -0
  29. data/lib/deprec/recipes/collectd.rb +112 -0
  30. data/lib/deprec/recipes/db/couchdb.rb +107 -0
  31. data/lib/deprec/recipes/db/mysql.rb +194 -0
  32. data/lib/deprec/recipes/db/postgresql.rb +104 -0
  33. data/lib/deprec/recipes/db/sqlite.rb +37 -0
  34. data/lib/deprec/recipes/ddclient.rb +51 -0
  35. data/lib/deprec/recipes/deprec.rb +167 -0
  36. data/lib/deprec/recipes/deprecated.rb +71 -0
  37. data/lib/deprec/recipes/drbd.rb +137 -0
  38. data/lib/deprec/recipes/dummy.rb +22 -0
  39. data/lib/deprec/recipes/example.rb +115 -0
  40. data/lib/deprec/recipes/git.rb +97 -0
  41. data/lib/deprec/recipes/gitosis.rb.disabled +55 -0
  42. data/lib/deprec/recipes/glusterfs.rb +176 -0
  43. data/lib/deprec/recipes/god.rb +70 -0
  44. data/lib/deprec/recipes/haproxy.rb +115 -0
  45. data/lib/deprec/recipes/heartbeat.rb +138 -0
  46. data/lib/deprec/recipes/imagemagick/imagemagick_bin.rb +24 -0
  47. data/lib/deprec/recipes/imagemagick/imagemagick_src.rb +39 -0
  48. data/lib/deprec/recipes/integrity.rb +108 -0
  49. data/lib/deprec/recipes/iptables.rb +94 -0
  50. data/lib/deprec/recipes/java.rb +23 -0
  51. data/lib/deprec/recipes/keepalived.rb +78 -0
  52. data/lib/deprec/recipes/ldap.rb +52 -0
  53. data/lib/deprec/recipes/logrotate.rb +56 -0
  54. data/lib/deprec/recipes/lvm.rb +20 -0
  55. data/lib/deprec/recipes/memcache.rb +49 -0
  56. data/lib/deprec/recipes/mongodb.rb +94 -0
  57. data/lib/deprec/recipes/monit.rb +135 -0
  58. data/lib/deprec/recipes/mysql_proxy.rb +67 -0
  59. data/lib/deprec/recipes/nagios.rb +361 -0
  60. data/lib/deprec/recipes/network.rb +116 -0
  61. data/lib/deprec/recipes/ntp.rb +103 -0
  62. data/lib/deprec/recipes/php.rb +58 -0
  63. data/lib/deprec/recipes/postfix.rb +115 -0
  64. data/lib/deprec/recipes/profiles.rb +125 -0
  65. data/lib/deprec/recipes/raid/amcc_3ware.rb +21 -0
  66. data/lib/deprec/recipes/rails.rb +330 -0
  67. data/lib/deprec/recipes/redhat_cluster.rb +228 -0
  68. data/lib/deprec/recipes/redis.rb +90 -0
  69. data/lib/deprec/recipes/ruby/mri.rb +55 -0
  70. data/lib/deprec/recipes/ruby/ree.rb +40 -0
  71. data/lib/deprec/recipes/rvm.rb +32 -0
  72. data/lib/deprec/recipes/s3utils.rb +63 -0
  73. data/lib/deprec/recipes/sphinx/thinking_sphinx.rb +105 -0
  74. data/lib/deprec/recipes/sphinx/ultrasphinx.rb +86 -0
  75. data/lib/deprec/recipes/ssh.rb +147 -0
  76. data/lib/deprec/recipes/ssl.rb +56 -0
  77. data/lib/deprec/recipes/starling.rb +119 -0
  78. data/lib/deprec/recipes/svn.rb +171 -0
  79. data/lib/deprec/recipes/syslog.rb +63 -0
  80. data/lib/deprec/recipes/trac.rb.disabled +277 -0
  81. data/lib/deprec/recipes/tsung.rb +74 -0
  82. data/lib/deprec/recipes/ubuntu.rb +90 -0
  83. data/lib/deprec/recipes/users.rb +90 -0
  84. data/lib/deprec/recipes/utils.rb +58 -0
  85. data/lib/deprec/recipes/vnstat.rb +85 -0
  86. data/lib/deprec/recipes/web/apache.rb +143 -0
  87. data/lib/deprec/recipes/web/nginx.rb +172 -0
  88. data/lib/deprec/recipes/wordpress.rb.notworking +96 -0
  89. data/lib/deprec/recipes/wpmu.rb +103 -0
  90. data/lib/deprec/recipes/xen.rb +364 -0
  91. data/lib/deprec/recipes/xentools.rb +101 -0
  92. data/lib/deprec/recipes_minus_rails.rb +125 -0
  93. data/lib/deprec/templates/aoe/aoe-init +55 -0
  94. data/lib/deprec/templates/aoe/fence_aoemask +351 -0
  95. data/lib/deprec/templates/apache/namevirtualhosts.conf +5 -0
  96. data/lib/deprec/templates/apache/ports.conf.erb +5 -0
  97. data/lib/deprec/templates/apache/status.conf.erb +17 -0
  98. data/lib/deprec/templates/ar_sendmail/logrotate.conf.erb +9 -0
  99. data/lib/deprec/templates/ar_sendmail/monit.conf.erb +5 -0
  100. data/lib/deprec/templates/chef/chef.json.erb +1 -0
  101. data/lib/deprec/templates/chef/solo.rb +2 -0
  102. data/lib/deprec/templates/collectd/collectd-init.d +153 -0
  103. data/lib/deprec/templates/collectd/collectd.conf.erb +686 -0
  104. data/lib/deprec/templates/ddclient/ddclient.conf.erb +11 -0
  105. data/lib/deprec/templates/ddclient/ddclient.erb +15 -0
  106. data/lib/deprec/templates/deprec/caprc.erb +14 -0
  107. data/lib/deprec/templates/drbd/drbd.conf.erb +531 -0
  108. data/lib/deprec/templates/glusterfs/glusterfsd-init.erb +95 -0
  109. data/lib/deprec/templates/gnbd_client/cluster.conf.erb +21 -0
  110. data/lib/deprec/templates/gnbd_client/clvm-default.erb +3 -0
  111. data/lib/deprec/templates/gnbd_client/cman-default.erb +6 -0
  112. data/lib/deprec/templates/gnbd_client/gnbdimports.conf.erb +1 -0
  113. data/lib/deprec/templates/gnbd_server/cluster.conf.erb +20 -0
  114. data/lib/deprec/templates/gnbd_server/clvm-default.erb +3 -0
  115. data/lib/deprec/templates/gnbd_server/cman-default.erb +6 -0
  116. data/lib/deprec/templates/gnbd_server/gnbd-server-default.erb +1 -0
  117. data/lib/deprec/templates/gnbd_server/gnbdexports.conf.erb +1 -0
  118. data/lib/deprec/templates/god/god-conf.erb +2 -0
  119. data/lib/deprec/templates/god/god-init.erb +47 -0
  120. data/lib/deprec/templates/haproxy/haproxy-init.d +120 -0
  121. data/lib/deprec/templates/haproxy/haproxy.cfg.erb +31 -0
  122. data/lib/deprec/templates/heartbeat/authkeys.erb +2 -0
  123. data/lib/deprec/templates/heartbeat/ha.cf.erb +15 -0
  124. data/lib/deprec/templates/heartbeat/haresources.erb +1 -0
  125. data/lib/deprec/templates/integrity/apache_vhost.erb +4 -0
  126. data/lib/deprec/templates/integrity/config.ru.erb +21 -0
  127. data/lib/deprec/templates/integrity/config.yml.erb +43 -0
  128. data/lib/deprec/templates/iptables/firewall-default.erb +13 -0
  129. data/lib/deprec/templates/iptables/firewall-init.erb +171 -0
  130. data/lib/deprec/templates/keepalived/keepalived.conf.erb +18 -0
  131. data/lib/deprec/templates/logrotate/logrotate.conf.erb +32 -0
  132. data/lib/deprec/templates/mongodb/mongodb-init.d +88 -0
  133. data/lib/deprec/templates/mongrel/apache_vhost.conf.erb +148 -0
  134. data/lib/deprec/templates/mongrel/logrotate.conf.erb +11 -0
  135. data/lib/deprec/templates/mongrel/mongrel_cluster-init-script +54 -0
  136. data/lib/deprec/templates/mongrel/mongrel_cluster.yml.erb +10 -0
  137. data/lib/deprec/templates/mongrel/monit.conf.erb +17 -0
  138. data/lib/deprec/templates/mongrel/nginx_vhost.conf.erb +41 -0
  139. data/lib/deprec/templates/monit/monit-init-script +104 -0
  140. data/lib/deprec/templates/monit/monitrc.erb +250 -0
  141. data/lib/deprec/templates/monit/nothing.monitrc +0 -0
  142. data/lib/deprec/templates/mysql/create_databases.sql +20 -0
  143. data/lib/deprec/templates/mysql/database.yml.prod +6 -0
  144. data/lib/deprec/templates/mysql/database.yml.stage +6 -0
  145. data/lib/deprec/templates/mysql/my.cnf.erb +140 -0
  146. data/lib/deprec/templates/mysql/sphinx.conf.prod +542 -0
  147. data/lib/deprec/templates/mysql/sphinx.conf.stage +542 -0
  148. data/lib/deprec/templates/mysql_proxy/mysql-proxy-default.erb +4 -0
  149. data/lib/deprec/templates/nagios/README +32 -0
  150. data/lib/deprec/templates/nagios/cgi.cfg.erb +357 -0
  151. data/lib/deprec/templates/nagios/check_linux_free_memory.pl +118 -0
  152. data/lib/deprec/templates/nagios/check_mongrel_cluster.rb +82 -0
  153. data/lib/deprec/templates/nagios/htpasswd.users +1 -0
  154. data/lib/deprec/templates/nagios/mrtg.cfg +180 -0
  155. data/lib/deprec/templates/nagios/nagios.cfg.erb +1325 -0
  156. data/lib/deprec/templates/nagios/nrpe.cfg.erb +222 -0
  157. data/lib/deprec/templates/nagios/nrpe.xinetd.erb +16 -0
  158. data/lib/deprec/templates/nagios/objects/commands.cfg.erb +265 -0
  159. data/lib/deprec/templates/nagios/objects/contacts.cfg.erb +89 -0
  160. data/lib/deprec/templates/nagios/objects/hosts.cfg.erb +114 -0
  161. data/lib/deprec/templates/nagios/objects/localhost.cfg.erb +116 -0
  162. data/lib/deprec/templates/nagios/objects/services.cfg.erb +165 -0
  163. data/lib/deprec/templates/nagios/objects/timeperiods.cfg.erb +94 -0
  164. data/lib/deprec/templates/nagios/resource.cfg.erb +34 -0
  165. data/lib/deprec/templates/network/hostname.erb +1 -0
  166. data/lib/deprec/templates/network/hosts.erb +2 -0
  167. data/lib/deprec/templates/network/interfaces.erb +18 -0
  168. data/lib/deprec/templates/network/resolv.conf.erb +6 -0
  169. data/lib/deprec/templates/nginx/logrotate.conf.erb +13 -0
  170. data/lib/deprec/templates/nginx/mime.types.erb +70 -0
  171. data/lib/deprec/templates/nginx/nginx-init-script +62 -0
  172. data/lib/deprec/templates/nginx/nginx.conf.erb +125 -0
  173. data/lib/deprec/templates/nginx/nginx.logrotate.d +12 -0
  174. data/lib/deprec/templates/nginx/nothing.conf +1 -0
  175. data/lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb +41 -0
  176. data/lib/deprec/templates/ntp/ntp.conf.erb +42 -0
  177. data/lib/deprec/templates/passenger/apache_vhost.erb +29 -0
  178. data/lib/deprec/templates/passenger/logrotate.conf.erb +12 -0
  179. data/lib/deprec/templates/passenger/passenger.conf.erb +21 -0
  180. data/lib/deprec/templates/passenger/passenger.load.erb +3 -0
  181. data/lib/deprec/templates/postfix/aliases.erb +3 -0
  182. data/lib/deprec/templates/postfix/dynamicmaps.cf.erb +8 -0
  183. data/lib/deprec/templates/postfix/main.cf.erb +36 -0
  184. data/lib/deprec/templates/postfix/master.cf.erb +77 -0
  185. data/lib/deprec/templates/redis/redis-conf.erb +132 -0
  186. data/lib/deprec/templates/redis/redis-init.erb +50 -0
  187. data/lib/deprec/templates/s3utils/s3cfg +35 -0
  188. data/lib/deprec/templates/s3utils/s3config.yml +3 -0
  189. data/lib/deprec/templates/sphinx/monit.conf.erb +5 -0
  190. data/lib/deprec/templates/ssh/ssh_config.erb +50 -0
  191. data/lib/deprec/templates/ssh/sshd_config.erb +78 -0
  192. data/lib/deprec/templates/ssl/make-ssl-cert +138 -0
  193. data/lib/deprec/templates/ssl/ssl-cert-snakeoil.key +15 -0
  194. data/lib/deprec/templates/ssl/ssl-cert-snakeoil.pem +19 -0
  195. data/lib/deprec/templates/starling/monit.conf.erb +14 -0
  196. data/lib/deprec/templates/starling/starling-init-script.erb +71 -0
  197. data/lib/deprec/templates/subversion/svn.apache.vhost.erb +43 -0
  198. data/lib/deprec/templates/syslog/syslog.conf.erb +71 -0
  199. data/lib/deprec/templates/syslog/syslogd.erb +13 -0
  200. data/lib/deprec/templates/trac/apache_vhost.conf.erb +24 -0
  201. data/lib/deprec/templates/trac/nginx_vhost.conf.erb +26 -0
  202. data/lib/deprec/templates/trac/trac.ini.erb +169 -0
  203. data/lib/deprec/templates/trac/trac_deprec.png +0 -0
  204. data/lib/deprec/templates/trac/tracd-init.erb +43 -0
  205. data/lib/deprec/templates/trac/users.htdigest.erb +0 -0
  206. data/lib/deprec/templates/tsung/tsung.xml.erb +47 -0
  207. data/lib/deprec/templates/vnstat/config.php +57 -0
  208. data/lib/deprec/templates/wordpress/apache2_wordpress_vhost.conf.erb +31 -0
  209. data/lib/deprec/templates/wordpress/wp-config.php.erb +31 -0
  210. data/lib/deprec/templates/wpmu/apache_vhost.conf.erb +13 -0
  211. data/lib/deprec/templates/xen/network-bridge-wrapper +3 -0
  212. data/lib/deprec/templates/xen/xend-config.sxp.erb +195 -0
  213. data/lib/deprec/templates/xen/xend-init.erb +57 -0
  214. data/lib/deprec/templates/xen/xendomains.erb +137 -0
  215. data/lib/deprec/templates/xentools/100-ubuntu-setup +26 -0
  216. data/lib/deprec/templates/xentools/15-disable-hwclock +40 -0
  217. data/lib/deprec/templates/xentools/30-disable-gettys +57 -0
  218. data/lib/deprec/templates/xentools/31-ubuntu-setup +32 -0
  219. data/lib/deprec/templates/xentools/40-setup-networking +145 -0
  220. data/lib/deprec/templates/xentools/98-custom +17 -0
  221. data/lib/deprec/templates/xentools/xen-tools.conf.erb +278 -0
  222. data/lib/deprec/templates/xentools/xm.tmpl.erb +138 -0
  223. data/lib/deprec_cmd_completion.sh +26 -0
  224. data/lib/deprec_minus_rails.rb +12 -0
  225. data/lib/vmbuilder_plugins/all.rb +20 -0
  226. data/lib/vmbuilder_plugins/apt.rb +93 -0
  227. data/lib/vmbuilder_plugins/emerge.rb +76 -0
  228. data/lib/vmbuilder_plugins/gem.rb +100 -0
  229. data/lib/vmbuilder_plugins/std.rb +203 -0
  230. metadata +304 -0
@@ -0,0 +1,203 @@
1
+ # =std.rb: Capistrano Standard Methods
2
+ # Standard library of procedures and functions that you can use with Capistrano.
3
+ #
4
+ # ----
5
+ # Copyright (c) 2007 Neil Wilson, Aldur Systems Ltd
6
+ #
7
+ # Licensed under the GNU Public License v2. No warranty is provided.
8
+
9
+ require 'capistrano'
10
+
11
+ # = Purpose
12
+ # Std is a Capistrano plugin that provides a set of standard methods refactored
13
+ # out of several Capistrano task libraries.
14
+ #
15
+ # Installs within Capistrano as the plugin _std_
16
+ #
17
+ # = Usage
18
+ #
19
+ # require 'vmbuilder_plugins/std'
20
+ #
21
+ # Prefix all calls to the library with <tt>std.</tt>
22
+ module Std
23
+
24
+ begin
25
+ # Use the Mmap class if it is available
26
+ # http://moulon.inra.fr/ruby/mmap.html
27
+ require 'mmap'
28
+ MMAP=true #:nodoc:
29
+ rescue LoadError
30
+ # no MMAP class, use normal reads instead
31
+ MMAP=false #:nodoc:
32
+ end
33
+
34
+ # Copies the files specified by +file_pattern+ to +destination+
35
+ #
36
+ # Error checking is minimal - a pattern onto a single file will result in +destination+
37
+ # containing the data from the last file only.
38
+ #
39
+ # Installs via *sudo*, +options+ are as for *put*.
40
+ def fput(file_pattern, destination, options={})
41
+ logger.info file_pattern
42
+ Dir.glob(file_pattern) do |fname|
43
+ if File.readable?(fname) then
44
+ if MMAP
45
+ logger.debug "Using Memory Mapped File Upload"
46
+ fdata=Mmap.new(fname,"r", Mmap::MAP_SHARED, :advice => Mmap::MADV_SEQUENTIAL)
47
+ else
48
+ fdata=File.open(fname).read
49
+ end
50
+ su_put(fdata, destination, File.join('/tmp',File.basename(fname)), options)
51
+ else
52
+ logger.error "Unable to read file #{fname}"
53
+ end
54
+ end
55
+ end
56
+
57
+ # Upload +data+ to +temporary_area+ before installing it in
58
+ # +destination+ using sudo.
59
+ #
60
+ # +options+ are as for *put*
61
+ #
62
+ def su_put(data, destination, temporary_area='/tmp', options={})
63
+ temporary_area = File.join(temporary_area,"#{File.basename(destination)}-$CAPISTRANO:HOST$")
64
+ put(data, temporary_area, options)
65
+ send run_method, <<-CMD
66
+ sh -c "install -m#{sprintf("%3o",options[:mode]||0755)} #{temporary_area} #{destination} &&
67
+ rm -f #{temporary_area}"
68
+ CMD
69
+ end
70
+
71
+ # Copies the +file_pattern+, which is assumed to be a tar
72
+ # file of some description (gzipped or plain), and unpacks it into
73
+ # +destination+.
74
+ def unzip(file_pattern, destination, options={})
75
+ Dir.glob(file_pattern) do |fname|
76
+ if File.readable?(fname) then
77
+ target="/tmp/#{File.basename(fname)}"
78
+ if MMAP
79
+ logger.debug "Using Memory Mapped File Upload"
80
+ fdata=Mmap.new(fname,"r", Mmap::MAP_SHARED, :advice => Mmap::MADV_SEQUENTIAL)
81
+ else
82
+ fdata=File.open(fname).read
83
+ end
84
+ put(fdata, target, options)
85
+ send run_method, <<-CMD
86
+ sh -c "cd #{destination} &&
87
+ zcat -f #{target} | tar xvf - &&
88
+ rm -f #{target}"
89
+ CMD
90
+ end
91
+ end
92
+ end
93
+
94
+ # Wrap this around your task calls to catch the no servers error and
95
+ # ignore it
96
+ #
97
+ # std.ignore_no_servers_error do
98
+ # activate_mysql
99
+ # end
100
+ #
101
+ def ignore_no_servers_error (&block)
102
+ begin
103
+ yield
104
+ rescue RuntimeError => failure
105
+ if failure.message =~ /no servers matched/
106
+ logger.debug "Ignoring 'no servers matched' error in task #{current_task.name}"
107
+ else
108
+ raise
109
+ end
110
+ end
111
+ end
112
+
113
+ # Wrap this around your task to force a connection as root.
114
+ # Flushes the session cache before and after the connection.
115
+ #
116
+ # std.connect_as_root do
117
+ # install_sudo
118
+ # end
119
+ #
120
+ def connect_as_root (&block)
121
+ begin
122
+ tempuser = user
123
+ set :user, "root"
124
+ actor.sessions.delete_if { true }
125
+ yield tempuser
126
+ ensure
127
+ set :user, tempuser if tempuser
128
+ actor.sessions.delete_if { true }
129
+ end
130
+ end
131
+
132
+ #Returns a random string of alphanumeric characters of size +size+
133
+ #Useful for passwords, usernames and the like.
134
+ def random_string(size=10)
135
+ s = ""
136
+ size.times { s << (i = rand(62); i += ((i < 10) ? 48 : ((i < 36) ? 55 : 61 ))).chr }
137
+ s
138
+ end
139
+
140
+
141
+ # Return a relative path from the destination directory +from_str+
142
+ # to the target file/directory +to_str+. Used to create relative
143
+ # symbolic link paths.
144
+ def relative_path (from_str, to_str)
145
+ require 'pathname'
146
+ Pathname.new(to_str).relative_path_from(Pathname.new(from_str)).to_s
147
+ end
148
+
149
+ # Run a ruby command file on the servers
150
+ #
151
+ def ruby(cmd, options={}, &block)
152
+ temp_name = random_string + ".rb"
153
+ begin
154
+ put(cmd, temp_name, :mode => 0700)
155
+ send(run_method, "ruby #{temp_name}", options, &block)
156
+ ensure
157
+ delete temp_name
158
+ end
159
+ end
160
+
161
+ # Run a patchfile on the servers
162
+ # Ignores reverses and rejects.
163
+ #
164
+ def patch(patchfile, level = '0', where = '/')
165
+ temp_name = random_string
166
+ begin
167
+ fput(patchfile, temp_name, :mode => 0600)
168
+ send(run_method, %{
169
+ patch -p#{level} -tNd #{where} -r /dev/null < #{temp_name} || true
170
+ })
171
+ ensure
172
+ delete temp_name
173
+ end
174
+ end
175
+
176
+ # Deletes the given file(s) from all servers targetted by the current
177
+ # task, but runs the +delete+ command according to the current setting
178
+ # of <tt>:use_sudo</tt>.
179
+ #
180
+ # If <tt>:recursive => true</tt> is specified, it may be used to remove
181
+ # directories.
182
+ def su_delete(path, options={})
183
+ cmd = "rm -%sf #{path}" % (options[:recursive] ? "r" : "")
184
+ send(run_method, cmd, options)
185
+ end
186
+
187
+ # Render a template file and upload it to the servers
188
+ #
189
+ def put_template(template, destination, options={})
190
+ if MMAP
191
+ logger.debug "Using Memory Mapped File Upload"
192
+ fdata=Mmap.new(template,"r", Mmap::MAP_SHARED, :advice => Mmap::MADV_SEQUENTIAL)
193
+ else
194
+ fdata=File.read(template)
195
+ end
196
+ put(render(:template => fdata), destination, options)
197
+ end
198
+
199
+ end
200
+
201
+ Capistrano.plugin :std, Std
202
+ #
203
+ # vim: nowrap sw=2 sts=2 ts=8 ff=unix ft=ruby:
metadata ADDED
@@ -0,0 +1,304 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: le1t0-deprec
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 2
7
+ - 1
8
+ - 6
9
+ - 1
10
+ version: 2.1.6.001
11
+ platform: ruby
12
+ authors:
13
+ - Le1t0
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-05-19 00:00:00 +02:00
19
+ default_executable: depify
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: le1t0-capistrano
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ requirements:
26
+ - - ">"
27
+ - !ruby/object:Gem::Version
28
+ segments:
29
+ - 2
30
+ - 5
31
+ - 0
32
+ version: 2.5.0
33
+ type: :runtime
34
+ version_requirements: *id001
35
+ description: " This project provides libraries of Capistrano tasks and extensions to \n remove the repetative manual work associated with installing services \n on linux servers.\n"
36
+ email: dev@ewout.to
37
+ executables:
38
+ - depify
39
+ extensions: []
40
+
41
+ extra_rdoc_files: []
42
+
43
+ files:
44
+ - bin/depify
45
+ - docs/config_gen_explained.txt
46
+ - docs/deprec-1.x/deprec-1.x.quickstart
47
+ - docs/deprec-1.x/notes.txt
48
+ - docs/EXAMPLE-installing_tracks.txt
49
+ - docs/old/deprec_banner.gif
50
+ - docs/README.nagios
51
+ - docs/README.rails
52
+ - docs/windows_linux.txt
53
+ - docs/xen/traffic_monitoring_with_vnstat.txt
54
+ - docs/xen/xen-tools-notes.txt
55
+ - docs/xen/xen_on_hardy.txt
56
+ - lib/deprec/capistrano_extensions.rb
57
+ - lib/deprec/recipes/aoe.rb
58
+ - lib/deprec/recipes/app/mongrel.rb
59
+ - lib/deprec/recipes/app/passenger.rb
60
+ - lib/deprec/recipes/ar_sendmail.rb
61
+ - lib/deprec/recipes/aspell.rb
62
+ - lib/deprec/recipes/canonical.rb
63
+ - lib/deprec/recipes/cap.rb
64
+ - lib/deprec/recipes/chef.rb
65
+ - lib/deprec/recipes/collectd.rb
66
+ - lib/deprec/recipes/db/couchdb.rb
67
+ - lib/deprec/recipes/db/mysql.rb
68
+ - lib/deprec/recipes/db/postgresql.rb
69
+ - lib/deprec/recipes/db/sqlite.rb
70
+ - lib/deprec/recipes/ddclient.rb
71
+ - lib/deprec/recipes/deprec.rb
72
+ - lib/deprec/recipes/deprecated.rb
73
+ - lib/deprec/recipes/drbd.rb
74
+ - lib/deprec/recipes/dummy.rb
75
+ - lib/deprec/recipes/example.rb
76
+ - lib/deprec/recipes/git.rb
77
+ - lib/deprec/recipes/gitosis.rb.disabled
78
+ - lib/deprec/recipes/glusterfs.rb
79
+ - lib/deprec/recipes/god.rb
80
+ - lib/deprec/recipes/haproxy.rb
81
+ - lib/deprec/recipes/heartbeat.rb
82
+ - lib/deprec/recipes/imagemagick/imagemagick_bin.rb
83
+ - lib/deprec/recipes/imagemagick/imagemagick_src.rb
84
+ - lib/deprec/recipes/integrity.rb
85
+ - lib/deprec/recipes/iptables.rb
86
+ - lib/deprec/recipes/java.rb
87
+ - lib/deprec/recipes/keepalived.rb
88
+ - lib/deprec/recipes/ldap.rb
89
+ - lib/deprec/recipes/logrotate.rb
90
+ - lib/deprec/recipes/lvm.rb
91
+ - lib/deprec/recipes/memcache.rb
92
+ - lib/deprec/recipes/mongodb.rb
93
+ - lib/deprec/recipes/monit.rb
94
+ - lib/deprec/recipes/mysql_proxy.rb
95
+ - lib/deprec/recipes/nagios.rb
96
+ - lib/deprec/recipes/network.rb
97
+ - lib/deprec/recipes/ntp.rb
98
+ - lib/deprec/recipes/php.rb
99
+ - lib/deprec/recipes/postfix.rb
100
+ - lib/deprec/recipes/profiles.rb
101
+ - lib/deprec/recipes/raid/amcc_3ware.rb
102
+ - lib/deprec/recipes/rails.rb
103
+ - lib/deprec/recipes/redhat_cluster.rb
104
+ - lib/deprec/recipes/redis.rb
105
+ - lib/deprec/recipes/ruby/mri.rb
106
+ - lib/deprec/recipes/ruby/ree.rb
107
+ - lib/deprec/recipes/rvm.rb
108
+ - lib/deprec/recipes/s3utils.rb
109
+ - lib/deprec/recipes/sphinx/thinking_sphinx.rb
110
+ - lib/deprec/recipes/sphinx/ultrasphinx.rb
111
+ - lib/deprec/recipes/ssh.rb
112
+ - lib/deprec/recipes/ssl.rb
113
+ - lib/deprec/recipes/starling.rb
114
+ - lib/deprec/recipes/svn.rb
115
+ - lib/deprec/recipes/syslog.rb
116
+ - lib/deprec/recipes/trac.rb.disabled
117
+ - lib/deprec/recipes/tsung.rb
118
+ - lib/deprec/recipes/ubuntu.rb
119
+ - lib/deprec/recipes/users.rb
120
+ - lib/deprec/recipes/utils.rb
121
+ - lib/deprec/recipes/vnstat.rb
122
+ - lib/deprec/recipes/web/apache.rb
123
+ - lib/deprec/recipes/web/nginx.rb
124
+ - lib/deprec/recipes/wordpress.rb.notworking
125
+ - lib/deprec/recipes/wpmu.rb
126
+ - lib/deprec/recipes/xen.rb
127
+ - lib/deprec/recipes/xentools.rb
128
+ - lib/deprec/recipes.rb
129
+ - lib/deprec/recipes_minus_rails.rb
130
+ - lib/deprec/templates/aoe/aoe-init
131
+ - lib/deprec/templates/aoe/fence_aoemask
132
+ - lib/deprec/templates/apache/namevirtualhosts.conf
133
+ - lib/deprec/templates/apache/ports.conf.erb
134
+ - lib/deprec/templates/apache/status.conf.erb
135
+ - lib/deprec/templates/ar_sendmail/logrotate.conf.erb
136
+ - lib/deprec/templates/ar_sendmail/monit.conf.erb
137
+ - lib/deprec/templates/chef/chef.json.erb
138
+ - lib/deprec/templates/chef/solo.rb
139
+ - lib/deprec/templates/collectd/collectd-init.d
140
+ - lib/deprec/templates/collectd/collectd.conf.erb
141
+ - lib/deprec/templates/ddclient/ddclient.conf.erb
142
+ - lib/deprec/templates/ddclient/ddclient.erb
143
+ - lib/deprec/templates/deprec/caprc.erb
144
+ - lib/deprec/templates/drbd/drbd.conf.erb
145
+ - lib/deprec/templates/glusterfs/glusterfsd-init.erb
146
+ - lib/deprec/templates/gnbd_client/cluster.conf.erb
147
+ - lib/deprec/templates/gnbd_client/clvm-default.erb
148
+ - lib/deprec/templates/gnbd_client/cman-default.erb
149
+ - lib/deprec/templates/gnbd_client/gnbdimports.conf.erb
150
+ - lib/deprec/templates/gnbd_server/cluster.conf.erb
151
+ - lib/deprec/templates/gnbd_server/clvm-default.erb
152
+ - lib/deprec/templates/gnbd_server/cman-default.erb
153
+ - lib/deprec/templates/gnbd_server/gnbd-server-default.erb
154
+ - lib/deprec/templates/gnbd_server/gnbdexports.conf.erb
155
+ - lib/deprec/templates/god/god-conf.erb
156
+ - lib/deprec/templates/god/god-init.erb
157
+ - lib/deprec/templates/haproxy/haproxy-init.d
158
+ - lib/deprec/templates/haproxy/haproxy.cfg.erb
159
+ - lib/deprec/templates/heartbeat/authkeys.erb
160
+ - lib/deprec/templates/heartbeat/ha.cf.erb
161
+ - lib/deprec/templates/heartbeat/haresources.erb
162
+ - lib/deprec/templates/integrity/apache_vhost.erb
163
+ - lib/deprec/templates/integrity/config.ru.erb
164
+ - lib/deprec/templates/integrity/config.yml.erb
165
+ - lib/deprec/templates/iptables/firewall-default.erb
166
+ - lib/deprec/templates/iptables/firewall-init.erb
167
+ - lib/deprec/templates/keepalived/keepalived.conf.erb
168
+ - lib/deprec/templates/logrotate/logrotate.conf.erb
169
+ - lib/deprec/templates/mongodb/mongodb-init.d
170
+ - lib/deprec/templates/mongrel/apache_vhost.conf.erb
171
+ - lib/deprec/templates/mongrel/logrotate.conf.erb
172
+ - lib/deprec/templates/mongrel/mongrel_cluster-init-script
173
+ - lib/deprec/templates/mongrel/mongrel_cluster.yml.erb
174
+ - lib/deprec/templates/mongrel/monit.conf.erb
175
+ - lib/deprec/templates/mongrel/nginx_vhost.conf.erb
176
+ - lib/deprec/templates/monit/monit-init-script
177
+ - lib/deprec/templates/monit/monitrc.erb
178
+ - lib/deprec/templates/monit/nothing.monitrc
179
+ - lib/deprec/templates/mysql/create_databases.sql
180
+ - lib/deprec/templates/mysql/database.yml.prod
181
+ - lib/deprec/templates/mysql/database.yml.stage
182
+ - lib/deprec/templates/mysql/my.cnf.erb
183
+ - lib/deprec/templates/mysql/sphinx.conf.prod
184
+ - lib/deprec/templates/mysql/sphinx.conf.stage
185
+ - lib/deprec/templates/mysql_proxy/mysql-proxy-default.erb
186
+ - lib/deprec/templates/nagios/cgi.cfg.erb
187
+ - lib/deprec/templates/nagios/check_linux_free_memory.pl
188
+ - lib/deprec/templates/nagios/check_mongrel_cluster.rb
189
+ - lib/deprec/templates/nagios/htpasswd.users
190
+ - lib/deprec/templates/nagios/mrtg.cfg
191
+ - lib/deprec/templates/nagios/nagios.cfg.erb
192
+ - lib/deprec/templates/nagios/nrpe.cfg.erb
193
+ - lib/deprec/templates/nagios/nrpe.xinetd.erb
194
+ - lib/deprec/templates/nagios/objects/commands.cfg.erb
195
+ - lib/deprec/templates/nagios/objects/contacts.cfg.erb
196
+ - lib/deprec/templates/nagios/objects/hosts.cfg.erb
197
+ - lib/deprec/templates/nagios/objects/localhost.cfg.erb
198
+ - lib/deprec/templates/nagios/objects/services.cfg.erb
199
+ - lib/deprec/templates/nagios/objects/timeperiods.cfg.erb
200
+ - lib/deprec/templates/nagios/README
201
+ - lib/deprec/templates/nagios/resource.cfg.erb
202
+ - lib/deprec/templates/network/hostname.erb
203
+ - lib/deprec/templates/network/hosts.erb
204
+ - lib/deprec/templates/network/interfaces.erb
205
+ - lib/deprec/templates/network/resolv.conf.erb
206
+ - lib/deprec/templates/nginx/logrotate.conf.erb
207
+ - lib/deprec/templates/nginx/mime.types.erb
208
+ - lib/deprec/templates/nginx/nginx-init-script
209
+ - lib/deprec/templates/nginx/nginx.conf.erb
210
+ - lib/deprec/templates/nginx/nginx.logrotate.d
211
+ - lib/deprec/templates/nginx/nothing.conf
212
+ - lib/deprec/templates/nginx/rails_nginx_vhost.conf.erb
213
+ - lib/deprec/templates/ntp/ntp.conf.erb
214
+ - lib/deprec/templates/passenger/apache_vhost.erb
215
+ - lib/deprec/templates/passenger/logrotate.conf.erb
216
+ - lib/deprec/templates/passenger/passenger.conf.erb
217
+ - lib/deprec/templates/passenger/passenger.load.erb
218
+ - lib/deprec/templates/postfix/aliases.erb
219
+ - lib/deprec/templates/postfix/dynamicmaps.cf.erb
220
+ - lib/deprec/templates/postfix/main.cf.erb
221
+ - lib/deprec/templates/postfix/master.cf.erb
222
+ - lib/deprec/templates/redis/redis-conf.erb
223
+ - lib/deprec/templates/redis/redis-init.erb
224
+ - lib/deprec/templates/s3utils/s3cfg
225
+ - lib/deprec/templates/s3utils/s3config.yml
226
+ - lib/deprec/templates/sphinx/monit.conf.erb
227
+ - lib/deprec/templates/ssh/ssh_config.erb
228
+ - lib/deprec/templates/ssh/sshd_config.erb
229
+ - lib/deprec/templates/ssl/make-ssl-cert
230
+ - lib/deprec/templates/ssl/ssl-cert-snakeoil.key
231
+ - lib/deprec/templates/ssl/ssl-cert-snakeoil.pem
232
+ - lib/deprec/templates/starling/monit.conf.erb
233
+ - lib/deprec/templates/starling/starling-init-script.erb
234
+ - lib/deprec/templates/subversion/svn.apache.vhost.erb
235
+ - lib/deprec/templates/syslog/syslog.conf.erb
236
+ - lib/deprec/templates/syslog/syslogd.erb
237
+ - lib/deprec/templates/trac/apache_vhost.conf.erb
238
+ - lib/deprec/templates/trac/nginx_vhost.conf.erb
239
+ - lib/deprec/templates/trac/trac.ini.erb
240
+ - lib/deprec/templates/trac/trac_deprec.png
241
+ - lib/deprec/templates/trac/tracd-init.erb
242
+ - lib/deprec/templates/trac/users.htdigest.erb
243
+ - lib/deprec/templates/tsung/tsung.xml.erb
244
+ - lib/deprec/templates/vnstat/config.php
245
+ - lib/deprec/templates/wordpress/apache2_wordpress_vhost.conf.erb
246
+ - lib/deprec/templates/wordpress/wp-config.php.erb
247
+ - lib/deprec/templates/wpmu/apache_vhost.conf.erb
248
+ - lib/deprec/templates/xen/network-bridge-wrapper
249
+ - lib/deprec/templates/xen/xend-config.sxp.erb
250
+ - lib/deprec/templates/xen/xend-init.erb
251
+ - lib/deprec/templates/xen/xendomains.erb
252
+ - lib/deprec/templates/xentools/100-ubuntu-setup
253
+ - lib/deprec/templates/xentools/15-disable-hwclock
254
+ - lib/deprec/templates/xentools/30-disable-gettys
255
+ - lib/deprec/templates/xentools/31-ubuntu-setup
256
+ - lib/deprec/templates/xentools/40-setup-networking
257
+ - lib/deprec/templates/xentools/98-custom
258
+ - lib/deprec/templates/xentools/xen-tools.conf.erb
259
+ - lib/deprec/templates/xentools/xm.tmpl.erb
260
+ - lib/deprec.rb
261
+ - lib/deprec_cmd_completion.sh
262
+ - lib/deprec_minus_rails.rb
263
+ - lib/vmbuilder_plugins/all.rb
264
+ - lib/vmbuilder_plugins/apt.rb
265
+ - lib/vmbuilder_plugins/emerge.rb
266
+ - lib/vmbuilder_plugins/gem.rb
267
+ - lib/vmbuilder_plugins/std.rb
268
+ - CHANGELOG
269
+ - COPYING
270
+ - LICENSE
271
+ - README
272
+ - THANKS
273
+ has_rdoc: true
274
+ homepage: http://github.com/le1t0/deprec
275
+ licenses: []
276
+
277
+ post_install_message:
278
+ rdoc_options: []
279
+
280
+ require_paths:
281
+ - lib
282
+ required_ruby_version: !ruby/object:Gem::Requirement
283
+ requirements:
284
+ - - ">="
285
+ - !ruby/object:Gem::Version
286
+ segments:
287
+ - 0
288
+ version: "0"
289
+ required_rubygems_version: !ruby/object:Gem::Requirement
290
+ requirements:
291
+ - - ">="
292
+ - !ruby/object:Gem::Version
293
+ segments:
294
+ - 0
295
+ version: "0"
296
+ requirements: []
297
+
298
+ rubyforge_project:
299
+ rubygems_version: 1.3.6
300
+ signing_key:
301
+ specification_version: 3
302
+ summary: deployment recipes for capistrano
303
+ test_files: []
304
+