-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deploy to multiple boxes simultaneously #8
Comments
I would also be interested in the answer to this. |
Yes, I'd want to see this before 1.0 myself. Discussions: https://trello.com/c/cukv1ztZ |
set :domains, ['test.deeptest.in,'test1.deeptest.in'] This works for me. Any better strategies anybody else is using? |
I used a solution similar to @sarguru but I needed to add the set :domains, %w[host1 host2 host3]
desc "Deploy to all servers"
task :deploy_all do
isolate do
domains.each do |domain|
set :domain, domain
invoke :deploy
run!
end
end
end While this approach does deploy to multiple hosts, it does so one at a time, which can be an issue for longer deploys. It would be nice to see a natively supported parallel deployment approach at some point. |
chances that parallel deployment is becoming reality ... ? |
+1 to this issue. This is the only thing that's keeping me from switching entirely from Capistrano. @phlipper's trick works, but I think it's a bit dangerous to deploy in sequence -- e.g. what happens when the last server you're deploying to fails? -- so I'm still waiting for a parallel implementation. Keep up the good work @rstacruz! |
I agree - this is an excellent question, and a good approach has been proposed... Ideally a segmentation between "build" and "release/symlinking to current"; that is... build on all servers in parallel and wait for confirmation (no errors)... if confirmed, then "release and restart" I know this is a bit complicated with the "1 shell script to rule them all" strategy, but I think it's an excellent feature/approach and something worth considering. |
I'm not sure if this issue is close enough to supporting multistage to warrant a new issue. Just adding my voice to say multistage deploy would be great. |
+1! |
I took this feature for granted while migrating away from Capistrano. +1 |
the above solution din't work for me... My solution is encapsulating mina command with grunt; and use multiple server deployment loop with grunt.js module.exports = function(grunt) {
}; |
Actually it's not that hard. I setup the app directory as an NFS share. And basically all host has a reference to that directory. Once the changes are pushed all the host receive changes via NFS and I have a small socket server client setup that sends a message from the main server to all host to restart the server. Mina only interfaces with 1 primary host and the primary host handles the rest. |
+1 |
|
+1 |
1 similar comment
+1 |
What about https://github.com/grosser/parallel gem ? |
Still waiting on this... |
any solutions? |
+1 |
4 similar comments
+1 |
👍 |
+1 |
+1 |
Any solutions @gabskoro? |
+1 |
1 similar comment
+1 |
@bbnnt, you are missing the key issue -- parallel vs serial. The workaround is for multiple hosts in serial, but it's slow on large infrastructures. Ideally, there's a way to release to all nodes at the same time. |
@ronwsmith thanks for pointing this out |
Thanks @phlipper - you saved my life. +1 for true parallel deployments! |
Almost three years and not a step forward, let alone a decent response? |
capistrano 3 is actually really good i've switched to using it. On Tue, Mar 17, 2015 at 9:27 AM, iMoses notifications@github.com wrote:
|
Based on the first scenario described by @cheba, it could be as simple as: cat list_of_servers.txt | parallel mina deploy to={} Are there any drawbacks on running multiple mina processes? |
@josericardo It's sort of working but not quite. Specifically, you may not want to perform complete deploy on each box. You want to run migrations only once (say, if you have many app servers and one db server). You may want to upload your assets to CDN only once. There are legitimate reasons for having native support for multiple destinations. |
Just as I was digging into Mina for our new deployment setup, I run into this and get stopped dead in my tracks. Deploying to multiple application servers isn't just a matter of "run the task on all boxes". There's also coordination, eg. if the deploy on one box fails, recognize that and roll back the deployment on all of them, lest you end up with different versions running at the same time. Particularly if you're doing something like building and pushing assets to a remote CDN, this kind of coordination is crucial. Hence just looping through a domain list and firing off the deploy task on each of them is no solution. Very disappointing, complete deal-breaker. |
Hey @brendonrapp yes, I agree. I love the concept of Mina, but the bottom line is that Capistrano is a vastly more mature product. It represents many years of real-world experience deploying complex production environments. The Mina project is thousands of developer hours short of it. |
We need help on this. As we do not use multiple servers in our company there really is not a high prioriy. |
I just want to share how to use multiple deploying server or environment with mina. Mina have a 3rd party to deploy in multiple stages. You can use mina-multistages this the url https://github.com/endoze/mina-multistage. It's really powerful to manage your deploy env. |
I read about using Mina in conjunction with Ansible for multi host deployments. +1 to see this added natively to mina |
|
+1 |
any solution for parallel deployment using mina ?? |
Still waiting for native sollution. |
Mina doesn't do multiple boxes and probably never, because it is meant to be used as one quick script on one remote host. |
I created a very simple gem called mina-multi_server that adds support for multiple servers. It runs tasks sequentially, but probably it is not an issue if you don't have a lot of servers. All comments are appreciated. |
This is a blocker to anyone using e.g. sidekiq server in another dedicated box. |
mina 2.x
|
+1 |
We built mina-multideploy - useful tool for parallel deploying on multiple servers. |
Something like this could work for handling roles. Again, not parallel (yet). task :staging do
set :domains, 'staging-1.app.com' => [:db], 'staging-2.app.com' => []
end
task :deploy do
invoke :'git:ensure_pushed'
fetch(:domains).each do |domain, roles|
set :domain, domain
deploy do
invoke :'git:clone'
invoke :'deploy:link_shared_paths'
invoke :'bundle:install'
invoke :'rails:db_migrate' if roles.include?(:db)
invoke :'rails:assets_precompile'
invoke :'deploy:cleanup'
on :launch do
in_path(fetch(:current_path)) do
command %(mkdir -p tmp/)
command %(touch tmp/restart.txt)
command %(direnv allow)
end
end
end
end
end |
If I'm not mistaken it's possible to deploy only to single box. I.e. if I have a bunch of identical boxes I have to deploy to each of them explicitly specifying to which box I deploy. Something like this:
Is parallel deployment planned anytime soon?
The text was updated successfully, but these errors were encountered: