Re: [capistrano] What's the best way to deploy to versioned directories rather than current and release/datestamp?
Hey Chris, I use capistrano for staging and production and point the appropriate git branch for each (ie master for production and staging for staging) You'll need this gem https://github.com/jamis/capistrano-ext Then you can put something like: require 'capistrano/ext/multistage' set :stages, %w(staging production) set :default_stage, 'staging' in your main deploy script and then create files under deploy/ for each stage, ie deploy/production.rb and deploy/staging.rb and in each you can instruct capistrano on which repository to use: set :branch, staging or set :branch, production Hope this helps, Greg *Greg Pederson* Founder and Technical Director 407.385.0098 office 888.308.9695 toll free www.NsightDevelopment.com http://www.nsightdevelopment.com Contact Me http://www.linkedin.com/in/gregpederson LinkedInhttp://www.linkedin.com/in/gregpederson http://www.facebook.com/gregpederson Facebookhttp://www.facebook.com/gregpederson http://twitter.com/gregpederson Twitter http://twitter.com/gregpederson Signature powered by http://www.wisestamp.com/email-install?utm_source=extensionutm_medium=emailutm_campaign=footer WiseStamphttp://www.wisestamp.com/email-install?utm_source=extensionutm_medium=emailutm_campaign=footer On Mon, Mar 7, 2011 at 3:43 PM, Chris Patti cpa...@gmail.com wrote: Folks; We're trying to use Capistrano to deploy services, so we need to deploy versioned directories rather than just current. What's the best way for me to handle this? I'm thinking maybe overriding deploy:symlink, but I realize that wouldn't handle the releases/datestamp issue for when the next release happens. So, we'd want: docroot/version-1.1 version-1.2 version-1.3 etc. Has anyone done this? is it achievable just by setting variables like current_release, etc? Or do I need to override deploy tasks? Thanks, -Chris -- Christopher Patti - Geek At Large | GTalk: cpa...@gmail.com | AIM: chrisfeohpatti | P: (260) 54PATTI Technology challenges art, art inspires technology. - John Lasseter, Pixar -- * You received this message because you are subscribed to the Google Groups Capistrano group. * To post to this group, send email to capistrano@googlegroups.com * To unsubscribe from this group, send email to capistrano+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano?hl=en -- * You received this message because you are subscribed to the Google Groups Capistrano group. * To post to this group, send email to capistrano@googlegroups.com * To unsubscribe from this group, send email to capistrano+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano?hl=en
Re: [capistrano] What's the best way to deploy to versioned directories rather than current and release/datestamp?
On Mon, Mar 7, 2011 at 3:56 PM, Greg Pederson greg.peder...@gmail.comwrote: Hey Chris, I use capistrano for staging and production and point the appropriate git branch for each (ie master for production and staging for staging) You'll need this gem https://github.com/jamis/capistrano-ext Then you can put something like: require 'capistrano/ext/multistage' set :stages, %w(staging production) set :default_stage, 'staging' in your main deploy script and then create files under deploy/ for each stage, ie deploy/production.rb and deploy/staging.rb and in each you can instruct capistrano on which repository to use: set :branch, staging or set :branch, production Hope this helps, Greg *Greg Pederson* Founder and Technical Director 407.385.0098 office 888.308.9695 toll free www.NsightDevelopment.comhttp://www.nsightdevelopment.com Contact Me http://www.linkedin.com/in/gregpederson LinkedInhttp://www.linkedin.com/in/gregpederson http://www.facebook.com/gregpederson Facebookhttp://www.facebook.com/gregpederson http://twitter.com/gregpederson Twitterhttp://twitter.com/gregpederson Signature powered by http://www.wisestamp.com/email-install?utm_source=extensionutm_medium=emailutm_campaign=footer WiseStamphttp://www.wisestamp.com/email-install?utm_source=extensionutm_medium=emailutm_campaign=footer On Mon, Mar 7, 2011 at 3:43 PM, Chris Patti cpa...@gmail.com wrote: Folks; We're trying to use Capistrano to deploy services, so we need to deploy versioned directories rather than just current. What's the best way for me to handle this? I'm thinking maybe overriding deploy:symlink, but I realize that wouldn't handle the releases/datestamp issue for when the next release happens. So, we'd want: docroot/version-1.1 version-1.2 version-1.3 etc. Has anyone done this? is it achievable just by setting variables like current_release, etc? Or do I need to override deploy tasks? Thanks, -Chris Hi Greg, thanks for the response. I guess I don't understand how the Multistage plugin will help me achieve what I'm looking for here. The goal isn't separate staging/test/development environments, but to have the filesystem on the server actually contain versioned directories for each version we're deploying. Sorry if I'm missing something (quite possible) Thanks, -Chris -- Christopher Patti - Geek At Large | GTalk: cpa...@gmail.com | AIM: chrisfeohpatti | P: (260) 54PATTI Technology challenges art, art inspires technology. - John Lasseter, Pixar -- * You received this message because you are subscribed to the Google Groups Capistrano group. * To post to this group, send email to capistrano@googlegroups.com * To unsubscribe from this group, send email to capistrano+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano?hl=en
Re: [capistrano] What's the best way to deploy to versioned directories rather than current and release/datestamp?
Explicitly set set :version_dir, '.' set :release_name, version-1.1 And no-op deploy:symlink if you don't need it. Should work with minimal damage to the strategy. Totally untested though See this for more ideas: https://github.com/donnoman/capistrano/blob/master/lib/capistrano/recipes/deploy.rb On Mar 7, 2011, at 1:02 PM, Chris Patti cpa...@gmail.com wrote: On Mon, Mar 7, 2011 at 3:56 PM, Greg Pederson greg.peder...@gmail.com wrote: Hey Chris, I use capistrano for staging and production and point the appropriate git branch for each (ie master for production and staging for staging) You'll need this gem https://github.com/jamis/capistrano-ext Then you can put something like: require 'capistrano/ext/multistage' set :stages, %w(staging production) set :default_stage, 'staging' in your main deploy script and then create files under deploy/ for each stage, ie deploy/production.rb and deploy/staging.rb and in each you can instruct capistrano on which repository to use: set :branch, staging or set :branch, production Hope this helps, Greg Greg Pederson Founder and Technical Director 407.385.0098 office 888.308.9695 toll free www.NsightDevelopment.com Contact Me LinkedIn Facebook Twitter Signature powered by WiseStamp On Mon, Mar 7, 2011 at 3:43 PM, Chris Patti cpa...@gmail.com wrote: Folks; We're trying to use Capistrano to deploy services, so we need to deploy versioned directories rather than just current. What's the best way for me to handle this? I'm thinking maybe overriding deploy:symlink, but I realize that wouldn't handle the releases/datestamp issue for when the next release happens. So, we'd want: docroot/version-1.1 version-1.2 version-1.3 etc. Has anyone done this? is it achievable just by setting variables like current_release, etc? Or do I need to override deploy tasks? Thanks, -Chris Hi Greg, thanks for the response. I guess I don't understand how the Multistage plugin will help me achieve what I'm looking for here. The goal isn't separate staging/test/development environments, but to have the filesystem on the server actually contain versioned directories for each version we're deploying. Sorry if I'm missing something (quite possible) Thanks, -Chris -- Christopher Patti - Geek At Large | GTalk: cpa...@gmail.com | AIM: chrisfeohpatti | P: (260) 54PATTI Technology challenges art, art inspires technology. - John Lasseter, Pixar -- * You received this message because you are subscribed to the Google Groups Capistrano group. * To post to this group, send email to capistrano@googlegroups.com * To unsubscribe from this group, send email to capistrano+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano?hl=en -- * You received this message because you are subscribed to the Google Groups Capistrano group. * To post to this group, send email to capistrano@googlegroups.com * To unsubscribe from this group, send email to capistrano+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano?hl=en
Re: [capistrano] What's the best way to deploy to versioned directories rather than current and release/datestamp?
Well you could have stages version1.1, version1.2, version1.3 and so on and then set :branch, version 1.x as appropriate in each version1.x.rb file (assuming each different version corresponds to a tag or branch in git) and set :deploy_dir to be different for each but otherwise share the same settings for the different stages so you'd end up with a directory structure on your server something like: version1.1/ - current symlink - releases/ - TIMESTAMP1/ - TIMESTAMP2/ - TIMESTAMP3/ version1.2/ - current symlink - releases/ - TIMESTAMP1/ - TIMESTAMP2/ - TIMESTAMP3/ version1.3/ - current symlink - releases/ - TIMESTAMP1/ - TIMESTAMP2/ - TIMESTAMP3/ and so on. Henry On 7 Mar 2011, at 21:02, Chris Patti wrote: On Mon, Mar 7, 2011 at 3:56 PM, Greg Pederson greg.peder...@gmail.com wrote: Hey Chris, I use capistrano for staging and production and point the appropriate git branch for each (ie master for production and staging for staging) You'll need this gem https://github.com/jamis/capistrano-ext Then you can put something like: require 'capistrano/ext/multistage' set :stages, %w(staging production) set :default_stage, 'staging' in your main deploy script and then create files under deploy/ for each stage, ie deploy/production.rb and deploy/staging.rb and in each you can instruct capistrano on which repository to use: set :branch, staging or set :branch, production Hope this helps, Greg Greg Pederson Founder and Technical Director 407.385.0098 office 888.308.9695 toll free www.NsightDevelopment.com Contact Me LinkedIn Facebook Twitter Signature powered by WiseStamp On Mon, Mar 7, 2011 at 3:43 PM, Chris Patti cpa...@gmail.com wrote: Folks; We're trying to use Capistrano to deploy services, so we need to deploy versioned directories rather than just current. What's the best way for me to handle this? I'm thinking maybe overriding deploy:symlink, but I realize that wouldn't handle the releases/datestamp issue for when the next release happens. So, we'd want: docroot/version-1.1 version-1.2 version-1.3 etc. Has anyone done this? is it achievable just by setting variables like current_release, etc? Or do I need to override deploy tasks? Thanks, -Chris Hi Greg, thanks for the response. I guess I don't understand how the Multistage plugin will help me achieve what I'm looking for here. The goal isn't separate staging/test/development environments, but to have the filesystem on the server actually contain versioned directories for each version we're deploying. Sorry if I'm missing something (quite possible) Thanks, -Chris -- Christopher Patti - Geek At Large | GTalk: cpa...@gmail.com | AIM: chrisfeohpatti | P: (260) 54PATTI Technology challenges art, art inspires technology. - John Lasseter, Pixar -- * You received this message because you are subscribed to the Google Groups Capistrano group. * To post to this group, send email to capistrano@googlegroups.com * To unsubscribe from this group, send email to capistrano+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano?hl=en -- * You received this message because you are subscribed to the Google Groups Capistrano group. * To post to this group, send email to capistrano@googlegroups.com * To unsubscribe from this group, send email to capistrano+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano?hl=en