capitate 0.1.9 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (78) hide show
  1. data/Capfile +3 -2
  2. data/History.txt +6 -0
  3. data/Manifest.txt +28 -11
  4. data/bin/capitate +13 -61
  5. data/config/hoe.rb +2 -2
  6. data/docs/nginx.README +12 -0
  7. data/docs/recipes/centos.txt +33 -0
  8. data/docs/recipes/deploy-pending.txt +25 -0
  9. data/docs/recipes/deploy-web.txt +33 -0
  10. data/docs/recipes/deploy.txt +159 -0
  11. data/docs/recipes/docs.txt +26 -0
  12. data/docs/recipes/imagemagick-centos.txt +20 -0
  13. data/docs/recipes/imagemagick.txt +8 -0
  14. data/docs/recipes/index.txt +26 -0
  15. data/docs/recipes/memcached-centos.txt +32 -0
  16. data/docs/recipes/memcached.txt +35 -0
  17. data/docs/recipes/mongrel_cluster-centos.txt +27 -0
  18. data/docs/recipes/mongrel_cluster.txt +40 -0
  19. data/docs/recipes/monit-centos.txt +32 -0
  20. data/docs/recipes/monit.txt +8 -0
  21. data/docs/recipes/mysql-centos.txt +22 -0
  22. data/docs/recipes/mysql.txt +58 -0
  23. data/docs/recipes/nginx-centos.txt +43 -0
  24. data/docs/recipes/nginx.txt +51 -0
  25. data/docs/recipes/rails.txt +58 -0
  26. data/docs/recipes/ruby-centos.txt +22 -0
  27. data/docs/recipes/ruby.txt +8 -0
  28. data/docs/recipes/sphinx-centos.txt +35 -0
  29. data/docs/recipes/sphinx.txt +89 -0
  30. data/lib/capitate/cap_ext/run_via.rb +14 -0
  31. data/lib/capitate/plugins/gem.rb +2 -3
  32. data/lib/capitate/plugins/prompt.rb +24 -0
  33. data/lib/capitate/plugins/script.rb +29 -15
  34. data/lib/capitate/plugins/templates.rb +45 -40
  35. data/lib/capitate/plugins/yum.rb +12 -22
  36. data/lib/capitate/task_node.rb +28 -9
  37. data/lib/capitate/version.rb +2 -2
  38. data/lib/capitate.rb +4 -5
  39. data/lib/deployment/deploy.rb +42 -0
  40. data/lib/deployment/install-centos-rubyweb.rb +131 -0
  41. data/lib/recipes/centos/centos.rb +30 -21
  42. data/lib/recipes/centos/imagemagick.rb +9 -8
  43. data/lib/recipes/centos/memcached.rb +11 -21
  44. data/lib/recipes/centos/mongrel_cluster.rb +7 -11
  45. data/lib/recipes/centos/monit.rb +13 -18
  46. data/lib/recipes/centos/mysql.rb +6 -9
  47. data/lib/recipes/centos/nginx.rb +17 -30
  48. data/lib/recipes/centos/ruby.rb +14 -19
  49. data/lib/recipes/centos/sphinx.rb +14 -28
  50. data/lib/recipes/docs.rb +22 -6
  51. data/lib/recipes/memcached.rb +14 -8
  52. data/lib/recipes/mongrel_cluster.rb +11 -14
  53. data/lib/recipes/mysql.rb +22 -40
  54. data/lib/recipes/nginx.rb +9 -4
  55. data/lib/recipes/rails.rb +53 -6
  56. data/lib/recipes/sphinx.rb +86 -17
  57. data/lib/templates/capistrano/Capfile +2 -6
  58. data/lib/templates/monit/cert.sh +1 -1
  59. data/lib/templates/mysql/install_db.sql.erb +2 -2
  60. data/lib/templates/sphinx/sphinx.conf.erb +28 -399
  61. data/lib/templates/sphinx/sphinx_app.initd.centos.erb +1 -1
  62. data/website/index.html +20 -34
  63. data/website/index.txt +12 -22
  64. data/website/stylesheets/screen.css +22 -11
  65. data/website/template.rhtml +7 -5
  66. data/website/template_recipe.rhtml +7 -3
  67. metadata +55 -15
  68. data/lib/capitate/plugins/package.rb +0 -30
  69. data/lib/capitate/plugins/profiles.rb +0 -33
  70. data/lib/capitate/plugins/wget.rb +0 -23
  71. data/lib/profiles/centos-sick.rb +0 -116
  72. data/lib/recipes/README +0 -5
  73. data/lib/recipes/centos/README +0 -3
  74. data/lib/recipes/gems.rb +0 -20
  75. data/lib/recipes/packages.rb +0 -39
  76. data/lib/recipes/recipes.rb +0 -30
  77. data/lib/templates/centos/setup_for_web.sh +0 -17
  78. data/lib/templates/centos/sudoers +0 -95
data/Capfile CHANGED
@@ -11,6 +11,7 @@ require 'lib/capitate/recipes'
11
11
 
12
12
  require 'erb'
13
13
 
14
-
15
- set :recipes_run, [ "centos:setup_for_web", "packages:install", "ruby:centos:install" ]
16
14
  set :user, "root"
15
+
16
+ # For testing
17
+ load "lib/deployment/install-centos-rubyweb.rb"
data/History.txt CHANGED
@@ -1,3 +1,9 @@
1
+ == 0.2.1 2008-02-24
2
+
3
+ * Removing all my brain dead recipes.
4
+ * Added build options for install tasks.
5
+ * Updating documentation
6
+
1
7
  == 0.1.9 2008-02-23
2
8
 
3
9
  * Adding config_script to mongrel_cluster recipe
data/Manifest.txt CHANGED
@@ -7,25 +7,47 @@ Rakefile
7
7
  bin/capitate
8
8
  config/hoe.rb
9
9
  config/requirements.rb
10
+ docs/nginx.README
11
+ docs/recipes/centos.txt
12
+ docs/recipes/deploy-pending.txt
13
+ docs/recipes/deploy-web.txt
14
+ docs/recipes/deploy.txt
15
+ docs/recipes/docs.txt
16
+ docs/recipes/imagemagick-centos.txt
17
+ docs/recipes/imagemagick.txt
18
+ docs/recipes/index.txt
19
+ docs/recipes/memcached-centos.txt
20
+ docs/recipes/memcached.txt
21
+ docs/recipes/mongrel_cluster-centos.txt
22
+ docs/recipes/mongrel_cluster.txt
23
+ docs/recipes/monit-centos.txt
24
+ docs/recipes/monit.txt
25
+ docs/recipes/mysql-centos.txt
26
+ docs/recipes/mysql.txt
27
+ docs/recipes/nginx-centos.txt
28
+ docs/recipes/nginx.txt
29
+ docs/recipes/rails.txt
30
+ docs/recipes/ruby-centos.txt
31
+ docs/recipes/ruby.txt
32
+ docs/recipes/sphinx-centos.txt
33
+ docs/recipes/sphinx.txt
10
34
  lib/capitate.rb
11
35
  lib/capitate/cap_ext/connections.rb
12
36
  lib/capitate/cap_ext/extension_proxy.rb
37
+ lib/capitate/cap_ext/run_via.rb
13
38
  lib/capitate/cap_ext/variables.rb
14
39
  lib/capitate/plugins/base.rb
15
40
  lib/capitate/plugins/gem.rb
16
- lib/capitate/plugins/package.rb
17
- lib/capitate/plugins/profiles.rb
41
+ lib/capitate/plugins/prompt.rb
18
42
  lib/capitate/plugins/script.rb
19
43
  lib/capitate/plugins/templates.rb
20
44
  lib/capitate/plugins/upload.rb
21
- lib/capitate/plugins/wget.rb
22
45
  lib/capitate/plugins/yum.rb
23
46
  lib/capitate/recipes.rb
24
47
  lib/capitate/task_node.rb
25
48
  lib/capitate/version.rb
26
- lib/profiles/centos-sick.rb
27
- lib/recipes/README
28
- lib/recipes/centos/README
49
+ lib/deployment/deploy.rb
50
+ lib/deployment/install-centos-rubyweb.rb
29
51
  lib/recipes/centos/centos.rb
30
52
  lib/recipes/centos/imagemagick.rb
31
53
  lib/recipes/centos/memcached.rb
@@ -37,18 +59,13 @@ lib/recipes/centos/ruby.rb
37
59
  lib/recipes/centos/sphinx.rb
38
60
  lib/recipes/deploy.rb
39
61
  lib/recipes/docs.rb
40
- lib/recipes/gems.rb
41
62
  lib/recipes/memcached.rb
42
63
  lib/recipes/mongrel_cluster.rb
43
64
  lib/recipes/mysql.rb
44
65
  lib/recipes/nginx.rb
45
- lib/recipes/packages.rb
46
66
  lib/recipes/rails.rb
47
- lib/recipes/recipes.rb
48
67
  lib/recipes/sphinx.rb
49
68
  lib/templates/capistrano/Capfile
50
- lib/templates/centos/setup_for_web.sh
51
- lib/templates/centos/sudoers
52
69
  lib/templates/memcached/memcached.initd.centos.erb
53
70
  lib/templates/memcached/memcached.monitrc.erb
54
71
  lib/templates/mongrel/mongrel_cluster.initd.erb
data/bin/capitate CHANGED
@@ -1,78 +1,30 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require 'optparse'
4
-
5
- OptionParser.new do |opts|
6
- opts.banner = "Usage: #{File.basename($0)} [path]"
7
-
8
- opts.on("-h", "--help", "Displays this help info") do
9
- puts opts
10
- exit 0
11
- end
12
-
13
- begin
14
- opts.parse!(ARGV)
15
- rescue OptionParser::ParseError => e
16
- warn e.message
17
- puts opts
18
- exit 1
19
- end
20
- end
21
-
22
3
  begin
23
4
  require 'capitate'
24
5
  rescue LoadError
25
6
  require 'rubygems'
26
- require 'capitate'
7
+ require 'capitate'
27
8
  end
28
9
 
10
+ require 'capistrano/cli'
29
11
 
30
- class CapitateBin
31
- class << self
32
- include Capitate::Plugins::Templates
33
- end
34
- end
12
+ cli = Capistrano::CLI.new(ARGV)
13
+ cli.parse_options!
35
14
 
36
- if ARGV.empty?
37
- abort "Please specify the directory to capify, e.g. `#{File.basename($0)} .'"
38
- elsif !File.exists?(ARGV.first)
39
- abort "`#{ARGV.first}' does not exist."
40
- elsif !File.directory?(ARGV.first)
41
- abort "`#{ARGV.first}' is not a directory."
42
- elsif ARGV.length > 1
43
- abort "Too many arguments; please specify only the directory to capitate."
44
- end
45
-
46
- base = ARGV.shift
47
-
48
- puts <<-EOS
15
+ config = cli.instantiate_configuration
16
+ config.logger.level = cli.options[:verbose]
49
17
 
50
- Generating capistrano configuration...
18
+ cli.set_pre_vars(config)
19
+ cli.load_recipes(config)
51
20
 
52
- EOS
53
-
54
- files = { "Capfile" => "capistrano/Capfile" }
55
-
56
- files.each do |file, template|
57
- file = File.join(base, file)
58
- if File.exists?(file)
59
- warn "`#{file}' already exists"
60
- elsif File.exists?(file.downcase)
61
- warn "`#{file.downcase}' exists, which could conflict with `#{file}'"
62
- elsif !File.exists?(File.dirname(file))
63
- warn "Directory `#{File.dirname(file)}' does not exist"
64
- else
65
- # Write Capfile
66
- CapitateBin.write(template, file)
67
- end
21
+ config.load do
22
+ require 'capitate/recipes'
68
23
  end
69
24
 
70
- puts <<-EOS
71
-
72
- You now need to create and set you deployment "profile" in the Capfile.
73
- This is currently a manual process, see the documentation on profiles
74
- for more information.
25
+ config.trigger(:load)
26
+ cli.execute_requested_actions(config)
27
+ config.trigger(:exit)
75
28
 
76
- EOS
77
29
 
78
30
 
data/config/hoe.rb CHANGED
@@ -55,7 +55,7 @@ hoe = Hoe.new(GEM_NAME, VERS) do |p|
55
55
  p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
56
56
  p.test_globs = ["test/**/test_*.rb"]
57
57
  p.clean_globs |= ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store'] #An array of file patterns to delete on clean.
58
- p.clean_globs += ['website/recipes/**', 'docs/recipes/**']
58
+ p.clean_globs += ['website/recipes/**']
59
59
 
60
60
  # == Optional
61
61
  p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
@@ -69,4 +69,4 @@ end
69
69
  CHANGES = hoe.paragraphs_of('History.txt', 0..1).join("\\n\\n")
70
70
  PATH = (RUBYFORGE_PROJECT == GEM_NAME) ? RUBYFORGE_PROJECT : "#{RUBYFORGE_PROJECT}/#{GEM_NAME}"
71
71
  hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc')
72
- hoe.rsync_args = '-av --delete --ignore-errors'
72
+ hoe.rsync_args = '-av --delete --ignore-errors'
data/docs/nginx.README ADDED
@@ -0,0 +1,12 @@
1
+ === Nginx + mongrel
2
+ http://brainspl.at/articles/2006/08/23/nginx-my-new-favorite-front-end-for-mongrel-cluster
3
+ http://brainspl.at/articles/2007/01/03/new-nginx-conf-with-optimizations
4
+ http://topfunky.net/svn/shovel/nginx
5
+
6
+ === Nginx + memcached:
7
+ http://www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/
8
+ http://blog.kovyrin.net/2007/08/05/using-nginx-ssi-and-memcache-to-make-your-web-applications-faster/
9
+
10
+ === Nginx
11
+ http://robsanheim.com/2008/02/07/beware-the-default-nginx-config-old-ie6-hates-gzip/
12
+ http://brainspl.at/articles/2007/11/09/a-fair-proxy-balancer-for-nginx-and-mongrel
@@ -0,0 +1,33 @@
1
+ h1. centos
2
+
3
+ "home":../index.html > "recipes":index.html > centos
4
+
5
+
6
+ h2. Tasks
7
+
8
+ * "centos:add_user":#centos:add_user
9
+
10
+
11
+ h2. Task documentation
12
+
13
+ h3(#centos:add_user). centos:add_user
14
+
15
+ Add user and set user password for application. Adds user to specified groups.
16
+
17
+ *user*: User to add.
18
+
19
+ @set :user, "app_user"@
20
+ *groups*: Groups for user to be in. _Defaults to none_
21
+
22
+ @set :groups, "admin,foo"@
23
+
24
+ *home*: Home directory for user. _Defaults to <tt>:deploy_to</tt> setting_
25
+
26
+ @set :home, "/var/www/apps/app_name"@
27
+
28
+ *home_readable*: Whether home permissions are readable by all. Needed if using deploy dir as home. _Defaults to true_
29
+
30
+ @set :home_readable, true@
31
+
32
+
33
+
@@ -0,0 +1,25 @@
1
+ h1. deploy:pending
2
+
3
+ "home":../index.html > "recipes":index.html > "deploy":deploy.html > pending
4
+
5
+
6
+ h2. Tasks
7
+
8
+ * "deploy:pending":#deploy:pending
9
+ * "deploy:pending:diff":#deploy:pending:diff
10
+
11
+
12
+ h2. Task documentation
13
+
14
+ h3(#deploy:pending). deploy:pending
15
+
16
+ Displays the commits since your last deploy. This is good for a summary of the changes that have occurred since the last deploy. Note that this might not be supported on all SCM's.
17
+
18
+
19
+
20
+ h3(#deploy:pending:diff). deploy:pending:diff
21
+
22
+ Displays the `diff' since your last deploy. This is useful if you want to examine what changes are about to be deployed. Note that this might not be supported on all SCM's.
23
+
24
+
25
+
@@ -0,0 +1,33 @@
1
+ h1. deploy:web
2
+
3
+ "home":../index.html > "recipes":index.html > "deploy":deploy.html > web
4
+
5
+
6
+ h2. Tasks
7
+
8
+ * "deploy:web:disable":#deploy:web:disable
9
+ * "deploy:web:enable":#deploy:web:enable
10
+
11
+
12
+ h2. Task documentation
13
+
14
+ h3(#deploy:web:disable). deploy:web:disable
15
+
16
+ Present a maintenance page to visitors. Disables your application's web interface by writing a "maintenance.html" file to each web server. The servers must be configured to detect the presence of this file, and if it is present, always display it instead of performing the request.
17
+
18
+ By default, the maintenance page will just say the site is down for "maintenance", and will be back "shortly", but you can customize the page by specifying the REASON and UNTIL environment variables:
19
+
20
+ $ cap deploy:web:disable \
21
+ REASON="hardware upgrade" \
22
+ UNTIL="12pm Central Time"
23
+
24
+ Further customization will require that you write your own task.
25
+
26
+
27
+
28
+ h3(#deploy:web:enable). deploy:web:enable
29
+
30
+ Makes the application web-accessible again. Removes the "maintenance.html" page generated by deploy:web:disable, which (if your web servers are configured correctly) will make your application web-accessible again.
31
+
32
+
33
+
@@ -0,0 +1,159 @@
1
+ h1. deploy
2
+
3
+ "home":../index.html > "recipes":index.html > deploy
4
+
5
+
6
+ h2. Namespaces
7
+
8
+ * "deploy:pending":deploy-pending.html (2)
9
+ * "deploy:web":deploy-web.html (2)
10
+
11
+
12
+ h2. Tasks
13
+
14
+ * "deploy":#deploy
15
+ * "deploy:check":#deploy:check
16
+ * "deploy:cleanup":#deploy:cleanup
17
+ * "deploy:cold":#deploy:cold
18
+ * "deploy:finalize_update":#deploy:finalize_update
19
+ * "deploy:migrate":#deploy:migrate
20
+ * "deploy:migrations":#deploy:migrations
21
+ * "deploy:restart":#deploy:restart
22
+ * "deploy:rollback":#deploy:rollback
23
+ * "deploy:rollback_code":#deploy:rollback_code
24
+ * "deploy:setup":#deploy:setup
25
+ * "deploy:start":#deploy:start
26
+ * "deploy:stop":#deploy:stop
27
+ * "deploy:symlink":#deploy:symlink
28
+ * "deploy:update":#deploy:update
29
+ * "deploy:update_code":#deploy:update_code
30
+ * "deploy:upload":#deploy:upload
31
+
32
+
33
+ h2. Task documentation
34
+
35
+ h3(#deploy). deploy
36
+
37
+ Deploys your project. This calls both `update' and `restart'. Note that this will generally only work for applications that have already been deployed once. For a "cold" deploy, you'll want to take a look at the `deploy:cold' task, which handles the cold start specifically.
38
+
39
+
40
+
41
+ h3(#deploy:check). deploy:check
42
+
43
+ Test deployment dependencies. Checks things like directory permissions, necessary utilities, and so forth, reporting on the things that appear to be incorrect or missing. This is good for making sure a deploy has a chance of working before you actually run `cap deploy'.
44
+
45
+ You can define your own dependencies, as well, using the `depend' method:
46
+
47
+ depend :remote, :gem, "tzinfo", ">=0.3.3"
48
+ depend :local, :command, "svn"
49
+ depend :remote, :directory, "/u/depot/files"
50
+
51
+
52
+
53
+ h3(#deploy:cleanup). deploy:cleanup
54
+
55
+ Clean up old releases. By default, the last 5 releases are kept on each server (though you can change this with the keep_releases variable). All other deployed revisions are removed from the servers. By default, this will use sudo to clean up the old releases, but if sudo is not available for your environment, set the :use_sudo variable to false instead.
56
+
57
+
58
+
59
+ h3(#deploy:cold). deploy:cold
60
+
61
+ Deploys and starts a `cold' application. This is useful if you have not deployed your application before, or if your application is (for some other reason) not currently running. It will deploy the code, run any pending migrations, and then instead of invoking `deploy:restart', it will invoke `deploy:start' to fire up the application servers.
62
+
63
+
64
+
65
+ h3(#deploy:finalize_update). deploy:finalize_update
66
+
67
+ [internal] Touches up the released code. This is called by update_code after the basic deploy finishes. It assumes a Rails project was deployed, so if you are deploying something else, you may want to override this task with your own environment's requirements.
68
+
69
+ This task will make the release group-writable (if the :group_writable variable is set to true, which is the default). It will then set up symlinks to the shared directory for the log, system, and tmp/pids directories, and will lastly touch all assets in public/images, public/stylesheets, and public/javascripts so that the times are consistent (so that asset timestamping works).
70
+
71
+
72
+
73
+ h3(#deploy:migrate). deploy:migrate
74
+
75
+ Run the migrate rake task. By default, it runs this in most recently deployed version of the app. However, you can specify a different release via the migrate_target variable, which must be one of :latest (for the default behavior), or :current (for the release indicated by the `current' symlink). Strings will work for those values instead of symbols, too. You can also specify additional environment variables to pass to rake via the migrate_env variable. Finally, you can specify the full path to the rake executable by setting the rake variable. The defaults are:
76
+
77
+ set :rake, "rake"
78
+ set :rails_env, "production"
79
+ set :migrate_env, ""
80
+ set :migrate_target, :latest
81
+
82
+
83
+
84
+ h3(#deploy:migrations). deploy:migrations
85
+
86
+ Deploy and run pending migrations. This will work similarly to the `deploy' task, but will also run any pending migrations (via the `deploy:migrate' task) prior to updating the symlink. Note that the update in this case it is not atomic, and transactions are not used, because migrations are not guaranteed to be reversible.
87
+
88
+
89
+
90
+ h3(#deploy:restart). deploy:restart
91
+
92
+
93
+
94
+
95
+
96
+ h3(#deploy:rollback). deploy:rollback
97
+
98
+ Rolls back to a previous version and restarts. This is handy if you ever discover that you've deployed a lemon; `cap rollback' and you're right back where you were, on the previously deployed version.
99
+
100
+
101
+
102
+ h3(#deploy:rollback_code). deploy:rollback_code
103
+
104
+ Rolls back to the previously deployed version. The `current' symlink will be updated to point at the previously deployed version, and then the current release will be removed from the servers. You'll generally want to call `rollback' instead, as it performs a `restart' as well.
105
+
106
+
107
+
108
+ h3(#deploy:setup). deploy:setup
109
+
110
+ Prepares one or more servers for deployment. Before you can use any of the Capistrano deployment tasks with your project, you will need to make sure all of your servers have been prepared with `cap setup'. When you add a new server to your cluster, you can easily run the setup task on just that server by specifying the HOSTS environment variable:
111
+
112
+ $ cap HOSTS=new.server.com setup
113
+
114
+ It is safe to run this task on servers that have already been set up; it will not destroy any deployed revisions or data.
115
+
116
+
117
+
118
+ h3(#deploy:start). deploy:start
119
+
120
+
121
+
122
+
123
+
124
+ h3(#deploy:stop). deploy:stop
125
+
126
+
127
+
128
+
129
+
130
+ h3(#deploy:symlink). deploy:symlink
131
+
132
+ Updates the symlink to the most recently deployed version. Capistrano works by putting each new release of your application in its own directory. When you deploy a new version, this task's job is to update the `current' symlink to point at the new version. You will rarely need to call this task directly; instead, use the `deploy' task (which performs a complete deploy, including `restart') or the 'update' task (which does everything except `restart').
133
+
134
+
135
+
136
+ h3(#deploy:update). deploy:update
137
+
138
+ Copies your project and updates the symlink. It does this in a transaction, so that if either `update_code' or `symlink' fail, all changes made to the remote servers will be rolled back, leaving your system in the same state it was in before `update' was invoked. Usually, you will want to call `deploy' instead of `update', but `update' can be handy if you want to deploy, but not immediately restart your application.
139
+
140
+
141
+
142
+ h3(#deploy:update_code). deploy:update_code
143
+
144
+ Copies your project to the remote servers. This is the first stage of any deployment; moving your updated code and assets to the deployment servers. You will rarely call this task directly, however; instead, you should call the `deploy' task (to do a complete deploy) or the `update' task (if you want to perform the `restart' task separately).
145
+
146
+ You will need to make sure you set the :scm variable to the source control software you are using (it defaults to :subversion), and the :deploy_via variable to the strategy you want to use to deploy (it defaults to :checkout).
147
+
148
+
149
+
150
+ h3(#deploy:upload). deploy:upload
151
+
152
+ Copy files to the currently deployed version. This is useful for updating files piecemeal, such as when you need to quickly deploy only a single file. Some files, such as updated templates, images, or stylesheets, might not require a full deploy, and especially in emergency situations it can be handy to just push the updates to production, quickly.
153
+
154
+ To use this task, specify the files and directories you want to copy as a comma-delimited list in the FILES environment variable. All directories will be processed recursively, with all files being pushed to the deployment servers. Any file or directory starting with a '.' character will be ignored.
155
+
156
+ $ cap deploy:upload FILES=templates,controller.rb
157
+
158
+
159
+
@@ -0,0 +1,26 @@
1
+ h1. docs
2
+
3
+ "home":../index.html > "recipes":index.html > docs
4
+
5
+
6
+ h2. Tasks
7
+
8
+ * "docs:recipes":#docs:recipes
9
+
10
+
11
+ h2. Task documentation
12
+
13
+ h3(#docs:recipes). docs:recipes
14
+
15
+ Generate documentation for all currently loaded recipes. Assumes textile formatting.
16
+
17
+ *docs_recipes_dir*: Destination directory. _Defaults to "docs/recipes"_
18
+
19
+ @set :docs_recipes_dir, "docs/recipes"@
20
+
21
+ *docs_recipes_clear*: Whether to clear destination before generating.
22
+
23
+ @set :docs_recipes_clear, true@
24
+
25
+
26
+
@@ -0,0 +1,20 @@
1
+ h1. imagemagick:centos
2
+
3
+ "home":../index.html > "recipes":index.html > "imagemagick":imagemagick.html > centos
4
+
5
+
6
+ h2. Tasks
7
+
8
+ * "imagemagick:centos:install":#imagemagick:centos:install
9
+
10
+
11
+ h2. Task documentation
12
+
13
+ h3(#imagemagick:centos:install). imagemagick:centos:install
14
+
15
+ Install imagemagick.
16
+
17
+ *imagemagick_build_options*: Imagemagick build options.
18
+
19
+
20
+
@@ -0,0 +1,8 @@
1
+ h1. imagemagick
2
+
3
+ "home":../index.html > "recipes":index.html > imagemagick
4
+
5
+
6
+ h2. Namespaces
7
+
8
+ * "imagemagick:centos":imagemagick-centos.html (1)
@@ -0,0 +1,26 @@
1
+ h1. Recipes
2
+
3
+ "home":../index.html > "recipes":index.html >
4
+
5
+
6
+ h2. Namespaces
7
+
8
+ * "centos":centos.html (1)
9
+ * "deploy":deploy.html (17)
10
+ * "deploy:pending":deploy-pending.html (2)
11
+ * "deploy:web":deploy-web.html (2)
12
+ * "docs":docs.html (1)
13
+ * "imagemagick:centos":imagemagick-centos.html (1)
14
+ * "memcached":memcached.html (1)
15
+ * "memcached:centos":memcached-centos.html (1)
16
+ * "mongrel_cluster":mongrel_cluster.html (1)
17
+ * "mongrel_cluster:centos":mongrel_cluster-centos.html (1)
18
+ * "monit:centos":monit-centos.html (1)
19
+ * "mysql":mysql.html (2)
20
+ * "mysql:centos":mysql-centos.html (1)
21
+ * "nginx":nginx.html (2)
22
+ * "nginx:centos":nginx-centos.html (2)
23
+ * "rails":rails.html (5)
24
+ * "ruby:centos":ruby-centos.html (1)
25
+ * "sphinx":sphinx.html (5)
26
+ * "sphinx:centos":sphinx-centos.html (2)
@@ -0,0 +1,32 @@
1
+ h1. memcached:centos
2
+
3
+ "home":../index.html > "recipes":index.html > "memcached":memcached.html > centos
4
+
5
+
6
+ h2. Tasks
7
+
8
+ * "memcached:centos:install":#memcached:centos:install
9
+
10
+
11
+ h2. Task documentation
12
+
13
+ h3(#memcached:centos:install). memcached:centos:install
14
+
15
+ Install memcached.
16
+
17
+ *memcached_build_options*: Memcached build options.
18
+
19
+ *memcached_memory*: Memcached memory (in MB).
20
+
21
+ @set :memcached_memory, 64@
22
+
23
+ *memcached_pid_path*: Path to memcached pid file. Defaults to /var/run/memcached.pid
24
+
25
+ @set :memcached_pid_path, "/var/run/memcached.pid"@
26
+
27
+ *memcached_port*: Memcached port. Defaults to 11211.
28
+
29
+ @set :memcached_port, 11211@
30
+
31
+
32
+
@@ -0,0 +1,35 @@
1
+ h1. memcached
2
+
3
+ "home":../index.html > "recipes":index.html > memcached
4
+
5
+
6
+ h2. Namespaces
7
+
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
+
@@ -0,0 +1,27 @@
1
+ h1. mongrel_cluster:centos
2
+
3
+ "home":../index.html > "recipes":index.html > "mongrel_cluster":mongrel_cluster.html > centos
4
+
5
+
6
+ h2. Tasks
7
+
8
+ * "mongrel_cluster:centos:setup":#mongrel_cluster:centos:setup
9
+
10
+
11
+ h2. Task documentation
12
+
13
+ h3(#mongrel_cluster:centos:setup). mongrel_cluster:centos:setup
14
+
15
+ Create mongrel cluster.
16
+
17
+ *mongrel_size*: Number of mongrels.
18
+
19
+ @set :mongrel_size, 3@
20
+
21
+ *mongrel_port*: Starting port for mongrels. If there are 3 mongrels with port 9000,
22
+ then instances will be at 9000, 9001, and 9002
23
+
24
+ @set :mongrel_port, 9000@
25
+
26
+
27
+