Puppet VS Ansible + what is the best auto remote task tool [closed]
there are many remote tools for automation tasks as puppet or ansible
my target is to perform many remote tasks on Linux machine as:
run block of Linux command ,
copy files from master machine to remote Linux machines
run script on remote Linux machine
and so on
Automation and remote-commanding are rather different use-cases. The thing to consider when selecting tools like this are how rapidly you need your entire population of machines to reach the same state, and how rapidly you plan to change the command-set.
Puppet and Chef (and likely the other Configuration Management) systems are:
- Loosely Convergent. It can take a half-hour before everything sees updates. Sometimes that's OK. Sometimes that very much isn't.
- Don't deal well with ad-hoc commands. If you need to run a git-pull in a given directory right now, doing so takes a fair amount of effort.
- Robust methods for programatically determining machine-types. This eases the 'what needs what' problem.
- Largely agent-based. Nodes poll the central system for updates, rather than the central system dispatching updates on a schedule. This is a large part of the 'loose consistency' thing.
Ansible and other non-agented systems:
-
Allow ad-hoc commands as a main feature. Need to run
apt-get update openssl
on everything? Easy! - Allow tighter convergence. You can do both do it within 30 minutes and also do it right bloody now on everything.
- Generally need inventory-management processes. Where something like puppet can be made to do things like deploy nginx on machines with RAMSIZE >= 2048GB and it will work for any such system, Ansible and suchlike need to be told that this system needs nginx. This complicates the what-needs-what problem.
I'm not going to go into scalability, since all of these can handle 1000's of nodes pretty easily. Things get different when you get into the 10,000's of nodes.
I know deployed systems that use a Puppet/Chef like system in addition to Ansible. The Puppet/Chef is used for maintaining a baseline config on the system, and the ansible system is used for remote commanding and for tasks that require much tighter consistency (such as for app-code deploys). Sometimes best is both.