capistrano-multi-server-deployment-with-different-parameters

196 views
Skip to first unread message

Sombuddha Poddar

unread,
Feb 20, 2015, 7:25:59 PM2/20/15
to capis...@googlegroups.com
Versions:
  • Ruby: ruby-2.1.5
  • Capistrano: 3.0
  • Rake / Rails / etc (Ruby without Rails)
Platform:
  • Working on....
  • Deploying to...
Logs:
  • Please past logs (as completely as possible to a 3rd party pasting service such as pastie.org)
Files:
  • Capfile
  • deploy.rb
  • Stage files (production.rb, staging.rb)
Question:

I would like to deploy a ruby script, bin/app.rb to multiple servers

zone1.myapp.comzone2.myapp.com & zone3.myapp.com using Capistrano v3. Post deployment, it will need to run as a daemon with a param specific to that zone, meaning ...

zone1 should run bundle exec ruby bin/app.rb zone1

zone2 should run bundle exec ruby bin/app.rb zone2

zone3 should run bundle exec ruby bin/app.rb zone3

Is there a way to accomplish this by Capistrano?

[a duplicate from, http://stackoverflow.com/questions/28445139/capistrano-multi-server-deployment-with-different-parameters]


Lee Hambley

unread,
Feb 21, 2015, 6:15:39 AM2/21/15
to Capistrano

Capistrano is backed by SSHKit where we maintain a long list of example usages:

When you define a host, you can attach arbitrary properties (the roles we assign are a special purpose property just names roles)

If you are only deploying a simple ruby script, and you don’t need all the scm/rollback/etc support, you might better just use SSHKIt with Rake after using SSHKit to upload a file from disk

SSHKit and Capistrano are sisters, and we support both here, as one is a superset (adding rollbacks, workflow, and a plugin ecosystem) on top of the other.

HTH.

--
You received this message because you are subscribed to the Google Groups "Capistrano" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capistrano+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/f7804727-0896-4101-9467-91d7af0f34af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages