Hi I have a problem here. I am developing an application which has a local development environment (on my harddisk), a second one for my customer (for testing new features) and a production environment which runs actual application online. How can I setup SwitchTower to have a possibility to deploy just for a particular server? Thanks, Peter
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mar 1, 2006, at 10:07 AM, Piotr Usewicz wrote:> I have a problem here. I am developing an application which has a > local development environment (on my harddisk), a second one for my > customer (for testing new features) and a production environment > which runs actual application online. > > How can I setup SwitchTower to have a possibility to deploy just > for a particular server?You may use separate deployment recipes for each. However, the rake tasks assume a default config/deploy recipe so you must use the switchtower command directly or alter deploy.rb. $ mkdir config/deploy; cd config/deploy $ ln -s ../deploy.rb production.rb $ cp production.rb staging.rb $ vi staging.rb $ switchtower -r config/deploy/staging -a deploy Or you may edit your deploy.rb to be require "#{File.dirname(__FILE__)}/deploy/#{ENV[''RECIPE''] || ''production''}" and invoke rake as rake remote:deploy [RECIPE=production] rake remote:deploy RECIPE=staging Best, jeremy -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (Darwin) iD8DBQFEBetLAQHALep9HFYRAuetAJ48uOkb/i2Tl13x85FbhHemeHAReQCgoJbZ ZbkWezUDJYOZCsPs+NciVjQ=ekiI -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mar 1, 2006, at 10:43 AM, Jeremy Kemper wrote:> On Mar 1, 2006, at 10:07 AM, Piotr Usewicz wrote: >> I have a problem here. I am developing an application which has a >> local development environment (on my harddisk), a second one for >> my customer (for testing new features) and a production >> environment which runs actual application online. >> >> How can I setup SwitchTower to have a possibility to deploy just >> for a particular server? > > [...] > Or you may edit your deploy.rb to be > require "#{File.dirname(__FILE__)}/deploy/#{ENV[''RECIPE''] || > ''production''}"Sorry, this should be load_paths << "#{File.dirname(__FILE__)}/deploy" load(ENV[''RECIPE''] || ''production'') since the contents of deploy.rb are evaluated in the context of a switchtower configuration object.> and invoke rake as > rake remote:deploy [RECIPE=production] > rake remote:deploy RECIPE=stagingBest, jeremy -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (Darwin) iD8DBQFEBfPKAQHALep9HFYRAqSaAJ4lv4I8PDgOHhwV0B4ZpIxyNl1CbQCgmXP0 FFV68BDtltnuG5U/z64uVVo=5rpZ -----END PGP SIGNATURE-----
On Mar 1, 2006, at 11:07 AM, Piotr Usewicz wrote:> Hi > > I have a problem here. I am developing an application which has a > local development environment (on my harddisk), a second one for my > customer (for testing new features) and a production environment > which runs actual application online. > > How can I setup SwitchTower to have a possibility to deploy just > for a particular server?In addition to Jeremy''s suggestion, you might want to look at: http://jamis.jamisbuck.org/articles/2006/01/03/using-switchtower- with-multiple-deployment-stages Hope that helps, - Jamis