<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/recipes/centos/README</filename>
    </added>
    <added>
      <filename>lib/recipes/centos/centos.rb</filename>
    </added>
    <added>
      <filename>lib/recipes/centos/imagemagick.rb</filename>
    </added>
    <added>
      <filename>lib/recipes/centos/memcached.rb</filename>
    </added>
    <added>
      <filename>lib/recipes/centos/mongrel_cluster.rb</filename>
    </added>
    <added>
      <filename>lib/recipes/centos/monit.rb</filename>
    </added>
    <added>
      <filename>lib/recipes/centos/mysql.rb</filename>
    </added>
    <added>
      <filename>lib/recipes/centos/nginx.rb</filename>
    </added>
    <added>
      <filename>lib/recipes/centos/ruby.rb</filename>
    </added>
    <added>
      <filename>lib/recipes/centos/sphinx.rb</filename>
    </added>
    <added>
      <filename>lib/templates/centos/setup_for_web.sh</filename>
    </added>
    <added>
      <filename>lib/templates/ruby/fix_openssl.sh</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,9 @@
+== 0.1.5 ?
+
+* Moving centos specific recipes into separate namespace
+* Plugin: script.make_install
+* Documentation and explicitly fetching vars (for install tasks), showing useful error messages
+
 == 0.1.4 2008-02-07
 
 * Using capistrano's plugin architecture instead of hacking around</diff>
      <filename>History.txt</filename>
    </modified>
    <modified>
      <diff>@@ -23,53 +23,51 @@ lib/capigen/recipes.yml
 lib/capigen/version.rb
 lib/profiles/centos-sick.rb
 lib/recipes/README
-lib/recipes/centos.rb
+lib/recipes/centos/README
+lib/recipes/centos/centos.rb
+lib/recipes/centos/imagemagick.rb
+lib/recipes/centos/memcached.rb
+lib/recipes/centos/mongrel_cluster.rb
+lib/recipes/centos/monit.rb
+lib/recipes/centos/mysql.rb
+lib/recipes/centos/nginx.rb
+lib/recipes/centos/ruby.rb
+lib/recipes/centos/sphinx.rb
 lib/recipes/deploy.rb
 lib/recipes/gems.rb
-lib/recipes/imagemagick.rb
 lib/recipes/install.rb
 lib/recipes/memcached.rb
 lib/recipes/mongrel_cluster.rb
-lib/recipes/monit.rb
 lib/recipes/mysql.rb
 lib/recipes/nginx.rb
 lib/recipes/packages.rb
 lib/recipes/rails.rb
-lib/recipes/ruby.rb
 lib/recipes/sphinx.rb
 lib/templates/capistrano/Capfile
 lib/templates/capistrano/deploy.rb.erb
-lib/templates/centos/setup.sh
+lib/templates/centos/setup_for_web.sh
 lib/templates/centos/sudoers
-lib/templates/imagemagick/install.sh
-lib/templates/memcached/install.sh
 lib/templates/memcached/memcached.initd.centos.erb
 lib/templates/memcached/memcached.monitrc.erb
 lib/templates/mongrel/mongrel_cluster.initd.erb
 lib/templates/mongrel/mongrel_cluster.monitrc.erb
 lib/templates/mongrel/mongrel_cluster.yml.erb
 lib/templates/monit/cert.sh
-lib/templates/monit/install.sh
 lib/templates/monit/monit.cnf
 lib/templates/monit/monit.initd.centos.erb
 lib/templates/monit/monitrc.erb
 lib/templates/monit/patch_inittab.sh
-lib/templates/mysql/install.sh.erb
 lib/templates/mysql/install_db.sql.erb
 lib/templates/mysql/mysql.monitrc.erb
-lib/templates/nginx/install.sh.erb
 lib/templates/nginx/nginx.conf.erb
 lib/templates/nginx/nginx.initd.erb
 lib/templates/nginx/nginx.monitrc.erb
 lib/templates/nginx/nginx_vhost.conf.erb
 lib/templates/rails/database.yml.erb
-lib/templates/ruby/ruby_install.sh
-lib/templates/ruby/rubygems_install.sh
-lib/templates/sphinx/install.sh.erb
+lib/templates/ruby/fix_openssl.sh
 lib/templates/sphinx/sphinx.conf.erb
 lib/templates/sphinx/sphinx.monitrc.erb
 lib/templates/sphinx/sphinx_app.initd.centos.erb
-lib/templates/sphinx/sphinx_app.initd.erb
 script/destroy
 script/generate
 script/txt2html</diff>
      <filename>Manifest.txt</filename>
    </modified>
    <modified>
      <diff>@@ -1,16 +1,27 @@
 = Capigen
 
-Capistrano recipes and templates.
+Capistrano plugins, recipes and templates.
 
 == Install recipes
 
-To install an application, use the install recipes; cap nginx:install
+To install an application, use the install recipes. For example:
+
+  cap nginx:install
+  
+Recipes may have settings that are required, or defaults that can be overriden. These are usually set in &quot;profiles&quot;.
 
 To install a group of applications based on a &quot;profile&quot;:
 
   cap install
 
-_You may need to comment out &quot;Defaults requiretty&quot; in /etc/sudoders on the image before capistrano recipes will work._
+&lt;em&gt;You may need to comment out &quot;Defaults requiretty&quot; in /etc/sudoders on the image before capistrano recipes will work.&lt;/em&gt;
+
+
+== Profiles
+
+Profiles store lists of recipes to run, and settings for those recipes.
+
+Profiles are capistrano configuration like a Capfile or deploy.rb. See capigen/lib/profiles for more info.
 
 
 == Generating a Capfile
@@ -26,7 +37,7 @@ If this is the first time you've deployed you'll need to run:
 
   cap deploy:setup
 
-Otherwise, your deploy options:
+Otherwise, your standard deploy options:
   
   cap deploy
 </diff>
      <filename>README.txt</filename>
    </modified>
    <modified>
      <diff>@@ -6,8 +6,8 @@ HighLine.track_eof = false
 
 $:.unshift File.dirname(__FILE__)
 
-module Capigen
- module Plugins
+module Capigen # :nodoc:
+ module Plugins # :nodoc:
  end  
 end
 </diff>
      <filename>lib/capigen.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,16 @@
-# Patch to add ability to clear sessions
+# Patch to add ability to clear sessions/connections.
 module Capistrano::Configuration::Connections
   
-  # Set the user to something new (but save the old user; reset_user will set it back)
+  # Set the user to something new (but save the old user; reset_user will set it back).
+  # Takes care of invalidating current connections. Will force a re-login.
+  # 
+  # ==== Options
+  # +new_user+:: User to become
+  #
+  # ==== Examples
+  #   set_user(&quot;nginx&quot;)
+  #   # Do something as user nginx
+  #
   def set_user(new_user)
     backup_user = fetch(:user)
     
@@ -12,14 +21,33 @@ module Capistrano::Configuration::Connections
     clear_sessions
   end
   
-  # Reset the old user
+  # Reset to the old user.
+  # Takes care of invalidating current connections. Will force a re-login.
+  # 
+  # ==== Examples
+  #   # User is &quot;root&quot;
+  #   set_user(&quot;nginx&quot;)
+  #   # Do something as user nginx
+  #   reset_user
+  #   # User is now root
+  #
   def reset_user
     set :user, @backup_user
     @backup_user = nil
     clear_sessions
   end
   
-  # Yields the previous user
+  # Yields the previous user.
+  #
+  # ==== Options
+  # +new_user+:: User to become
+  #
+  # ==== Examples
+  #   new_user(&quot;nginx&quot;) do |old_user|
+  #     # Do something as user nginx
+  #   end
+  #   # Now as user old_user
+  #
   def with_user(new_user, &amp;block)
     begin
       set_user(new_user)
@@ -31,7 +59,8 @@ module Capistrano::Configuration::Connections
     clear_sessions
   end
   
-  # Close all open session
+  # Close all open sessions.
+  # Will force user to re-login.
   def clear_sessions    
     sessions.each do |key, session|
       logger.info &quot;Closing: #{key}&quot;
@@ -41,7 +70,8 @@ module Capistrano::Configuration::Connections
     reset_password
   end
   
-  # Reset the password
+  # Reset the password.
+  # Display the current user that is asking for the password.
   def reset_password
     set :password, Proc.new {
       Capistrano::CLI.password_prompt(&quot;Password (for #{user}): &quot;)</diff>
      <filename>lib/capigen/cap_ext/connections.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,15 @@
-module Capistrano
-  class ExtensionProxy #:nodoc:
-    
-    # Allow include modules in plugins
-    def include(mod)
-      self.class.send(:include, mod)
-    end
-    
+class Capistrano::ExtensionProxy 
+  
+  # Allow ability to include modules in plugins.
+  #
+  # ==== Options
+  # +mod+:: Module
+  #
+  # ==== Examples
+  #   include Capigen::Plugins::Yum
+  #
+  def include(mod)
+    self.class.send(:include, mod)
   end
+  
 end
\ No newline at end of file</diff>
      <filename>lib/capigen/cap_ext/extension_proxy.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,9 @@
 require 'yaml'
 require 'highline'
 
-# Configuration
+# Application configuration for helping generate Capfile and deploy.rb.
+# This isn't used for recipes or profiles.
+#
 class Capigen::Config
   
   attr_accessor :application, :user, :deploy_to, :web_host
@@ -14,11 +16,24 @@ class Capigen::Config
   def initialize
   end
 
-  # Expose the binding
+  # Expose the binding.
   def get_binding
     binding
   end
   
+  # Ask for property.
+  # 
+  # ==== Options
+  # +message+:: Prompt
+  # +property+:: Property
+  # +options+:: Options
+  # - :default, Default value, defaults to nil
+  # - :answer_type, Highline answer type, defaults to String
+  # - :auto_apply, If true and property is set don't ask for it
+  #
+  # ==== Examples
+  #   ask(&quot;Database port: &quot;, &quot;db_port&quot;, { :default =&gt; 3306, :answer_type =&gt; Integer })
+  #
   def ask(message, property, options = {}, &amp;block)    
     # Options
     default = options[:default] || nil    
@@ -39,16 +54,22 @@ class Capigen::Config
     end
   end
   
+  # For property, set to value if blank.
   def set_default(property, value)
     v = send(property.to_sym)
     send(&quot;#{property}=&quot;, value) if v.blank?
   end
-  
+
+  # Save to yaml.
   def save(path)
     File.open(path, &quot;w&quot;) { |f| f.puts self.to_yaml }
   end
   
-  # Build config from asking
+  # Build config from asking.
+  # 
+  # ==== Options
+  # +auto_apply+:: For values, if set, then don't ask for it
+  #
   def ask_all(auto_apply = false)
     
     options = { :auto_apply =&gt; auto_apply }</diff>
      <filename>lib/capigen/config.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,14 +1,10 @@
 require 'erb'
 require 'yaml'
 
-# == Recipe helpers
-#
-# * Loads the configuration 
-# * Generates files from templates
-#
+# Capigen base capistrano plugin
 module Capigen::Plugins::Base
   
-  # Project root (for rails)
+  # Project root
   def root
     if respond_to?(:fetch)
       return fetch(:project_root)</diff>
      <filename>lib/capigen/plugins/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,13 +1,13 @@
 module Capigen::Plugins::Gem
   
-  # Installl a gem.
+  # Install a gem.
   #
   # ==== Options
   # +gems+:: List of gem names, or a single gem
   #
-  # ==== Examples
-  #   install(&quot;raspell&quot;) 
-  #   install([ &quot;raspell&quot;, &quot;foo&quot; ])
+  # ==== Examples (in capistrano task)
+  #   gemc.install(&quot;raspell&quot;) 
+  #   gemc.install([ &quot;raspell&quot;, &quot;foo&quot; ])
   #
   def install(gems)
     # If a single object, wrap in array</diff>
      <filename>lib/capigen/plugins/gem.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,16 @@
 module Capigen::Plugins::Package
   
-  # Setup packager
+  # Setup packager.
   #
   # ==== Options
-  # +packager+:: Packager type (:yum)
+  # +packager_type+:: Packager type (:yum)
+  #
+  # ==== Examples (in capistrano task)
+  #   package.type = :yum
+  #   package.install [ &quot;aspell&quot;, &quot;foo&quot; ]
+  #   package.remove [ &quot;aspell&quot;, &quot;foo&quot; ]
+  #   package.update [ &quot;aspell&quot;, &quot;foo&quot; ]
+  #   package.clean
   #
   def type=(packager_type)
     case packager_type.to_sym</diff>
      <filename>lib/capigen/plugins/package.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,10 +2,20 @@ module Capigen::Plugins::Profiles
   
   ProfileDir = File.dirname(__FILE__) + &quot;/../../profiles&quot;
   
+  # Load all profile recipes with prefix.
+  #
+  # ==== Options
+  # +prefix+:: Prefix to filter/search on
+  #  
   def recipes(prefix = &quot;&quot;)
     Dir[ProfileDir + &quot;/#{prefix}*.rb&quot;].collect { |file| File.basename(file).gsub(File.extname(file), &quot;&quot;) }
   end
   
+  # Choose a profile (via command line).
+  # 
+  # ==== Options
+  # +prefix+:: Prefix to filter/search on
+  #
   def choose(prefix = &quot;&quot;)
     profile = HighLine.new.choose(*recipes(prefix)) do |menu|
       menu.header = &quot;Choose recipe profile&quot;
@@ -14,17 +24,45 @@ module Capigen::Plugins::Profiles
     &quot;#{ProfileDir}/#{profile}.rb&quot;
   end
   
-  # More helpful fetch
-  def get(var)
+  # Fetch the profile, see local gem Capfile for implementation details.
+  def ask
+    fetch(:profile)
+  end
+  
+  # Fetch and raise useful error if value is not set.
+  #
+  # ===== Options
+  # +var+:: Variable to fetch
+  # +message+:: Raise custom message (like usage info)
+  #  
+  def get(var, message = nil)
     begin
       result = fetch(var.to_sym)
     rescue
-      puts &lt;&lt;-EOS
+      if message.blank?
+        message = &lt;&lt;-EOS
+      
+        Please set :#{var} variable in your Capfile or profile.
       
-      Please set :#{var} variable in your Capfile or profile.
+        EOS
+      end
       
-      EOS
-      raise &quot;Please set :#{var} in your Capfile or profile.&quot;
+      raise &quot;\n#{message}&quot;
+    end
+    result
+  end
+  
+  # Fetch and return default if value not set.
+  #
+  # ==== Options
+  # +var+:: Variable to fetch
+  # +default+:: Result to return if variable not set
+  #
+  def get_or_default(var, default)
+    begin
+      result = fetch(var.to_sym)
+    rescue
+      result = default
     end
     result
   end</diff>
      <filename>lib/capigen/plugins/profiles.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,20 +1,65 @@
 module Capigen::Plugins::Script
   
-  # Install (sh) script
+  # Configure, make, make install.
   #
   # ==== Options
-  # +script+:: Name of file (relative to templates dir) 
-  # +files_to_put+:: List of files to upload [ { :file =&gt; &quot;foo/bar.txt&quot;, :dest &quot;/tmp/bar.txt&quot; }, ... ]
+  # +name+:: Name for app
+  # +options+:: Options 
+  # - +build_dest+:: Place to build from, ex. /usr/src, defaults to /tmp/name
+  # - +url+:: URL to download package from
+  # - +configure_options+:: Options for ./configure
+  # - +unpack_dir+:: Directory that is unpacked from tgz (if not matching the file name)
   #
-  def install(script, files_to_put = [], override_binding = nil)
+  # ==== Examples (in capistrano task)
+  #   script.make_install(&quot;nginx&quot;, { :url =&gt; &quot;http://sysoev.ru/nginx/nginx-0.5.35.tar.gz&quot;, ... })
+  #
+  def make_install(name, options)
+    install(name, options) do 
+      configure_options = options[:configure_options] || &quot;&quot;
+      sudo &quot;echo 'Configuring #{name}...' &amp;&amp; ./configure #{configure_options} &gt; configure.log&quot;
+      sudo &quot;echo 'Compiling #{name}...' &amp;&amp; make &gt; make.log&quot;
+      sudo &quot;echo 'Installing #{name}...' &amp;&amp; make install &gt; make_install.log&quot;        
+    end
+  end
+  
+  # Download, unpack and yield.
+  # 
+  # ==== Options
+  # +name+:: Name for app
+  # +options+:: Options
+  # - +build_dest+:: Place to build from, ex. /usr/src, defaults to /tmp/name
+  # - +url+:: URL to download package from
+  # 
+  # ==== Examples (in capistrano task)
+  #   script.make(&quot;rubygems&quot;, { :url =&gt; :url =&gt; &quot;http://rubyforge.org/frs/download.php/29548/rubygems-1.0.1.tgz&quot; }) do 
+  #     sudo &quot;ruby setup.rb&quot;
+  #   end
+  #
+  def install(name, options, &amp;block)
+    build_dest = options[:build_dest]
+    build_dest ||= &quot;/tmp/#{name}&quot;
+    url = options[:url]    
+    dependencies = options[:dependencies]
     
-    files_to_put = [ files_to_put ] if files_to_put.is_a?(Hash)
+    package.install(dependencies) if dependencies
     
-    files_to_put.each do |file_info|
-      data = template.load(file_info[:file], override_binding || binding)
-      put data, file_info[:dest]
-    end
+    unpack(url, build_dest, options[:clean], options[:unpack_dir]) do 
+      yield if block_given?
+    end      
+  end
     
+  
+  # Run (sh) script. If script has .erb extension it will evaluate it.
+  #
+  # ==== Options
+  # +script+:: Name of sh file (relative to templates dir)
+  # +override_binding++:: Binding to override, otherwise defaults to current (task) context
+  #
+  # ==== Examples
+  #   script.sh(&quot;ruby/openssl_fix.sh&quot;)
+  #
+  def sh(script, override_binding = nil)
+        
     if File.extname(script) == &quot;.erb&quot;
       name = script[0...script.length-4]
       dest = &quot;/tmp/#{name}&quot;
@@ -34,6 +79,33 @@ module Capigen::Plugins::Script
     sudo &quot;rm -rf #{File.dirname(dest)}&quot;    
   end
   
+  # Download and unpack URL.
+  #
+  # ==== Options
+  # +url+:: URL to download
+  # +dest+:: Destination directory
+  # +clean+:: If true will remove the unpacked directory
+  # +unpack_dir+:: Directory that is unpacked from tgz (if not matching the file name)
+  #
+  # ==== Examples
+  #   script.unpack(&quot;http://rubyforge.org/frs/download.php/29548/rubygems-1.0.1.tgz&quot;, &quot;/tmp/rubygems&quot;) do
+  #     sudo &quot;ruby setup.rb&quot;
+  #   end
+  #
+  def unpack(url, dest, clean = true, unpack_dir = nil, &amp;block)        
+    file = url.split(&quot;/&quot;).last
+    unpack_dir ||= file.gsub(/\.tar\.gz|tgz/, &quot;&quot;)
+    
+    sudo &quot;mkdir -p #{dest} &amp;&amp; cd #{dest} &amp;&amp; wget -nv #{url}&quot;
+    sudo &quot;tar xzf #{file} &amp;&amp; cd #{unpack_dir}&quot;
+    
+    if block_given?
+      yield 
+      sudo &quot;rm -f #{dest}/#{file}&quot;
+      sudo &quot;rm -rf #{unpack_dir}&quot; if clean
+    end
+  end
+  
 end
 
 Capistrano.plugin :script, Capigen::Plugins::Script
\ No newline at end of file</diff>
      <filename>lib/capigen/plugins/script.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,11 +1,17 @@
 module Capigen::Plugins::Templates
   
-  # Root of templates path
+  # Get the absolute base templates path.
   def gem_templates_root
     File.expand_path(File.dirname(__FILE__) + &quot;/../../templates&quot;)
   end
   
-  # Get full template path
+  # Get full template path from relative path.
+  #
+  # Something like &lt;tt&gt;monit/monit.cnf =&gt; /usr/lib/..../capigen/lib/templates/monit/monit.cnf&lt;/tt&gt;.
+  #
+  # ==== Options 
+  # +template_path+:: Relative path
+  #
   def gem_template_path(template_path)
     File.join(gem_templates_root, template_path)
   end
@@ -14,7 +20,11 @@ module Capigen::Plugins::Templates
   # 
   # ==== Options
   # +path+:: If starts with '/', absolute path, otherwise relative path to templates dir
-  # +binding+:: Binding
+  # +override_binding+:: Binding to override, otherwise uses current (task) binding
+  #
+  # ==== Examples
+  #   template.load(&quot;memcached/memcached.monitrc.erb&quot;)
+  #   put template.load(&quot;memcached/memcached.monitrc.erb&quot;), &quot;/tmp/memcached.monitrc&quot;
   #
   def load(path, override_binding = nil)
     template_paths = [ path, gem_template_path(path) ]
@@ -41,7 +51,17 @@ module Capigen::Plugins::Templates
     data
   end
   
-  # Load template from project
+  # Load template from project.
+  # If extension is erb will be evaluated with binding.
+  # 
+  # ==== Options
+  # +path+:: If starts with '/', absolute path, otherwise relative path to templates dir
+  # +override_binding+:: Binding to override, otherwise uses current (task) binding
+  #
+  # ==== Examples
+  #   template.project(&quot;config/templates/sphinx.conf.erb&quot;)
+  #   put template.project(&quot;config/templates/sphinx.conf.erb&quot;), &quot;#{shared_path}/config/sphinx.conf&quot;
+  #
   def project(path, override_binding = nil)
     load(project_root + &quot;/&quot; + path, override_binding || binding)
   end
@@ -50,7 +70,14 @@ module Capigen::Plugins::Templates
   #
   # ==== Options
   # +template_path+:: Path to template relative to templates path
+  # +binding+:: Binding
+  # +dest_path+:: Local destination path to write to
+  # +overwrite+:: Force overwrite
+  # +verbose+:: Verbose output
   #
+  # ==== Examples
+  #   template.write(&quot;config/templates/sphinx.conf.erb&quot;, binding, &quot;config/sphinx.conf&quot;)
+  #  
   def write(template_path, binding, dest_path, overwrite = false, verbose = true)    
     # This is gnarly!
     relative_dest_path = Pathname.new(File.expand_path(dest_path)).relative_path_from(Pathname.new(File.expand_path(&quot;.&quot;)))  </diff>
      <filename>lib/capigen/plugins/templates.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@ module Capigen::Plugins::Wget
   # 
   # ==== Options
   # +uri+:: URI to get
-  # +remote_dest_dir+:: Remote destination directory
+  # +remote_dest_dir+:: Remote destination directory, defaults to /tmp
   #
   def uri(uri, remote_dest_dir = &quot;/tmp&quot;)
     </diff>
      <filename>lib/capigen/plugins/wget.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,18 +1,54 @@
 # Packages must respond to update, remove, install and clean
 module Capigen::Plugins::Yum
   
-  # Update all installed packages
+  # Update all installed packages.
+  #
+  # ==== Options
+  # +packages+:: Packages to update, or empty to update all
+  #
+  # ==== Examples
+  #   yum.update
+  #   yum.update([ &quot;aspell&quot; ])
+  #
+  # Also can use package plugin with package.type = :yum, and then:
+  #   package.update
+  #   package.update([ &quot;aspell&quot; ])
+  #
   def update(packages = [])
     sudo &quot;yum -y update #{packages.join(&quot; &quot;)}&quot;
   end
     
   # Remove via yum.
+  #
+  # ==== Options
+  # +packages+:: Packages to remove
+  #
+  # ==== Examples
+  #   yum.remove
+  #   yum.remove([ &quot;aspell&quot; ])
+  #
+  # Also can use package plugin with package.type = :yum, and then:
+  #   package.remove
+  #   package.remove([ &quot;aspell&quot; ])
+  #  
   def remove(packages)
     sudo &quot;yum -y remove #{packages.join(&quot; &quot;)}&quot;    
   end
   
   # Install via yum.
-  # If package already exists, it will be updated (unless update_existing = false).
+  # 
+  # ==== Options
+  # +packages+:: Packages to install, either String (for single package) or Array
+  # +update_existing+:: If package exists, where to yum update it, defaults to true
+  #  
+  # ==== Examples
+  #   yum.install
+  #   yum.install([ &quot;aspell&quot; ])
+  #
+  # Also can use package plugin with package.type = :yum, and then:
+  #   package.install
+  #   package.install([ &quot;aspell&quot; ])
+  #    
   def install(packages, update_existing = true)    
     
     # If a single object, wrap in array
@@ -34,7 +70,14 @@ module Capigen::Plugins::Yum
     sudo &quot;yum -y install #{packages.join(&quot; &quot;)}&quot; unless packages.blank?
   end
   
-  # Clean yum
+  # Clean yum.
+  #
+  # ==== Examples
+  #   yum.clean
+  #
+  # Also can use package plugin with package.type = :yum, and then:
+  #   package.clean
+  #
   def clean
     sudo &quot;yum -y clean all&quot;
   end</diff>
      <filename>lib/capigen/plugins/yum.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ module Capigen #:nodoc:
   module VERSION #:nodoc:
     MAJOR = 0
     MINOR = 1
-    TINY  = 4
+    TINY  = 5
 
     STRING = [MAJOR, MINOR, TINY].join('.')
   end</diff>
      <filename>lib/capigen/version.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,17 +2,17 @@ set :namespace, &quot;centos&quot;
 set :description, &quot;Install based on default centos 5.1 image&quot;
 
 set :recipes, [ 
-  &quot;centos:setup&quot;,
+  &quot;centos:setup_for_web&quot;,
   &quot;packages:install&quot;,
-  &quot;ruby:install&quot;, 
-  &quot;nginx:install&quot;, 
+  &quot;centos:ruby:install&quot;, 
+  &quot;centos:nginx:install&quot;, 
   &quot;nginx:install_monit&quot;, 
-  &quot;mysql:install&quot;, 
+  &quot;centos:mysql:install&quot;, 
   &quot;mysql:install_monit&quot;, 
-  &quot;sphinx:install&quot;, 
-  &quot;monit:install&quot;,
-  &quot;imagemagick:install&quot;, 
-  &quot;memcached:install&quot;, 
+  &quot;centos:sphinx:install&quot;, 
+  &quot;centos:monit:install&quot;,
+  &quot;centos:imagemagick:install&quot;, 
+  &quot;centos:memcached:install&quot;, 
   &quot;memcached:install_monit&quot;, 
   &quot;gems:install&quot;, 
   &quot;centos:cleanup&quot; 
@@ -22,6 +22,7 @@ set :recipes, [
 # Settings for recipes
 #
 
+# For packages:install
 set :packages, { 
   :type =&gt; &quot;yum&quot;,
   :remove =&gt; [ &quot;openoffice.org-*&quot;, &quot;ImageMagick&quot; ],
@@ -29,16 +30,10 @@ set :packages, {
   &quot;gcc&quot;, &quot;kernel-devel&quot;, &quot;libevent-devel&quot;, &quot;libxml2-devel&quot;, 
   &quot;openssl&quot;, &quot;openssl-devel&quot;,
   &quot;aspell&quot;, &quot;aspell-devel&quot;, &quot;aspell-en&quot;, &quot;aspell-es&quot;,
-  &quot;zlib&quot;, &quot;zlib-devel&quot;, 
-  &quot;gcc-c++&quot;, 
-  &quot;pcre-devel&quot;, 
-  &quot;mysql&quot;, &quot;mysql-devel&quot;, &quot;mysql-server&quot;,
-  &quot;flex&quot;, &quot;byacc&quot;, 
-  &quot;libjpeg-devel&quot;, &quot;libpng-devel&quot;, &quot;glib2-devel&quot;, &quot;fontconfig-devel&quot;, &quot;libwmf-devel&quot;, &quot;freetype-devel&quot;,
-    &quot;libtiff-devel&quot;
   ]
 }
   
+# For gem:install
 set :gem_list, [ 
   &quot;rake&quot;, 
   &quot;mysql -- --with-mysql-include=/usr/include/mysql --with-mysql-lib=/usr/lib/mysql --with-mysql-config&quot;, 
@@ -49,25 +44,25 @@ set :gem_list, [
   &quot;json&quot;
 ]
 
-# Monit
+# For monit:install
 set :monit_port, 2812 # Capistrano::CLI.ui.ask('Monit port: ')
 set :monit_password, Proc.new { Capistrano::CLI.ui.ask('Monit admin password (to set): ') }
 
-# For nginx
+# For nginx:install
 set :nginx_bin_path, &quot;/sbin/nginx&quot;
 set :nginx_conf_path, &quot;/etc/nginx/nginx.conf&quot;
 set :nginx_pid_path, &quot;/var/run/nginx.pid&quot;
 set :nginx_prefix_path, &quot;/var/nginx&quot;
 
-# Mysql
+# For mysql:install
 set :mysql_admin_password, Proc.new { Capistrano::CLI.ui.ask('Mysql admin password (to set): ') }
 set :mysql_pid_path, &quot;/var/run/mysqld/mysqld.pid&quot;
 set :db_port, 3306 # Capistrano::CLI.ui.ask('Mysql port: ')
 
-# Sphinx
+# For sphinx:install
 set :sphinx_prefix, &quot;/usr/local/sphinx&quot;
 
-# Memcached
+# For memcached:install
 set :memcached_pid_path, &quot;/var/run/memcached.pid&quot;
 set :memcached_memory, 64
 set :memcached_port, 11211</diff>
      <filename>lib/profiles/centos-sick.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,12 +1,5 @@
 = Recipes
-
-Install tasks are one time tasks (per image).
-
-Setup tasks are one time tasks (per application).
-
-Update code tasks are called after each deploy (per application).
-
-
-The bootstrap/patch.rb is not a recipe but is to include Capigen helpers for use within recipes.
-
-Scripts and templates are in ./templates
\ No newline at end of file
+* Install tasks are one time tasks (per OS).
+* Setup tasks are one time tasks (per application).
+* Update code tasks are called after each deploy (per application).
+* Scripts and templates are in capigen/lib/templates.
\ No newline at end of file</diff>
      <filename>lib/recipes/README</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,6 @@
 # Override default deploy tasks here (using Monit). 
-# If not using monit, use service start/stop, #sudo &quot;/sbin/service mongrel_cluster_#{application} restart&quot;     
+# If not using monit, use service start/stop:
+#   sudo &quot;/sbin/service mongrel_cluster_#{application} restart&quot;     
 namespace :deploy do
   
   task :restart, :roles =&gt; :web do     </diff>
      <filename>lib/recipes/deploy.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,17 @@ namespace :gems do
   
   desc &quot;Install gems&quot;
   task :install do    
-    gem_list = profile.get(:gem_list)
+    gem_list = profile.get(:gem_list, &lt;&lt;-EOS)
+    
+      To use this recipe, set the :gem_list variable (in a profile, Capfile or deploy.rb), for example:
+      
+      set :gem_list, [ 
+        &quot;rake&quot;, 
+        &quot;mysql -- --with-mysql-include=/usr/include/mysql --with-mysql-lib=/usr/lib/mysql --with-mysql-config&quot;, 
+        &quot;raspell&quot; 
+      ]
+    
+    EOS
     
     gemc.install(gem_list)
   end</diff>
      <filename>lib/recipes/gems.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,7 +2,7 @@ namespace :install do
   
   task :default do
     # Choose profile, and load capistrano settings
-    fetch(:profile)
+    profile.ask
         
     # These run after install task and install all the apps
     recipes.each do |task_name|</diff>
      <filename>lib/recipes/install.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,5 @@
 namespace :memcached do
   
-  desc &quot;Install memcached&quot;
-  task :install do
-    script.install(&quot;memcached/install.sh&quot;, :file =&gt; &quot;memcached/memcached.initd.centos.erb&quot;, :dest =&gt; &quot;/tmp/memcached.initd&quot;)   
-  end
-
   desc &quot;Install memcached monit hooks&quot;
   task :install_monit do
     put template.load(&quot;memcached/memcached.monitrc.erb&quot;, binding), &quot;/tmp/memcached.monitrc&quot;    </diff>
      <filename>lib/recipes/memcached.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,27 +1,6 @@
 # Create init script
 namespace :mongrel_cluster do
-  
-  after &quot;mongrel_cluster:setup&quot;, &quot;mongrel_cluster:setup_monit&quot;
-    
-  desc &quot;Create mongrel cluster&quot;
-  task :setup do 
-    run &quot;mkdir -p #{shared_path}/config&quot;
-    
-    # Mongrel cluster config needs its own config directory
-    mongrel_config_path = &quot;#{shared_path}/config/mongrel&quot; 
-    run &quot;mkdir -p #{mongrel_config_path}&quot;
-    
-    pid_path = &quot;#{shared_path}/pids&quot;
-    
-    put template.load(&quot;mongrel/mongrel_cluster.initd.erb&quot;, binding), &quot;/tmp/mongrel_cluster_#{application}.initd&quot;    
-    put template.load(&quot;mongrel/mongrel_cluster.yml.erb&quot;, binding), &quot;#{mongrel_config_path}/mongrel_cluster.yml&quot;
-    
-    # Setup the mongrel_cluster init script
-    sudo &quot;install -o root /tmp/mongrel_cluster_#{application}.initd /etc/init.d/mongrel_cluster_#{application}&quot;
-        
-    sudo &quot;/sbin/chkconfig --level 345 mongrel_cluster_#{application} on&quot;
-  end
-  
+
   desc &quot;Create monit configuration for mongrel cluster&quot;
   task :setup_monit do
     </diff>
      <filename>lib/recipes/mongrel_cluster.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,19 +1,29 @@
 # Mysql recipes
 namespace :mysql do
   
-  desc &quot;Install mysql&quot;
-  task :install do    
-    script.install(&quot;mysql/install.sh.erb&quot;)
-  end
-  
   desc &quot;Install mysql monit hooks&quot;
   task :install_monit do
+    
+    # Settings 
+    mysql_pid_path = profile.get_or_default(:mysql_pid_path, &quot;/var/run/mysqld/mysqld.pid&quot;)
+    db_port = profile.get_or_default(:db_port, 3306)    
+    
     put template.load(&quot;mysql/mysql.monitrc.erb&quot;, binding), &quot;/tmp/mysql.monitrc&quot;    
     sudo &quot;install -o root /tmp/mysql.monitrc /etc/monit/mysql.monitrc&quot;
   end
   
   desc &quot;Create database user, and database with appropriate permissions&quot;
   task :setup do    
+    
+    # Settings
+    db_name = profile.get(:db_name)
+    db_user = profile.get(:db_user)
+    db_pass = profile.get(:db_pass) 
+    web_host = profile.get(:web_host)
+    db_host = profile.get(:db_host)
+    mysql_admin_password = profile.get_or_default(:mysql_admin_password, 
+      Proc.new { Capistrano::CLI.ui.ask('Mysql admin password: ') })
+    
     # Add localhost to grant locations
     locations_for_grant = [ &quot;localhost&quot;, web_host, db_host ]
     </diff>
      <filename>lib/recipes/mysql.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,20 +4,12 @@ namespace :nginx do
   # Callbacks
   after &quot;nginx:setup&quot;, &quot;nginx:restart&quot;
     
-  desc &quot;Install nginx, conf, initscript, nginx user and service&quot;
-  task :install do
-    # Dependencies: &quot;pcre-devel&quot;, &quot;openssl&quot;, &quot;openssl-devel&quot;
-
-    files = [ 
-      { :file =&gt; &quot;nginx/nginx.initd.erb&quot;, :dest =&gt; &quot;/tmp/nginx.initd&quot; },
-      { :file =&gt; &quot;nginx/nginx.conf.erb&quot;, :dest =&gt; &quot;/tmp/nginx.conf&quot; }
-    ]
-    
-    script.install(&quot;nginx/install.sh.erb&quot;, files, binding)
-  end
-  
   desc &quot;Install nginx monit hooks&quot;
   task :install_monit do
+    
+    # Settings
+    nginx_pid_path = profile.get_or_default(:nginx_pid_path, &quot;/var/run/nginx.pid&quot;)
+    
     put template.load(&quot;nginx/nginx.monitrc.erb&quot;, binding), &quot;/tmp/nginx.monitrc&quot;    
     sudo &quot;install -o root /tmp/nginx.monitrc /etc/monit/nginx.monitrc&quot;
   end</diff>
      <filename>lib/recipes/nginx.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,20 @@
 namespace :packages do
   
+  desc &quot;Packages to install&quot;
   task :install do
     
     # Settings
-    packages = profile.get(:packages)
+    packages = profile.get(:packages, &lt;&lt;-EOS)
+      
+      To use this recipe, set the :packages variable (in a profile, Capfile or deploy.rb), for example:
+      
+      set :packages, { 
+        :type =&gt; &quot;yum&quot;,
+        :remove =&gt; [ &quot;openoffice.org-*&quot;, &quot;ImageMagick&quot; ],
+        :add =&gt; [ &quot;gcc&quot;, &quot;kernel-devel&quot;, &quot;libevent-devel&quot;, &quot;libxml2-devel&quot; ]
+      }
+      
+    EOS
     
     packages_to_remove = packages[:remove]
     packages_to_add = packages[:add]</diff>
      <filename>lib/recipes/packages.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,30 +1,6 @@
 # Sphinx recipes
 namespace :sphinx do
   
-  after &quot;sphinx:setup&quot;, &quot;sphinx:setup_monit&quot;
-  
-  desc &quot;Install sphinx&quot;
-  task :install do 
-    # Dependencies: gcc-c++
-    script.install(&quot;sphinx/install.sh.erb&quot;)
-  end
-  
-  desc &quot;Setup sphinx for application&quot;
-  task :setup do 
-    
-    sphinx_bin_path = &quot;#{sphinx_prefix}/bin&quot;
-    sphinx_conf_path = &quot;#{shared_path}/config/sphinx.conf&quot;
-    sphinx_pid_path = &quot;#{shared_path}/pids/searchd.pid&quot;
-    
-    put template.load(&quot;sphinx/sphinx_app.initd.centos.erb&quot;), &quot;/tmp/sphinx.initd&quot;
-
-    sudo &quot;install -o root /tmp/sphinx.initd /etc/init.d/sphinx_#{application}&quot;
-    
-    sudo &quot;/sbin/chkconfig --level 345 sphinx_#{application} on&quot;    
-    
-    run &quot;mkdir -p #{shared_path}/var/index&quot;    
-  end
-  
   desc &quot;Create monit configuration for sphinx&quot;
   task :setup_monit do    
     sphinx_pid_path = &quot;#{shared_path}/pids/searchd.pid&quot;</diff>
      <filename>lib/recipes/sphinx.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,7 @@
   &lt;link rel=&quot;stylesheet&quot; href=&quot;stylesheets/screen.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; /&gt;
   &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
   &lt;title&gt;
-      capigen
+      Capistrano plugins, recipes and templates
   &lt;/title&gt;
   &lt;script src=&quot;javascripts/rounded_corners_lite.inc.js&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
 &lt;style&gt;
@@ -30,10 +30,10 @@
 &lt;body&gt;
 &lt;div id=&quot;main&quot;&gt;
 
-    &lt;h1&gt;capigen&lt;/h1&gt;
+    &lt;h1&gt;Capistrano plugins, recipes and templates&lt;/h1&gt;
     &lt;div id=&quot;version&quot; class=&quot;clickable&quot; onclick='document.location = &quot;http://rubyforge.org/projects/capigen&quot;; return false'&gt;
       &lt;p&gt;Get Version&lt;/p&gt;
-      &lt;a href=&quot;http://rubyforge.org/projects/capigen&quot; class=&quot;numbers&quot;&gt;0.1.4&lt;/a&gt;
+      &lt;a href=&quot;http://rubyforge.org/projects/capigen&quot; class=&quot;numbers&quot;&gt;0.1.5&lt;/a&gt;
     &lt;/div&gt;
     &lt;h1&gt;&amp;#x2192; &amp;#8216;capigen&amp;#8217;&lt;/h1&gt;
 
@@ -41,6 +41,9 @@
 	&lt;h2&gt;What&lt;/h2&gt;
 
 
+	&lt;p&gt;Capistrano plugins, recipes and templates.&lt;/p&gt;
+
+
 	&lt;h2&gt;Installing&lt;/h2&gt;
 
 
@@ -50,16 +53,84 @@
 	&lt;h2&gt;The basics&lt;/h2&gt;
 
 
+	&lt;p&gt;Capigen has recipes for:&lt;/p&gt;
+
+
+	&lt;ul&gt;
+	&lt;li&gt;Installing applications, via yum or manual building with make.&lt;/li&gt;
+		&lt;li&gt;Common deployment setup and update_code tasks, such as symlinking in database.yml and more advanced recipes such as sphinx configuration.&lt;/li&gt;
+		&lt;li&gt;&lt;span class=&quot;caps&quot;&gt;ERB&lt;/span&gt; templates for application configuration files, init scripts, monit configuration, etc.&lt;/li&gt;
+		&lt;li&gt;And more&amp;#8230;&lt;/li&gt;
+	&lt;/ul&gt;
+
+
 	&lt;h2&gt;Demonstration of usage&lt;/h2&gt;
 
 
-	&lt;h2&gt;Forum&lt;/h2&gt;
+	&lt;h3&gt;Install recipes&lt;/h3&gt;
 
 
-	&lt;p&gt;&lt;a href=&quot;http://groups.google.com/group/capigen&quot;&gt;http://groups.google.com/group/capigen&lt;/a&gt;&lt;/p&gt;
+	&lt;p&gt;To install an application, use the install recipes. For example:&lt;/p&gt;
+
+
+	&lt;pre&gt;&lt;code&gt;cap nginx:install&lt;/code&gt;&lt;/pre&gt;
+
+
+	&lt;p&gt;Recipes may have settings that are required, or defaults that can be overriden. These are usually set in &amp;#8220;profiles&amp;#8221;.&lt;/p&gt;
+
+
+	&lt;p&gt;To install a group of applications based on a &lt;a href=&quot;&lt;/p&quot;&gt;profile&lt;/a&gt;&amp;gt;
+
+
+	&lt;pre&gt;&lt;code&gt;cap install&lt;/code&gt;&lt;/pre&gt;
+
+
+	&lt;p&gt;&lt;em&gt;You may need to comment out &amp;#8220;Defaults requiretty&amp;#8221; in /etc/sudoders on the image before capistrano recipes will work.&lt;/em&gt;&lt;/p&gt;
+
+
+	&lt;h3&gt;Profiles&lt;/h3&gt;
+
+
+	&lt;p&gt;Profiles store lists of recipes to run, and settings for those recipes.&lt;/p&gt;
+
+
+	&lt;p&gt;Profiles are capistrano configuration like a Capfile or deploy.rb. See capigen/lib/profiles for more info.&lt;/p&gt;
 
 
-	&lt;p&gt;&lt;span class=&quot;caps&quot;&gt;TODO&lt;/span&gt; &amp;#8211; create Google Group &amp;#8211; capigen&lt;/p&gt;
+	&lt;h3&gt;Generating a Capfile and deploy.rb&lt;/h3&gt;
+
+
+	&lt;p&gt;From a rails project:&lt;/p&gt;
+
+
+	&lt;pre&gt;&lt;code&gt;rake capigen&lt;/code&gt;&lt;/pre&gt;
+
+
+	&lt;h3&gt;Deploying (application)&lt;/h3&gt;
+
+
+	&lt;p&gt;If this is the first time you&amp;#8217;ve deployed you&amp;#8217;ll need to run:&lt;/p&gt;
+
+
+	&lt;pre&gt;&lt;code&gt;cap deploy:setup&lt;/code&gt;&lt;/pre&gt;
+
+
+	&lt;p&gt;Otherwise, your standard deploy options:&lt;/p&gt;
+
+
+	&lt;pre&gt;&lt;code&gt;cap deploy&lt;/code&gt;&lt;/pre&gt;
+
+
+	&lt;pre&gt;&lt;code&gt;cap deploy:migrations (deploys and does migration)&lt;/code&gt;&lt;/pre&gt;
+
+
+	&lt;pre&gt;&lt;code&gt;cap deploy:migrate (only does migration on existing deployment)&lt;/code&gt;&lt;/pre&gt;
+
+
+	&lt;h2&gt;Forum&lt;/h2&gt;
+
+
+	&lt;p&gt;&lt;a href=&quot;http://groups.google.com/group/capigen&quot;&gt;http://groups.google.com/group/capigen&lt;/a&gt;&lt;/p&gt;
 
 
 	&lt;h2&gt;How to submit patches&lt;/h2&gt;
@@ -68,7 +139,7 @@
 	&lt;p&gt;Read the &lt;a href=&quot;http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/&quot;&gt;8 steps for fixing other people&amp;#8217;s code&lt;/a&gt; and for section &lt;a href=&quot;http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups&quot;&gt;8b: Submit patch to Google Groups&lt;/a&gt;, use the Google Group above.&lt;/p&gt;
 
 
-	&lt;p&gt;The trunk repository is &lt;code&gt;svn://rubyforge.org/var/svn/capigen/trunk&lt;/code&gt; for anonymous access.&lt;/p&gt;
+	&lt;p&gt;The trunk repository is &lt;code&gt;http://svn.ducktyper.com/var/svn/capigen/trunk&lt;/code&gt; for anonymous access.&lt;/p&gt;
 
 
 	&lt;h2&gt;License&lt;/h2&gt;
@@ -80,9 +151,9 @@
 	&lt;h2&gt;Contact&lt;/h2&gt;
 
 
-	&lt;p&gt;Comments are welcome. Send an email to &lt;a href=&quot;mailto:FIXME&quot;&gt;Gabriel Handford&lt;/a&gt; email via the &lt;a href=&quot;http://groups.google.com/group/capigen&quot;&gt;forum&lt;/a&gt;&lt;/p&gt;
+	&lt;p&gt;Comments are welcome. Send an email to &lt;a href=&quot;mailto:gabrielh@gmail.com&quot;&gt;Gabriel Handford&lt;/a&gt; via the &lt;a href=&quot;http://groups.google.com/group/capigen&quot;&gt;forum&lt;/a&gt;&lt;/p&gt;
     &lt;p class=&quot;coda&quot;&gt;
-      &lt;a href=&quot;FIXME email&quot;&gt;Gabriel Handford&lt;/a&gt;, 6th February 2008&lt;br&gt;
+      &lt;a href=&quot;FIXME email&quot;&gt;Gabriel Handford&lt;/a&gt;, 18th February 2008&lt;br&gt;
       Theme extended from &lt;a href=&quot;http://rb2js.rubyforge.org/&quot;&gt;Paul Battley&lt;/a&gt;
     &lt;/p&gt;
 &lt;/div&gt;</diff>
      <filename>website/index.html</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,11 @@
-h1. capigen
+h1. Capistrano plugins, recipes and templates
 
 h1. &amp;#x2192; 'capigen'
 
 
 h2. What
 
+Capistrano plugins, recipes and templates.
 
 h2. Installing
 
@@ -12,22 +13,70 @@ h2. Installing
 
 h2. The basics
 
+Capigen has recipes for:
+
+* Installing applications, via package manager or manually building with make.
+* Common deployment setup and update_code tasks, such as symlinking in database.yml and more advanced recipes such as sphinx configuration.
+* ERB templates for application configuration files, init scripts, monit configuration, etc.
+* And more...
+
 
 h2. Demonstration of usage
 
+h3. Install recipes
+
+To install an application, use the install recipes. For example:
+
+  cap nginx:install
+  
+Recipes may have settings that are required, or defaults that can be overriden. These are usually set in &quot;profiles&quot;.
+
+To install a group of applications based on a profile:
+
+  cap install
+
+&lt;em&gt;You may need to comment out &quot;Defaults requiretty&quot; in /etc/sudoders on the image before capistrano recipes will work.&lt;/em&gt;
+
+
+h3. Profiles
+
+Profiles store lists of recipes to run, and settings for those recipes.
+
+Profiles are capistrano configuration like a Capfile or deploy.rb. See capigen/lib/profiles for more info.
+
+
+h3. Generating a Capfile and deploy.rb
+
+From a rails project:
+
+  rake capigen
+  
+  
+h3. Deploying (application)
+
+If this is the first time you've deployed you'll need to run:
+
+  cap deploy:setup
+
+Otherwise, your standard deploy options:
+  
+  cap deploy
+
+  cap deploy:migrations (deploys and does migration)
+  
+  cap deploy:migrate (only does migration on existing deployment)
+
 
 
 h2. Forum
 
 &quot;http://groups.google.com/group/capigen&quot;:http://groups.google.com/group/capigen
 
-TODO - create Google Group - capigen
-
 h2. How to submit patches
 
 Read the &quot;8 steps for fixing other people's code&quot;:http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/ and for section &quot;8b: Submit patch to Google Groups&quot;:http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups, use the Google Group above.
 
-The trunk repository is &lt;code&gt;svn://rubyforge.org/var/svn/capigen/trunk&lt;/code&gt; for anonymous access.
+The trunk repository is &lt;code&gt;http://svn.ducktyper.com/var/svn/capigen/trunk&lt;/code&gt; for anonymous access.
 
 h2. License
 
@@ -35,5 +84,5 @@ This code is free to use under the terms of the MIT license.
 
 h2. Contact
 
-Comments are welcome. Send an email to &quot;Gabriel Handford&quot;:mailto:FIXME email via the &quot;forum&quot;:http://groups.google.com/group/capigen
+Comments are welcome. Send an email to &quot;Gabriel Handford&quot;:mailto:gabrielh@gmail.com via the &quot;forum&quot;:http://groups.google.com/group/capigen
 </diff>
      <filename>website/index.txt</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>lib/recipes/centos.rb</filename>
    </removed>
    <removed>
      <filename>lib/recipes/imagemagick.rb</filename>
    </removed>
    <removed>
      <filename>lib/recipes/monit.rb</filename>
    </removed>
    <removed>
      <filename>lib/recipes/ruby.rb</filename>
    </removed>
    <removed>
      <filename>lib/templates/centos/setup.sh</filename>
    </removed>
    <removed>
      <filename>lib/templates/imagemagick/install.sh</filename>
    </removed>
    <removed>
      <filename>lib/templates/memcached/install.sh</filename>
    </removed>
    <removed>
      <filename>lib/templates/monit/install.sh</filename>
    </removed>
    <removed>
      <filename>lib/templates/mysql/install.sh.erb</filename>
    </removed>
    <removed>
      <filename>lib/templates/nginx/install.sh.erb</filename>
    </removed>
    <removed>
      <filename>lib/templates/ruby/ruby_install.sh</filename>
    </removed>
    <removed>
      <filename>lib/templates/ruby/rubygems_install.sh</filename>
    </removed>
    <removed>
      <filename>lib/templates/sphinx/install.sh.erb</filename>
    </removed>
    <removed>
      <filename>lib/templates/sphinx/sphinx_app.initd.erb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>bbbd4dd6b6cf716f8696d645e1e14b64db55a1a3</id>
    </parent>
  </parents>
  <author>
    <name>Gabriel Handford</name>
    <email>gabrielh@gmail.com</email>
  </author>
  <url>http://github.com/gabriel/capitate/commit/736968290ee9388458f2403df344464922ac0cef</url>
  <id>736968290ee9388458f2403df344464922ac0cef</id>
  <committed-date>2008-02-18T14:15:10-08:00</committed-date>
  <authored-date>2008-02-18T14:15:10-08:00</authored-date>
  <message>Major refactoring.


git-svn-id: http://svn.ducktyper.com/capigen/trunk@76 03f83d6c-b416-495f-9003-0924d19d01a8</message>
  <tree>9723020d678d4060d71dd17222cc6e3b7c4f467e</tree>
  <committer>
    <name>Gabriel Handford</name>
    <email>gabrielh@gmail.com</email>
  </committer>
</commit>
