What is the equivalent of deploy:setup under Capistrano 3?

430 views
Skip to first unread message

Stuart Watson

unread,
Jul 6, 2015, 10:22:17 AM7/6/15
to capis...@googlegroups.com
Versions:
  • Ruby  2.0.0-p451
  • Capistrano  3.4.0
  • Rake / Rails / etc rake 10.3.2
Platform:
  • Working on.... Ubuntu
  • Deploying to... Ubuntu

Hi

What is the equivalent of deploy:setup for Capistrano 3. We used to use this under Capistrano 2 for setting up the database.yml file and the nginx virtualhost. 

I've had a look  at this problem on various forums  and the recommendation appears to be that the something such as Ansible does the config, or ssh to the server and manually   create the file.

What are peoples experiences of this?  I'd rather keep the app specific settings under Capistrano and use Ansible to do the non-app specific stuff such as installing software. I understand that I can change it from deploy:setup to deploy, but I only want these to run on the initial deploy and not on subsequent ones.

I look forward to hearing from people.

Thanks


Lee Hambley

unread,
Jul 6, 2015, 10:24:55 AM7/6/15
to Capistrano
There is no deploy:setup because originally the first deploy of a rails app was unique in setting up spinners, installing gems and starting mongrel daemons, etc - with the advent of bundler and passenger mod_rails, and friends this has largely gone away.

You can see the flow capistranorb.com/documentation/getting-started/flow here which capistrano expects, and enforces, since deploy:setup was never called automatically, and only ever by hand, you can simply write a task deploy:setup yourself, and call it whenever you like. There was never any secret sauce behind deploy:setup, it is just so seldom needed now that we don't include it by default. 

The deployment/hosting world is now so fragmented with chef, puppet, ansible, salt, docker, coreos, rocket, xen, lxd, lxc, where would one even know where to start?

--
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/ff439153-4e5a-42ca-8e99-623f2f2602ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stuart Watson

unread,
Jul 7, 2015, 6:23:33 AM7/7/15
to capis...@googlegroups.com
Thanks...so far i've got this http://pastebin.com/fD1C3F1c

Which i've put in my lib/capistrano/tasks folder and gets executed.

This works apart from the deploy_to and application settings are defined in by deploy.rb file. How do I go about fetching these from another file?

Thanks

Stuart

Stuart Watson

unread,
Jul 7, 2015, 7:42:34 AM7/7/15
to capis...@googlegroups.com
Actually...this is now working....thanks....


On Monday, July 6, 2015 at 3:22:17 PM UTC+1, Stuart Watson wrote:

Lee Hambley

unread,
Jul 7, 2015, 8:08:44 AM7/7/15
to Capistrano
Great Stuart,

I was going to say, we expect fetch() and set() to work in that situation, I'm glad you got it all working. 

Ping us if there's anything we can do for you in the future, thanks for being patient and battling through some of the rough parts.

--
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.
Reply all
Reply to author
Forward
0 new messages