Sorry, there's really no good way to do that, you might better just use SSHKit <https://github.com/capistrano/sshkit/>.
In an ideal word, you'd have an "integration" repository, where you push all the "ready to deploy" assets, so your deploy would in effect be two step, one step to move everything to the intermediate server, and commit and push assets to the "release" repository. The 2nd would be a Capistrano deploy from that server, from the repo to your other machines. It's a bit of work to get that right, but it should be possible. Lee Hambley -- http://lee.hambley.name/ +49 (0) 170 298 5667 On 28 December 2013 15:39, 陈若涵 <[email protected]> wrote: > Versions: > > - Ruby - 2.0.0 > - Capistrano - at branch master (almost v3.1.0) > - Rake / Rails / etc - rails 4.0.1 > > Platform: > > - Working on.... linux > - Deploying to... linux > > Files: > > - https://gist.github.com/crhan/8159771 > > > Here is my situation: I have a bunch of servers(approximately 60) to > deploy a rails app. And those servers may not have external internet > access. So I have to install gem dependencies locally. Luckily, `bundle > package` helped me a lot. But I still don't want to put those gem package > file(in `vendor/cache`) into my commit log(too messy). > > ## The First Thought: upload cache from local to remote > > Here is my try, see the gist 8159771<https://gist.github.com/crhan/8159771>. > I have a gateway server (have fully internet access) to deploy app to > remote servers. First, I make a > check<https://gist.github.com/crhan/8159771#file-deploy-rb-L7>for local > vendor/cache (cache packages on the gateway server). And then use > SSHKit#upload! to upload cache > dir<https://gist.github.com/crhan/8159771#file-deploy-rb-L17-L19>recursively > to remote server. > > That works great when deploy to single server. But the upload progress > become a nightmare when you want to deploy to more and more servers, > especially those servers are in different Data-Centers. > > ## The Second Thought: make a git submodule in vendor/cache > > I'm not sure git submodule is supported in Capistrano v3. Further more, my > app server may not have access to the git source code server (my gateway > server also reverse proxy to git server, and set production :repo_url to > gateway server). > > The biggest problem here is that I cannot specify different submodule git > url in production mode, `git submodule update` may fail due to some kinds > of internet error. > > ## The Last Thought: local tar -> scp -> untar > > This may be the best way I can imagine, but has not implemented yet. > > > Looking for some suggestion, thank you > > -- > 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 [email protected]. > To view this discussion on the web, visit > https://groups.google.com/d/msgid/capistrano/9d07eb95-5740-42bf-9e3a-f6ea3ca6b4cb%40googlegroups.com > . > For more options, visit https://groups.google.com/groups/opt_out. > -- 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 [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/capistrano/CAN_%2BVLVHPCMJQwjBcqusWmw23D7u5dQiH%2BvchMbK4UbzazE3pw%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
