Deploying with Capistrano via a gateway - some notes
May 15, 2008
Some notes on setting up a gateway server for deploying via Capistrano that I couldn’t find at the source.
- You can specify the user you want to use to login to your gateway server like so:
set :gateway, 'deploy@deploy.example.com'. This logs in to your gateway server as the “deploy” user. - You can specify an alternate SSH port for both your gateway and your deployment servers. E.g. setting
ssh_options[:port] = 11111will make Capistrano SSH to your gateway server with on port 11111. For your actual application (and web and database) servers, you can specify the SSH port like so:set :gateway, 'deploy@deploy.example.com' role :app, '192.168.1.113:22222' role :web, '192.168.1.113:22222' role :db, '192.168.1.113:22222', :primary => true - If you’re using public key authentication, you should put the public keys of your users (those who be deploying your app) on the gateway server and on the actual servers. I thought Capistrano would use the key of the “deploy” user but nope.





[…] Deploying with Capistrano via a gateway - Chu Yeow sorts a few things out. I have one project where this would be useful, except that they are stuck on an older Capistrano due to inertia. […]
Posted by: A Fresh Cup » Blog Archive » Double Shot #208 on May 15, 2008 7pm