Coder Social home page Coder Social logo

Comments (8)

teaforthecat avatar teaforthecat commented on September 7, 2024

if you say --fork 1 on the command line that will do it right?

from deploy.

ricardclau avatar ricardclau commented on September 7, 2024

@teaforthecat --forks 1 will make Ansible connect to 1 host at a time, but the goal for this issue is preventing 2 people deploying at the same time.

Imagine for instance a distributed team deploying to 100 nodes in groups of 10... this is a relatively long process and we should prevent a second deployment until the first one has finished in all the nodes

from deploy.

teaforthecat avatar teaforthecat commented on September 7, 2024

ah I see sorry. ok well how about this - wait_for: path=lock state=absent but since we have an atomic change with the current symlink is this really valuable? I guess if the inventory did not have a consistent order, some hosts could end up with a different release. This seems strange though. I'm thinking the responsibility should be at a higher level. I'm thinking the lock should live in Jenkins or Rundeck or... (do you have any other suggestions for an execution manager?)

from deploy.

ricardclau avatar ricardclau commented on September 7, 2024

I have thought a bit about this and I think there is no easy way to achieve it.

If all the deployments are originated from the same box (a Jenkins machine or something similar) the lock file strategy would possibly work but if a team is allowing any developer to deploy from any location the only way to do a common distributed lock is to have something like Zookeeper or Redis doing that function.

And I honestly think this is beyond the scope of a deployment tool and it really depends on every organisation policies.

We can add the lock file as a best effort but I am not sure it is worth it. Thoughts? @teaforthecat @carlosbuenosvinos @theUniC @ajgarlag

from deploy.

teaforthecat avatar teaforthecat commented on September 7, 2024

I agree. If this is a problem, you probably have enough resources to spin up a deployer node. (I'd recommend Rundeck so far)

from deploy.

ajgarlag avatar ajgarlag commented on September 7, 2024

I agree too. For me, this feature is beyond the scope of the tool.

from deploy.

cbrunnkvist avatar cbrunnkvist commented on September 7, 2024

Totally agree with @ricardclau, it is a deployment process / organizational problem, not something that can be solved by a lockfile.

While it could save someone's donkey during a simple single-node deployment, I am quite sure that such a feature would cause much more inconvenience (in the form of stale/leftover locks) for others than what is gained.

You'll get into all sorts of other parallelism problems (DB migrations, LB configs) that are way out of scope for this "deploy" role, that are better solved at the playbook level.

from deploy.

ricardclau avatar ricardclau commented on September 7, 2024

Closing the issue according to the discussion

from deploy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.