<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>.DS_Store</filename>
    </added>
    <added>
      <filename>config/eldorado.database.yml</filename>
    </added>
    <added>
      <filename>config/eldorado.vhost</filename>
    </added>
    <added>
      <filename>config/example.deploy.rb</filename>
    </added>
    <added>
      <filename>config/orig.eldorado.deploy.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -0,0 +1,23 @@
+#	Deploy Eldorado via Capistrano
+#	download Eldorado from Github to ~/el-dorado 
+git clone git://github.com/trevorturk/el-dorado.git
+mv el-dorado eldorado
+cd eldorado
+
+#	Use configuration-automation's permalinked eldorado deploy.rb
+wget --timeout=10 --waitretry=1 http://github.com/mmond/ file
+#	Update the TARGET_SERVER placeholders in deploy.rb
+cat config/eldorado.deploy.rb |sed &quot;s/TARGET_SERVER/$TARGET_SERVER/g&quot; &gt; config/deploy.rb
+rm config/generic.deploy.rb
+
+#	Use configuration-automation's permalinked eldorado deploy.rb
+wget --timeout=10 --waitretry=1 http://github.com/mmond/ file
+#	Update the TARGET_SERVER placeholders in the Apache vhost
+cat config/eldorado.vhost |sed &quot;s/TARGET_SERVER/$TARGET_SERVER/g&quot; &gt; config/eldorado
+rm config/eldorado.vhost
+
+#	Use configuration-automation's permalinked eldorado deploy.rb
+wget --timeout=10 --waitretry=1 http://github.com/mmond/configuration-automation/tree/master%2Feldorado.database.yml.txt?raw=true -O config/database.yml
+
+#	Use Capistrano to configure directory structure, Eldorado and servers
+cap deploy:setup deploy:update rake:db_create rake:db_schema_load rake:db_migrate deploy:start</diff>
      <filename>apps/eldorado.sh</filename>
    </modified>
    <modified>
      <diff>@@ -1,68 +1,58 @@
-load 'deploy' if respond_to?(:namespace) # cap2 differentiator
+#############################################################
+#	Application
+#############################################################
+
+set :application, &quot;eldorado&quot;
+set :deploy_to, &quot;/var/www/#{application}&quot;
+
+#############################################################
+#	Settings
+#############################################################
+
+default_run_options[:pty] = true
+set :use_sudo, false
+
+#############################################################
+#	Servers
+#############################################################
+
+set :user, &quot;root&quot;
+set :domain, &quot;TARGET_SERVER&quot;
+server domain, :app, :web
+role :db, domain, :primary =&gt; true
+
+#############################################################
+#	git
+#############################################################
 
 set :repository, 'git://github.com/trevorturk/el-dorado.git'
 set :scm, :git
 set :deploy_via, :copy
 set :copy_cache, true
 set :git_shallow_clone, 1
+  
+#############################################################
+#	Passenger
+#############################################################
 
-set :application, 'eldorado'
-set :deploy_to, '/var/www/el-dorado'
-set :mongrel_port, '8000'
-set :user, 'root'
-set :use_sudo, false  # We are already root in this example
-
-role :app, &quot;TARGET_SERVER&quot;
-role :web, &quot;TARGET_SERVER&quot;
-role :db,  &quot;TARGET_SERVER&quot;, :primary =&gt; true
-
-before  'deploy:update_code', 'deploy:web:disable' 
-after   'deploy:update_code', 'deploy:config_database'
-after   'deploy:update_code', 'deploy:config_servers'
-after   'deploy:update_code', 'deploy:create_symlinks'
-after   'deploy:restart', 'deploy:cleanup'
-after   'deploy:restart', 'deploy:web:enable'
-
-namespace :deploy do
+namespace :passenger do
+  desc &quot;Restart Application&quot;
   task :restart do
-    begin run &quot;/usr/bin/mongrel_rails stop -P #{shared_path}/log/mongrel.#{mongrel_port}.pid&quot;; rescue; end; sleep 15;
-    begin run &quot;/usr/bin/mongrel_rails start -d -e production -p #{mongrel_port} -P log/mongrel.#{mongrel_port}.pid -c #{release_path} --user root --group root&quot;; rescue; end; sleep 15;
-  end
-  task :config_database do
-    put(File.read('config/database.yml'), &quot;#{release_path}/config/database.yml&quot;, :mode =&gt; 0444)
-    # For security consider uploading a production-only database.yml to your server and using this instead:
-    # run &quot;cp #{shared_path}/config/database.yml #{release_path}/config/database.yml&quot;
-  end
-  task :config_servers do
-    put(File.read('script/spin'), &quot;#{release_path}/script/spin&quot;, :mode =&gt; 0444)
-    run &quot;chmod 755 #{release_path}/script/spin&quot;
-    put(File.read('./eldorado'), &quot;/etc/nginx/sites-available/eldorado&quot;, :mode =&gt; 0444)
-    run &quot;ln -s /etc/nginx/sites-available/eldorado /etc/nginx/sites-enabled/eldorado&quot;
-    run &quot;rm /etc/nginx/sites-enabled/default&quot;
-    run &quot;/etc/init.d/nginx start&quot;
-  end
-  task :create_symlinks do
-    require 'yaml'
-    download &quot;#{release_path}/config/symlinks.yml&quot;, &quot;/tmp/eldorado_symlinks.yml&quot;
-    YAML.load_file('/tmp/eldorado_symlinks.yml').each do |share|
-      run &quot;rm -rf #{release_path}/public/#{share}&quot;
-      run &quot;mkdir -p #{shared_path}/system/#{share}&quot;
-      run &quot;ln -nfs #{shared_path}/system/#{share} #{release_path}/public/#{share}&quot;
-    end
+    run &quot;touch #{current_path}/tmp/restart.txt&quot;
   end
 end
 
+after :deploy, &quot;passenger:restart&quot;
+
+#############################################################
+#	Database Rake Tasks
+#############################################################
+
 namespace :rake do
   desc &quot;Show the available rake tasks.&quot;
   task :show_tasks do
     run(&quot;cd #{deploy_to}/current; /usr/bin/rake -T&quot;)
   end
-  task :db_create_sqlite do
-    run(&quot;cd #{deploy_to}/current; /usr/bin/rake db:create&quot;)
-  end
-  task :db_schema_load_sqlite do
-    run(&quot;cd #{deploy_to}/current; /usr/bin/rake db:schema:load&quot;)
-  end
   task :db_create do
     run(&quot;cd #{deploy_to}/current; /usr/bin/rake db:create RAILS_ENV=production&quot;)
   end
@@ -72,4 +62,5 @@ namespace :rake do
   task :db_migrate do
     run(&quot;cd #{deploy_to}/current; /usr/bin/rake db:migrate RAILS_ENV=production&quot;)
   end
-end
\ No newline at end of file
+end
+  
\ No newline at end of file</diff>
      <filename>config/eldorado.deploy.rb</filename>
    </modified>
    <modified>
      <diff>@@ -15,9 +15,9 @@
 #		Rubygems 1.3
 #		
 #	Services:
-#		Capistrano			Phusion Passenger
-#		MySQL				Sqlite3		
-#		Puppet	
+#		MySQL				Phusion Passenger
+#								
+#			
 #	
 #	Rails Applications:	 
 #		Hello World 		Eldorado
@@ -99,7 +99,9 @@ echo &quot;&lt;html&gt;&lt;h1&gt;Hello World&lt;/h1&gt;&lt;/html&gt;&quot; &gt; app/views/welcome/hello.html.erb
 updatedb
 '
 #	Install any Rails applications?
-echo &quot;The Hello World test app is available at &quot; $TARGET_SERVER&quot;/welcome/hello.index.erb&quot;
+echo &quot;
+
+The Hello World test app is available at http://hello.&quot; $TARGET_SERVER
 echo &quot;Would you like to install a production Rails application?&quot;
 echo &quot;The choices are: &quot;
 echo &quot;Radiant CMS&quot;</diff>
      <filename>configure_ubuntu.sh</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8364199dba54f361bf1fded46f229dbecdabcd30</id>
    </parent>
  </parents>
  <author>
    <name>mark</name>
    <email>mmond@io.com</email>
  </author>
  <url>http://github.com/mmond/configuration-automation/commit/be814b9c6d5ebca8298dc99cbfbb4b8e15fd5667</url>
  <id>be814b9c6d5ebca8298dc99cbfbb4b8e15fd5667</id>
  <committed-date>2009-01-14T06:11:57-08:00</committed-date>
  <authored-date>2009-01-14T06:11:57-08:00</authored-date>
  <message>First multi-app rev</message>
  <tree>fcc68606b5b5c7fb5fecef68e8b24a0fc828500c</tree>
  <committer>
    <name>mark</name>
    <email>mmond@io.com</email>
  </committer>
</commit>
