Comments (8)
if you say --fork 1
on the command line that will do it right?
from deploy.
@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.
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.
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.
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.
I agree too. For me, this feature is beyond the scope of the tool.
from deploy.
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.
Closing the issue according to the discussion
from deploy.
Related Issues (20)
- deploy fail on "Ensure GIT deployment key is up to date (local key file)" HOT 10
- File '...REVISION' created with default permissions '600' warning HOT 2
- Prevent `{{ ansistrano_deploy_to }}/shared` directory. HOT 1
- 'dict object' has no attribute 'stdout' when running in --check mode HOT 2
- [SPONSOR] Logo HOT 2
- Disable anonymous stats by default HOT 4
- Defining explicit targets for shared folders HOT 4
- Deploy a docker application HOT 1
- Deprecated Ansible file module property HOT 15
- Task freezes at "Update remote repository
- Task freezes at "Update remote repository" HOT 1
- Allow to ignore files with rsync strategy HOT 4
- Tag 3.11.0 does not appear on Ansible Galaxy HOT 1
- Deploy method: unarchive | Unable to pass extra_opts HOT 1
- Allow setting custom dest of get_url when using download deployment strategy HOT 4
- Strange tasks in `deploy/tasks/symlink-shared.yml` HOT 1
- The task includes an option with an undefined variable. HOT 1
- deploy fails with ansistrano_git_repo_tree that matches more than 1 directory
- Question/Bug: Git - Permission denied (publickey) - Update remote repository using SSH key HOT 2
- ansistrano.deploy was NOT installed successfully: missing required 'current_version' from server response (https://galaxy.ansible.com/api/) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deploy.