<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>generators/capistrano/USAGE</filename>
    </added>
    <added>
      <filename>generators/capistrano/capistrano_generator.rb</filename>
    </added>
    <added>
      <filename>generators/templates/centos/setup.sh</filename>
    </added>
    <added>
      <filename>generators/templates/centos/sudoers</filename>
    </added>
    <added>
      <filename>generators/templates/imagemagick/install.sh</filename>
    </added>
    <added>
      <filename>generators/templates/memcached/install.sh</filename>
    </added>
    <added>
      <filename>generators/templates/memcached/memcached.initd.centos.erb</filename>
    </added>
    <added>
      <filename>generators/templates/memcached/memcached.monitrc.erb</filename>
    </added>
    <added>
      <filename>generators/templates/mongrel/mongrel_cluster.initd.erb</filename>
    </added>
    <added>
      <filename>generators/templates/mongrel/mongrel_cluster.monitrc.erb</filename>
    </added>
    <added>
      <filename>generators/templates/mongrel/mongrel_cluster.yml.erb</filename>
    </added>
    <added>
      <filename>generators/templates/monit/cert.sh</filename>
    </added>
    <added>
      <filename>generators/templates/monit/install.sh</filename>
    </added>
    <added>
      <filename>generators/templates/monit/monit.cnf</filename>
    </added>
    <added>
      <filename>generators/templates/monit/monit.initd.centos.erb</filename>
    </added>
    <added>
      <filename>generators/templates/monit/monitrc.erb</filename>
    </added>
    <added>
      <filename>generators/templates/monit/patch_inittab.sh</filename>
    </added>
    <added>
      <filename>generators/templates/mysql/install.sh.erb</filename>
    </added>
    <added>
      <filename>generators/templates/mysql/install_db.sql.erb</filename>
    </added>
    <added>
      <filename>generators/templates/mysql/mysql.monitrc.erb</filename>
    </added>
    <added>
      <filename>generators/templates/nginx/install.sh.erb</filename>
    </added>
    <added>
      <filename>generators/templates/nginx/nginx.conf.erb</filename>
    </added>
    <added>
      <filename>generators/templates/nginx/nginx.initd.erb</filename>
    </added>
    <added>
      <filename>generators/templates/nginx/nginx.monitrc.erb</filename>
    </added>
    <added>
      <filename>generators/templates/nginx/nginx_vhost.conf.erb</filename>
    </added>
    <added>
      <filename>generators/templates/rails/database.yml.erb</filename>
    </added>
    <added>
      <filename>generators/templates/ruby/ruby_install.sh</filename>
    </added>
    <added>
      <filename>generators/templates/ruby/rubygems_install.sh</filename>
    </added>
    <added>
      <filename>generators/templates/sphinx/install.sh.erb</filename>
    </added>
    <added>
      <filename>generators/templates/sphinx/sphinx.conf.erb</filename>
    </added>
    <added>
      <filename>generators/templates/sphinx/sphinx.monitrc.erb</filename>
    </added>
    <added>
      <filename>generators/templates/sphinx/sphinx_app.initd.centos.erb</filename>
    </added>
    <added>
      <filename>generators/templates/sphinx/sphinx_app.initd.erb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,7 @@
+#
+# Capfile for running base install recipe
+#
+
 load 'deploy' if respond_to?(:namespace) # cap2 differentiator
 
 # Patches for capistrano
@@ -12,4 +16,7 @@ require 'erb'
 set :user, Proc.new { Capistrano::CLI.ui.ask('Bootstrap user: ') }
 
 # Roles
-role :app, Capistrano::CLI.ui.ask('Server: ')
+role :base, Capistrano::CLI.ui.ask('Server: ')
+
+
+set :profile, Proc.new { load choose_profile }
\ No newline at end of file</diff>
      <filename>Capfile</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,4 @@
-require 'rake'
-require 'rake/testtask'
-require 'rake/rdoctask'
-
-RAILS_ROOT = File.dirname(__FILE__) + &quot;/test&quot;
-
-Dir[&quot;tasks/*&quot;].each { |task| load task }
\ No newline at end of file
+require 'config/requirements'
+require 'config/hoe' # setup Hoe + all gem configuration
+
+Dir['tasks/**/*.rake'].each { |rake| load rake }
\ No newline at end of file</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -20,4 +20,3 @@ require &quot;configr/profiles&quot;
 require &quot;configr/helper&quot;
 
 require &quot;configr/config&quot;
-require &quot;configr/tasks&quot;</diff>
      <filename>init.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,15 +1,7 @@
 namespace :gems do
   
-  desc &quot;Install gems from profile&quot;
-  task :install_manual do
-    profile = choose_profile    
-    gems = profile[&quot;gems&quot;]
-    gem_install(gems) if gems    
-  end
-  
   desc &quot;Install gems&quot;
   task :install do
-    gems = fetch(:gems)
     gem_install(gems) if gems
   end
   </diff>
      <filename>recipes/gems.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,8 @@
 namespace :imagemagick do
   
   task :install do
-    
-    package_install([ &quot;libjpeg-devel&quot;, &quot;libpng-devel&quot;, &quot;glib2-devel&quot;, &quot;fontconfig-devel&quot;, &quot;zlib-devel&quot;,
-      &quot;libwmf-devel&quot;, &quot;freetype-devel&quot;, &quot;libtiff-devel&quot;])
-      
+    # Dependencies: &quot;libjpeg-devel&quot;, &quot;libpng-devel&quot;, &quot;glib2-devel&quot;, &quot;fontconfig-devel&quot;, &quot;zlib-devel&quot;, 
+    # &quot;libwmf-devel&quot;, &quot;freetype-devel&quot;, &quot;libtiff-devel&quot;
     script_install(&quot;imagemagick/install.sh&quot;)
   end
   </diff>
      <filename>recipes/imagemagick.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,19 +1,8 @@
 namespace :install do
   
-  set :profile, nil
-  
   task :default do
-    # TODO: This sucks (mostly capistrano's fault)
-    profile = fetch(:profile) 
-    profile = choose_profile unless profile
-    set :profile, profile 
-    set :gems, profile[&quot;gems&quot;]
-    
-    packager_type = profile[&quot;packager&quot;][&quot;type&quot;]
-    packages_to_remove = profile[&quot;packager&quot;][&quot;remove&quot;]
-    packages_to_add = profile[&quot;packager&quot;][&quot;install&quot;]
-    tasks = profile[&quot;tasks&quot;]
-    namespace = profile[&quot;namespace&quot;]
+    # Choose profile, and load capistrano settings
+    fetch(:profile)
     
     # Setup packager
     setup_packager(packager_type)
@@ -28,7 +17,7 @@ namespace :install do
     package_install(packages_to_add)
     
     # These run after install task and install all the apps
-    tasks.each do |task_name|
+    install_tasks.each do |task_name|
       after &quot;install&quot;, task_name
     end
   end</diff>
      <filename>recipes/install.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,29 +1,15 @@
 namespace :memcached do
   
-  after &quot;memcached:install&quot;, &quot;memcached:install_init&quot;
-  after &quot;memcached:install&quot;, &quot;memcached:install_monit&quot;
-  
-  set :memcached_pid_path, &quot;/var/run/memcached.pid&quot;
-  set :memcached_port, 11211
-  
   desc &quot;Install memcached&quot;
   task :install do
+    put load_template(&quot;memcached/memcached.initd.centos.erb&quot;, binding), &quot;/tmp/memcached.initd&quot;    
     script_install(&quot;memcached/install.sh&quot;)   
   end
-  
-  desc &quot;Install memcached init&quot;
-  task :install_init do
-    put load_template(&quot;memcached/memcached.initd.centos.erb&quot;, binding), &quot;/tmp/memcached.initd&quot;
 
-    sudo &quot;install -o root /tmp/memcached.initd /etc/init.d/memcached &amp;&amp; rm -f /tmp/memcached.initd&quot;
-    
-    sudo &quot;/sbin/chkconfig --level 345 memcached on&quot;            
-  end
-  
+  desc &quot;Install memcached monit hooks&quot;
   task :install_monit do
-    put load_template(&quot;memcached/memcached.monitrc.erb&quot;, binding), &quot;/tmp/memcached.monitrc&quot;
-    
-    sudo &quot;install -o root /tmp/memcached.monitrc /etc/monit/memcached.monitrc &amp;&amp; rm -f /tmp/memcached.monitrc&quot;
+    put load_template(&quot;memcached/memcached.monitrc.erb&quot;, binding), &quot;/tmp/memcached.monitrc&quot;    
+    script_install(&quot;memcached/install_monit.sh&quot;)    
   end
   
 end
\ No newline at end of file</diff>
      <filename>recipes/memcached.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,12 +2,7 @@
 namespace :mongrel_cluster do
   
   after &quot;mongrel_cluster:setup&quot;, &quot;mongrel_cluster:setup_monit&quot;
-  
-  desc &quot;Install mongrel and mongrel_cluster&quot;
-  task :install do 
-    sudo &quot;gem install mongrel mongrel_cluster&quot;
-  end
-  
+    
   desc &quot;Create mongrel cluster&quot;
   task :setup do 
     run &quot;mkdir -p #{shared_path}/config&quot;</diff>
      <filename>recipes/mongrel_cluster.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,48 +1,16 @@
 namespace :monit do
   
-  after &quot;monit:install&quot;, &quot;monit:install_rc&quot;
-  after &quot;monit:install&quot;, &quot;monit:install_init&quot;
-  after &quot;monit:install&quot;, &quot;monit:install_cert&quot;
-  
   desc &quot;Install monit&quot;
   task :install do
-    package_install([ &quot;flex&quot;, &quot;byacc&quot; ])
-    script_install(&quot;monit/install.sh&quot;)      
-  end
-  
-  desc &quot;Install monit RC&quot;
-  task :install_rc do
-    sudo &quot;mkdir -p /etc/monit&quot;
-    
-    set :monit_port, Proc.new { Capistrano::CLI.ui.ask('Monit port: ') }
-    set :monit_password, Proc.new { Capistrano::CLI.ui.ask('Monit admin password (to set): ') }
-  
-    put load_template(&quot;monit/monitrc.erb&quot;, binding), &quot;/tmp/monitrc&quot;
-  
-    sudo &quot;install -o root -m 700 /tmp/monitrc /etc/monitrc &amp;&amp; rm -f /tmp/monitrc&quot;
-  end
-  
-  desc &quot;Install init.d&quot;
-  task :install_init do
+    # Dependencies: &quot;flex&quot;, &quot;byacc&quot;
     
     put load_template(&quot;monit/monit.initd.centos.erb&quot;, binding), &quot;/tmp/monit.initd&quot;
-
-    sudo &quot;install -o root /tmp/monit.initd /etc/init.d/monit &amp;&amp; rm -f /tmp/monit.initd&quot;
-
-    # Started from inittab
-    #sudo &quot;/sbin/chkconfig --level 345 monit on&quot;     
+    put load_template(&quot;monit/monitrc.erb&quot;, binding), &quot;/tmp/monitrc&quot;
+    put load_file(&quot;monit/monit.cnf&quot;), &quot;/tmp/monit.cnf&quot;
     
+    script_install(&quot;monit/install.sh&quot;)      
     script_install(&quot;monit/patch_inittab.sh&quot;)
-  end
-  
-  
-  desc &quot;Install monit cert&quot;
-  task :install_cert do
-    sudo &quot;mkdir -p /var/certs&quot;
-    
-    put load_file(&quot;monit/monit.cnf&quot;), &quot;/var/certs/monit.cnf&quot;
-    
     script_install(&quot;monit/cert.sh&quot;)
   end
-    
+      
 end
\ No newline at end of file</diff>
      <filename>recipes/monit.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,38 +1,23 @@
 # Mysql recipes
 namespace :mysql do
   
-  after &quot;mysql:install&quot;, &quot;mysql:install_monit&quot;
-  
   desc &quot;Install mysql&quot;
   task :install do    
-    
-    set :mysql_admin_password, Proc.new { Capistrano::CLI.ui.ask('Mysql admin password (to set): ') }
-    
-    package_install([ &quot;mysql&quot;, &quot;mysql-devel&quot;, &quot;mysql-server&quot; ])
     script_install(&quot;mysql/install.sh.erb&quot;)
   end
   
-  desc &quot;Create monit configuration for mysql&quot;
+  desc &quot;Install mysql monit hooks&quot;
   task :install_monit do
-    
-    pid_path = &quot;/var/run/mysqld/mysqld.pid&quot;
-    set :db_port, Proc.new { Capistrano::CLI.ui.ask('Mysql port: ') }
-    
-    put load_template(&quot;mysql/mysql.monitrc.erb&quot;, binding), &quot;/tmp/mysql.monitrc&quot;    
-    
-    sudo &quot;install -o root /tmp/mysql.monitrc /etc/monit/mysql.monitrc &amp;&amp; rm -f /tmp/mysql.monitrc&quot;    
+    put load_template(&quot;mysql/mysql.monitrc.erb&quot;, binding), &quot;/tmp/mysql.monitrc&quot;        
+    script_install(&quot;mysql/install_monit.sh&quot;)
   end
   
   desc &quot;Create database user, and database with appropriate permissions&quot;
-  task :setup do
-    
-    set :mysql_admin_password, Proc.new { Capistrano::CLI.ui.ask('Mysql admin password: ') }
-    
-    # Locations can access from
+  task :setup do    
+    # Add localhost to grant locations
     locations_for_grant = [ &quot;localhost&quot;, web_host ]
     
     put load_template(&quot;mysql/install_db.sql.erb&quot;, binding), &quot;/tmp/install_db_#{application}.sql&quot;    
-    
     run &quot;mysql -u root -p#{mysql_admin_password} &lt; /tmp/install_db_#{application}.sql&quot;
   end
   </diff>
      <filename>recipes/mysql.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,33 +1,23 @@
 # Nginx recipes
 namespace :nginx do
   
-  after &quot;nginx:install&quot;, &quot;nginx:install_monit&quot;
-  
-  # Conf variables
-  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;
-  
   # Callbacks
   after &quot;nginx:setup&quot;, &quot;nginx:restart&quot;
     
   desc &quot;Install nginx, conf, initscript, nginx user and service&quot;
   task :install do
-    package_install([ &quot;pcre-devel&quot;, &quot;openssl&quot;, &quot;openssl-devel&quot; ])
+    # Dependencies: &quot;pcre-devel&quot;, &quot;openssl&quot;, &quot;openssl-devel&quot;
 
-    run(&quot;rm -rf /tmp/nginx &amp;&amp; mkdir -p /tmp/nginx&quot;)
-    
-    put(load_template(&quot;nginx/nginx.initd.erb&quot;, binding), &quot;/tmp/nginx/nginx.initd&quot;)
-    put(load_template(&quot;nginx/nginx.conf.erb&quot;, binding), &quot;/tmp/nginx/nginx.conf&quot;)
+    put(load_template(&quot;nginx/nginx.initd.erb&quot;, binding), &quot;/tmp/nginx.initd&quot;)
+    put(load_template(&quot;nginx/nginx.conf.erb&quot;, binding), &quot;/tmp/nginx.conf&quot;)
     
-    script_install(&quot;nginx/install.sh.erb&quot;)      
+    script_install(&quot;nginx/install.sh.erb&quot;)          
   end
   
-  desc &quot;Create monit configuration for nginx&quot;
+  desc &quot;Install nginx monit hooks&quot;
   task :install_monit do
     put load_template(&quot;nginx/nginx.monitrc.erb&quot;, binding), &quot;/tmp/nginx.monitrc&quot;
-    sudo &quot;mkdir -p /etc/monit &amp;&amp; install -o root /tmp/nginx.monitrc /etc/monit/nginx.monitrc &amp;&amp; rm -f /tmp/nginx.monitrc&quot;
+    script_install(&quot;nginx/install_monit.sh&quot;)
   end
   
   </diff>
      <filename>recipes/nginx.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,8 @@
 namespace :ruby do
   
-  desc &quot;Install ruby, rubygems and rake&quot;
+  desc &quot;Install ruby and rubygems&quot;
   task :install do 
-  
-    package_install([ &quot;ruby&quot;, &quot;ruby-devel&quot;, &quot;ruby-libs&quot;, &quot;ruby-irb&quot;, &quot;ruby-rdoc&quot;, &quot;ruby-ri&quot;, &quot;zlib&quot;, &quot;zlib-devel&quot; ])
+    # Dependencies: zlib, zlib-devel
     
     # Install ruby 1.8.6
     script_install(&quot;ruby/ruby_install.sh&quot;)</diff>
      <filename>recipes/ruby.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,19 +3,15 @@ namespace :sphinx do
   
   after &quot;sphinx:setup&quot;, &quot;sphinx:setup_monit&quot;
   
-  set :sphinx_prefix, &quot;/usr/local/sphinx&quot;
-  
   desc &quot;Install sphinx&quot;
   task :install do 
-    package_install([ &quot;gcc-c++&quot; ])
+    # Dependencies: gcc-c++
     script_install(&quot;sphinx/install.sh.erb&quot;)
   end
   
   desc &quot;Setup sphinx for application&quot;
   task :setup do 
     
-    sphinx_prefix = fetch(:sphinx_prefix)
-    application = config.application
     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;
@@ -44,35 +40,23 @@ namespace :sphinx do
     index_root = &quot;#{shared_path}/var/index&quot;;
     log_root = &quot;#{shared_path}/log&quot;
     pid_root = &quot;#{shared_path}/pids&quot;
-    sphinx_host = config.sphinx_host
-    sphinx_port = config.sphinx_port
-    db_name = config.db_name
-    db_user = config.db_user
-    db_pass = config.db_pass
-    db_host = config.db_host
-    db_port = config.db_port
     
     put load_project_template(&quot;config/templates/sphinx.conf.erb&quot;, binding), &quot;#{shared_path}/config/sphinx.conf&quot;
-    
-    # Dont symlink in since we dont want to use sphinx rake tasks in deployed environment
-    #run &quot;ln -nfs #{shared_path}/config/sphinx.conf #{release_path}/config/sphinx.conf&quot;
   end
   
   desc &quot;Rotate sphinx index for application&quot;
   task :rotate_all do
-    sphinx_prefix = fetch(:sphinx_prefix)    
     run &quot;#{sphinx_prefix}/bin/indexer --config #{shared_path}/config/sphinx.conf --rotate --all&quot;
   end
   
   desc &quot;Build sphinx indexes for application&quot;
   task :index_all do
-    sphinx_prefix = fetch(:sphinx_prefix)    
     run &quot;#{sphinx_prefix}/bin/indexer --config #{shared_path}/config/sphinx.conf --all&quot;
   end
   
   desc &quot;Start sphinx&quot;
   task :start do
     # TODO: Monit
-    sudo &quot;/sbin/service sphinx_#{application} start&quot;
+    sudo &quot;/sbin/service monit restart sphinx_#{application}&quot;
   end  
 end
\ No newline at end of file</diff>
      <filename>recipes/sphinx.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,10 +1,2 @@
 require 'test/unit'
-require 'rubygems'
-require 'active_support'
-
-$LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
-
-RAILS_ROOT = '.' unless defined?(RAILS_ROOT)
-
-require 'rake'
-Dir[File.dirname(__FILE__) + &quot;/../tasks/*.rake&quot;].each { |task| load task }
\ No newline at end of file
+require File.dirname(__FILE__) + '/../lib/capigen'</diff>
      <filename>test/test_helper.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>recipes/aspell.rb</filename>
    </removed>
    <removed>
      <filename>recipes/profiles/centos-sick.yml</filename>
    </removed>
    <removed>
      <filename>recipes/profiles/centos-test.yml</filename>
    </removed>
    <removed>
      <filename>tasks/configr.rake</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>9b77d2d53131fdd7111a05a0da6182ee3d737e52</id>
    </parent>
  </parents>
  <author>
    <name>Gabriel Handford</name>
    <email>gabrielh@gmail.com</email>
  </author>
  <url>http://github.com/gabriel/capitate/commit/397c2b0e74b6f1eabf6ced217e48b2c49ba3fbb0</url>
  <id>397c2b0e74b6f1eabf6ced217e48b2c49ba3fbb0</id>
  <committed-date>2008-02-06T15:17:46-08:00</committed-date>
  <authored-date>2008-02-06T15:17:46-08:00</authored-date>
  <message>moving everything around

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