Hi All, I''m trying to get switchtower up and running. I want to use it to deploy code from SVN (which is PHP <*GASP*> project). It crashes part way through. Below is a copy of the recipe and the output of switchtower. I''m running switchtower on OS X. Any ideas? Thanks! -Adam deploy.rb --- set :application, "composure-base" set :repository, "file:///Users/Adam/svnrep/composure-base/trunk" role :app, "localhost" role :web, "localhost" role :db, "localhost" set :deploy_to, "/Users/Adam/vhosts/deploy" set :user, "Adam" Output of switchtower --- bash> switchtower -r deploy.rb -a deploy Password: ******* /opt/local/lib/ruby/site_ruby/1.8/switchtower/command.rb:41:in `process!'': command "rm -rf /Users/Adam/vhosts/deploy/releases/20051011132030/log /Users/Adam/vhosts/deploy/releases/20051011132030/public/system &&\\\n ln -nfs /Users/Adam/vhosts/deploy/shared/log /Users/Adam/vhosts/deploy/releases/20051011132030/log &&\\\n ln -nfs /Users/Adam/vhosts/deploy/shared/system /Users/Adam/vhosts/deploy/releases/20051011132030/public/system" failed on localhost (RuntimeError) from /opt/local/lib/ruby/site_ruby/1.8/switchtower/actor.rb:145:in `run'' from /opt/local/lib/ruby/site_ruby/1.8/switchtower/recipes/standard.rb:63:in `instance_eval'' from /opt/local/lib/ruby/site_ruby/1.8/switchtower/recipes/standard.rb:58:in `instance_eval'' from /opt/local/lib/ruby/site_ruby/1.8/switchtower/actor.rb:110:in `instance_eval'' from /opt/local/lib/ruby/site_ruby/1.8/switchtower/actor.rb:110:in `update_code'' from /opt/local/lib/ruby/site_ruby/1.8/switchtower/actor.rb:105:in `update_code'' from /opt/local/lib/ruby/site_ruby/1.8/switchtower/recipes/standard.rb:131:in `instance_eval'' from /opt/local/lib/ruby/site_ruby/1.8/switchtower/recipes/standard.rb:130:in `transaction'' ... 8 levels... from /opt/local/lib/ruby/site_ruby/1.8/switchtower/cli.rb:180:in `execute_recipes!'' from /opt/local/lib/ruby/site_ruby/1.8/switchtower/cli.rb:160:in `execute!'' from /opt/local/lib/ruby/site_ruby/1.8/switchtower/cli.rb:7:in `execute!'' from /sw/bin/switchtower:11
Adam, Could you try running switchtower with the -v option? Perhaps even - vvvv (four v''s) to get maximum output? that will help to see what the problem is. It is dying during an ''rm'' operation, but it is hard to say why with only the information below. Perhaps the permissions on the directory it is trying to delete are too restrictive? - Jamis On Oct 11, 2005, at 7:38 AM, Adam Weisbart wrote:> Hi All, > > I''m trying to get switchtower up and running. I want to use it to > deploy code from SVN (which is PHP <*GASP*> project). It crashes part > way through. Below is a copy of the recipe and the output of > switchtower. I''m running switchtower on OS X. > > Any ideas? > > Thanks! > > -Adam > > deploy.rb > --- > set :application, "composure-base" > set :repository, "file:///Users/Adam/svnrep/composure-base/trunk" > > role :app, "localhost" > role :web, "localhost" > role :db, "localhost" > > set :deploy_to, "/Users/Adam/vhosts/deploy" > set :user, "Adam" > > > Output of switchtower > --- > bash> switchtower -r deploy.rb -a deploy > Password: ******* > > /opt/local/lib/ruby/site_ruby/1.8/switchtower/command.rb:41:in > `process!'': command "rm -rf > /Users/Adam/vhosts/deploy/releases/20051011132030/log > /Users/Adam/vhosts/deploy/releases/20051011132030/public/system &&\\\n > ln -nfs /Users/Adam/vhosts/deploy/shared/log > /Users/Adam/vhosts/deploy/releases/20051011132030/log &&\\\n ln > -nfs /Users/Adam/vhosts/deploy/shared/system > /Users/Adam/vhosts/deploy/releases/20051011132030/public/system" > failed on localhost (RuntimeError) > from /opt/local/lib/ruby/site_ruby/1.8/switchtower/actor.rb: > 145:in `run'' > from /opt/local/lib/ruby/site_ruby/1.8/switchtower/recipes/ > standard.rb:63:in > `instance_eval'' > from /opt/local/lib/ruby/site_ruby/1.8/switchtower/recipes/ > standard.rb:58:in > `instance_eval'' > from /opt/local/lib/ruby/site_ruby/1.8/switchtower/actor.rb: > 110:in > `instance_eval'' > from /opt/local/lib/ruby/site_ruby/1.8/switchtower/actor.rb: > 110:in > `update_code'' > from /opt/local/lib/ruby/site_ruby/1.8/switchtower/actor.rb: > 105:in > `update_code'' > from /opt/local/lib/ruby/site_ruby/1.8/switchtower/recipes/ > standard.rb:131:in > `instance_eval'' > from /opt/local/lib/ruby/site_ruby/1.8/switchtower/recipes/ > standard.rb:130:in > `transaction'' > ... 8 levels... > from /opt/local/lib/ruby/site_ruby/1.8/switchtower/cli.rb: > 180:in > `execute_recipes!'' > from /opt/local/lib/ruby/site_ruby/1.8/switchtower/cli.rb: > 160:in > `execute!'' > from /opt/local/lib/ruby/site_ruby/1.8/switchtower/cli.rb:7:in > `execute!'' > from /sw/bin/switchtower:11 > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Hey Jamis, Looks like it can''t run svn, which is quite odd ([out :: localhost] bash: line 2: svn: command not found). I''ll hack around a bit and see if I can make some progress. But FYI here''s the verbose dump: Lappy-2:~/vhosts Adam$ switchtower -vvvv -r deploy.rb -a deploy loading configuration /opt/local/lib/ruby/site_ruby/1.8/switchtower/recipes/standard.rb loading configuration ./deploy.rb executing task deploy transaction: start executing task update_code querying latest revision... executing "if [[ ! -d /Users/Adam/vhosts/deploy/releases/20051011142049 ]]; then\n svn co -q -r2533 http://dev.rubyonrails.com/svn/rails/tools/switchtower /Users/Adam/vhosts/deploy/releases/20051011142049;\n echo `date +\"%Y-%m-%d %H:%M:%S\"` $USER 2533 20051011142049 >> /Users/Adam/vhosts/deploy/revisions.log;\n chmod 666 /Users/Adam/vhosts/deploy/revisions.log;\n fi" servers: ["localhost"] Password: ***** processing command [localhost] executing command [out :: localhost] bash: line 2: svn: command not found command finished executing "rm -rf /Users/Adam/vhosts/deploy/releases/20051011142049/log /Users/Adam/vhosts/deploy/releases/20051011142049/public/system &&\n ln -nfs /Users/Adam/vhosts/deploy/shared/log /Users/Adam/vhosts/deploy/releases/20051011142049/log &&\n ln -nfs /Users/Adam/vhosts/deploy/shared/system /Users/Adam/vhosts/deploy/releases/20051011142049/public/system" servers: ["localhost"] processing command [localhost] executing command [out :: localhost] ln: /Users/Adam/vhosts/deploy/releases/20051011142049/log: No such file or directory command finished [update_code] transaction: rollback [update_code] rolling back executing "rm -rf /Users/Adam/vhosts/deploy/releases/20051011142049" servers: ["localhost"] processing command [localhost] executing command command finished /opt/local/lib/ruby/site_ruby/1.8/switchtower/command.rb:41:in `process!'': command "rm -rf /Users/Adam/vhosts/deploy/releases/20051011142049/log /Users/Adam/vhosts/deploy/releases/20051011142049/public/system &&\\\n ln -nfs /Users/Adam/vhosts/deploy/shared/log /Users/Adam/vhosts/deploy/releases/20051011142049/log &&\\\n ln -nfs /Users/Adam/vhosts/deploy/shared/system /Users/Adam/vhosts/deploy/releases/20051011142049/public/system" failed on localhost (RuntimeError) from /opt/local/lib/ruby/site_ruby/1.8/switchtower/actor.rb:145:in `run'' from /opt/local/lib/ruby/site_ruby/1.8/switchtower/recipes/standard.rb:63:in `instance_eval'' from /opt/local/lib/ruby/site_ruby/1.8/switchtower/recipes/standard.rb:58:in `instance_eval'' from /opt/local/lib/ruby/site_ruby/1.8/switchtower/actor.rb:110:in `instance_eval'' from /opt/local/lib/ruby/site_ruby/1.8/switchtower/actor.rb:110:in `update_code'' from /opt/local/lib/ruby/site_ruby/1.8/switchtower/actor.rb:105:in `update_code'' from /opt/local/lib/ruby/site_ruby/1.8/switchtower/recipes/standard.rb:131:in `instance_eval'' from /opt/local/lib/ruby/site_ruby/1.8/switchtower/recipes/standard.rb:130:in `transaction'' ... 8 levels... from /opt/local/lib/ruby/site_ruby/1.8/switchtower/cli.rb:180:in `execute_recipes!'' from /opt/local/lib/ruby/site_ruby/1.8/switchtower/cli.rb:160:in `execute!'' from /opt/local/lib/ruby/site_ruby/1.8/switchtower/cli.rb:7:in `execute!'' from /sw/bin/switchtower:11